You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

invoice-header-list.vue 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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. <view class="no" v-if="form.data.length==0">暂无发票抬头</view>
  28. </view>
  29. <view class="action">
  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. // 表单数据
  51. const form = reactive({
  52. userMobile: "",
  53. data: [],
  54. manage: 1,//1订单管理过来的 2申请选择抬头过来的
  55. });
  56. const value = ref('-1')
  57. onLoad((option) => {
  58. form.manage = option.manage
  59. queryList()
  60. })
  61. onShow(() => {
  62. queryList()
  63. })
  64. const choose = (i, item) => {
  65. value.value = i
  66. console.log(item);
  67. uni.$emit('list', {
  68. item: item
  69. })
  70. uni.navigateBack({
  71. delta: 1
  72. })
  73. }
  74. const add = () => {
  75. navTo(`/subpackage/orders/invoiceApply/invoice-header-add?userMobile=${form.userMobile}`);
  76. }
  77. const queryList = () => {
  78. const options = {
  79. type: 2,
  80. data: {
  81. customerId: getItem('customerObj')['customerId']
  82. },
  83. method: "POST",
  84. showLoading: true,
  85. };
  86. console.log("options", options)
  87. requestNew(billRaiseSelect, options).then((res) => {
  88. console.log("data", res)
  89. form.data = res.result
  90. });
  91. }
  92. const toEdit = (item) => {
  93. const params = encodeURIComponent(JSON.stringify(item))
  94. navTo(`/subpackage/orders/invoiceApply/invoice-header-edit?params=${params}&&userMobile=${form.userMobile}`)
  95. }
  96. </script>
  97. <style scoped lang="scss">
  98. .no {
  99. text-align: center;
  100. padding-top: 300rpx;
  101. }
  102. .content {
  103. padding-top: 30rpx;
  104. box-sizing: border-box;
  105. padding-bottom: 200rpx;
  106. }
  107. .list {
  108. background: #FFFFFF;
  109. border-radius: 12rpx;
  110. border: 1px solid #FFFFFF;
  111. width: 90%;
  112. margin: 0 auto;
  113. font-weight: 400;
  114. margin-bottom: 30rpx;
  115. .title {
  116. padding: 0 20rpx;
  117. display: flex;
  118. justify-content: space-between;
  119. align-items: center;
  120. height: 80rpx;
  121. background-image: var(--bgimg);
  122. background-size: 100% 100%;
  123. background-repeat: no-repeat;
  124. .title_left {
  125. display: flex;
  126. align-items: center;
  127. }
  128. image {
  129. width: 40rpx;
  130. height: 40rpx;
  131. }
  132. .question {
  133. font-size: 30rpx;
  134. color: #01243A;
  135. margin-left: 10rpx;
  136. }
  137. // 待处理
  138. .statusdcl {
  139. font-size: 24rpx;
  140. color: #b3b3b3;
  141. }
  142. }
  143. .bot {
  144. padding: 10rpx 20rpx 20rpx 20rpx;
  145. .details {
  146. font-size: 26rpx;
  147. padding: 10rpx 0 5rpx 0;
  148. view {
  149. display: flex;
  150. margin-bottom: 5rpx;
  151. text {
  152. color: #999999;
  153. width: 13%;
  154. }
  155. view {
  156. color: #002025;
  157. width: 79%;
  158. }
  159. }
  160. }
  161. .time {
  162. font-size: 24rpx;
  163. color: #999999;
  164. padding: 20rpx 0;
  165. border-top: 1rpx solid #DCDCDC;
  166. }
  167. }
  168. }
  169. .action {
  170. position: fixed;
  171. left: 0;
  172. bottom: 0;
  173. height: 188rpx;
  174. background-color: #fff;
  175. border-radius: 30rpx 30rpx 0 0;
  176. width: 100vw;
  177. display: flex;
  178. align-items: center;
  179. justify-content: center;
  180. flex-direction: column;
  181. margin-top: 20rpx;
  182. }
  183. .default{
  184. border: 1rpx solid #01243A;
  185. font-size: 28rpx;
  186. border-radius: 10rpx;
  187. padding: 2rpx 6rpx;
  188. margin-left: 10rpx;
  189. }
  190. </style>