DESKTOP-2IO5MST\huting 1 år sedan
förälder
incheckning
a334f46ac8

+ 63
- 61
subpackage/after-sale/activation-once-again/activation-once-again.vue Visa fil

@@ -73,7 +73,7 @@
</view>
</view>
</view>
</template>

<script lang="ts" setup>
@@ -90,7 +90,7 @@
navTo
} from "@/utils/utils";
import {
onLoad,onShow
onLoad, onShow
} from '@dcloudio/uni-app'
// import {
// getItem
@@ -107,20 +107,20 @@
} from "@/utils/network/encryption.js";
import activeSuccess from "./components/popup-device-active-success";
import * as IFCODE from "@/utils/network/api.js";
const cmd = require("../../../static/etcUtil/cmdConfig.js");
const tools = require("../../../static/etcUtil/tools.js");
const bluetoothUtil = require("../../../static/etcUtil/index.js");
import {
getCodeName
} from "@/datas/queryKey.js";
const state = reactive({
showPopup:false
showPopup: false
})
//订单
const orderInfos = reactive({
orderId: "",
@@ -129,20 +129,20 @@
ownerIdnum: "",
vehiclePlate: "",
vehiclePlateColorStr: "",
vehiclePlateColor:"",
vehiclePlateColor: "",
vehicleType: "",
cardId: "",
cardStatus: "",
obuId: "",
obuStatus: "",
outlineL:0,
outlineW:0,
outlineH:0,
type:0,
axleCount:0,
approvedCount:0,
vehicleVin:"",
vehicleEngineNum:"",
outlineL: 0,
outlineW: 0,
outlineH: 0,
type: 0,
axleCount: 0,
approvedCount: 0,
vehicleVin: "",
vehicleEngineNum: "",
});
//OBU
const obu = reactive({
@@ -165,10 +165,10 @@
});

onLoad((option) => {
console.log('======重新激活开始======',option);
console.log('======重新激活开始======', option);
//请求订单详情
queryOrderDetail(option.id);
queryOrderDetail(option.id);
});

onShow((option) => {
@@ -179,19 +179,19 @@
getObuId()
}
//移除监听
console.log('======移除监听======',res)
console.log('======移除监听======', res)
// uni.$off('bluetoothLink')
})

})
const cancel = ()=>{
const cancel = () => {
state.showPopup = false;
// navTo("/pages/service/service")
uni.navigateBack({
delta:2
delta: 2
})
};

@@ -200,7 +200,7 @@
};

