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 11KB

hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 10 meses
hace 10 meses
hace 1 año
hace 1 año
hace 2 años
hace 2 años
hace 2 años
hace 1 año
hace 1 año
hace 1 año
hace 1 año
hace 1 año
hace 1 año
hace 1 año
hace 1 año
hace 1 año
hace 10 meses
hace 1 año
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 10 meses
hace 2 años
hace 2 años
hace 10 meses
hace 2 años
hace 2 años
hace 1 año
hace 10 meses
hace 1 año
hace 1 año
hace 10 meses
hace 1 año
hace 10 meses
hace 1 año
hace 10 meses
hace 1 año
hace 10 meses
hace 1 año
hace 10 meses
hace 1 año
hace 10 meses
hace 1 año
hace 1 año
hace 1 año
hace 10 meses
hace 1 año
hace 1 año
hace 1 año
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
hace 2 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. <template>
  2. <!-- 搜索框 -->
  3. <view class="as-layout-horizontal as-gravity-center-start search-layout">
  4. <view class="search-box">
  5. <image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill"></image>
  6. <input class="search" placeholder="请输入车牌号" @blur="onKeyInput" v-model="state.car" />
  7. </view>
  8. </view>
  9. <view class="title">车辆列表</view>
  10. <view class="selectCar-box">
  11. <view class="list" v-if="state.list.length > 0" @click="choose(i, item)" v-for="(item, i) in state.list"
  12. :key="i">
  13. <image class="car" :src='`${$imgUrl}issuance/car.png`' mode=""></image>
  14. <view class="content">
  15. <view class="content-top">
  16. <text class="vehiclePlate">{{item.vehiclePlate}}</text>
  17. </view>
  18. <view class="content-time">车牌颜色:{{getVehiclePlateColor(item.vehiclePlateColor)}}</view>
  19. </view>
  20. <image class="arrow" :src='`${$imgUrl}issuance/arrow.png`' mode=""></image>
  21. </view>
  22. <view v-else class="flex"> 暂无车辆订单信息 </view>
  23. </view>
  24. <view class="action">
  25. <button type="default" class="ui-btn" @click="add()">
  26. 新增车辆
  27. </button>
  28. </view>
  29. </template>
  30. <script lang="ts" setup>
  31. import { reactive, ref } from "vue";
  32. import { navTo} from "@/utils/utils";
  33. import { onLoad,onShow} from "@dcloudio/uni-app";
  34. import { queryVehicleBind,queryPage } from "@/utils/network/api.js";
  35. import { requestNew } from "@/utils/network/request.js";
  36. import { getItem, StorageKeys} from "@/utils/storage";
  37. import { jump } from "@/datas/9901Jump.js";
  38. import { deviceType } from "@/utils/network/difference";
  39. import {
  40. getVehiclePlateColor
  41. } from "@/datas/vehiclePlateColor";
  42. import {
  43. getCodeName
  44. } from "@/datas/queryKey.js";
  45. import useOrderListItem from "@/composables/order/useOrderListItem";
  46. const props = defineProps({
  47. index: {
  48. type: Number,
  49. default() {
  50. return 0
  51. }
  52. },
  53. refresh: { //是否刷新列表
  54. type: Boolean,
  55. default: true
  56. }
  57. })
  58. // const { onKeyInput, searchKeyWords } = useOrderListItem(props);
  59. const state = reactive({
  60. car:"",
  61. list: [],
  62. type: "",//1 OBU重新激活 2 卡签注销 3 更换设备 4卡签续期 5挂失解挂 6增补设备(单卡单签补) 7补卡签(设备丢了补卡签) 8解除挂起
  63. // 30 储值卡转记账卡 31卡pin码解锁 32ETC车牌过户 33 卡签停用/卡签启用
  64. // 34月结单查询 35ETC通行流水记录 36 黑名单查询 37恢复签约
  65. });
  66. onLoad((options) => {
  67. console.log("options", options)
  68. state.type = options.type
  69. if (options.type == "2") {
  70. uni.setNavigationBarTitle({
  71. title: 'ETC注销-选择车辆'
  72. });
  73. } else if (options.type == "3") {
  74. uni.setNavigationBarTitle({
  75. title: '更换ETC设备-选择车辆'
  76. });
  77. } else if (options.type == "4") {
  78. uni.setNavigationBarTitle({
  79. title: '卡签续期-选择车辆'
  80. });
  81. }else if (options.type == "5") {
  82. uni.setNavigationBarTitle({
  83. title: '卡签挂失/解除挂失-选择车辆'
  84. });
  85. }else if (options.type == "6") {
  86. uni.setNavigationBarTitle({
  87. title: '增补设备-选择车辆'
  88. });
  89. }else if (options.type == "7") {
  90. uni.setNavigationBarTitle({
  91. title: '补卡补签-选择车辆'
  92. });
  93. }else if (options.type == "8") {
  94. uni.setNavigationBarTitle({
  95. title: '解除挂起-选择车辆'
  96. });
  97. }else if (options.type == "30") {
  98. uni.setNavigationBarTitle({
  99. title: '储值卡转记账卡-选择车辆'
  100. });
  101. }else if (options.type == "31") {
  102. uni.setNavigationBarTitle({
  103. title: '卡pin码解锁-选择车辆'
  104. });
  105. }else if (options.type == "32") {
  106. uni.setNavigationBarTitle({
  107. title: 'ETC车牌过户-选择车辆'
  108. });
  109. }else if (options.type == "33") {
  110. uni.setNavigationBarTitle({
  111. title: '卡签停用/卡签启用-选择车辆'
  112. });
  113. }else if (options.type == "34") {
  114. uni.setNavigationBarTitle({
  115. title: '月结单查询-选择车辆'
  116. });
  117. }else if (options.type == "35") {
  118. uni.setNavigationBarTitle({
  119. title: 'ETC通行流水-选择车辆'
  120. });
  121. }else if (options.type == "36") {
  122. uni.setNavigationBarTitle({
  123. title: '黑名单查询'
  124. });
  125. }else if (options.type == "37") {
  126. uni.setNavigationBarTitle({
  127. title: '恢复签约-选择车辆'
  128. });
  129. }
  130. });
  131. onShow(()=>{
  132. if(state.type=='37'){
  133. // 恢复签约查询订单接口
  134. list().then((item : any) => {
  135. console.log("item",item)
  136. state.list = item.data;
  137. })
  138. }else{
  139. quanCheckActionTrue().then((item : any) => {
  140. if (state.type == "32") {
  141. let data = item
  142. for (var k = 0; k < data.length; k++) {
  143. if (data[k]['orderStatus'] != "99999") {
  144. state.list.push(data[k])
  145. }
  146. }
  147. }else{
  148. state.list = item;
  149. }
  150. console.log(item);
  151. });
  152. }
  153. })
  154. const onKeyInput = (event) => {
  155. // searchKeyWords.value = event.target.value;
  156. }
  157. const list=()=>{
  158. let newsource = "WECHAT"
  159. // #ifdef MP-ALIPAY
  160. newsource = "ALI"
  161. // #endif
  162. const options = {
  163. type: 2,
  164. data: {
  165. "source": newsource,
  166. "orderStatus": "ACTIVE",
  167. "tabIndex":"-1"
  168. },
  169. method: "POST",
  170. showLoading: true,
  171. };
  172. return new Promise(async (resolve, reject) => {
  173. const res = await requestNew(queryPage, options);
  174. const data = res;
  175. resolve(data);
  176. }).catch((error) => {
  177. reject(error);
  178. });
  179. }
  180. const quanCheckActionTrue = () => {
  181. const options = {
  182. type: 2,
  183. data: {},
  184. method: "POST",
  185. showLoading: true,
  186. };
  187. return new Promise(async (resolve, reject) => {
  188. const res = await requestNew(queryVehicleBind, options);
  189. const data = res;
  190. console.log("车辆列表",data)
  191. resolve(data);
  192. }).catch((error) => {
  193. reject(error);
  194. });
  195. };
  196. const flag = ref("0");
  197. const choose = (i, item) => {
  198. console.log(item.cardId);
  199. flag.value = i
  200. // 判断9901
  201. // 月结单查询 etc通行流水记录 黑名单查询 目前不用跳转到插件
  202. if (state.type == "34") {
  203. navTo(`/subpackage/after-sale/month-statement/month-statement-query-list?vehicleId=${item.vehicleId}`)
  204. }else if (state.type == "35") {
  205. navTo(`/subpackage/personal-center/search/etcFlowingWater?vehicleId=${item.vehicleId}`)
  206. }else if (state.type == "36") {
  207. uni.navigateTo({
  208. url: `/subpackage/after-sale/blacklist-query/list?vehicleId=${item.vehicleId}`
  209. })
  210. }else{
  211. if (item.deviceType == deviceType) {
  212. // OBU重新激活跳转
  213. const params = encodeURIComponent(JSON.stringify(item))
  214. jump(state.type, params)
  215. } else {
  216. if (state.type == "1") {
  217. // #ifdef MP-WEIXIN
  218. navTo(
  219. `/subpackage/after-sale/activation-once-again/activation-once-again?vehicleId=${item.vehicleId}`
  220. );
  221. // #endif
  222. // #ifdef MP-ALIPAY
  223. navTo(
  224. `/subpackage/after-sale/activation-once-again/activation-once-again-ali?vehicleId=${item.vehicleId}`
  225. );
  226. // #endif
  227. } else if (state.type == "2") {
  228. navTo(`/subpackage/after-sale/ETC-log-off/log-off-confirm?vehicleId=${item.vehicleId}`)
  229. } else if (state.type == "3") {
  230. navTo(`/subpackage/after-sale/replace-equipment/replace-equipment-confirm?vehicleId=${item.vehicleId}`)
  231. } else if (state.type == "4") {
  232. navTo(`/subpackage/after-sale/card-Renewal/renewal-confirm?vehicleId=${item.vehicleId}`)
  233. } else if (state.type == "5") {
  234. navTo(`/subpackage/after-sale/card-loss-reporting/cardloss-confirm?vehicleId=${item.vehicleId}`)
  235. }else if (state.type == "6") {
  236. navTo(`/subpackage/after-sale/additional-equipment/additional-equipment-confirm?id=${item.id}`)
  237. }else if (state.type == "7") {
  238. navTo(`/subpackage/after-sale/replace-cardObu/replace-equipment-confirm?vehicleId=${item.vehicleId}`)
  239. }else if (state.type == "8") {
  240. navTo(`/subpackage/after-sale/releaseSuspension/cardloss-confirm?vehicleId=${item.vehicleId}`)
  241. }else if (state.type == "30") {
  242. navTo(`/subpackage/after-sale/to-bookkeeping-card/confirm?id=${item.id}`)
  243. }else if (state.type == "31") {
  244. navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?vehicleId=${item.vehicleId}`);
  245. }else if (state.type == "32") {
  246. navTo(`/subpackage/after-sale/transfer-ownership/transfer-confirm?id=${item.id}`)
  247. }else if (state.type == "33") {
  248. navTo(`/subpackage/after-sale/card-deactivation-activation/deactivation-activation-confirm?id=${item.id}`)
  249. }else if (state.type == "37") {
  250. // #ifdef MP-ALIPAY
  251. uni.navigateTo({
  252. url: `/subpackage/orders/sign-up-ali?orderId=${item.orderId}&&channelSing=1&&vehiclePlate=${item.vehiclePlate}`,
  253. });
  254. // #endif
  255. // #ifdef MP-WEIXIN
  256. uni.navigateTo({
  257. url: `/subpackage/orders/sign-up?orderId=${item.orderId}&&channelSing=1&&vehiclePlate=${item.vehiclePlate}`,
  258. });
  259. // #endif
  260. }
  261. }
  262. }
  263. }
  264. const add=()=>{
  265. navTo(`/subpackage/after-sale/blacklist-query/addCar`)
  266. }
  267. </script>
  268. <style lang="scss" scoped>
  269. .flex {
  270. display: flex;
  271. justify-content: center;
  272. }
  273. .selectCar-box {
  274. height: 100%;
  275. padding: 30rpx;
  276. padding-top: 0;
  277. }
  278. .message{
  279. font-size: 26rpx;
  280. margin-left: 6rpx;
  281. }
  282. .search-layout {
  283. .search-box {
  284. margin: 30rpx 30rpx 0rpx 30rpx;
  285. height: 80rpx;
  286. background: #FFFFFF;
  287. // border: 1px solid #DCDCDC;
  288. border-radius: 40rpx;
  289. display: flex;
  290. justify-content: center;
  291. align-items: center;
  292. box-sizing: border-box;
  293. flex: 1;
  294. }
  295. .search-box .icon {
  296. width: 48rpx;
  297. height: 48rpx;
  298. margin: 0 20rpx;
  299. }
  300. .search-box .search {
  301. flex: 1;
  302. margin-right: 20rpx;
  303. height: 100%;
  304. padding: 0 10rpx;
  305. font-size: 28rpx;
  306. color: #00b38b;
  307. }
  308. .search-btn {
  309. color: white;
  310. background-color: #00B38B;
  311. width: 140rpx;
  312. height: 75rpx;
  313. line-height: 75rpx;
  314. font-size: 32rpx;
  315. border-radius: 40rpx;
  316. text-align: center;
  317. margin-right: 30rpx;
  318. margin-top: 30rpx;
  319. }
  320. }
  321. .title{
  322. font-weight: 400;
  323. font-size: 34rpx;
  324. color: #01243A;
  325. margin: 30rpx 30rpx 0rpx 30rpx;
  326. }
  327. .list{
  328. background: #FFFFFF;
  329. border-radius: 12rpx;
  330. border: 1px solid #FFFFFF;
  331. width: 98%;
  332. margin: 30rpx auto;
  333. padding: 20rpx;
  334. box-sizing: border-box;
  335. display: flex;
  336. align-items: center;
  337. .content{
  338. font-weight: 400;
  339. width: 76%;
  340. margin-left: 20rpx;
  341. .content-top{
  342. margin-bottom: 20rpx;
  343. .vehiclePlate{
  344. font-size: 30rpx;
  345. color: #01243A;
  346. }
  347. }
  348. .content-time{
  349. font-size: 26rpx;
  350. color: #999999;
  351. }
  352. }
  353. .car{
  354. width: 100rpx;
  355. height: 100rpx;
  356. }
  357. .arrow{
  358. width: 18rpx;
  359. height: 34rpx;
  360. }
  361. }
  362. .action {
  363. position: fixed;
  364. bottom: 0rpx;
  365. left: 0;
  366. height: 188rpx;
  367. background-color: #fff;
  368. border-radius: 30rpx 30rpx 0 0;
  369. width: 100vw;
  370. display: flex;
  371. align-items: center;
  372. justify-content: center;
  373. flex-direction: column;
  374. }
  375. </style>