Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

invoice-header-list.vue 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="content">
  3. <view class="list" v-for="(item,index) in form.data">
  4. <view class="title" :style="{'--bgimg':`url(${$imgUrl}etcbg.png)`}">
  5. <view class="title_left">
  6. <image :src="`${$imgUrl}etc.png`" mode=""></image>
  7. <text class="question">{{item.buyerName}}</text>
  8. <view v-if="item.isDefault==1" class="default">默认</view>
  9. </view>
  10. <image @click="toEdit(item)" :src="`${$imgUrl}applyCard/edit.png`" mode=""></image>
  11. </view>
  12. <view class="bot">
  13. <view class="details">
  14. <view><text>税号:</text>
  15. <view>{{item.buyerTaxNo}}</view>
  16. </view>
  17. <view v-if="item.companyTel"><text>电话:</text>
  18. <view>{{item.companyTel}}</view>
  19. </view>
  20. <view v-if="item.bankName"><text>银行:</text>
  21. <view>{{item.bankName}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <!-- <view style="text-align: center;margin: 20rpx;font-size: 30rpx;" v-if="state.flags">我是有底线的~</view> -->
  27. <NoDataView v-if="form.data.length == 0" text="暂无发票抬头" />
  28. </view>
  29. <view class="fixed-bottom-box">
  30. <button type="default" class="ui-btn" @click="add()">
  31. 添加新抬头
  32. </button>
  33. </view>
  34. </template>
  35. <script lang="ts" setup>
  36. import {
  37. reactive, ref
  38. } from "vue";
  39. import {
  40. onLoad, onShow
  41. } from "@dcloudio/uni-app";
  42. import {
  43. navTo,
  44. } from "@/utils/utils";
  45. import { billRaiseSelect, getUserMsg } from "@/utils/network/api.js";
  46. import { requestNew } from "@/utils/network/request.js";
  47. import {
  48. getItem
  49. } from "@/utils/storage";
  50. import NoDataView from "@/components/no-data-view/no-data-view.vue";
  51. // 表单数据
  52. const form = reactive({
  53. userMobile: "",
  54. data: [],
  55. manage: 1,//1订单管理过来的 2申请选择抬头过来的
  56. });
  57. const value = ref('-1')
  58. onLoad((option) => {
  59. form.manage = option.manage
  60. queryList()
  61. })
  62. onShow(() => {
  63. queryList()
  64. })
  65. const choose = (i, item) => {
  66. value.value = i
  67. console.log(item);
  68. uni.$emit('list', {
  69. item: item
  70. })
  71. uni.navigateBack({
  72. delta: 1
  73. })
  74. }
  75. const add = () => {
  76. navTo(`/subpackage/orders/invoiceApply/invoice-header-add?userMobile=${form.userMobile}`);
  77. }
  78. const queryList = () => {
  79. const options = {
  80. type: 2,
  81. data: {
  82. customerId: getItem('customerObj')['customerId']
  83. },
  84. method: "POST",
  85. showLoading: true,
  86. };
  87. console.log("options", options)
  88. requestNew(billRaiseSelect, options).then((res) => {
  89. console.log("data", res)
  90. form.data = res.result
  91. });
  92. }
  93. const toEdit = (item) => {
  94. const params = encodeURIComponent(JSON.stringify(item))
  95. navTo(`/subpackage/orders/invoiceApply/invoice-header-edit?params=${params}&&userMobile=${form.userMobile}`)
  96. }
  97. </script>
  98. <style scoped lang="scss">
  99. .no {
  100. text-align: center;
  101. padding-top: 300rpx;
  102. }
  103. .content {
  104. padding-top: 30rpx;
  105. box-sizing: border-box;
  106. padding-bottom: 200rpx;
  107. }
  108. .list {
  109. background: #FFFFFF;
  110. border-radius: 12rpx;
  111. border: 1px solid #FFFFFF;
  112. width: 90%;
  113. margin: 0 auto;
  114. font-weight: 400;
  115. margin-bottom: 30rpx;
  116. .title {
  117. padding: 0 20rpx;
  118. display: flex;
  119. justify-content: space-between;
  120. align-items: center;
  121. height: 80rpx;
  122. background-image: var(--bgimg);
  123. background-size: 100% 100%;
  124. background-repeat: no-repeat;
  125. .title_left {
  126. display: flex;
  127. align-items: center;
  128. }
  129. image {
  130. width: 40rpx;
  131. height: 40rpx;
  132. }
  133. .question {
  134. font-size: 30rpx;
  135. color: #01243A;
  136. margin-left: 10rpx;
  137. }
  138. // 待处理
  139. .statusdcl {
  140. font-size: 24rpx;
  141. color: #b3b3b3;
  142. }
  143. }
  144. .bot {
  145. padding: 10rpx 20rpx 20rpx 20rpx;
  146. .details {
  147. font-size: 26rpx;
  148. padding: 10rpx 0 5rpx 0;
  149. view {
  150. display: flex;
  151. margin-bottom: 5rpx;
  152. text {
  153. color: #999999;
  154. width: 13%;
  155. }
  156. view {
  157. color: #002025;
  158. width: 79%;
  159. }
  160. }
  161. }
  162. .time {
  163. font-size: 24rpx;
  164. color: #999999;
  165. padding: 20rpx 0;
  166. border-top: 1rpx solid #DCDCDC;
  167. }
  168. }
  169. }
  170. </style>