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.

select-car.vue 5.4KB

1 year ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view class="selectCar-box">
  3. <view v-if="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"> </view>
  11. </view>
  12. </view>
  13. <view v-else class="flex"> 暂无车辆订单信息 </view>
  14. </view>
  15. </template>
  16. <script lang="ts" setup>
  17. import { reactive, ref } from "vue";
  18. import { navTo } from "@/utils/utils";
  19. import { onLoad, onShow } from "@dcloudio/uni-app";
  20. import { orderList } from "@/utils/network/api.js";
  21. import { request } from "@/utils/network/request.js";
  22. import { getItem, StorageKeys, setItem } from "@/utils/storage";
  23. import { stringToJson } from "@/utils/network/encryption";
  24. import { jump } from "@/datas/9901Jump.js";
  25. import { deviceType } from "@/utils/network/difference";
  26. const state = reactive({
  27. list: [],
  28. type: "",//1 OBU重新激活 2 卡签注销 3 更换设备 4卡签续期 5挂失解挂 6增补设备
  29. // 30 储值卡转记账卡 31卡pin码解锁
  30. });
  31. onLoad((options) => {
  32. console.log("options", options)
  33. state.type = options.type
  34. if (options.type == "2") {
  35. uni.setNavigationBarTitle({
  36. title: 'ETC注销-选择车辆'
  37. });
  38. } else if (options.type == "3") {
  39. uni.setNavigationBarTitle({
  40. title: '更换ETC设备-选择车辆'
  41. });
  42. } else if (options.type == "4") {
  43. uni.setNavigationBarTitle({
  44. title: '卡签续期-选择车辆'
  45. });
  46. }else if (options.type == "5") {
  47. uni.setNavigationBarTitle({
  48. title: '卡签挂失/解除挂失-选择车辆'
  49. });
  50. }else if (options.type == "6") {
  51. uni.setNavigationBarTitle({
  52. title: '增补设备-选择车辆'
  53. });
  54. }else if (options.type == "30") {
  55. uni.setNavigationBarTitle({
  56. title: '储值卡转记账卡-选择车辆'
  57. });
  58. }else if (options.type == "31") {
  59. uni.setNavigationBarTitle({
  60. title: '卡pin码解锁-选择车辆'
  61. });
  62. }
  63. quanCheckActionTrue().then((item : any) => {
  64. state.list = item.data;
  65. console.log(item);
  66. });
  67. });
  68. const quanCheckActionTrue = () => {
  69. let source = ""
  70. // #ifdef MP-ALIPAY
  71. source = "ALI"
  72. // #endif
  73. // #ifdef MP-WEIXIN
  74. source = "WECHAT"
  75. // #endif
  76. var data = {
  77. opId: getItem(StorageKeys.OpenId),
  78. source: source,
  79. tabIndex: "0",
  80. orderStep: "11",
  81. isValueCard: "",
  82. orderStatus: "1",
  83. isAfter: true,
  84. };
  85. const options = {
  86. type: 2,
  87. data: data,
  88. method: "POST",
  89. showLoading: true,
  90. };
  91. return new Promise(async (resolve, reject) => {
  92. const res = await request(orderList, options);
  93. const data = stringToJson(res.bizContent);
  94. resolve(data);
  95. }).catch((error) => {
  96. reject(error);
  97. });
  98. };
  99. const flag = ref("0");
  100. const choose = (i, item) => {
  101. console.log(item.cardId);
  102. flag.value = i
  103. // 判断9901
  104. if (item.deviceType == deviceType) {
  105. // OBU重新激活跳转
  106. const params = encodeURIComponent(JSON.stringify(item))
  107. jump(state.type, params)
  108. } else {
  109. if (state.type == "1") {
  110. // #ifdef MP-WEIXIN
  111. navTo(
  112. `/subpackage/after-sale/activation-once-again/activation-once-again?id=${item.id}`
  113. );
  114. // #endif
  115. // #ifdef MP-ALIPAY
  116. navTo(
  117. `/subpackage/after-sale/activation-once-again/activation-once-again-ali?id=${item.id}`
  118. );
  119. // #endif
  120. } else if (state.type == "2") {
  121. navTo(`/subpackage/after-sale/ETC-log-off/log-off-confirm?id=${item.id}`)
  122. } else if (state.type == "3") {
  123. navTo(`/subpackage/after-sale/replace-equipment/replace-equipment-confirm?id=${item.id}`)
  124. } else if (state.type == "4") {
  125. navTo(`/subpackage/after-sale/card-Renewal/renewal-confirm?id=${item.id}&orderId=${item.orderId}`)
  126. } else if (state.type == "5") {
  127. navTo(`/subpackage/after-sale/card-loss-reporting/cardloss-confirm?id=${item.id}`)
  128. }else if (state.type == "6") {
  129. navTo(`/subpackage/after-sale/additional-equipment/additional-equipment-confirm?id=${item.id}`)
  130. }else if (state.type == "30") {
  131. navTo(`/subpackage/after-sale/to-bookkeeping-card/confirm?id=${item.id}`)
  132. }else if (state.type == "31") {
  133. navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?id=${item.id}`);
  134. }
  135. }
  136. }
  137. </script>
  138. <style>
  139. page {
  140. width: 100%;
  141. height: 100%;
  142. background-color: #eef7f7;
  143. }
  144. </style>
  145. <style lang="scss" scoped>
  146. .flex {
  147. display: flex;
  148. justify-content: center;
  149. }
  150. .selectCar-box {
  151. height: 100%;
  152. padding: 30rpx;
  153. .item {
  154. padding: 20rpx;
  155. display: flex;
  156. justify-content: space-between;
  157. align-items: center;
  158. height: 130rpx;
  159. background: #ffffff;
  160. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  161. border-radius: 20rpx;
  162. margin-bottom: 30rpx;
  163. .iten-left {
  164. display: flex;
  165. align-items: center;
  166. image {
  167. width: 150rpx;
  168. height: 90rpx;
  169. }
  170. text {
  171. margin-left: 20rpx;
  172. font-size: 32rpx;
  173. font-family: Noto Sans S Chinese;
  174. font-weight: 400;
  175. color: #333333;
  176. }
  177. }
  178. .choose-item {
  179. width: 44rpx;
  180. height: 44rpx;
  181. background: #ffffff;
  182. border: 2rpx solid #00b38b;
  183. border-radius: 50%;
  184. margin-right: 20rpx;
  185. display: flex;
  186. justify-content: center;
  187. align-items: center;
  188. box-sizing: content-box;
  189. }
  190. .active {
  191. width: 34rpx;
  192. height: 34rpx;
  193. background: #00b38b;
  194. border-radius: 50%;
  195. }
  196. }
  197. }
  198. </style>