瀏覽代碼

修复bug

master
梁超 3 天之前
父節點
當前提交
2c15c368ad
共有 3 個檔案被更改,包括 56 行新增62 行删除
  1. 51
    56
      subpackage/after-sale/activation/activate.vue
  2. 4
    5
      subpackage/after-sale/deviceInfo/deviceInfo.vue
  3. 1
    1
      utils/network/api.js

+ 51
- 56
subpackage/after-sale/activation/activate.vue 查看文件

@@ -81,7 +81,8 @@
cardObuQuery,
cardObuQueryinLog,
obuFileDataDecrypt,
vfjObuActive
vfjObuActive,
saveRecord
} from "@/utils/network/api";
import {
agentId
@@ -152,7 +153,7 @@
console.log(state);
state.transfer = Number(option.transfer)
//获取订单详情
if (option.transfer == '1') {
if (option.transfer == '1' || !state.transfer) {
getOrderDetails(orderData.orderId);
} else {
getObuId();
@@ -248,8 +249,9 @@
});

function cmdResult1() {
console.log("我的orderInfo:",orderInfo)
// tools.showLoadingAlert('正在激活,请等待')
state.progressNum = 10
state.progressNum = 100 / 20
state.showPopup = true;
const options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
@@ -294,8 +296,8 @@

function implementCmd(transOrderId, cmd, cmdResult, stepNo) {
console.log("datas.stepNo1", stepNo)
if (state.progressNum > 100) {
state.progressNum = Number(stepNo) * 10 + 10
if (state.progressNum != 100) {
state.progressNum = Number(stepNo) * 100 / 20
} else {
state.progressNum = 100
}
@@ -426,12 +428,12 @@
console.log(res);
if (res[0] == "9000") {
msg('激活成功');
// navTo(`/pages/order/order?index=${0}`);
uni.switchTab({
url: '/pages/index/index'
}).then(res => {
navTo(`/pages/order/order?index=${0}`)
})
navTo(`/pages/index/index`);
// uni.switchTab({
// url: '/pages/index/index'
// }).then(res => {
// navTo(`/pages/order/order?index=${0}`)
// })
} else {
msg(`激活失败,提示码:${res[0]}`);
}
@@ -754,7 +756,7 @@
obu.wheelCount = res.wheelsCount;
obu.outsideDimensions = res.carLong + "x" + res.carWidth +
"x" + res.carHeight
getObuList();
saveRecordApi();


tools.hideLoadingAlert();
@@ -776,56 +778,49 @@
alertF("OBU_SYSTEM_FILE指令长度不符" + res[1]);
})
};
const getObuList = () => {
var data = {
obuId: obu.num,
cardId: card.cardNo,
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
requestNew(cardObuQuery, options).then((res) => {
tools.hideLoadingAlert();
let result = res;
state.obuStatus = result.obuStatus ? result.obuStatus : ""
state.cardStatus = result.cardStatus
if (result.cardType == 1 && result.debitType == 1) {
state.cardTypeName = "预存卡"
card['cardTypeName'] = 3
} else if (result.cardType == 2) {
state.cardTypeName = "储值卡"
card['cardTypeName'] = 2
} else {
state.cardTypeName = "记账卡"
card['cardTypeName'] = 1
}
// 卡签提交得信息
card['cardStatus'] = result.cardStatus
obu['obuStatus'] = result.obuStatus ? result.obuStatus : ""
cardObuMsgUp()
})
}
// 签信息提交日志记录
const cardObuMsgUp = () => {
var data = {
cardLogInfo: card,
obuLogInfo: obu,
type: "active"
};
const saveRecordApi = () => {
const options = {
type: 2,
data: data,
data: {
approvedCount: obu.approvedCount, // 核定载人数
axleCount: obu.axleCount, // 车轴数
axleDistance: obu.axleDistance, // 轴距
bindingFinishStatus: card.favourableStr, // 卡签绑定完成状态
cardEnableTime: card.startTime, // 卡启用时间
cardExpireTime: card.endTime, // 卡过期时间
cardId: card.cardNo, // 卡号
cardVehiclePlate: card.vehiclePlate, // 车牌号码
cardVehiclePlateColor: card.colorStr, // 车牌颜色
cardVehicleType: card.typeStr, // 行驶证车辆类型
cardVersion: card.version, // 卡版本号
checksums: card.money, // 校验值
customerIdNum: card.idNumStr, // 身份证号
customerName: card.userNameStr, // 用户姓名
isActive: obu.isJHStr, // 是否激活
loadStatus: obu.loadStatus, // 拆卸状态
obuEnableTime: obu.startTime, // 启用时间
obuExpireTime: obu.endTime, // 到期时间
obuId: obu.num, // obu编号
obuVehicleCustomerType: obu.userTypeStr, // 车辆用户类型
obuVehiclePlate: obu.vehiclePlate, // 车牌号码
obuVehiclePlateColor: obu.vehiclePlateColorStr, // 车牌颜色
obuVehicleType: obu.typeStr, // 行驶证车辆类型
obuVersion: obu.version ,// obu版本号
vehicleDimensions: obu.outsideDimensions, // 外廓尺寸
vehicleEngineNum: obu.engineNum, // 发动机号码
vin: obu.vin, // 车辆识别代码
wheelCount: obu.wheelCount, // 车轮数
},
method: "POST",
showLoading: true,
showLoading: false,
};
requestNew(cardObuQueryinLog, options).then((res) => {
tools.hideLoadingAlert();
navTo(`/subpackage/after-sale/activation/result`)
requestNew(saveRecord, options).then((res) => {
console.log("saveRecord", card, obu, state)
msg('激活完成');
navTo(`navTo(`/pages/order/order?index=${0}`)`)
console.log("提交成功")
})
});
}
/**
* 解密OBU车辆信息

+ 4
- 5
subpackage/after-sale/deviceInfo/deviceInfo.vue 查看文件

@@ -119,7 +119,7 @@
</view>
<view class="cell">
<view class="cell-left">拆卸状态</view>
<view class="cell-right">{{obu.loadStatus=='01'?'正常':'已拆卸'}}</view>
<view class="cell-right">{{obu.loadStatus }}</view>
</view>
<view class="cell">
<view class="cell-left">版本号</view>
@@ -347,6 +347,7 @@
obu.isJH = res[1].substring(53, 54)
obu.isJHStr = res[1].substring(53, 54) == "1" ? "是" : res[1].substring(53, 54) == "0" ?
"否" : "其他:" + res[1].substring(53, 54);
console.log("我的loadStatus:",res[1].substring(52, 54))
obu.loadStatus=res[1].substring(52, 54)=='01'?'正常':'已拆卸',

console.log("开始执行车辆信息识读");
@@ -385,9 +386,7 @@
obu.vin = res.vin.replace(/\u0000/g, '');
obu.wheelCount = res.wheelsCount;
obu.outsideDimensions = res.carLong + "x" + res.carWidth + "x" + res.carHeight
getObuList();

saveRecordApi();
tools.hideLoadingAlert();
});
//断开蓝牙
@@ -427,7 +426,7 @@
checksums: card.money, // 校验值
customerIdNum: card.idNumStr, // 身份证号
customerName: card.userNameStr, // 用户姓名
isActive: state.cardStatus, // 是否激活
isActive: obu.isJHStr, // 是否激活
loadStatus: obu.loadStatus, // 拆卸状态
obuEnableTime: obu.startTime, // 启用时间
obuExpireTime: obu.endTime, // 到期时间

+ 1
- 1
utils/network/api.js 查看文件

@@ -278,7 +278,7 @@ export const agreeOrderProdcut = "/iaw/issue/order/agreeOrderProduct" //订单
export const monthlyStatementQuery = "/iaw/app/issue/monthlyStatement/query" //月结单查询
export const registerFull = "/iaw/issue/userBasic/registerFull" //无感注册登录接口
export const activeImgUpload = "/iaw/issue/order/activeImgUpload" //激活图片上传
export const cardObuQuery = "/iaw/ass/query/cardObuQuery" //卡签信息查询
export const cardObuQuery = "/iaw/deviceQueryRecord/saveRecord" //卡签信息查询
export const singleEquityDetail = "/iaw/ass/equity/singleEquityDetail" //单项权益详情查询
export const obuFileDataDecrypt = "/iaw/vfj/getVehInfoClear" //OBU系统信息在线解密
export const updateShippingAddress = "/iaw/issue/order/updateShippingAddress" //订单修改收货地址

Loading…
取消
儲存