//获取订单详情
const queryOrderDetail = (id: string) => {
const queryOrderDetail = (id : string) => {
const options = {
type: 2,
data: {
@@ -229,22 +229,22 @@
orderInfos.outlineW = parseInt(arr[1]); //外廓 宽
orderInfos.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高

orderInfos.type=orderInfo.type;
orderInfos.axleCount=orderInfo.vehicleAxleCount;
orderInfos.approvedCount=orderInfo.vehicleApprovedCount;
orderInfos.vehicleVin=orderInfo.vehicleVin;
orderInfos.vehicleEngineNum=orderInfo.vehicleEngineNum;
orderInfos.type = orderInfo.type;
orderInfos.axleCount = orderInfo.vehicleAxleCount;
orderInfos.approvedCount = orderInfo.vehicleApprovedCount;
orderInfos.vehicleVin = orderInfo.vehicleVin;
orderInfos.vehicleEngineNum = orderInfo.vehicleEngineNum;
});
};

/**
* 获取OBU号 读OBU
*/
/**
* 获取OBU号 读OBU
*/
const getObuId = () => {
console.log('======获取OBU号======')
let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
tools.showLoadingAlert("正在执行指令");
bluetoothUtil.transCmd(cmdArray, "20", function(res) {
bluetoothUtil.transCmd(cmdArray, "20", function (res) {
tools.hideLoadingAlert();
var status = res[1].substring(res[1].length - 4, res[1].length);
console.log('获取OBU号执行结果' + status)
@@ -283,10 +283,10 @@
//调用方式
request(IFCODE.installApply, options)
.then(() => {
tools.hideLoadingAlert();
tools.hideLoadingAlert();
//再次获取随机数
let cmdArr = [cmd.HOME_DIRECTORY, cmd.RANDOM_NUMBER];
bluetoothUtil.transCmd(cmdArr, '20', function(res) {
bluetoothUtil.transCmd(cmdArr, '20', function (res) {
var str = res[1].substring(res[1].length - 4, res[1].length);
if (str == "9000") {
let cmdRandNum = res[1].substring(0, res[1].length - 4);
@@ -297,11 +297,11 @@
})
})
};
/**
* VFJ-OBU在线激活 请求
*/
const getObuActivation = (cmdRandNum:string) => {
const getObuActivation = (cmdRandNum : string) => {
console.log('======VFJ-OBU在线激活======')
tools.showLoadingAlert("加载中");
let options = {
@@ -322,7 +322,7 @@
console.log(stringToJson(res.bizContent));
const datas = stringToJson(res.bizContent);
tools.showLoadingAlert("执行指令");
bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
bluetoothUtil.transCmd([datas.data.APDU], "20", function (res) {
tools.hideLoadingAlert();
console.log(res);
if (res[0] == "9000") {
@@ -335,11 +335,11 @@
console.log(err);
});
};
/**
* BDS-安装确认 请求
*/
const getObuInstall = (status:number, reason:string) => {
const getObuInstall = (status : number, reason : string) => {
console.log('======OBU安装确认======')
tools.showLoadingAlert("加载中");
let options = {
@@ -360,18 +360,14 @@
.then(() => {
tools.hideLoadingAlert();
state.showPopup = true;
uni.navigateBack({
delta: 1,
})
setTimeout(() => {
uni.navigateBack({
delta: 1,
})
}, 1000)
});
};



};
</script>

<style>
@@ -382,7 +378,7 @@
}
</style>
<style lang="scss" scoped>
.mask{
.mask {
background: rgba(0, 0, 0, .35);
position: fixed;
left: 0;
@@ -390,7 +386,8 @@
bottom: 0;
right: 0;
}
.main{

.main {
width: 560rpx;
padding: 25rpx 20rpx 55rpx;
text-align: center;
@@ -398,21 +395,25 @@
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
transform: translate(-50%, -50%);
border-radius: 20rpx;
.top{

.top {
text-align: right;
.icon-close{

.icon-close {
width: 48rpx;
height: 48rpx;
}
}
.icon-success{

.icon-success {
width: 500rpx;
height: 320rpx;
margin-top: 22rpx;
}
.title{

.title {
color: #333333;
font-size: 40rpx;
font-weight: 600;
@@ -420,6 +421,7 @@
margin-top: 55rpx;
}
}

.selectCar-box {
// width: 100%;
// height: 100%;
@@ -554,4 +556,4 @@
line-height: 80rpx;
}
}
</style>
</style>

+ 11
- 5
subpackage/orders/car-release.vue Visa fil

@@ -172,7 +172,7 @@
<view v-if="state.data.transferLogs && state.data.transferLogs.length" class="">
<view class="bettwen-center">
<view style="padding: 20rpx" class="title"> 选择卡签 </view>
<view class="goto"> 直接跳过,不使用此套卡签 </view>
<view class="goto" @click="pass"> 直接跳过,不使用此套卡签 </view>
</view>
<view @click="guohuAction(item)" class="card" v-for="(item, index) in state.data.transferLogs"
:key="index" style="margin-top: 30rpx; margin-bottom: 30rpx">
@@ -325,7 +325,9 @@
console.log(res);
});
};

const pass = () => {
state.show = false
}
const selectConfirm = (index : any) => {
console.log(index);
state.form.useUserType = state.actionSheetList[index].value;
@@ -478,7 +480,8 @@
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
sourceType: ["camera", "album"], //从相册选择
success: function (res) {

console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0].startsWith('file://'))
// tempFilePaths[0].startsWith('file://')
pathToBase64(res.tempFilePaths[0])
.then((path) => {
console.log("Base64返回", path)
@@ -579,8 +582,11 @@
const res = await request(queryGuoHuCaoZuo, options);
const data = stringToJson(res.bizContent);
state.show = false;
uni.navigateTo({
url: `/subpackage/orders/choice-product?orderId=${state.form.orderId}`,
// uni.navigateTo({
// url: `/subpackage/orders/choice-product?orderId=${state.form.orderId}`,
// });
uni.redirectTo({
url: `/subpackage/orders/product-detail?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}`,
});
}).catch((error) => {
reject(error);

Laddar…
Avbryt
Spara