@@ -237,6 +237,7 @@ | |||
<view>寄回信息:</view> | |||
<view>收件人:ETC售后 联系电话:18798751224(此电话仅用于ETC售后收取快递,如需咨询业务请致电4008008787)</view> | |||
<view>寄回地址:{{config.address}}</view> | |||
<view>补换订单审核时效:设备签收后的2个自然日完成审核,审核通过后请关注订单物流单号;</view> | |||
</view> | |||
<view class="subBtn"> | |||
<submit-button :title="config ? config.submitName : '提交'" form-type="submit" |
@@ -182,8 +182,9 @@ | |||
function cmdResult() { | |||
uni.showLoading({ | |||
title: '执行指令', | |||
mask: true | |||
title: '正在激活,请等待', | |||
mask: true, | |||
duration:10000 | |||
}); | |||
const options = { | |||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||
@@ -198,29 +199,33 @@ | |||
request('4b001421f5354c248a7759971881b52f', options) | |||
.then((res) => { | |||
console.log("在线激活 请求"); | |||
uni.showLoading({ | |||
title: '正在激活,请等待', | |||
mask: true, | |||
duration:8000 | |||
}); | |||
console.log(stringToJson(res.bizContent)); | |||
const datas = stringToJson(res.bizContent).data; | |||
console.log("datas===",datas) | |||
uni.showLoading({ | |||
title: '执行指令', | |||
mask: true | |||
}); | |||
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) { | |||
console.log("res申请",res) | |||
implementCmd(datas.transOrderId,datas.cmd,res.toString(),datas.stepNo) | |||
}, () => { | |||
showModals('在线激活异常') | |||
tools.hideLoadingAlert(); | |||
}); | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
tools.hideLoadingAlert(); | |||
}); | |||
} | |||
function implementCmd(transOrderId, cmd, cmdResult, stepNo) { | |||
uni.showLoading({ | |||
title: '执行指令', | |||
mask: true | |||
title: '正在激活,请等待', | |||
mask: true, | |||
duration:5000 | |||
}); | |||
const options = { | |||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||
@@ -239,7 +244,6 @@ | |||
console.log(stringToJson(res.bizContent)); | |||
const datas = stringToJson(res.bizContent).data; | |||
console.log("在线激活 请求",datas); | |||
// tools.showLoadingAlert("执行指令"); | |||
if (datas.stepNo == 100) { | |||
state.disabled = true | |||
tools.hideLoadingAlert(); | |||
@@ -248,18 +252,20 @@ | |||
uni.navigateTo({ | |||
url: "/subpackage/after-sale/deviceInfo/deviceInfo", | |||
}); | |||
}, 2000) | |||
}, 3000) | |||
} else { | |||
console.log("datas.stepNo",datas.stepNo) | |||
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) { | |||
implementCmd(transOrderId,datas.cmd,res.toString(),datas.stepNo) | |||
}, () => { | |||
showModals('在线激活异常') | |||
tools.hideLoadingAlert(); | |||
}); | |||
} | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
tools.hideLoadingAlert(); | |||
}); | |||
} | |||
@@ -268,45 +274,6 @@ | |||
state.disabled = false | |||
console.log('orderInfo参数', orderInfo, state.disabled) | |||
cmdResult() | |||
// //0 是原来的激活 1 是过户激活 | |||
// if (state.transfer) { | |||
// // 获取cardId | |||
// getCardId() | |||
// // 过户激活 1 | |||
// // 1. 过户激活申请 2.设备升级 3.过户升级(跟过户升级一样) 4.79(BDS-安装申请)(后台数据)- | |||
// // >76(VFJ-OBU在线激活)(指令接口)->80(BDS-安装确认)->73(BDS-卡签绑定)(指令接口)->51(BDS-写卡指令返回)(指令接口) | |||
// } else { | |||
// console.log("=================================") | |||
// if (orderInfo) { | |||
// //根据订单详情走相应的断步功能 | |||
// const cardId = orderInfo.cardId; | |||
// const cardStatus = orderInfo.cardStatus != null ? orderInfo.cardStatus : '0' | |||
// const obuId = orderInfo.obuId; | |||
// const obuStatus = orderInfo.obuStatus != null ? orderInfo.obuStatus : '9' | |||
// console.log('当前卡签状态', cardId, obuId, cardStatus, obuStatus) | |||
// console.log('输出内容', obu.obuId, '=======', fileDataStrings.obuId, obu.obuId != fileDataStrings.obuId) | |||
// if (fileDataStrings.obuId) { | |||
// if (obu.obuId + '' != fileDataStrings.obuId + '') { | |||
// tools.showModalAlert("订单设备号信息与当前设备号信息不符!"); | |||
// return | |||
// } | |||
// } | |||
// if (!cardId) { //卡发行 | |||
// getCardId() | |||
// } else if (cardId && cardStatus == '0') { //卡发行 | |||
// getCardId() | |||
// } else if (!obuId) { //OBU发行 | |||
// getObuApply(); | |||
// } else if (obuId && obuStatus == '9') { //OBU发行 | |||
// getObuApply(); | |||
// } else if (cardId && obuId && (obuStatus == '1' || obuStatus == '11' || obuStatus == '0')) { | |||
// getInstallApply(); //激活 | |||
// } else { | |||
// getCardId() | |||
// } | |||
// } | |||
// } | |||
}; | |||
//获取订单详情 | |||
@@ -337,8 +304,6 @@ | |||
.vehiclePlateColor); | |||
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌 | |||
fileDataStrings.vehicleClassStr = orderInfo.vehicleClassStr; | |||
cancelOrderRequest(orderInfo.orderId) | |||
} | |||
}); |
@@ -580,15 +580,6 @@ | |||
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色 | |||
console.log("车辆信息", orderInfo) | |||
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions; | |||
// let arr = orderInfo.vehicleDimensions.split("X"); | |||
// console.log("orderInfo.vehicleDimensions", orderInfo.vehicleDimensions.split("X")) | |||
// fileDataStrings.outlineL = parseInt(arr[0]); //外廓 长 | |||
// fileDataStrings.outlineW = parseInt(arr[1]); //外廓 宽 | |||
// if(arr[2].indexOf('mm')){ | |||
// fileDataStrings.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高 | |||
// }else{ | |||
// fileDataStrings.outlineH = arr[2] //外廓 高 | |||
// } | |||
fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号 | |||
fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo | |||
.vehiclePlateColor); |
@@ -228,7 +228,6 @@ | |||
// navTo(`/subpackage/after-sale/activation-once-again/select-car?type=1`) | |||
// } | |||
// } | |||
// }) | |||
} else if (state.type == "29") { | |||
navTo(`/subpackage/personal-center/search/select-card?vehicleId=${state.vehicleId}`) |
@@ -22,6 +22,7 @@ | |||
<view>寄回信息:</view> | |||
<view>收件人:ETC售后 联系电话:18798751224(此电话仅用于ETC售后收取快递,如需咨询业务请致电4008008787)</view> | |||
<view>寄回地址:{{state.address}}</view> | |||
<view>补换订单审核时效:设备签收后的2个自然日完成审核,审核通过后请关注订单物流单号;</view> | |||
</view> | |||
<button class="submit" @click="submit">下一步</button> | |||
<!-- 自提网点弹窗 --> |
@@ -31,9 +31,12 @@ | |||
</view> | |||
</view> | |||
<view class="btns"> | |||
<view class="btn btn-primary as-gravity-center" @click="gotoConfirmReceipt(item)" v-if="item.orderStep==9 && item.orderStatus=='0'">确认收货</view> | |||
<view class="btn btn-primary as-gravity-center" @click="gotoActiveOrder(item)" v-if="item.orderStep==10 && item.orderStatus=='0'">去激活</view> | |||
<view class="btn btn-primary as-gravity-center" @click="gotoOnceActivate(item)" v-if="item.orderStep==11 && item.orderStatus=='1'">OBU重新激活</view> | |||
<view class="btn btn-primary as-gravity-center" @click="gotoConfirmReceipt(item)" | |||
v-if="item.orderStep==9 && item.orderStatus=='0'">确认收货</view> | |||
<view class="btn btn-primary as-gravity-center" @click="gotoActiveOrder(item)" | |||
v-if="item.orderStep==10 && item.orderStatus=='0'">去激活</view> | |||
<view class="btn btn-primary as-gravity-center" @click="gotoOnceActivate(item)" | |||
v-if="item.orderStep==11 && item.orderStatus=='1'">OBU重新激活</view> | |||
</view> | |||
</view> | |||
@@ -47,26 +50,26 @@ | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { onLoad, onUnload, onReachBottom, onPullDownRefresh } from "@dcloudio/uni-app"; | |||
import { getItem, StorageKeys } from "@/utils/storage"; | |||
import { hasLogin, msg, getOrderStatusName, getOrderTypeName,navTo} from "@/utils/utils"; | |||
import { noActivationOrder } from "@/utils/network/api"; | |||
import { getItem, StorageKeys,setItem } from "@/utils/storage"; | |||
import { hasLogin, msg, getOrderStatusName, getOrderTypeName, navTo } from "@/utils/utils"; | |||
import { noActivationOrder,ndActivateVerification,silentLoginApi} from "@/utils/network/api"; | |||
import { PageData } from "@/datas/enum"; | |||
import useOrderSkip from "@/composables/order/useOrderSkip"; | |||
//跳转 | |||
const { gotoActiveOrder,gotoConfirmReceipt } = useOrderSkip(); | |||
const gotoOnceActivate=(item)=>{ | |||
// #ifdef MP-WEIXIN | |||
navTo( | |||
`/subpackage/after-sale/activation-once-again/activation-once-again?id=${item.id}` | |||
); | |||
// #endif | |||
// #ifdef MP-ALIPAY | |||
navTo( | |||
`/subpackage/after-sale/activation-once-again/activation-once-again-ali?id=${item.id}` | |||
); | |||
// #endif | |||
} | |||
const { gotoActiveOrder, gotoConfirmReceipt } = useOrderSkip(); | |||
const gotoOnceActivate = (item) => { | |||
// #ifdef MP-WEIXIN | |||
navTo( | |||
`/subpackage/after-sale/activation-once-again/activation-once-again?id=${item.id}` | |||
); | |||
// #endif | |||
// #ifdef MP-ALIPAY | |||
navTo( | |||
`/subpackage/after-sale/activation-once-again/activation-once-again-ali?id=${item.id}` | |||
); | |||
// #endif | |||
} | |||
const config = { | |||
emptyHint: { | |||
hint: '~ 暂无待激活订单 ~', | |||
@@ -88,6 +91,9 @@ const gotoOnceActivate=(item)=>{ | |||
status: 'more', | |||
reload: false, | |||
ordersList: [], | |||
vehicleId:"", | |||
tel:"", | |||
qdOrderNo:"" | |||
}) | |||
/* 刷新列表 */ | |||
@@ -160,27 +166,85 @@ const gotoOnceActivate=(item)=>{ | |||
} | |||
} | |||
onLoad(() => { | |||
if (!hasLogin()) { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '您还未登录小程序,请先登录小程序', | |||
showCancel: false, | |||
success: function (res) { | |||
if (res.confirm) { | |||
navTo(`/login/login?back=1`) | |||
} | |||
} | |||
onLoad((option) => { | |||
// 诺德数据过来 验证+无感登录 | |||
if(option.qdOrderNo){ | |||
params.qdOrderNo=option.qdOrderNo | |||
params.tel=option.tel | |||
params.vehicleId=option.vehicleId | |||
ndActivateVerificationQuery().then((data) => { | |||
console.log("验证") | |||
silentLogin(data).then(() => { | |||
//监听订单刷新信息 | |||
uni.$on('refreshOrder', (data) => { | |||
refreshList(); | |||
}); | |||
console.log("guoliale") | |||
refreshList(); | |||
}) | |||
}) | |||
}else{ | |||
//监听订单刷新信息 | |||
uni.$on('refreshOrder', (data) => { | |||
refreshList(); | |||
}); | |||
} | |||
//监听订单刷新信息 | |||
uni.$on('refreshOrder', (data) => { | |||
console.log("guoliale") | |||
refreshList(); | |||
}); | |||
console.log("guoliale") | |||
refreshList(); | |||
} | |||
}); | |||
// 诺德激活验证接口 | |||
const ndActivateVerificationQuery = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
"code": "1", //诺德 | |||
"qdOrderNo": params.qdOrderNo, //渠道订单号 | |||
"tel": params.tel, | |||
"vehicleId": params.vehicleId, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(ndActivateVerification, options); | |||
const data = stringToJson(res.bizContent); | |||
console.log("data==", data) | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
} | |||
const silentLogin = (data) => { | |||
if (data.userType == "1") { | |||
var datas = { | |||
userType: data.userType, | |||
account: data.mobile, | |||
loginSource: getItem("loginSource"), | |||
}; | |||
} else { | |||
var datas = { | |||
userType: data.userType, | |||
account: data.userIdNum, | |||
loginSource: getItem("loginSource"), | |||
}; | |||
} | |||
const options = { | |||
type: 2, | |||
data: datas, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(silentLoginApi, options); | |||
const data = stringToJson(res.bizContent); | |||
setItem("openId", data.openId); | |||
setItem("token", data.accessToken); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
} | |||
onUnload(() => { | |||
uni.$off('refreshOrder'); | |||
}); |
@@ -314,4 +314,5 @@ export const channelSingQueryApi = "0c6d650d94274ee086008652fa0fe41a" | |||
export const decrypt9901 = "c6e7c27e774c493d82c942dc69507d67" | |||
export const getMailingAddressApi = "1babe3f09d0b458a84c798e89895664f" //更换设备获取邮寄地址 | |||
export const addAddressApi = "09d4ba9985394ef8a241acabe888273c" //支付完添加收货地址 | |||
export const oneOreTwo = "3e09b1199e854a91a4d3a9329e734b8d" //判断诺德订单是一次激活还是重新激活 | |||
export const oneOreTwo = "3e09b1199e854a91a4d3a9329e734b8d" //判断诺德订单是一次激活还是重新激活 | |||
export const ndActivateVerification = "6aeefd1ec9c1469fae240b9dca3733a4" //诺德激活验证接口 |