浏览代码

卡签续期

yxb
DESKTOP-2IO5MST\huting 1年前
父节点
当前提交
293260b7c4

+ 16
- 11
pages.json 查看文件

], ],
"subPackages": [{ "subPackages": [{
"root": "subpackage/after-sale", //售后相关 "root": "subpackage/after-sale", //售后相关
"pages": [
{
"pages": [{
"path": "month-statement/select-car", "path": "month-statement/select-car",
"style": { "style": {
"navigationBarTitleText": "选择车辆", "navigationBarTitleText": "选择车辆",
"navigationBarTitleText": "月结单查询", "navigationBarTitleText": "月结单查询",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
}, {
"path": "progress-query/progress-query-business-details", "path": "progress-query/progress-query-business-details",
"style": { "style": {
"navigationBarTitleText": "业务审核记录详情", "navigationBarTitleText": "业务审核记录详情",
}, },
{ {
"root": "subpackage/personal-center", //个人中心 "root": "subpackage/personal-center", //个人中心
"pages": [
{
"path": "car-details",
"style": {
"navigationBarTitleText": "车辆详情",
"enablePullDownRefresh": false
}
},
"pages": [{
"path": "car-message-change",
"style": {
"navigationBarTitleText": "车辆信息变更",
"enablePullDownRefresh": false
}
},
{
"path": "car-details",
"style": {
"navigationBarTitleText": "车辆详情",
"enablePullDownRefresh": false
}
},
{ {
"path": "get-code", "path": "get-code",
"style": { "style": {

+ 187
- 52
subpackage/after-sale/card-Renewal/renewal-confirm.vue 查看文件

<view> 3.xxxxxxxx </view> <view> 3.xxxxxxxx </view>
<view> 4.xxxxxxxx </view> <view> 4.xxxxxxxx </view>
</view> --> </view> -->
<button class="submit" @click="toPage" v-if="!state.flag" >卡签续期</button>
<button class="submit" @click="toPage" v-if="!state.flag">卡签续期</button>
<button class="submit" @click="toBack" v-else="state.flag">返回服务中心</button> <button class="submit" @click="toBack" v-else="state.flag">返回服务中心</button>
<view class="mask" v-show="state.showPopup"> <view class="mask" v-show="state.showPopup">
<view class="main"> <view class="main">
modifyObuVehicleInfo, modifyObuVehicleInfo,
obuActivation obuActivation
} from "@/utils/network/api.js"; } from "@/utils/network/api.js";
const cmd = require("../../../static/etcUtil/cmdConfig.js");

const cmd = require("../../../static/etcUtil/cmdConfig.js");
import {
IntegerToHexString,
AsciToHexString,
} from "@/utils/util/fileData.js";


import { import {
stringToJson stringToJson
const bluetoothUtil = require("../../../static/etcUtil/index.js"); const bluetoothUtil = require("../../../static/etcUtil/index.js");
const state = reactive({ const state = reactive({
showPopup: false, showPopup: false,
flag: false
flag: false,

}) })
const fileDataStrings = reactive({
approvedCount: 0, //核载人数
cardId: "", //卡号
obuId: "", //obu号
obuId: "", //obu号
packageNum: "", //套餐编号
axleCount: 0, //轴数
axleDistance: "", //轴距
engineNum: "", //发动机
vehicleVin: "",
vehicleEngineNum: "",
cardStatus: "",
obuStatus: "",
type: 0, //类型
userType: 0, //用户类型
vehiclePlate: "", //车牌
vehiclePlateColor: 0, //车牌颜色
vehicleDimensions: "",
outlineL: 0, //外廓 长
outlineW: 0, //外廓 宽
outlineH: 0, //外廓 高
wheelCount: "", //车轮数
vehicleIdNo: "", //车牌号
vehiclePlateColorStr: "",
customerTel: "",
customerId: "",
orderId: ""
});
let cmdRandNum = ''; let cmdRandNum = '';
const orderInfos = reactive({ const orderInfos = reactive({
orderId: "", orderId: "",
obuStatus: "", obuStatus: "",
cardEnableTime: "", cardEnableTime: "",
obuEnableTime: "", obuEnableTime: "",
cardExpireTime:"",
obuExpireTime:""
cardExpireTime: "",
obuExpireTime: ""
}); });


onLoad((option) => { onLoad((option) => {
//请求订单详情 //请求订单详情
queryOrderDetail(option.id); queryOrderDetail(option.id);
getOrderDetails(option.orderId)
}); });


onShow((option) => { onShow((option) => {
}; };
request(orderDetail, options).then((res) => { request(orderDetail, options).then((res) => {
let orderInfo = JSON.parse(res.bizContent); let orderInfo = JSON.parse(res.bizContent);
console.log("orderInfo",orderInfo);
console.log("orderInfo", orderInfo);
orderInfos.orderId = orderInfo.orderId; orderInfos.orderId = orderInfo.orderId;
orderInfos.ownerName = orderInfo.ownerName; orderInfos.ownerName = orderInfo.ownerName;
orderInfos.ownerIdtype = orderInfo.ownerIdtype; orderInfos.ownerIdtype = orderInfo.ownerIdtype;
orderInfos.obuEnableTime = orderInfo.obuEnableTime.substring(0, 10); orderInfos.obuEnableTime = orderInfo.obuEnableTime.substring(0, 10);
orderInfos.cardExpireTime = orderInfo.cardExpireTime; orderInfos.cardExpireTime = orderInfo.cardExpireTime;
orderInfos.obuExpireTime = orderInfo.obuExpireTime; orderInfos.obuExpireTime = orderInfo.obuExpireTime;
console.log("orderInfos.cardExpiretime",orderInfos.cardExpiretime,orderInfo.cardExpiretime)
console.log("orderInfos.cardExpiretime", orderInfos.cardExpiretime, orderInfo.cardExpiretime)
}); });
}; };




//签续期 请求 //签续期 请求
const getObuRenewal = () => { const getObuRenewal = () => {
console.log("899执行之前",);
let cmdArray1 = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd.RANDOM_NUMBER];
tools.showLoadingAlert("正在执行指令");
bluetoothUtil.transCmd(cmdArray1, "20", function(res) {
tools.hideLoadingAlert();
var str = res[3].substring(res[3].length - 4, res[3].length);
if (str == "9000") {
cmdRandNum = res[3].substring(0, res[3].length - 4);
const options = {
type: 2,
data: {
obuId: orderInfos.obuId,
random:cmdRandNum
},
method: "POST",
showLoading: true,
};
request(obuRenewal, options).then((res) => {
let datas = stringToJson(res.bizContent);
// let cmdArray = result.command.split(",");
console.log("899",datas,datas.data.APDU);
if (datas.data.APDU) {
tools.showLoadingAlert("正在执行指令");
bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
tools.hideLoadingAlert();
console.log("res=====",res,res[0])
// var str = res[3].substring(res[3].length - 4, res[3].length);
// if (res[0] == "9000") {
// cmdRandNum = res[3].substring(0, res[3].length - 4);
// getFileData((demos) => {
// modifyVehicle(demos);
// })
// } else {
// tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
// }
})
}
console.log("899执行之前", );
let cmdArray1 = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
tools.showLoadingAlert("正在执行指令");
bluetoothUtil.transCmd(cmdArray1, "20", function(res) {
tools.hideLoadingAlert();
console.log("=========3", res[2])
var str = res[2].substring(res[2].length - 4, res[2].length);
console.log("=========2")
if (str == "9000") {
console.log("=========1")
cmdRandNum = res[2].substring(0, res[2].length - 4);
const options = {
type: 2,
data: {
obuId: orderInfos.obuId,
random: cmdRandNum
},
method: "POST",
showLoading: true,
};
request(obuRenewal, options).then((res) => {
let datas = stringToJson(res.bizContent);
// let cmdArray = result.command.split(",");
console.log("899", datas, datas.data.APDU);
if (datas.data.APDU) {
tools.showLoadingAlert("正在执行指令");
bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
tools.hideLoadingAlert();
console.log("res=====", res, res[0])
let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd
.RANDOM_NUMBER
];
bluetoothUtil.transCmd(cmdArr, "20", function(res) {
console.log("chelaing======", res)
var str = res[3].substring(res[3].length - 4, res[3]
.length);
if (str == "9000") {
cmdRandNum = res[3].substring(0, res[3].length -
4);
console.log("0000000000000000000000000")
getFileData((demos) => {
modifyVehicle(demos);
}) })
} else {
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
}
} else {
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
}
})

})
}
}) })
} else {
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
}
})
};
//获取fileData
const getFileData = (fun) => {
//调用方式
request('6ed853e432fb4811a3c0d7d27034bd39', {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
fileData: fileDataStrings.vehiclePlate,
nLen: 24
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
}).then((les) => {
let result = stringToJson(les.bizContent);
console.log(les, '=========123')
let res1 = result.gbkFileData; //车牌号
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

let res3 = IntegerToHexString(1, 2); //类型

let res4 = IntegerToHexString(1, 2); //用户类型
let res5 = IntegerToHexString(fileDataStrings.outlineL, 4); //车辆尺寸 长
let res6 = IntegerToHexString(fileDataStrings.outlineW, 2); //车辆尺寸 宽
let res7 = IntegerToHexString(fileDataStrings.outlineH, 2); //车辆尺寸 高
let res8 = IntegerToHexString(4, 2); //获取轮数
let res9 = IntegerToHexString(4, 2); //轴数

let res10 = IntegerToHexString(null, 4); //轴距32
let res11 = IntegerToHexString(fileDataStrings.approvedCount, 6); //核载人数

let res12 = AsciToHexString(fileDataStrings.vehicleVin, 32); //车编号

// let res12 = JSON.parse(res.bizContent).gbkFileData; //车编号
let res13 = AsciToHexString(fileDataStrings.vehicleEngineNum, 32); //发动机

fun(res1 + res2 + res3 + res4 + res5 + res6 + res7 + res8 + res9 + res10 + res11 + res12 + res13);
})
}; };
/** /**
* 修改车辆信息 请求 * 修改车辆信息 请求
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: { data: {
Status: "0", Status: "0",
random: cmdRandNum,
random: cmdRandNum,
obuSerailNo: orderInfos.obuId, obuSerailNo: orderInfos.obuId,
fileData: ites, fileData: ites,
orderId: orderInfos.orderId, orderId: orderInfos.orderId,
.then((res) => { .then((res) => {
tools.hideLoadingAlert(); tools.hideLoadingAlert();
const datas = stringToJson(res.bizContent); const datas = stringToJson(res.bizContent);
console.log("modifyObuVehicleInfo",modifyObuVehicleInfo,datas)
console.log("modifyObuVehicleInfo", modifyObuVehicleInfo, datas)
tools.showLoadingAlert("正在执行指令"); tools.showLoadingAlert("正在执行指令");
if (datas.data.APDU) { if (datas.data.APDU) {
bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) { bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
console.log('执行指令结果', res) console.log('执行指令结果', res)
tools.hideLoadingAlert(); tools.hideLoadingAlert();
if (res[0] == "9000") { if (res[0] == "9000") {
getObuActivation();
//再次获取随机数
let cmdArr = [cmd.HOME_DIRECTORY, cmd.RANDOM_NUMBER];
bluetoothUtil.transCmd(cmdArr, '20', function(res) {
var str = res[1].substring(res[1].length - 4, res[1].length);
if (str == "9000") {
cmdRandNum = res[1].substring(0, res[1].length - 4);
getObuActivation();
} else {
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
}
})
} }
}); });
} }
console.log(stringToJson(res.bizContent)); console.log(stringToJson(res.bizContent));
const datas = stringToJson(res.bizContent); const datas = stringToJson(res.bizContent);
tools.showLoadingAlert("执行指令"); tools.showLoadingAlert("执行指令");
console.log("在线激活 请求==========================", datas, datas.data.APDU);
bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) { bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
tools.hideLoadingAlert(); tools.hideLoadingAlert();
console.log(res);
console.log("在线激活 请求", res);
if (res[0] == "9000") { if (res[0] == "9000") {
state.showPopup = true; state.showPopup = true;
} }
console.log(err); console.log(err);
}); });
}; };
//获取订单详情
const getOrderDetails = (id) => {
console.log('======获取订单信息======')
const options = {
type: 2,
data: {
id: id,
},
method: "POST",
showLoading: true,
};
request(IFCODE.orderDetail, options).then((res) => {
orderInfo = JSON.parse(res.bizContent);
console.log("orderInfo", orderInfo);
console.log("orderInfores", res);
if (orderInfo) {
fileDataStrings.userType = orderInfo.userType; //用户类型
fileDataStrings.approvedCount = parseInt(orderInfo.vehicleApprovedCount); //核载人数
fileDataStrings.cardId = orderInfo.cardId;
fileDataStrings.packageNum = orderInfo.packageNum;
fileDataStrings.obuId = orderInfo.obuId;
fileDataStrings.vehicleVin = orderInfo.vehicleVin;
fileDataStrings.vehicleEngineNum = orderInfo.vehicleEngineNum;
fileDataStrings.axleCount = parseInt(orderInfo.vehicleAxleCount); //轴数
fileDataStrings.engineNum = orderInfo.vehicleVin; //发动机
fileDataStrings.type = parseInt(orderInfo.vehicleType); //类型
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions;
let arr = orderInfo.vehicleDimensions.split("X");
fileDataStrings.outlineL = parseInt(arr[0]); //外廓 长
fileDataStrings.outlineW = parseInt(arr[1]); //外廓 宽
fileDataStrings.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号
fileDataStrings.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr;
fileDataStrings.customerTel = orderInfo.customerTel;
fileDataStrings.customerId = orderInfo.customerId;
fileDataStrings.orderId = orderInfo.orderId;
}
});
};
</script> </script>


<style> <style>

+ 3
- 3
subpackage/after-sale/card-Renewal/select-car.vue 查看文件

const quanCheckActionTrue = () => { const quanCheckActionTrue = () => {
let source = "" let source = ""
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
source ="ALI"
source = "ALI"
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
source ="WECHAT"
source = "WECHAT"
// #endif // #endif
var data = { var data = {
opId: getItem(StorageKeys.OpenId), opId: getItem(StorageKeys.OpenId),


const choose = (i, item) => { const choose = (i, item) => {
console.log(item.cardId) console.log(item.cardId)
navTo(`/subpackage/after-sale/card-Renewal/renewal-confirm?id=${item.id}`)
navTo(`/subpackage/after-sale/card-Renewal/renewal-confirm?id=${item.id}&orderId=${item.orderId}`)
} }
</script> </script>



+ 19
- 7
subpackage/personal-center/car-details.vue 查看文件

<view><text>总质量:</text><text>{{state.tableData['totalMass']}}Kg</text></view> <view><text>总质量:</text><text>{{state.tableData['totalMass']}}Kg</text></view>
<view><text>车轴数:</text><text>{{state.tableData['axleCount']}}轴</text></view> <view><text>车轴数:</text><text>{{state.tableData['axleCount']}}轴</text></view>
<view><text>状态:</text><text>{{state.tableData['status']}}</text></view> <view><text>状态:</text><text>{{state.tableData['status']}}</text></view>
<view><text>行驶证主页:</text><image mode="widthFix" :src="state.tableData['vehPosImgUrl']"></image></view>
<view><text>行驶证副业:</text><image mode="widthFix" :src="state.tableData['vehNegImgUrl']"></image></view>
<view><text>车头照:</text><image mode="widthFix" :src="state.tableData['vehBodyUrl']"></image></view>
<button class="submit" @click="nextACtion">车辆信息变更</button>
<view><text>行驶证主页:</text>
<image mode="widthFix" :src="state.tableData['vehPosImgUrl']"></image>
</view>
<view><text>行驶证副业:</text>
<image mode="widthFix" :src="state.tableData['vehNegImgUrl']"></image>
</view>
<view><text>车头照:</text>
<image mode="widthFix" :src="state.tableData['vehBodyUrl']"></image>
</view>
<button class="submit" @click="carChange(state.tableData['vehicleId'])">车辆信息变更</button>
</view> </view>
</view> </view>


state.tableData = JSON.parse(decodeURIComponent(options.params)) state.tableData = JSON.parse(decodeURIComponent(options.params))
console.log("options.promoteId", 1111, state.tableData) console.log("options.promoteId", 1111, state.tableData)
}) })
const carChange = (vehicleId) => {
uni.navigateTo({
url: `/subpackage/personal-center/car-message-change?vehicleId=${vehicleId}`
})
}
</script> </script>


<style scoped> <style scoped>
padding: 12rpx; padding: 12rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: white; background-color: white;
margin: 20rpx auto;
margin: 20rpx auto;
} }


.list-item>view { .list-item>view {
display: inline-block; display: inline-block;
word-break: break-all; word-break: break-all;
} }
image{

image {
width: 220rpx; width: 220rpx;
} }

.submit { .submit {
margin-top: 100rpx; margin-top: 100rpx;
width: 670rpx; width: 670rpx;

+ 1318
- 0
subpackage/personal-center/car-message-change.vue
文件差异内容过多而无法显示
查看文件


正在加载...
取消
保存