您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

select-car.vue 3.6KB

1年前
1年前
10 个月前
1年前
10 个月前
1年前
1年前
1年前
1年前
1年前
10 个月前
1年前
10 个月前
1年前
10 个月前
1年前
10 个月前
10 个月前
1年前
1年前
1年前
1年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. <view class="message">
  8. <view>车牌号:{{ item.vehiclePlate }}</view>
  9. <view>车牌颜色:{{ getVehiclePlateColor(item.vehiclePlateColor) }}</view>
  10. <view v-if="item.cardId">卡号:{{ item.cardId }}</view>
  11. <view v-if="item.cardStatus">卡状态:{{getCodeName('CARD_STATE_TYPE',item.cardStatus)}}</view>
  12. <view v-if="item.obuId">签号:{{ item.obuId }}</view>
  13. <view v-if="item.obuStatus">签状态:{{ getCodeName('OBU_STATE_TYPE',item.obuStatus) }}</view>
  14. </view>
  15. </view>
  16. <view class="choose-item">
  17. <view class="active" v-if="flag==i">
  18. </view>
  19. </view>
  20. </view>
  21. <view v-else>
  22. <empty title='暂无找到相关车辆信息' />
  23. </view>
  24. </view>
  25. </template>
  26. <script lang="ts" setup>
  27. import empty from "@/components/empty/empty.vue";
  28. import {
  29. reactive,
  30. ref
  31. } from "vue"
  32. import {
  33. onLoad,
  34. } from "@dcloudio/uni-app";
  35. import {
  36. generalAuditListVehicle
  37. } from "@/utils/network/api.js";
  38. import {
  39. requestNew
  40. } from "@/utils/network/request.js";
  41. import {
  42. getItem
  43. } from "@/utils/storage";
  44. import {
  45. stringToJson
  46. } from "@/utils/network/encryption";
  47. import {
  48. getCodeName
  49. } from "@/datas/queryKey.js";
  50. import {
  51. getVehiclePlateColor
  52. } from "@/datas/vehiclePlateColor";
  53. import {interceptND} from "@/utils/utils";
  54. const state = reactive({
  55. customerIdNum: "",
  56. list: [] //车辆list
  57. });
  58. const flag = ref('0') //默认选择0
  59. onLoad(() => {
  60. quanCheckActionTrue().then((item : any) => {
  61. state.list = item;
  62. console.log(item);
  63. });
  64. });
  65. const quanCheckActionTrue = () => {
  66. var data = {
  67. };
  68. const options = {
  69. type: 2,
  70. data: data,
  71. method: "POST",
  72. showLoading: true,
  73. };
  74. return new Promise(async (resolve, reject) => {
  75. const res = await requestNew(generalAuditListVehicle, options);
  76. const data = res;
  77. resolve(data);
  78. }).catch((error) => {
  79. reject(error);
  80. });
  81. };
  82. const choose = (i, item) => {
  83. // interceptND(item.vehicleId).then(()=>{
  84. console.log("item", item)
  85. flag.value = i
  86. uni.navigateTo({
  87. url: `/subpackage/after-sale/progress-query/progress-query-business?vehiclePlate=${item.vehiclePlate}&vehiclePlateColor=${item.vehiclePlateColor}`
  88. })
  89. // })
  90. }
  91. </script>
  92. <style>
  93. page {
  94. width: 100%;
  95. height: 100%;
  96. background-color: #EEF7F7;
  97. }
  98. </style>
  99. <style lang="scss" scoped>
  100. .flex {
  101. display: flex;
  102. justify-content: center;
  103. }
  104. .selectCar-box {
  105. // width: 100%;
  106. height: 100%;
  107. padding: 30rpx;
  108. .item {
  109. padding: 20rpx;
  110. display: flex;
  111. justify-content: space-between;
  112. align-items: center;
  113. // height: 130rpx;
  114. background: #FFFFFF;
  115. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  116. border-radius: 20rpx;
  117. margin-bottom: 30rpx;
  118. .iten-left {
  119. display: flex;
  120. align-items: center;
  121. image {
  122. width: 150rpx;
  123. height: 90rpx;
  124. }
  125. text {
  126. margin-left: 20rpx;
  127. font-size: 32rpx;
  128. font-family: Noto Sans S Chinese;
  129. font-weight: 400;
  130. color: #333333;
  131. }
  132. }
  133. .choose-item {
  134. width: 44rpx;
  135. height: 44rpx;
  136. background: #FFFFFF;
  137. border: 2rpx solid #00B38B;
  138. border-radius: 50%;
  139. margin-right: 20rpx;
  140. display: flex;
  141. justify-content: center;
  142. align-items: center;
  143. box-sizing: content-box;
  144. }
  145. .active {
  146. width: 34rpx;
  147. height: 34rpx;
  148. background: #00B38B;
  149. border-radius: 50%;
  150. }
  151. }
  152. }
  153. .message{
  154. font-size: 26rpx;
  155. margin-left: 6rpx;
  156. }
  157. </style>