import { request } from "@/utils/network/request.js"; | import { request } from "@/utils/network/request.js"; | ||||
import { gotoAgainUseOrderApi, finishUseOrderApi } from "@/utils/network/api.js"; | import { gotoAgainUseOrderApi, finishUseOrderApi } from "@/utils/network/api.js"; | ||||
import { stringToJson } from "@/utils/network/encryption.js"; | import { stringToJson } from "@/utils/network/encryption.js"; | ||||
import { jump } from "@/datas/9901Jump.js"; | |||||
export default function useOrderSkip() { | export default function useOrderSkip() { | ||||
const gotoOrderDetailsPay = (orderInfo) => { | const gotoOrderDetailsPay = (orderInfo) => { | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
//去激活订单 | //去激活订单 | ||||
const gotoActiveOrder = (orderInfo : any) => { | const gotoActiveOrder = (orderInfo : any) => { | ||||
navTo(`/subpackage/after-sale/activation/operation-tips?id=${orderInfo.id}&orderId=${orderInfo.orderId}&cardStatus=${orderInfo.cardStatus}&obuStatus=${orderInfo.obuStatus}&transfer=${orderInfo.transfer}`); | |||||
// if(orderInfo.aa){ | |||||
// const params = encodeURIComponent(JSON.stringify(orderInfo)) | |||||
// jump("3",params) | |||||
// }else{ | |||||
navTo(`/subpackage/after-sale/activation/operation-tips?id=${orderInfo.id}&orderId=${orderInfo.orderId}&cardStatus=${orderInfo.cardStatus}&obuStatus=${orderInfo.obuStatus}&transfer=${orderInfo.transfer}`); | |||||
// } | |||||
} | } | ||||
//新办订单-去评价 | //新办订单-去评价 |
import { | |||||
getItem | |||||
} from "@/utils/storage"; | |||||
export function jump(type,item){ | |||||
let data=""//传递过来的数据 | |||||
if(item){ | |||||
data = JSON.parse(decodeURIComponent(item)) | |||||
} | |||||
let path="" | |||||
let jumpType=type //1 obu重新激活 2 卡签注销 3 首次激活 4客车个人用户办理etc 5 更换设备 | |||||
if(jumpType=="1"){ | |||||
path="pages/route/index" | |||||
}else if(jumpType=="2"){ | |||||
path="pages/route/index" | |||||
}else if(jumpType=="3"){ | |||||
path="pages/route/index" | |||||
}else if(jumpType=="4"){ | |||||
path="pages/route/index" | |||||
}else if(jumpType=="5"){ | |||||
if(item.applyType=="EXCHANGE_CARD"){ | |||||
// 卡 | |||||
path="pages/route/index" | |||||
}else if(item.applyType=="EXCHANGE_OBU"){ | |||||
// 签 | |||||
path="pages/route/index" | |||||
}else if(item.applyType=="EXCHANGE_ALL"){ | |||||
// 卡签 | |||||
path="pages/route/index" | |||||
} | |||||
} | |||||
console.log("===",getItem("QYorder").openid,data.vehicleId,data.cardId,jumpType) | |||||
uni.navigateToMiniProgram({ | |||||
appId: "wxbcad394b3d99dac9", | |||||
path: path, | |||||
extraData: { | |||||
openid: getItem("QYorder").openid, | |||||
access_token: getItem("QYorder").access_token, | |||||
mobile: getItem("mobile"), | |||||
vehicleId: data.vehicleId?data.vehicleId:"", | |||||
cardId: data.cardId?data.cardId:"", | |||||
obuId: data.obuId?data.obuId:"" , | |||||
}, | |||||
success(res) { | |||||
console.log(res); | |||||
}, | |||||
complete(res) { | |||||
console.log(res); | |||||
}, | |||||
fail(res) { | |||||
console.log(res); | |||||
// 未成功跳转到车主小程序 | |||||
}, | |||||
}) | |||||
} |
"enablePullDownRefresh": false | "enablePullDownRefresh": false | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
"path": "ETC-log-off/select-car", | |||||
"style": { | |||||
"navigationBarTitleText": "ETC注销-选择车辆", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | { | ||||
"path": "ETC-log-off/log-off-confirm", | "path": "ETC-log-off/log-off-confirm", | ||||
"style": { | "style": { |
} else if (val == 2) { | } else if (val == 2) { | ||||
navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | ||||
} else if (val == 3) { | } else if (val == 3) { | ||||
navTo('/subpackage/after-sale/ETC-log-off/select-car', true) | |||||
navTo('/subpackage/after-sale/activation-once-again/select-car?type=2', true) | |||||
} | } | ||||
// #endif | // #endif | ||||
} | } |
</style> | </style> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
.selectCar-box { | .selectCar-box { | ||||
// width: 100%; | |||||
// height: 100%; | |||||
padding: 30rpx; | padding: 30rpx; | ||||
.title { | .title { |
<template> | |||||
<view class="selectCar-box"> | |||||
<view v-if="state.list&&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> | |||||
<view class="choose-item"> | |||||
<view class="active" v-if="flag==i"> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view v-else> | |||||
<empty title='暂无找到相关车辆信息' /> | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script lang="ts" setup> | |||||
import empty from "@/components/empty/empty.vue"; | |||||
import { | |||||
reactive, | |||||
ref | |||||
} from "vue" | |||||
import { | |||||
navTo | |||||
} from "@/utils/utils" | |||||
import { | |||||
onLoad, | |||||
} from "@dcloudio/uni-app"; | |||||
import { | |||||
orderList | |||||
} from "@/utils/network/api.js"; | |||||
import { | |||||
request | |||||
} from "@/utils/network/request.js"; | |||||
import { | |||||
getItem, | |||||
StorageKeys, | |||||
} from "@/utils/storage"; | |||||
import { | |||||
stringToJson | |||||
} from "@/utils/network/encryption"; | |||||
const state = reactive({ | |||||
list: [] //车辆list | |||||
}); | |||||
const flag = ref('0') //默认选择0 | |||||
onLoad(() => { | |||||
quanCheckActionTrue().then((item : any) => { | |||||
state.list = item.data | |||||
}) | |||||
}); | |||||
const quanCheckActionTrue = () => { | |||||
let source = "" | |||||
// #ifdef MP-ALIPAY | |||||
source = "ALI" | |||||
// #endif | |||||
// #ifdef MP-WEIXIN | |||||
source = "WECHAT" | |||||
// #endif | |||||
var data = { | |||||
opId: getItem(StorageKeys.OpenId), | |||||
source: source, //渠道为小程序 | |||||
tabIndex: '0', //0全部 | |||||
orderStep: '11', //11 为已完成” | |||||
isValueCard: "", | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
return new Promise(async (resolve, reject) => { | |||||
const res = await request(orderList, options); | |||||
const data = stringToJson(res.bizContent); | |||||
resolve(data); | |||||
}).catch((error) => { | |||||
reject(error); | |||||
}); | |||||
} | |||||
const choose = (i, item) => { | |||||
flag.value = i | |||||
navTo(`/subpackage/after-sale/ETC-log-off/log-off-confirm?id=${item.id}`) | |||||
} | |||||
</script> | |||||
<style> | |||||
page { | |||||
width: 100%; | |||||
height: 100%; | |||||
background-color: #EEF7F7; | |||||
} | |||||
</style> | |||||
<style lang="scss" scoped> | |||||
.flex { | |||||
display: flex; | |||||
justify-content: center; | |||||
} | |||||
.selectCar-box { | |||||
height: 100%; | |||||
padding: 30rpx; | |||||
.item { | |||||
padding: 20rpx; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
height: 130rpx; | |||||
background: #FFFFFF; | |||||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8); | |||||
border-radius: 20rpx; | |||||
margin-bottom: 30rpx; | |||||
.iten-left { | |||||
display: flex; | |||||
align-items: center; | |||||
image { | |||||
width: 150rpx; | |||||
height: 90rpx; | |||||
} | |||||
text { | |||||
margin-left: 20rpx; | |||||
font-size: 32rpx; | |||||
font-family: Noto Sans S Chinese; | |||||
font-weight: 400; | |||||
color: #333333; | |||||
} | |||||
} | |||||
.choose-item { | |||||
width: 44rpx; | |||||
height: 44rpx; | |||||
background: #FFFFFF; | |||||
border: 2rpx solid #00B38B; | |||||
border-radius: 50%; | |||||
margin-right: 20rpx; | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
box-sizing: content-box; | |||||
} | |||||
.active { | |||||
width: 34rpx; | |||||
height: 34rpx; | |||||
background: #00B38B; | |||||
border-radius: 50%; | |||||
} | |||||
} | |||||
} | |||||
</style> |
import { msg } from "@/utils/utils"; | import { msg } from "@/utils/utils"; | ||||
import { getItem, StorageKeys, setItem } from "@/utils/storage"; | import { getItem, StorageKeys, setItem } from "@/utils/storage"; | ||||
import { stringToJson } from "@/utils/network/encryption"; | import { stringToJson } from "@/utils/network/encryption"; | ||||
import { jump } from "@/datas/9901Jump.js"; | |||||
const state = reactive({ | const state = reactive({ | ||||
list: [], | list: [], | ||||
type:"",//1 OBU重新激活 2 卡签注销 3 更换设备(正常走,现在不需要跳转) | |||||
}); | }); | ||||
onLoad(() => { | |||||
onLoad((options) => { | |||||
console.log("options",options) | |||||
state.type=options.type | |||||
if(options.type=="2"){ | |||||
uni.setNavigationBarTitle({ | |||||
title: 'ETC注销-选择车辆' | |||||
}); | |||||
}else if(options.type=="3"){ | |||||
uni.setNavigationBarTitle({ | |||||
title: '更换ETC设备-选择车辆' | |||||
}); | |||||
} | |||||
quanCheckActionTrue().then((item : any) => { | quanCheckActionTrue().then((item : any) => { | ||||
state.list = item.data; | state.list = item.data; | ||||
console.log(item); | console.log(item); | ||||
reject(error); | reject(error); | ||||
}); | }); | ||||
}; | }; | ||||
const list = reactive([ | |||||
{ | |||||
name: "A12345", | |||||
}, | |||||
{ | |||||
name: "B12345", | |||||
}, | |||||
{ | |||||
name: "C12345", | |||||
}, | |||||
]); | |||||
const flag = ref("0"); | const flag = ref("0"); | ||||
const choose = (i, item) => { | const choose = (i, item) => { | ||||
console.log(item.cardId); | console.log(item.cardId); | ||||
// #ifdef MP-WEIXIN | |||||
navTo( | |||||
`/subpackage/after-sale/activation-once-again/activation-once-again?id=${item.id}` | |||||
); | |||||
// #endif | |||||
// #ifdef MP-ALIPAY | |||||
navTo( | |||||
`/subpackage/after-sale/activation-once-again/activation-once-again-ali?id=${item.id}` | |||||
); | |||||
// #endif | |||||
}; | |||||
// 判断9901 | |||||
// if(item.aa && state.type!=3){ | |||||
// // OBU重新激活跳转 | |||||
// const params = encodeURIComponent(JSON.stringify(item)) | |||||
// jump(state.type,params) | |||||
// }else{ | |||||
if(state.type=="1"){ | |||||
// #ifdef MP-WEIXIN | |||||
navTo( | |||||
`/subpackage/after-sale/activation-once-again/activation-once-again?id=${item.id}` | |||||
); | |||||
// #endif | |||||
// #ifdef MP-ALIPAY | |||||
navTo( | |||||
`/subpackage/after-sale/activation-once-again/activation-once-again-ali?id=${item.id}` | |||||
); | |||||
// #endif | |||||
}else if(state.type=="2"){ | |||||
navTo(`/subpackage/after-sale/ETC-log-off/log-off-confirm?id=${item.id}`) | |||||
}else if(state.type=="3"){ | |||||
navTo(`/subpackage/after-sale/replace-equipment/replace-equipment-confirm?id=${item.id}`) | |||||
} | |||||
// } | |||||
} | |||||
</script> | </script> | ||||
<style> | <style> |
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import navBar from "./components/nav-bar.vue"; | |||||
import { | |||||
checkStr | |||||
} from "@/utils/utils"; | |||||
import { jump } from "@/datas/9901Jump.js"; | |||||
import { | import { | ||||
ref, | ref, | ||||
reactive | reactive | ||||
} from "@/utils/network/request.js"; | } from "@/utils/network/request.js"; | ||||
import { | import { | ||||
sendCode, | sendCode, | ||||
checkCode, | |||||
changeCardApply, | changeCardApply, | ||||
changeCardQuery, | changeCardQuery, | ||||
} from "@/utils/network/api.js"; | } from "@/utils/network/api.js"; | ||||
//下一步 | //下一步 | ||||
const toPage = () => { | const toPage = () => { | ||||
console.log("sdkchkdscn", apply.data) | console.log("sdkchkdscn", apply.data) | ||||
// if (apply.data.status === 'APPLY') { | |||||
// navTo( | |||||
// `/subpackage/after-sale/replace-equipment/form?orderId=${params.orderId}&&id=${apply.data.id}` | |||||
// ) | |||||
// } else { | |||||
console.log("form.damageMode", form.damageMode) | console.log("form.damageMode", form.damageMode) | ||||
queryCckChangejzCardAction().then(val => { | |||||
console.log("val888888", val) | |||||
navTo( | |||||
`/subpackage/after-sale/replace-equipment/form?orderId=${params.orderId}&&id=${val.id}&&damageMode=${form.damageMode}&&msg=${val.msg}&&cardExpire=${val.cardExpire}&&obuExpire=${val.obuExpire}` | |||||
) | |||||
}) | |||||
// if(state.aa){ | |||||
// let obj={ | |||||
// applyType:form.applyType, | |||||
// vehicleId:form.vehicleId, | |||||
// cardId:params.cardId, | |||||
// } | |||||
// const params = encodeURIComponent(JSON.stringify(obj)) | |||||
// jump("5",params) | |||||
// }else{ | |||||
queryCckChangejzCardAction().then(val => { | |||||
console.log("val888888", val) | |||||
navTo( | |||||
`/subpackage/after-sale/replace-equipment/form?orderId=${params.orderId}&&id=${val.id}&&damageMode=${form.damageMode}&&msg=${val.msg}&&cardExpire=${val.cardExpire}&&obuExpire=${val.obuExpire}` | |||||
) | |||||
}) | |||||
// } | // } | ||||
}; | }; | ||||
</script> | </script> | ||||
msg("请输入外廊尺寸高"); | msg("请输入外廊尺寸高"); | ||||
return; | return; | ||||
} | } | ||||
console.log("state.form.tractorSign",state.form.tractorSign,state.form.roadTransportPermitPicUrl) | |||||
if (state.form.tractorSign == 1 && !state.form.roadTransportPermitPicUrl) { | if (state.form.tractorSign == 1 && !state.form.roadTransportPermitPicUrl) { | ||||
msg("请上传道路运输许可证"); | msg("请上传道路运输许可证"); | ||||
return; | return; | ||||
state.form.vehicleModel = data.model; | state.form.vehicleModel = data.model; | ||||
console.log("走不是牵引车的", data.vehicle.indexOf('牵引车'), data.vehicle) | console.log("走不是牵引车的", data.vehicle.indexOf('牵引车'), data.vehicle) | ||||
if (data.vehicle.indexOf('牵引车') > 0) { | if (data.vehicle.indexOf('牵引车') > 0) { | ||||
console.log("是牵引车的") | |||||
qian() | qian() | ||||
} else { | } else { | ||||
console.log("走不是牵引车的") | console.log("走不是牵引车的") | ||||
state.form.vehNegImgUrl = data.imageUrl; | state.form.vehNegImgUrl = data.imageUrl; | ||||
state.form.permittedWeight = data.alc ? data.alc : 0; | state.form.permittedWeight = data.alc ? data.alc : 0; | ||||
state.form.permittedTowWeight = data.towing ? data.towing : 0; | state.form.permittedTowWeight = data.towing ? data.towing : 0; | ||||
if (data.towing) { | |||||
qian() | |||||
} else { | |||||
notQian() | |||||
} | |||||
// if (data.towing) { | |||||
// console.log("牵引车") | |||||
// qian() | |||||
// } else { | |||||
// notQian() | |||||
// } | |||||
console.log('=====================', state.form.vehNegImgUrl, state) | console.log('=====================', state.form.vehNegImgUrl, state) | ||||
} | } | ||||
state.isTakePhotoModeShow = false | state.isTakePhotoModeShow = false | ||||
name: '否', | name: '否', | ||||
}] | }] | ||||
for (let i = 0; i < state.items.length; i++) { | for (let i = 0; i < state.items.length; i++) { | ||||
console.log("") | |||||
if (state.items[i].value === '1') { | if (state.items[i].value === '1') { | ||||
state.current = i; | state.current = i; | ||||
state.form.tractorSign = 1; | state.form.tractorSign = 1; |
<navBgCar></navBgCar> | <navBgCar></navBgCar> | ||||
<view class="content-value"> | <view class="content-value"> | ||||
<view v-for="(item, index) in state.dataArray" :key="index"> | <view v-for="(item, index) in state.dataArray" :key="index"> | ||||
<!-- #F4F6FA --> | |||||
<view :style="`background-color:${bgc}`" style="border-radius: 16rpx;padding: 20rpx;margin-top: 20rpx;"> | <view :style="`background-color:${bgc}`" style="border-radius: 16rpx;padding: 20rpx;margin-top: 20rpx;"> | ||||
<view class="title" style="display: flex;flex-direction: row;justify-content: flex-start;"> | <view class="title" style="display: flex;flex-direction: row;justify-content: flex-start;"> | ||||
<view style="font-weight: bold;margin-right: 10rpx;font-size: 18px;"> | <view style="font-weight: bold;margin-right: 10rpx;font-size: 18px;"> | ||||
state.radiolist1.push(obj) | state.radiolist1.push(obj) | ||||
} | } | ||||
state.choiceCardShow = true; | state.choiceCardShow = true; | ||||
// state.fee = val.fee; | |||||
console.log("state.radiolist1", state.radiolist1) | console.log("state.radiolist1", state.radiolist1) | ||||
} | } | ||||
}; | }; |
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import { onLoad, onShow } from "@dcloudio/uni-app"; | |||||
import { onLoad} from "@dcloudio/uni-app"; | |||||
import { reactive, ref } from "vue"; | import { reactive, ref } from "vue"; | ||||
import { equityProductsApi, equityProductsInfo } from "@/utils/network/api.js"; | |||||
import { equityProductsInfo } from "@/utils/network/api.js"; | |||||
import { stringToJson } from "@/utils/network/encryption"; | import { stringToJson } from "@/utils/network/encryption"; | ||||
import { request } from "@/utils/network/request"; | import { request } from "@/utils/network/request"; | ||||
import { fileURL } from "@/datas/fileURL.js"; | import { fileURL } from "@/datas/fileURL.js"; | ||||
import navBar from "@/components/nav-bar/nav-bar2.vue"; | |||||
import navBgCar from "./components/nav-bg-car4"; | |||||
import { msg, navTo } from "@/utils/utils"; | import { msg, navTo } from "@/utils/utils"; | ||||
import { jump } from "@/datas/9901Jump.js"; | |||||
import { | import { | ||||
checkOrderStatus, | |||||
wechatAppID, | |||||
wechatPayConfigId, | |||||
wechatSecret, | |||||
addProduct, | |||||
queryDetails, | |||||
getOpenidApi | getOpenidApi | ||||
} from "@/utils/network/api"; | } from "@/utils/network/api"; | ||||
import { | import { | ||||
getItem, | getItem, | ||||
StorageKeys, | |||||
setItem | setItem | ||||
} from "@/utils/storage"; | } from "@/utils/storage"; | ||||
const imgURL = `${fileURL}image/`; | |||||
const state = reactive({ | const state = reactive({ | ||||
openid: "", | openid: "", | ||||
getOpenID(); | getOpenID(); | ||||
}) | }) | ||||
const addInterestsList = () => { | const addInterestsList = () => { | ||||
if (state.changeCardType == "1") { | |||||
navTo( | |||||
`/subpackage/after-sale/to-bookkeeping-card/mailing_information?orderId=${state.orderId}&&applyId=${state.applyId}&&productId=${state.promoteId}&&totalAmount=${state.totalAmount}&&equityId=${state.equityId}` | |||||
) | |||||
} else { | |||||
// 正常流程 | |||||
uni.redirectTo({ | |||||
url: `/subpackage/orders/essential-information?promoteId=${getItem("promoteId")}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&totalAmount=${state.totalAmount}&equityId=${state.equityId}`, | |||||
}); | |||||
} | |||||
// if(state.aa){ | |||||
// jump("4","") | |||||
// }else{ | |||||
if (state.changeCardType == "1") { | |||||
navTo( | |||||
`/subpackage/after-sale/to-bookkeeping-card/mailing_information?orderId=${state.orderId}&&applyId=${state.applyId}&&productId=${state.promoteId}&&totalAmount=${state.totalAmount}&&equityId=${state.equityId}` | |||||
) | |||||
} else { | |||||
// 正常流程 | |||||
uni.redirectTo({ | |||||
url: `/subpackage/orders/essential-information?promoteId=${getItem("promoteId")}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&totalAmount=${state.totalAmount}&equityId=${state.equityId}`, | |||||
}); | |||||
} | |||||
// } | |||||
} | } | ||||
const getInfo = () => { | const getInfo = () => { |
} | } | ||||
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' | ||||