選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

select-car.vue 9.1KB

8ヶ月前
9ヶ月前
1年前
1年前
1年前
8ヶ月前
8ヶ月前
8ヶ月前
9ヶ月前
11ヶ月前
9ヶ月前
11ヶ月前
9ヶ月前
11ヶ月前
8ヶ月前
11ヶ月前
8ヶ月前
11ヶ月前
9ヶ月前
11ヶ月前
9ヶ月前
11ヶ月前
9ヶ月前
11ヶ月前
9ヶ月前
11ヶ月前
11ヶ月前
11ヶ月前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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. <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"> </view>
  18. </view>
  19. </view>
  20. <view v-else class="flex"> 暂无车辆订单信息 </view>
  21. </view>
  22. </template>
  23. <script lang="ts" setup>
  24. import { reactive, ref } from "vue";
  25. import { navTo} from "@/utils/utils";
  26. import { onLoad,onShow} from "@dcloudio/uni-app";
  27. import { afterSaleCommQuery,queryPage } from "@/utils/network/api.js";
  28. import { requestNew } from "@/utils/network/request.js";
  29. import { getItem, StorageKeys} from "@/utils/storage";
  30. import { jump } from "@/datas/9901Jump.js";
  31. import { deviceType } from "@/utils/network/difference";
  32. import {
  33. getCodeName
  34. } from "@/datas/queryKey.js";
  35. import {
  36. getVehiclePlateColor
  37. } from "@/datas/vehiclePlateColor";
  38. const state = reactive({
  39. list: [],
  40. type: "",//1 OBU重新激活 2 卡签注销 3 更换设备 4卡签续期 5挂失解挂 6增补设备
  41. // 30 储值卡转记账卡 31卡pin码解锁 32ETC车牌过户 33 卡签停用/卡签启用
  42. // 34月结单查询 35ETC通行流水记录 36 黑名单查询 37恢复签约
  43. });
  44. onLoad((options) => {
  45. console.log("options", options)
  46. state.type = options.type
  47. if (options.type == "2") {
  48. uni.setNavigationBarTitle({
  49. title: 'ETC注销-选择车辆'
  50. });
  51. } else if (options.type == "3") {
  52. uni.setNavigationBarTitle({
  53. title: '更换ETC设备-选择车辆'
  54. });
  55. } else if (options.type == "4") {
  56. uni.setNavigationBarTitle({
  57. title: '卡签续期-选择车辆'
  58. });
  59. }else if (options.type == "5") {
  60. uni.setNavigationBarTitle({
  61. title: '卡签挂失/解除挂失-选择车辆'
  62. });
  63. }else if (options.type == "6") {
  64. uni.setNavigationBarTitle({
  65. title: '增补设备-选择车辆'
  66. });
  67. }else if (options.type == "30") {
  68. uni.setNavigationBarTitle({
  69. title: '储值卡转记账卡-选择车辆'
  70. });
  71. }else if (options.type == "31") {
  72. uni.setNavigationBarTitle({
  73. title: '卡pin码解锁-选择车辆'
  74. });
  75. }else if (options.type == "32") {
  76. uni.setNavigationBarTitle({
  77. title: 'ETC车牌过户-选择车辆'
  78. });
  79. }else if (options.type == "33") {
  80. uni.setNavigationBarTitle({
  81. title: '卡签停用/卡签启用-选择车辆'
  82. });
  83. }else if (options.type == "34") {
  84. uni.setNavigationBarTitle({
  85. title: '月结单查询-选择车辆'
  86. });
  87. }else if (options.type == "35") {
  88. uni.setNavigationBarTitle({
  89. title: 'ETC通行流水-选择车辆'
  90. });
  91. }else if (options.type == "36") {
  92. uni.setNavigationBarTitle({
  93. title: '黑名单查询-选择车辆'
  94. });
  95. }else if (options.type == "37") {
  96. uni.setNavigationBarTitle({
  97. title: '恢复签约-选择车辆'
  98. });
  99. }
  100. });
  101. onShow(()=>{
  102. if(state.type=='37'){
  103. // 恢复签约查询订单接口
  104. list().then((item : any) => {
  105. console.log("item",item)
  106. state.list = item.result;
  107. })
  108. }else{
  109. quanCheckActionTrue().then((item : any) => {
  110. if (state.type == "32") {
  111. let data = item.result
  112. for (var k = 0; k < data.length; k++) {
  113. if (data[k]['orderStatus'] != "99999") {
  114. state.list.push(data[k])
  115. }
  116. }
  117. }else{
  118. state.list = item.result;
  119. }
  120. console.log(item);
  121. });
  122. }
  123. })
  124. const list=()=>{
  125. let newsource = "WECHAT"
  126. // #ifdef MP-ALIPAY
  127. newsource = "ALI"
  128. // #endif
  129. const options = {
  130. type: 2,
  131. data: {
  132. "source": newsource,
  133. "orderStatus": "ACTIVE",
  134. "tabIndex":""
  135. },
  136. method: "POST",
  137. showLoading: true,
  138. };
  139. return new Promise(async (resolve, reject) => {
  140. const res = await requestNew(queryPage, options);
  141. const data = res;
  142. resolve(data);
  143. }).catch((error) => {
  144. reject(error);
  145. });
  146. }
  147. const quanCheckActionTrue = () => {
  148. let source = ""
  149. // #ifdef MP-ALIPAY
  150. source = "ALI"
  151. // #endif
  152. // #ifdef MP-WEIXIN
  153. source = "WECHAT"
  154. // #endif
  155. var data={}
  156. if(state.type=="5"){
  157. data = {
  158. opId: getItem(StorageKeys.OpenId),
  159. loginSource:getItem("loginSource"),
  160. deviceStatus:[1,6],//挂失解挂设备状态
  161. };
  162. }else{
  163. data = {
  164. opId: getItem(StorageKeys.OpenId),
  165. loginSource:getItem("loginSource"),
  166. };
  167. }
  168. const options = {
  169. type: 2,
  170. data: data,
  171. method: "POST",
  172. showLoading: true,
  173. };
  174. return new Promise(async (resolve, reject) => {
  175. const res = await requestNew(afterSaleCommQuery, options);
  176. const data = res;
  177. resolve(data);
  178. }).catch((error) => {
  179. reject(error);
  180. });
  181. };
  182. const flag = ref("0");
  183. const choose = (i, item) => {
  184. console.log(item.cardId);
  185. flag.value = i
  186. // 判断9901
  187. // 月结单查询 etc通行流水记录 黑名单查询 目前不用跳转到插件
  188. if (state.type == "34") {
  189. navTo(`/subpackage/after-sale/month-statement/month-statement-query-list?vehicleId=${item.vehicleId}`)
  190. }else if (state.type == "35") {
  191. navTo(`/subpackage/personal-center/search/etcFlowingWater?vehicleId=${item.vehicleId}`)
  192. }else if (state.type == "36") {
  193. uni.navigateTo({
  194. url: `/subpackage/after-sale/blacklist-query/list?vehiclePlate=${item.vehiclePlate}&vehiclePlateColor=${item.vehiclePlateColor}&cardId=${item.cardId}`
  195. })
  196. }else{
  197. if (item.deviceType == deviceType) {
  198. // OBU重新激活跳转
  199. const params = encodeURIComponent(JSON.stringify(item))
  200. jump(state.type, params)
  201. } else {
  202. if (state.type == "1") {
  203. // #ifdef MP-WEIXIN
  204. navTo(
  205. `/subpackage/after-sale/activation-once-again/activation-once-again?vehicleId=${item.vehicleId}`
  206. );
  207. // #endif
  208. // #ifdef MP-ALIPAY
  209. navTo(
  210. `/subpackage/after-sale/activation-once-again/activation-once-again-ali?vehicleId=${item.vehicleId}`
  211. );
  212. // #endif
  213. } else if (state.type == "2") {
  214. navTo(`/subpackage/after-sale/ETC-log-off/log-off-confirm?vehicleId=${item.vehicleId}`)
  215. } else if (state.type == "3") {
  216. navTo(`/subpackage/after-sale/replace-equipment/replace-equipment-confirm?vehicleId=${item.vehicleId}`)
  217. } else if (state.type == "4") {
  218. navTo(`/subpackage/after-sale/card-Renewal/renewal-confirm?vehicleId=${item.vehicleId}`)
  219. } else if (state.type == "5") {
  220. navTo(`/subpackage/after-sale/card-loss-reporting/cardloss-confirm?vehicleId=${item.vehicleId}`)
  221. }else if (state.type == "6") {
  222. navTo(`/subpackage/after-sale/additional-equipment/additional-equipment-confirm?id=${item.id}`)
  223. }else if (state.type == "30") {
  224. navTo(`/subpackage/after-sale/to-bookkeeping-card/confirm?id=${item.id}`)
  225. }else if (state.type == "31") {
  226. navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?id=${item.id}`);
  227. }else if (state.type == "32") {
  228. navTo(`/subpackage/after-sale/transfer-ownership/transfer-confirm?id=${item.id}`)
  229. }else if (state.type == "33") {
  230. navTo(`/subpackage/after-sale/card-deactivation-activation/deactivation-activation-confirm?id=${item.id}`)
  231. }else if (state.type == "37") {
  232. // #ifdef MP-ALIPAY
  233. uni.navigateTo({
  234. url: `/subpackage/orders/sign-up-ali?orderId=${item.orderId}&&channelSing=1&&vehiclePlate=${item.vehiclePlate}`,
  235. });
  236. // #endif
  237. // #ifdef MP-WEIXIN
  238. uni.navigateTo({
  239. url: `/subpackage/orders/sign-up?orderId=${item.orderId}&&channelSing=1&&vehiclePlate=${item.vehiclePlate}`,
  240. });
  241. // #endif
  242. }
  243. }
  244. }
  245. }
  246. </script>
  247. <style>
  248. page {
  249. width: 100%;
  250. height: 100%;
  251. background-color: #eef7f7;
  252. }
  253. </style>
  254. <style lang="scss" scoped>
  255. .flex {
  256. display: flex;
  257. justify-content: center;
  258. }
  259. .selectCar-box {
  260. height: 100%;
  261. padding: 30rpx;
  262. .item {
  263. padding: 20rpx;
  264. display: flex;
  265. justify-content: space-between;
  266. align-items: center;
  267. // height: 130rpx;
  268. background: #ffffff;
  269. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  270. border-radius: 20rpx;
  271. margin-bottom: 30rpx;
  272. .iten-left {
  273. display: flex;
  274. align-items: center;
  275. image {
  276. width: 150rpx;
  277. height: 90rpx;
  278. }
  279. text {
  280. margin-left: 20rpx;
  281. font-size: 32rpx;
  282. font-family: Noto Sans S Chinese;
  283. font-weight: 400;
  284. color: #333333;
  285. }
  286. }
  287. .choose-item {
  288. width: 44rpx;
  289. height: 44rpx;
  290. background: #ffffff;
  291. border: 2rpx solid #00b38b;
  292. border-radius: 50%;
  293. margin-right: 20rpx;
  294. display: flex;
  295. justify-content: center;
  296. align-items: center;
  297. box-sizing: content-box;
  298. }
  299. .active {
  300. width: 34rpx;
  301. height: 34rpx;
  302. background: #00b38b;
  303. border-radius: 50%;
  304. }
  305. }
  306. }
  307. .message{
  308. font-size: 26rpx;
  309. margin-left: 6rpx;
  310. }
  311. </style>