123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- <template>
- <!-- 搜索框 -->
- <view class="as-layout-horizontal as-gravity-center-start search-layout">
- <view class="search-box">
- <image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill" @click="search()"></image>
- <input class="search" placeholder="请输入车牌号" v-model="state.vehiclePlate" />
- </view>
- </view>
- <view class="title">车辆列表</view>
- <view class="selectCar-box">
- <view class="list" v-if="state.list.length > 0" @click="choose(i, item)" v-for="(item, i) in state.list"
- :key="i">
- <view style="height: 134rpx;">
- <image class="car" :src='`${$imgUrl}issuance/car.png`' mode=""></image>
- <text class="yanse" :style="{ background: item.showColor}">{{getVehiclePlateColor(item.vehiclePlateColor)}}</text>
- </view>
- <view class="content">
- <view class="content-top">
- <text class="vehiclePlate">{{item.vehiclePlate}}</text>
- </view>
- </view>
- <image class="arrow" :src='`${$imgUrl}issuance/arrow.png`' mode=""></image>
- </view>
- <view v-else class="flex"> 暂无车辆订单信息 </view>
- </view>
- <view class="action">
- <button type="default" class="ui-btn" @click="add()">
- 新增车辆
- </button>
- </view>
- </template>
-
- <script lang="ts" setup>
- import { reactive, ref } from "vue";
- import { navTo} from "@/utils/utils";
- import { onLoad,onShow} from "@dcloudio/uni-app";
- import { queryVehicleBind,queryPage } from "@/utils/network/api.js";
- import { requestNew } from "@/utils/network/request.js";
- import { getItem, StorageKeys} from "@/utils/storage";
- import { jump } from "@/datas/9901Jump.js";
- import { deviceType } from "@/utils/network/difference";
- import {getVehiclePlateColor,vehiclePlateColorPai} from "@/datas/vehiclePlateColor";
- import {
- getCodeName
- } from "@/datas/queryKey.js";
- import useOrderListItem from "@/composables/order/useOrderListItem";
- const props = defineProps({
- index: {
- type: Number,
- default() {
- return 0
- }
- },
- refresh: { //是否刷新列表
- type: Boolean,
- default: true
- }
- })
- const state = reactive({
- vehiclePlate:"",
- list: [],
- type: "",//1 OBU重新激活 2 卡签注销 3 更换设备 4卡签续期 5挂失解挂 6增补设备(单卡单签补) 7补卡签(设备丢了补卡签) 8解除挂起
- // 30 储值卡转记账卡 31卡pin码解锁 32ETC车牌过户 33 卡签停用/卡签启用
- // 34月结单查询 35ETC通行流水记录 36 黑名单查询 37恢复签约
- // 38 车辆信息变更
- });
- onLoad((options) => {
- console.log("options", options)
- state.type = options.type
- if (options.type == "2") {
- uni.setNavigationBarTitle({
- title: 'ETC注销-选择车辆'
- });
- } else if (options.type == "3") {
- uni.setNavigationBarTitle({
- title: '更换ETC设备-选择车辆'
- });
- } else if (options.type == "4") {
- uni.setNavigationBarTitle({
- title: '卡签续期-选择车辆'
- });
- }else if (options.type == "5") {
- uni.setNavigationBarTitle({
- title: '卡签挂失/解除挂失-选择车辆'
- });
- }else if (options.type == "6") {
- uni.setNavigationBarTitle({
- title: '增补设备-选择车辆'
- });
- }else if (options.type == "7") {
- uni.setNavigationBarTitle({
- title: '补卡补签-选择车辆'
- });
- }else if (options.type == "8") {
- uni.setNavigationBarTitle({
- title: '解除挂起-选择车辆'
- });
- }else if (options.type == "30") {
- uni.setNavigationBarTitle({
- title: '储值卡转记账卡-选择车辆'
- });
- }else if (options.type == "31") {
- uni.setNavigationBarTitle({
- title: '卡pin码解锁-选择车辆'
- });
- }else if (options.type == "32") {
- uni.setNavigationBarTitle({
- title: 'ETC车牌过户-选择车辆'
- });
- }else if (options.type == "33") {
- uni.setNavigationBarTitle({
- title: '卡签停用/卡签启用-选择车辆'
- });
- }else if (options.type == "34") {
- uni.setNavigationBarTitle({
- title: '月结单查询-选择车辆'
- });
- }else if (options.type == "35") {
- uni.setNavigationBarTitle({
- title: 'ETC通行流水-选择车辆'
- });
- }else if (options.type == "36") {
- uni.setNavigationBarTitle({
- title: '黑名单查询'
- });
- }else if (options.type == "37") {
- uni.setNavigationBarTitle({
- title: '恢复签约-选择车辆'
- });
- }else if (options.type == "38") {
- uni.setNavigationBarTitle({
- title: '车辆信息变更-选择车辆'
- });
- }
-
- });
- onShow(()=>{
- if(state.type=='37'){
- // 恢复签约查询订单接口
- list().then((item : any) => {
- console.log("item",item)
- state.list = item.data;
- })
- }else{
- quanCheckActionTrue(state.vehiclePlate);
- }
-
- })
- const list=()=>{
- let newsource = "WECHAT"
- // #ifdef MP-ALIPAY
- newsource = "ALI"
- // #endif
- const options = {
- type: 2,
- data: {
- "source": newsource,
- "orderStatus": "ACTIVE",
- "tabIndex":"-1"
- },
- method: "POST",
- showLoading: true,
- };
- return new Promise(async (resolve, reject) => {
- const res = await requestNew(queryPage, options);
- const data = res;
-
- resolve(data);
- }).catch((error) => {
- reject(error);
- });
- }
- const quanCheckActionTrue = (vehiclePlate) => {
- const options = {
- type: 2,
- data: {
- vehiclePlate
- },
- method: "POST",
- showLoading: true,
- };
- requestNew(queryVehicleBind, options).then((res) => {
- const data = res.result;
- for(var i=0;i<data.length;i++){
- for (var j = 0; j < vehiclePlateColorPai.length; j++) {
- if (data[i].vehiclePlateColor == vehiclePlateColorPai[j]['id']) {
- data[i].color = vehiclePlateColorPai[j]['color']
- data[i].showColor = vehiclePlateColorPai[j]['showColor']
- }
- }
- }
- console.log("车辆列表",data)
- if (state.type == "32") {
- for (var k = 0; k < data.length; k++) {
- if (data[k]['orderStatus'] != "99999") {
- state.list.push(data[k])
- }
- }
- }else{
- state.list = data;
- }
- })
- .catch((err) => {
- console.log(err);
- });
- };
- const flag = ref("0");
-
- const choose = (i, item) => {
- console.log(item.cardId);
- flag.value = i
- // 判断9901
- // 月结单查询 etc通行流水记录 黑名单查询 目前不用跳转到插件
- if (state.type == "34") {
- navTo(`/subpackage/after-sale/month-statement/month-statement-query-list?vehicleId=${item.vehicleId}`)
- }else if (state.type == "35") {
- navTo(`/subpackage/personal-center/search/etcFlowingWater?vehicleId=${item.vehicleId}`)
- }else if (state.type == "36") {
- uni.navigateTo({
- url: `/subpackage/after-sale/blacklist-query/list?vehicleId=${item.vehicleId}`
- })
- }else if (state.type == "38") {
- uni.navigateTo({
- url: `/subpackage/personal-center/vehicle-change/vehicle-change-choiceType?vehicleId=${item.vehicleId}&vehiclePlate=${item.vehiclePlate}`
- })
- }else{
- if (item.deviceType == deviceType) {
- // OBU重新激活跳转
- const params = encodeURIComponent(JSON.stringify(item))
- jump(state.type, params)
- } else {
- if (state.type == "1") {
- // #ifdef MP-WEIXIN
- navTo(
- `/subpackage/after-sale/activation-once-again/activation-once-again?vehicleId=${item.vehicleId}`
- );
- // #endif
- // #ifdef MP-ALIPAY
- navTo(
- `/subpackage/after-sale/activation-once-again/activation-once-again-ali?vehicleId=${item.vehicleId}`
- );
- // #endif
- } else if (state.type == "2") {
- navTo(`/subpackage/after-sale/ETC-log-off/log-off-confirm?vehicleId=${item.vehicleId}`)
- } else if (state.type == "3") {
- navTo(`/subpackage/after-sale/replace-equipment/replace-equipment-confirm?vehicleId=${item.vehicleId}`)
- } else if (state.type == "4") {
- navTo(`/subpackage/after-sale/card-Renewal/renewal-confirm?vehicleId=${item.vehicleId}`)
- } else if (state.type == "5") {
- navTo(`/subpackage/after-sale/card-loss-reporting/cardloss-confirm?vehicleId=${item.vehicleId}`)
- }else if (state.type == "6") {
- navTo(`/subpackage/after-sale/additional-equipment/additional-equipment-confirm?id=${item.id}`)
- }else if (state.type == "7") {
- navTo(`/subpackage/after-sale/replace-cardObu/replace-equipment-confirm?vehicleId=${item.vehicleId}`)
- }else if (state.type == "8") {
- navTo(`/subpackage/after-sale/releaseSuspension/cardloss-confirm?vehicleId=${item.vehicleId}`)
- }else if (state.type == "30") {
- navTo(`/subpackage/after-sale/to-bookkeeping-card/confirm?id=${item.id}`)
- }else if (state.type == "31") {
- navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?vehicleId=${item.vehicleId}`);
- }else if (state.type == "32") {
- navTo(`/subpackage/after-sale/transfer-ownership/transfer-confirm?id=${item.id}`)
- }else if (state.type == "33") {
- navTo(`/subpackage/after-sale/card-deactivation-activation/deactivation-activation-confirm?id=${item.id}`)
- }else if (state.type == "37") {
- // #ifdef MP-ALIPAY
- uni.navigateTo({
- url: `/subpackage/orders/sign-up-ali?orderId=${item.orderId}&&channelSing=1&&vehiclePlate=${item.vehiclePlate}`,
- });
- // #endif
- // #ifdef MP-WEIXIN
- uni.navigateTo({
- url: `/subpackage/orders/sign-up?orderId=${item.orderId}&&channelSing=1&&vehiclePlate=${item.vehiclePlate}`,
- });
- // #endif
- }
- }
- }
- }
- const add=()=>{
- navTo(`/subpackage/after-sale/blacklist-query/addCar`)
- }
- const search=()=>{
- quanCheckActionTrue(state.vehiclePlate);
- }
- </script>
-
- <style lang="scss" scoped>
- .flex {
- display: flex;
- justify-content: center;
- }
-
- .selectCar-box {
- height: 100%;
- padding: 30rpx;
- padding-top: 0;
- padding-bottom: 200rpx;
- }
- .message{
- font-size: 26rpx;
- margin-left: 6rpx;
- }
- .search-layout {
- .search-box {
- margin: 30rpx 30rpx 0rpx 30rpx;
- height: 80rpx;
- background: #FFFFFF;
- border-radius: 40rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- box-sizing: border-box;
- flex: 1;
- }
-
- .search-box .icon {
- width: 48rpx;
- height: 48rpx;
- margin: 0 20rpx;
- }
-
- .search-box .search {
- flex: 1;
- margin-right: 20rpx;
- height: 100%;
- padding: 0 10rpx;
- font-size: 28rpx;
- }
-
- .search-btn {
- color: white;
- background-color: #00B38B;
- width: 140rpx;
- height: 75rpx;
- line-height: 75rpx;
- font-size: 32rpx;
- border-radius: 40rpx;
- text-align: center;
- margin-right: 30rpx;
- margin-top: 30rpx;
- }
- }
- .title{
- font-weight: 400;
- font-size: 34rpx;
- color: #01243A;
- margin: 30rpx 30rpx 0rpx 30rpx;
- }
- .list{
- background: #FFFFFF;
- border-radius: 12rpx;
- border: 1px solid #FFFFFF;
- width: 98%;
- margin: 30rpx auto;
- padding: 20rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- .content{
- font-weight: 400;
- width: 76%;
- margin-left: 20rpx;
- .content-top{
- margin-bottom: 20rpx;
- .vehiclePlate{
- font-size: 30rpx;
- color: #01243A;
- }
- }
- .content-time{
- font-size: 26rpx;
- color: #999999;
- }
- }
- .yanse{
- display: inline-block;
- position: relative;
- width: 64rpx;
- height: 30rpx;
- background: red;
- color: white;
- border-radius: 15rpx 0 15rpx 0;
- text-align: center;
- line-height: 30rpx;
- font-size: 24rpx;
- top: -147rpx;
- }
- .car{
- width: 134rpx;
- height: 134rpx;
- }
- .arrow{
- width: 18rpx;
- height: 34rpx;
- }
- }
- .action {
- position: fixed;
- bottom: 0rpx;
- left: 0;
- height: 188rpx;
- background-color: #fff;
- border-radius: 30rpx 30rpx 0 0;
- width: 100vw;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- }
- </style>
|