|
|
@@ -253,28 +253,41 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//获取fileData |
|
|
|
const getFileData = () => { |
|
|
|
console.log("======修改车辆信息0.1======", fileDataStrings); |
|
|
|
//获取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 res1 = AsciToHexString(fileDataStrings.vehiclePlate, 24); //车牌号 |
|
|
|
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色 |
|
|
|
let res3 = IntegerToHexString(1, 2); //类型 |
|
|
|
|
|
|
|
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 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 res10 = IntegerToHexString(null, 4); //轴距32 |
|
|
|
let res11 = IntegerToHexString(fileDataStrings.approvedCount, 6); //核载人数 |
|
|
|
let res12 = AsciToHexString(fileDataStrings.vehicleVin, 32); //车编号 |
|
|
|
|
|
|
|
let res12 = AsciToHexString(fileDataStrings.vehicleVin, 32); //车编号 |
|
|
|
let res13 = AsciToHexString(fileDataStrings.vehicleEngineNum, 32); //发动机 |
|
|
|
return res1 + res2 + res3 + res4 + res5 + res6 + res7 + res8 + res9 + res10 + res11 + res12 + res13; |
|
|
|
// 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); |
|
|
|
}) |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
@@ -513,7 +526,9 @@ |
|
|
|
var str = res[3].substring(res[3].length - 4, res[3].length); |
|
|
|
if (str == "9000") { |
|
|
|
cmdRandNum = res[3].substring(0, res[3].length - 4); |
|
|
|
modifyVehicle(); |
|
|
|
getFileData((demos) => { |
|
|
|
modifyVehicle(demos); |
|
|
|
}) |
|
|
|
} else { |
|
|
|
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]); |
|
|
|
} |
|
|
@@ -531,16 +546,16 @@ |
|
|
|
/** |
|
|
|
* 修改车辆信息 请求 |
|
|
|
*/ |
|
|
|
const modifyVehicle = () => { |
|
|
|
const modifyVehicle = (ites) => { |
|
|
|
tools.showLoadingAlert("加载中"); |
|
|
|
console.log('======修改车辆信息======') |
|
|
|
console.log('======修改车辆信息======', ites) |
|
|
|
let options = { |
|
|
|
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) |
|
|
|
data: { |
|
|
|
Status: "0", |
|
|
|
random: cmdRandNum, //5202192509222239 |
|
|
|
obuSerailNo: obu.obuId, //5202192509551922 |
|
|
|
fileData: getFileData(), |
|
|
|
fileData: ites, |
|
|
|
orderId: fileDataStrings.orderId, |
|
|
|
}, //请求参数 |
|
|
|
method: "POST", //提交方式(默认POST) |