123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <template>
- <view class="content">
- <view class="list" v-for="(item,index) in form.data">
- <view class="title" :style="{'--bgimg':`url(${$imgUrl}etcbg.png)`}">
- <view class="title_left">
- <image :src="`${$imgUrl}etc.png`" mode=""></image>
- <text class="question">{{item.buyerName}}</text>
- <view v-if="item.isDefault==1" class="default">默认</view>
- </view>
- <image @click="toEdit(item)" :src="`${$imgUrl}applyCard/edit.png`" mode=""></image>
- </view>
- <view class="bot">
- <view class="details">
- <view><text>税号:</text>
- <view>{{item.buyerTaxNo}}</view>
- </view>
- <view v-if="item.companyTel"><text>电话:</text>
- <view>{{item.companyTel}}</view>
- </view>
- <view v-if="item.bankName"><text>银行:</text>
- <view>{{item.bankName}}</view>
- </view>
- </view>
- </view>
-
- </view>
- <!-- <view style="text-align: center;margin: 20rpx;font-size: 30rpx;" v-if="state.flags">我是有底线的~</view> -->
- <view class="no" v-if="form.data.length==0">暂无发票抬头</view>
- </view>
- <view class="action">
- <button type="default" class="ui-btn" @click="add()">
- 添加新抬头
- </button>
- </view>
- </template>
-
- <script lang="ts" setup>
- import {
- reactive, ref
- } from "vue";
- import {
- onLoad, onShow
- } from "@dcloudio/uni-app";
- import {
- navTo,
- } from "@/utils/utils";
- import { billRaiseSelect, getUserMsg } from "@/utils/network/api.js";
- import { requestNew } from "@/utils/network/request.js";
- import {
- getItem
- } from "@/utils/storage";
- // 表单数据
- const form = reactive({
- userMobile: "",
- data: [],
- manage: 1,//1订单管理过来的 2申请选择抬头过来的
- });
- const value = ref('-1')
- onLoad((option) => {
- form.manage = option.manage
- queryList()
- })
- onShow(() => {
- queryList()
- })
- const choose = (i, item) => {
- value.value = i
- console.log(item);
- uni.$emit('list', {
- item: item
- })
- uni.navigateBack({
- delta: 1
- })
- }
- const add = () => {
- navTo(`/subpackage/orders/invoiceApply/invoice-header-add?userMobile=${form.userMobile}`);
- }
- const queryList = () => {
- const options = {
- type: 2,
- data: {
- customerId: getItem('customerObj')['customerId']
- },
- method: "POST",
- showLoading: true,
- };
- console.log("options", options)
- requestNew(billRaiseSelect, options).then((res) => {
- console.log("data", res)
- form.data = res.result
-
- });
- }
- const toEdit = (item) => {
- const params = encodeURIComponent(JSON.stringify(item))
- navTo(`/subpackage/orders/invoiceApply/invoice-header-edit?params=${params}&&userMobile=${form.userMobile}`)
- }
- </script>
-
- <style scoped lang="scss">
-
- .no {
- text-align: center;
- padding-top: 300rpx;
- }
- .content {
- padding-top: 30rpx;
- box-sizing: border-box;
- padding-bottom: 200rpx;
- }
-
- .list {
- background: #FFFFFF;
- border-radius: 12rpx;
- border: 1px solid #FFFFFF;
- width: 90%;
- margin: 0 auto;
- font-weight: 400;
- margin-bottom: 30rpx;
-
- .title {
- padding: 0 20rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 80rpx;
- background-image: var(--bgimg);
- background-size: 100% 100%;
- background-repeat: no-repeat;
-
- .title_left {
- display: flex;
- align-items: center;
- }
-
- image {
- width: 40rpx;
- height: 40rpx;
- }
-
- .question {
- font-size: 30rpx;
- color: #01243A;
- margin-left: 10rpx;
- }
-
- // 待处理
- .statusdcl {
- font-size: 24rpx;
- color: #b3b3b3;
- }
- }
-
- .bot {
- padding: 10rpx 20rpx 20rpx 20rpx;
-
- .details {
- font-size: 26rpx;
- padding: 10rpx 0 5rpx 0;
-
- view {
- display: flex;
- margin-bottom: 5rpx;
-
- text {
- color: #999999;
- width: 13%;
- }
-
- view {
- color: #002025;
- width: 79%;
- }
- }
- }
-
- .time {
- font-size: 24rpx;
- color: #999999;
- padding: 20rpx 0;
- border-top: 1rpx solid #DCDCDC;
- }
- }
- }
-
- .action {
- position: fixed;
- left: 0;
- bottom: 0;
- height: 188rpx;
- background-color: #fff;
- border-radius: 30rpx 30rpx 0 0;
- width: 100vw;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- margin-top: 20rpx;
- }
- .default{
- border: 1rpx solid #01243A;
- font-size: 28rpx;
- border-radius: 10rpx;
- padding: 2rpx 6rpx;
- margin-left: 10rpx;
- }
- </style>
|