Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

select-car-transfer.vue 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view class="selectCar-box">
  3. <view v-if="state.list&&state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list"
  4. :key="i">
  5. <view class="iten-left">
  6. <image :src="`${$imgUrl}che.png`" mode="aspectFill"></image>
  7. <text>{{item.vehiclePlate}}</text>
  8. </view>
  9. <view class="choose-item">
  10. <view class="active" v-if="flag==i">
  11. </view>
  12. </view>
  13. </view>
  14. <view v-else>
  15. <empty title='暂无找到相关车辆信息' />
  16. </view>
  17. </view>
  18. </template>
  19. <script lang="ts" setup>
  20. import empty from "@/components/empty/empty.vue";
  21. import {
  22. reactive,
  23. ref
  24. } from "vue"
  25. import {
  26. navTo
  27. } from "@/utils/utils"
  28. import {
  29. onLoad,
  30. } from "@dcloudio/uni-app";
  31. import {
  32. orderList
  33. } from "@/utils/network/api.js";
  34. import {
  35. request
  36. } from "@/utils/network/request.js";
  37. import {
  38. getItem,
  39. StorageKeys,
  40. } from "@/utils/storage";
  41. import {
  42. stringToJson
  43. } from "@/utils/network/encryption";
  44. const state = reactive({
  45. list: [] //车辆list
  46. });
  47. const flag = ref('0') //默认选择0
  48. onLoad(() => {
  49. quanCheckActionTrue().then((item : any) => {
  50. console.log("过户", item)
  51. let data = item.data
  52. for (var k = 0; k < data.length; k++) {
  53. if (data[k]['orderStatus'] != "99999") {
  54. state.list.push(data[k])
  55. }
  56. }
  57. })
  58. });
  59. const quanCheckActionTrue = () => {
  60. let source = ""
  61. // #ifdef MP-ALIPAY
  62. source = "ALI"
  63. // #endif
  64. // #ifdef MP-WEIXIN
  65. source = "WECHAT"
  66. // #endif
  67. var data = {
  68. opId: getItem(StorageKeys.OpenId),
  69. source: source, //渠道为小程序
  70. tabIndex: '0', //0全部
  71. orderStep: '11', //11 为已完成”
  72. isAfter: true,
  73. };
  74. const options = {
  75. type: 2,
  76. data: data,
  77. method: "POST",
  78. showLoading: true,
  79. };
  80. return new Promise(async (resolve, reject) => {
  81. const res = await request(orderList, options);
  82. const data = stringToJson(res.bizContent);
  83. resolve(data);
  84. }).catch((error) => {
  85. reject(error);
  86. });
  87. }
  88. const choose = (i, item) => {
  89. flag.value = i
  90. navTo(`/subpackage/after-sale/transfer-ownership/transfer-confirm?id=${item.id}`)
  91. }
  92. </script>
  93. <style>
  94. page {
  95. width: 100%;
  96. height: 100%;
  97. background-color: #EEF7F7;
  98. }
  99. </style>
  100. <style lang="scss" scoped>
  101. .flex {
  102. display: flex;
  103. justify-content: center;
  104. }
  105. .selectCar-box {
  106. // width: 100%;
  107. height: 100%;
  108. padding: 30rpx;
  109. .item {
  110. padding: 20rpx;
  111. display: flex;
  112. justify-content: space-between;
  113. align-items: center;
  114. height: 130rpx;
  115. background: #FFFFFF;
  116. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  117. border-radius: 20rpx;
  118. margin-bottom: 30rpx;
  119. .iten-left {
  120. display: flex;
  121. align-items: center;
  122. image {
  123. width: 150rpx;
  124. height: 90rpx;
  125. }
  126. text {
  127. margin-left: 20rpx;
  128. font-size: 32rpx;
  129. font-family: Noto Sans S Chinese;
  130. font-weight: 400;
  131. color: #333333;
  132. }
  133. }
  134. .choose-item {
  135. width: 44rpx;
  136. height: 44rpx;
  137. background: #FFFFFF;
  138. border: 2rpx solid #00B38B;
  139. border-radius: 50%;
  140. margin-right: 20rpx;
  141. display: flex;
  142. justify-content: center;
  143. align-items: center;
  144. box-sizing: content-box;
  145. }
  146. .active {
  147. width: 34rpx;
  148. height: 34rpx;
  149. background: #00B38B;
  150. border-radius: 50%;
  151. }
  152. }
  153. }
  154. </style>