Browse Source

提交

yxb
yangteng 1 year ago
parent
commit
c0b57fb316

+ 19
- 6
subpackage/after-sale/equipment-upgrade/select-car.vue View File

@@ -3,7 +3,14 @@
<view v-if="state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list" :key="i">
<view class="iten-left">
<image :src="`${$imgUrl}che.png`" mode="aspectFill"></image>
<text>{{item.vehiclePlate}}</text>
<view class="message">
<view>车牌号:{{ item.vehiclePlate }}</view>
<view>车牌颜色:{{ getVehiclePlateColor(item.vehiclePlateColor) }}</view>
<view v-if="item.cardId">卡号:{{ item.cardId }}</view>
<view v-if="item.cardStatus">卡状态:{{getCodeName('CARD_STATE_TYPE',item.cardStatus)}}</view>
<view v-if="item.obuId">签号:{{ item.obuId }}</view>
<view v-if="item.obuStatus">签状态:{{ getCodeName('OBU_STATE_TYPE',item.obuStatus) }}</view>
</view>
</view>
<view class="choose-item">
<view class="active" v-if="flag==i">
@@ -44,7 +51,12 @@
import {
stringToJson
} from "@/utils/network/encryption";

import {
getCodeName
} from "@/datas/queryKey.js";
import {
getVehiclePlateColor
} from "@/datas/vehiclePlateColor";
const state = reactive({
list: [],
businessType: "",
@@ -175,7 +187,7 @@
display: flex;
justify-content: space-between;
align-items: center;
height: 130rpx;
// height: 130rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
border-radius: 20rpx;
@@ -219,9 +231,10 @@
background: #00B38B;
border-radius: 50%;
}

}


}
.message{
font-size: 26rpx;
margin-left: 6rpx;
}
</style>

+ 83
- 51
subpackage/after-sale/transfer-page.vue View File

@@ -11,9 +11,9 @@
} from "@/utils/utils"
import {
orderList,
userInfoQuery,
silentLoginApi,
selectCarInfo
selectCarInfo,
oneOreTwo
} from "@/utils/network/api.js";
import {
getItem,
@@ -49,57 +49,57 @@
// 31发票 32月结单查询

onLoad((options) => {
if(options.params){
let params=JSON.parse(decodeURIComponent(options.params))
// 登录回来
console.log("options",params)
state.type = params.type
state.name = params.name
state.vehicleId = params.vehicleId
state.deptShortName = params.deptShortName
state.userType = params.userType
state.userIdNum = params.userIdNum
state.mobile = params.mobile
if (options.params) {
let params = JSON.parse(decodeURIComponent(options.params))
// 登录回来
console.log("options", params)
state.type = params.type
state.name = params.name
state.vehicleId = params.vehicleId
state.deptShortName = params.deptShortName
state.userType = params.userType
state.userIdNum = params.userIdNum
state.mobile = params.mobile
judge()
} else {
// 不需要登录
state.type = options.type
state.name = options.name
state.vehicleId = options.vehicleId
state.deptShortName = options.deptShortName
state.userType = options.userType
state.userIdNum = options.userIdNum
state.mobile = options.mobile
console.log("options", options)
if ((options.userType && state.userIdNum) || (options.userType && state.mobile)) {
// 登录了
silentLogin().then(() => {
judge()
}else{
// 不需要登录
state.type = options.type
state.name = options.name
state.vehicleId = options.vehicleId
state.deptShortName = options.deptShortName
state.userType = options.userType
state.userIdNum = options.userIdNum
state.mobile = options.mobile
console.log("options", options)
if((options.userType && state.userIdNum) || (options.userType && state.mobile)){
// 登录了
silentLogin().then(() => {
judge()
})
}else{
let obj={
type:state.type,
name:state.name,
vehicleId:state.vehicleId,
deptShortName:state.deptShortName,
userType:state.userType,
userIdNum:state.userIdNum,
mobile:state.mobile,
}
const params = encodeURIComponent(JSON.stringify(obj))
// 没登录情况
uni.navigateTo({
url: `/login/login?back=2&params=${params}`,
})
}
})

} else {
let obj = {
type: state.type,
name: state.name,
vehicleId: state.vehicleId,
deptShortName: state.deptShortName,
userType: state.userType,
userIdNum: state.userIdNum,
mobile: state.mobile,
}
const params = encodeURIComponent(JSON.stringify(obj))
// 没登录情况
uni.navigateTo({
url: `/login/login?back=2&params=${params}`,
})
}
}
})
// 判断哪些需要跳转
const judge=()=>{
if(state.type == "9" || state.type == "20" || state.type == "23" || state.type == "25" || state.type == "28" || state.type == "31"){
const judge = () => {
if (state.type == "9" || state.type == "20" || state.type == "23" || state.type == "25" || state.type == "28" || state.type == "31") {
jump()
}else{
} else {
quanCheckActionTrue().then((item : any) => {
console.log("item====", item, item.data.length)
if (item.data.length == 1) {
@@ -115,7 +115,7 @@
})
}, 1500)
}
})
}
}
@@ -218,7 +218,18 @@
} else if (state.type == "27") {
navTo(`/subpackage/after-sale/pin-code-deblocking/pin-code-confirm?id=${state.id}`)
} else if (state.type == "28") {
navTo(`/subpackage/personal-center/install-activation-order`)
queryOneOreTwo().then((data) => {
// newStatus 0:未激活(首次激活) 1:激活(obu重新激活)
console.log("data000", data)
if (data.pass == "on") {
if (data.newStatus == "0") {
navTo(`/subpackage/personal-center/install-activation-order`)
} else {
navTo(`/subpackage/after-sale/activation-once-again/select-car?type=1`)
}
}

})
} else if (state.type == "29") {
navTo(`/subpackage/personal-center/search/select-card?vehicleId=${state.vehicleId}`)
} else if (state.type == "30") {
@@ -269,8 +280,29 @@
});

}
// 查询首次激活还是OBU重新激活
const queryOneOreTwo = () => {
const options = {
type: 2,
data: {
"source": 'MINI_PROGRAM',
"vehicleId": state.vehicleId
},
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(oneOreTwo, options);
const data = stringToJson(res.bizContent);
console.log("data==", data)
resolve(data);
}).catch((error) => {
reject(error);
});

}
</script>

<style scoped>

</style>
</style>

+ 2
- 1
utils/network/api.js View File

@@ -312,4 +312,5 @@ export const channelSingQueryApi = "0c6d650d94274ee086008652fa0fe41a"
export const decrypt9901 = "c6e7c27e774c493d82c942dc69507d67"
export const getMailingAddressApi = "1babe3f09d0b458a84c798e89895664f" //更换设备获取邮寄地址
export const addAddressApi = "09d4ba9985394ef8a241acabe888273c" //支付完添加收货地址
export const addAddressApi = "09d4ba9985394ef8a241acabe888273c" //支付完添加收货地址
export const oneOreTwo = "3e09b1199e854a91a4d3a9329e734b8d" //判断诺德订单是一次激活还是重新激活

Loading…
Cancel
Save