}); | }); | ||||
} else if (routeType.value == "3") { | } else if (routeType.value == "3") { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?state=true&id=" + state.id, | |||||
url: "/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?state=true&vehicleId=" + state.vehicleId, | |||||
}); | }); | ||||
} else if (routeType.value == "4") { | } else if (routeType.value == "4") { | ||||
uni.navigateTo({ | uni.navigateTo({ |
<view class="selectCar-box"> | <view class="selectCar-box"> | ||||
<view class="details"> | <view class="details"> | ||||
<view class="title"> 基础信息 </view> | <view class="title"> 基础信息 </view> | ||||
<!-- <view class="details-item"> | |||||
<view> 订单编号: </view> | |||||
<text>{{ orderInfos.orderId }}</text> | |||||
</view> --> | |||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> 用户名称: </view> | <view> 用户名称: </view> | ||||
<text>{{ orderInfos.name }}</text> | <text>{{ orderInfos.name }}</text> |
}else if (state.type == "30") { | }else if (state.type == "30") { | ||||
navTo(`/subpackage/after-sale/to-bookkeeping-card/confirm?id=${item.id}`) | navTo(`/subpackage/after-sale/to-bookkeeping-card/confirm?id=${item.id}`) | ||||
}else if (state.type == "31") { | }else if (state.type == "31") { | ||||
navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?id=${item.id}`); | |||||
navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?vehicleId=${item.vehicleId}`); | |||||
}else if (state.type == "32") { | }else if (state.type == "32") { | ||||
navTo(`/subpackage/after-sale/transfer-ownership/transfer-confirm?id=${item.id}`) | navTo(`/subpackage/after-sale/transfer-ownership/transfer-confirm?id=${item.id}`) | ||||
}else if (state.type == "33") { | }else if (state.type == "33") { |
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
console.log("11",{ | |||||
"uid":getItem('openId'),//用户唯一标识(微信公众号openid) | |||||
"phone":getItem('mobile'), | |||||
"chl":"9ZHOUETC" | |||||
}) | |||||
request(getOnLineUrlApi, options).then((res) => { | request(getOnLineUrlApi, options).then((res) => { | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
url.value=data.data.rd | url.value=data.data.rd |
<view class="selectCar-box"> | <view class="selectCar-box"> | ||||
<view class="details"> | <view class="details"> | ||||
<view class="title"> 基础信息 </view> | <view class="title"> 基础信息 </view> | ||||
<view class="details-item"> | |||||
<view> 订单编号: </view> | |||||
<text>{{ orderInfos.orderId }}</text> | |||||
</view> | |||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> 用户名称: </view> | <view> 用户名称: </view> | ||||
<text>{{ orderInfos.customerName }}</text> | <text>{{ orderInfos.customerName }}</text> | ||||
</view> | </view> | ||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> 车牌颜色: </view> | <view> 车牌颜色: </view> | ||||
<text style="color: #00b38b">{{ | |||||
orderInfos.vehiclePlateColorStr | |||||
}}</text> | |||||
<text style="color: #00b38b">{{ getVehiclePlateColor(orderInfos.vehiclePlateColor)}}</text> | |||||
</view> | </view> | ||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> 收费车型: </view> | <view> 收费车型: </view> | ||||
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
navTo, | navTo, | ||||
getFormatDate, | |||||
desensitization | desensitization | ||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
import { | import { | ||||
onLoad, | onLoad, | ||||
onUnload, | |||||
onShow | |||||
onUnload | |||||
} from "@dcloudio/uni-app"; | } from "@dcloudio/uni-app"; | ||||
import { | import { | ||||
request | |||||
requestNew | |||||
} from "@/utils/network/request.js"; | } from "@/utils/network/request.js"; | ||||
import { | import { | ||||
orderDetail, | |||||
commGetDetail, | |||||
pinCodeUnlock | pinCodeUnlock | ||||
} from "@/utils/network/api.js"; | } from "@/utils/network/api.js"; | ||||
import { | |||||
getCredentialType | |||||
} from "@/subpackage/after-sale/js/credentialType.js"; | |||||
import { | import { | ||||
getEtcCardStatus | |||||
} from "@/subpackage/after-sale/js/etcCardStatus.js"; | |||||
import { | |||||
getObuStatus | |||||
} from "@/subpackage/after-sale/js/obuStatus.js"; | |||||
getVehiclePlateColor | |||||
} from "@/datas/vehiclePlateColor"; | |||||
import { | import { | ||||
getCodeName | getCodeName | ||||
} from "@/datas/queryKey.js"; | } from "@/datas/queryKey.js"; | ||||
import { | |||||
stringToJson | |||||
} from "@/utils/network/encryption"; | |||||
const tools = require("../../../static/etcUtil/tools.js"); | const tools = require("../../../static/etcUtil/tools.js"); | ||||
const bluetoothUtil = require("../../../static/etcUtil/index.js"); | const bluetoothUtil = require("../../../static/etcUtil/index.js"); | ||||
const state = reactive({ | const state = reactive({ | ||||
ownerIdtype: "", | ownerIdtype: "", | ||||
ownerIdnum: "", | ownerIdnum: "", | ||||
vehiclePlate: "", | vehiclePlate: "", | ||||
vehiclePlateColorStr: "", | |||||
vehiclePlateColor: "", | vehiclePlateColor: "", | ||||
vehicleType: "", | vehicleType: "", | ||||
cardId: "", | cardId: "", | ||||
cardStatus: "", | cardStatus: "", | ||||
obuId: "", | obuId: "", | ||||
obuStatus: "", | obuStatus: "", | ||||
cardEnableTime: "", | |||||
obuEnableTime: "", | |||||
cardExpireTime: "" | cardExpireTime: "" | ||||
}); | }); | ||||
let ordId = ''; | |||||
let vehicleId = ''; | |||||
onLoad((option) => { | onLoad((option) => { | ||||
//请求订单详情 | //请求订单详情 | ||||
queryOrderDetail(option.id); | |||||
ordId = option.id; | |||||
queryOrderDetail(option.vehicleId); | |||||
vehicleId = option.vehicleId; | |||||
if (option.state) { | if (option.state) { | ||||
tools.showLoadingAlert("正在执行指令"); | tools.showLoadingAlert("正在执行指令"); | ||||
state.disabled = true; | state.disabled = true; | ||||
uni.$off('bluetoothLink') | uni.$off('bluetoothLink') | ||||
}) | }) | ||||
//获取订单详情 | //获取订单详情 | ||||
const queryOrderDetail = (id) => { | |||||
const queryOrderDetail = (vehicleId) => { | |||||
const options = { | const options = { | ||||
type: 2, | type: 2, | ||||
data: { | data: { | ||||
id: id, | |||||
vehicleId | |||||
}, | }, | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
request(orderDetail, options).then((res) => { | |||||
let orderInfo = JSON.parse(res.bizContent); | |||||
requestNew(commGetDetail, options).then((res) => { | |||||
let orderInfo = res; | |||||
console.log("orderInfo", orderInfo); | console.log("orderInfo", orderInfo); | ||||
orderInfos.orderId = orderInfo.orderId; | orderInfos.orderId = orderInfo.orderId; | ||||
orderInfos.customerName = orderInfo.customerName; | |||||
orderInfos.ownerIdtype = orderInfo.ownerIdtype; | |||||
orderInfos.ownerIdnum = desensitization(orderInfo.ownerIdnum); | |||||
orderInfos.customerName = orderInfo.name; | |||||
orderInfos.ownerIdtype = orderInfo.idType; | |||||
orderInfos.ownerIdnum = desensitization(orderInfo.idNum); | |||||
orderInfos.vehiclePlate = orderInfo.vehiclePlate; | orderInfos.vehiclePlate = orderInfo.vehiclePlate; | ||||
orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | |||||
orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; | orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; | ||||
orderInfos.vehicleType = orderInfo.vehicleType; | orderInfos.vehicleType = orderInfo.vehicleType; | ||||
orderInfos.cardId = orderInfo.cardId; | orderInfos.cardId = orderInfo.cardId; | ||||
orderInfos.cardStatus = orderInfo.cardStatus; | orderInfos.cardStatus = orderInfo.cardStatus; | ||||
orderInfos.obuId = orderInfo.obuId; | orderInfos.obuId = orderInfo.obuId; | ||||
orderInfos.obuStatus = orderInfo.obuStatus; | orderInfos.obuStatus = orderInfo.obuStatus; | ||||
orderInfos.cardEnableTime = orderInfo.cardEnableTime.substring(0, 10); | |||||
orderInfos.cardExpireTime = orderInfo.cardExpireTime; | |||||
orderInfos.obuEnableTime = orderInfo.obuEnableTime.substring(0, 10); | |||||
orderInfos.cardExpireTime = orderInfo.cardExpiretime.replace('T',' '); | |||||
}); | }); | ||||
}; | }; | ||||
//PIN解锁 请求 | //PIN解锁 请求 | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
request(pinCodeUnlock, options).then((res) => { | |||||
requestNew(pinCodeUnlock, options).then((res) => { | |||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
//第一次调用 | //第一次调用 | ||||
let result = stringToJson(res.bizContent); | |||||
let result = res; | |||||
let cmdArray = result.command ? result.command.split(",") : ""; | let cmdArray = result.command ? result.command.split(",") : ""; | ||||
if (cmdArray.length > 0) { | if (cmdArray.length > 0) { | ||||
tools.showLoadingAlert("正在执行指令"); | tools.showLoadingAlert("正在执行指令"); | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
request(pinCodeUnlock, options).then((res) => { | |||||
requestNew(pinCodeUnlock, options).then((res) => { | |||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
let result = stringToJson(res.bizContent); | |||||
let result = res; | |||||
console.log("result===", result) | console.log("result===", result) | ||||
if (result.cardUnblockStatus == "1") { | if (result.cardUnblockStatus == "1") { | ||||
tools.showModalAlert("解锁成功", function successFunc() {}); | tools.showModalAlert("解锁成功", function successFunc() {}); | ||||
//去连接蓝牙 | //去连接蓝牙 | ||||
const toPage = () => { | const toPage = () => { | ||||
navTo("/pages/bluetooth/bluetooth?routeType=3&id=" + ordId); //去连接蓝牙 | |||||
navTo("/pages/bluetooth/bluetooth?routeType=3&vehicleId=" + vehicleId); //去连接蓝牙 | |||||
}; | }; | ||||
//返回列表 | //返回列表 |
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import { onLoad, onPageScroll,onShow } from "@dcloudio/uni-app"; | |||||
import { onLoad, onPageScroll} from "@dcloudio/uni-app"; | |||||
import { reactive, ref } from "vue"; | import { reactive, ref } from "vue"; | ||||
import { | import { | ||||
PAYMENTORDERAPPLY, | PAYMENTORDERAPPLY, | ||||
OrderStatus | OrderStatus | ||||
} from "@/datas/enum"; | } from "@/datas/enum"; | ||||
import useOrderSkip from "@/composables/order/useOrderSkip"; | import useOrderSkip from "@/composables/order/useOrderSkip"; | ||||
const { gotoActiveOrder } = useOrderSkip(); | |||||
import { | import { | ||||
setItem | setItem | ||||
} from "@/utils/storage"; | } from "@/utils/storage"; | ||||
console.log("state.dataArray", state.dataArray) | console.log("state.dataArray", state.dataArray) | ||||
}); | }); | ||||
} | } | ||||
onShow(()=>{ | |||||
if(state.continue=1){ | |||||
orderDetail(state.orderId) | |||||
} | |||||
}) | |||||
// 车辆详情 | |||||
const orderDetail = (orderNo) => { | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
orderNo | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
requestNew(orderQueryDetail, options).then((res) => { | |||||
console.log("orderQueryDetail", res) | |||||
if (res['orderStep'] == OrderStatus['待激活']) { | |||||
// 待激活 | |||||
gotoActiveOrder(res) | |||||
} | |||||
}) | |||||
} | |||||
onLoad((option : any) => { | onLoad((option : any) => { | ||||
console.log("传递过来的到支付页面", option) | console.log("传递过来的到支付页面", option) | ||||
state.orderId = option.orderId; | state.orderId = option.orderId; | ||||
extraData: {}, | extraData: {}, | ||||
envVersion:'trial', | envVersion:'trial', | ||||
success(res) { | success(res) { | ||||
state.continue=1 | |||||
console.log(res); | console.log(res); | ||||
}, | }, | ||||
complete(res) { | complete(res) { | ||||
extraData: {}, | extraData: {}, | ||||
envVersion:'trial', | envVersion:'trial', | ||||
success(res) { | success(res) { | ||||
state.continue=1 | |||||
console.log(res); | console.log(res); | ||||
}, | }, | ||||
complete(res) { | complete(res) { | ||||
qdSignUrl:"", | qdSignUrl:"", | ||||
qdSignAppId:"", | qdSignAppId:"", | ||||
qtSign:"", | qtSign:"", | ||||
continue:0,//继续执行,不需要点击 | |||||
xianxia:"",//线下订单 1 | xianxia:"",//线下订单 1 | ||||
}); | }); |
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import carNumberInput from "./components/car-number-input.vue"; | import carNumberInput from "./components/car-number-input.vue"; | ||||
import { reactive } from "vue"; | import { reactive } from "vue"; | ||||
import { onLoad, onShow } from "@dcloudio/uni-app"; | |||||
import { onLoad} from "@dcloudio/uni-app"; | |||||
import { | import { | ||||
navTo, hasLogin | navTo, hasLogin | ||||
} from "@/utils/utils" | } from "@/utils/utils" | ||||
orderId: "", | orderId: "", | ||||
words: "", | words: "", | ||||
carAll:"", | carAll:"", | ||||
continue:0,//继续执行,不需要点击 | |||||
}); | }); | ||||
onShow(() => { | |||||
onLoad(() => { | |||||
if (state.orderId) { | if (state.orderId) { | ||||
state.continue=1 | |||||
// 签约完回来 | // 签约完回来 | ||||
orderDetail(state.orderId) | orderDetail(state.orderId) | ||||
}else{ | }else{ | ||||
// 待激活 | // 待激活 | ||||
state.words = "审核不通过" | state.words = "审核不通过" | ||||
} | } | ||||
console.log("continue",state.continue) | |||||
if(state.continue==1){ | |||||
savaHandle() | |||||
} | |||||
} | } | ||||
} | } | ||||
const savaHandle = () => { | const savaHandle = () => { |
export const cardStopOrStart = "892" //ASS-卡停/启用 | export const cardStopOrStart = "892" //ASS-卡停/启用 | ||||
export const deviceUpgrade = "896" //BDS-设备升级接口 | export const deviceUpgrade = "896" //BDS-设备升级接口 | ||||
export const cardModifyConfirm = "898" //ASS-卡信息变更确认 | export const cardModifyConfirm = "898" //ASS-卡信息变更确认 | ||||
export const pinCodeUnlock = "862" //ASS-卡PIN解锁 | |||||
//公务车 | //公务车 | ||||
export const gongWuChefindFormatVehicleInfo = "507"; //制式警车信息查询 ,只用于同步IF01001202206010854 | export const gongWuChefindFormatVehicleInfo = "507"; //制式警车信息查询 ,只用于同步IF01001202206010854 | ||||
export const orderQueryDetail = "/iaw/app/issue/order/orderQueryDetail"; //订单查询详情(其他地方跳转过来) | export const orderQueryDetail = "/iaw/app/issue/order/orderQueryDetail"; //订单查询详情(其他地方跳转过来) | ||||
export const cardObuQueryinLog = "/iaw/ass/query/cardObuQueryInLog"; //卡签信息提交日志记录 | export const cardObuQueryinLog = "/iaw/ass/query/cardObuQueryInLog"; //卡签信息提交日志记录 | ||||
export const hexToStrig = "/iaw/api/afterSale/comm/hexToStrig"; //解密信息 十六进制转汉字 | |||||
export const hexToStrig = "/iaw/api/afterSale/comm/hexToStrig"; //解密信息 十六进制转汉字 | |||||
export const pinCodeUnlock = "/iaw/api/afterSale/order/cardUnBlock" //ASS-卡PIN解锁 |