瀏覽代碼

修改车辆信息拼接

master
yangteng 11 月之前
父節點
當前提交
d020273b81

+ 4
- 34
subpackage/after-sale/activation/activate.vue 查看文件

fileDataStrings.orderId = orderInfo.orderId; fileDataStrings.orderId = orderInfo.orderId;
let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor
searchVehicleInfoQuery(vehicleId).then((orderInfo) => { searchVehicleInfoQuery(vehicleId).then((orderInfo) => {
console.log("orderInfo1111",orderInfo)
fileDataStrings.approvedCount = parseInt(orderInfo.approvedCount); //核载人数 fileDataStrings.approvedCount = parseInt(orderInfo.approvedCount); //核载人数
fileDataStrings.vehicleVin = orderInfo.vin; fileDataStrings.vehicleVin = orderInfo.vin;
fileDataStrings.vehicleEngineNum = orderInfo.engineNum; fileDataStrings.vehicleEngineNum = orderInfo.engineNum;


//获取fileData //获取fileData
const getFileData = (fun) => { const getFileData = (fun) => {
//调用方式
request('6ed853e432fb4811a3c0d7d27034bd39', {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
fileData: fileDataStrings.vehiclePlate,
nLen: 24,
random: cmdRandNum
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
}).then((les) => {
let result = stringToJson(les.bizContent);
// let res1 = result.gbkFileData; //车牌号
// let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

// let res3 = IntegerToHexString(fileDataStrings.type, 2); //类型
// let userTypeNumber = fileDataStrings.userType == 'PERSONAL_USER' ? 1 : 2
// console.log("userTypeNumber", userTypeNumber)
// let res4 = IntegerToHexString(userTypeNumber, 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(fileDataStrings.axleCount, 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); //发动机
console.log(result, '=========123', )
fun(result.fileData);
searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor,cmdRandNum).then((orderInfo) => {
console.log("orderInfo==",orderInfo,orderInfo.fileData)
fun(orderInfo.fileData);
}) })
}; };



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

}; };
//获取fileData //获取fileData
const getFileData = (fun) => { 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(result, '=========123')
let res1 = result.gbkFileData; //车牌号
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

let res3 = IntegerToHexString(fileDataStrings.type, 2); //类型
let userTypeNumber = fileDataStrings.userType == 'PERSONAL_USER' ? 1 : 2
let res4 = IntegerToHexString(userTypeNumber, 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(fileDataStrings.axleCount, 2); //轴数

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

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

let res13 = AsciToHexString(fileDataStrings.vehicleEngineNum, 32); //发动机

fun(res1 + res2 + res3 + res4 + res5 + res6 + res7 + res8 + res9 + res10 + res11 + res12 + res13);
searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor,cmdRandNum).then((orderInfo) => {
console.log("orderInfo==",orderInfo,orderInfo.fileData)
fun(orderInfo.fileData);
}) })
}; };
/** /**

+ 5
- 34
subpackage/after-sale/equipment-upgrade/upgrade-confirm.vue 查看文件

customerId: "", customerId: "",
orderId: "" orderId: ""
}); });
let orderInfo = {};
let cmdRandNum = ''; let cmdRandNum = '';
onLoad((option) => { onLoad((option) => {
console.log("options", option) console.log("options", option)
}; };
//获取fileData //获取fileData
const getFileData = (fun) => { 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(fileDataStrings.type, 2); //类型
let userTypeNumber = fileDataStrings.userType == 'PERSONAL_USER' ? 1 : 2
let res4 = IntegerToHexString(userTypeNumber, 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(fileDataStrings.axleCount, 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);
searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor,cmdRandNum).then((orderInfo) => {
console.log("orderInfo==",orderInfo,orderInfo.fileData)
fun(orderInfo.fileData);
}) })
}; };
/** /**
showLoading: true, showLoading: true,
}; };
request(orderDetail, options).then((res) => { request(orderDetail, options).then((res) => {
let orderInfo = JSON.parse(res.bizContent);
orderInfo = JSON.parse(res.bizContent);
console.log("orderInfo", orderInfo); console.log("orderInfo", orderInfo);
console.log("orderInfores", res); console.log("orderInfores", res);
if (orderInfo) { if (orderInfo) {

+ 3
- 32
subpackage/after-sale/unsuspend/unsuspend-confirm.vue 查看文件

}; };
//获取fileData //获取fileData
const getFileData = (fun) => { 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(result, '=========123')
let res1 = result.gbkFileData; //车牌号
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

let res3 = IntegerToHexString(fileDataStrings.type, 2); //类型
let userTypeNumber = fileDataStrings.userType == 'PERSONAL_USER' ? 1 : 2
let res4 = IntegerToHexString(userTypeNumber, 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(fileDataStrings.axleCount, 2); //轴数

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

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

let res13 = AsciToHexString(fileDataStrings.vehicleEngineNum, 32); //发动机

fun(res1 + res2 + res3 + res4 + res5 + res6 + res7 + res8 + res9 + res10 + res11 + res12 + res13);
searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor,cmdRandNum).then((orderInfo) => {
console.log("orderInfo==",orderInfo,orderInfo.fileData)
fun(orderInfo.fileData);
}) })
}; };
/** /**

+ 2
- 2
utils/network/request.js 查看文件



} }


options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/dev/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
options.url = envs[process.env.NODE_ENV].baseUrl + '/dev/api/interfaceMidGroundIn'
//默认json数据格式提交` //默认json数据格式提交`
let contentType = 'application/x-www-form-urlencoded' let contentType = 'application/x-www-form-urlencoded'



+ 6
- 2
utils/publicRequest.ts 查看文件

import { request } from "@/utils/network/request"; import { request } from "@/utils/network/request";
import { searchVehicleInfo } from "@/utils/network/api.js"; import { searchVehicleInfo } from "@/utils/network/api.js";
// 154接口获取车辆信息 // 154接口获取车辆信息
export const searchVehicleInfoQuery = (vehicleId) => {
export const searchVehicleInfoQuery = (vehicleId,random) => {
const options = { const options = {
type: 2, type: 2,
data: { data: {
vehicleId: vehicleId
vehicleId: vehicleId,
random:random
}, },
method: "POST", method: "POST",
showLoading: true, showLoading: true,
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const res = await request(searchVehicleInfo, options); const res = await request(searchVehicleInfo, options);
const data = stringToJson(res.bizContent).vehicles[0]; const data = stringToJson(res.bizContent).vehicles[0];
if(stringToJson(res.bizContent).fileData){
data['fileData']=stringToJson(res.bizContent).fileData
}
resolve(data); resolve(data);
}).catch((error) => { }).catch((error) => {
reject(error); reject(error);

Loading…
取消
儲存