@@ -73,7 +73,8 @@ | |||
<view v-if="item.orderSource == 'WECHAT' && item.orderStep=='WAITING_RECEIVE' && item.shippingStatus=='WAIT_RECEIVING'" | |||
class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view> | |||
<view v-if="item.orderSource == 'WECHAT' && (item.orderStep=='WAITING_AUDIT' || item.orderStep=='WAITING_SEND') && item.shippingStatus=='WAIT_SHIPPING'" class="btn btn-primary" @click.stop="gotoEditAddressNew(item)">修改地址</view> | |||
<view v-if="item.orderSource == 'WECHAT' && item.canEvaluate== true" class="btn btn-primary" @click.stop="gotoEvaluateProduct(item)">去评价产品</view> | |||
<!--评价暂不上线 | |||
<view v-if="item.orderSource == 'WECHAT' && item.canEvaluate== true" class="btn btn-primary" @click.stop="gotoEvaluateProduct(item)">去评价产品</view>--> | |||
<view v-if="item.orderStep=='ORDER_PAID'" class="btn btn-primary" @click.stop="gotoOrderSign(item)">签约 | |||
</view> | |||
<view |
@@ -180,6 +180,7 @@ | |||
//开始激活 按钮事件 | |||
const btn = () => { | |||
console.log('activateSHBTN', orderInfo, state.disabled); | |||
state.disabled = false | |||
console.log('orderInfo参数', orderInfo, state.disabled) | |||
// 售后激活 |
@@ -80,7 +80,8 @@ | |||
errorLogAdd, | |||
cardObuQuery, | |||
cardObuQueryinLog, | |||
obuFileDataDecrypt | |||
obuFileDataDecrypt, | |||
vfjObuActive | |||
} from "@/utils/network/api"; | |||
import { | |||
agentId | |||
@@ -133,7 +134,12 @@ | |||
console.log(state); | |||
state.transfer = Number(option.transfer) | |||
//获取订单详情 | |||
getOrderDetails(orderData.orderId); | |||
if (option.transfer == '1') { | |||
getOrderDetails(orderData.orderId); | |||
} else { | |||
getObuId(); | |||
} | |||
console.log("state.transfer", state.transfer, state.transfer == 0, state.transfer == 1, getItem( | |||
"orderInfo")) | |||
}) | |||
@@ -251,14 +257,14 @@ | |||
console.log("err", err) | |||
errorLog(datas.cmd, JSON.stringify(err), datas.stepNo) | |||
tools.hideLoadingAlert(); | |||
state.showPopup = false | |||
state.disabled = true | |||
}); | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
tools.hideLoadingAlert(); | |||
state.showPopup = false | |||
state.disabled = true | |||
}); | |||
} | |||
@@ -330,11 +336,12 @@ | |||
//开始激活 按钮事件 | |||
const btn = () => { | |||
console.log('activateBtn', state) | |||
if (!state.disabled) { | |||
return; | |||
} | |||
if (state.CardVersion == '48' || state.CardVersion == '49' || state.ObuVersion == '48' || state.ObuVersion == | |||
'49') { | |||
if (state.CardVersion == '48' || state.CardVersion == '49' || state.ObuVersion == '48' || state.ObuVersion == '49') { | |||
// 是48,49 先密钥升级再激活 | |||
obuUpdate(); | |||
} else { | |||
@@ -345,11 +352,53 @@ | |||
}; | |||
const activateQuqet = () => { | |||
state.disabled = false | |||
state.showPopup = true | |||
console.log('orderInfo参数', orderInfo, state.disabled) | |||
stopHeartbeat(); | |||
cmdResult1() | |||
if(state.transfer == '1') { | |||
cmdResult1() | |||
} else { | |||
cmdResult2() | |||
} | |||
// cmdResult1() | |||
} | |||
const cmdResult2 = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
"cardId": card.cardId, | |||
"obuId": obu.obuId, | |||
"random": cmdRandNum, | |||
"vehicleId": getItem('vehicleId') | |||
}, | |||
method: "POST", | |||
showLoading: false, | |||
} | |||
tools.showLoadingAlert("执行指令"); | |||
requestNew(vfjObuActive, options) | |||
.then((res) => { | |||
tools.hideLoadingAlert(); | |||
console.log("在线激活 请求"); | |||
console.log(res); | |||
const datas = res; | |||
let cmdArr = datas.apdu.split(',') | |||
tools.showLoadingAlert("执行指令"); | |||
bluetoothUtil.transCmd(cmdArr, "20", function (res) { | |||
tools.hideLoadingAlert(); | |||
console.log(res); | |||
if (res[0] == "9000") { | |||
msg('激活成功'); | |||
navTo(`/pages/order/order?index=${0}`); | |||
} else { | |||
msg(`激活失败,提示码:${res[0]}`); | |||
} | |||
}); | |||
}) | |||
.catch((err) => { | |||
tools.hideLoadingAlert(); | |||
}); | |||
} | |||
//获取订单详情 | |||
const getOrderDetails = (orderId) => { | |||
console.log('======获取订单信息======') | |||
@@ -396,12 +445,14 @@ | |||
if (status == "9000") { | |||
state.disabled = true | |||
obu.obuId = res[1].substring(20, 36); | |||
// obu.obuId = '5201250802001105'; | |||
obu.vin = res[1].substring(18, 20); | |||
obu.version = res[1].substring(18, 20); | |||
state.ObuVersion = res[1].substring(18, 20) | |||
state.ChipSn = res[1].substring(0, 8) | |||
cmdRandNum = res[2].substring(0, res[2].length - 4); | |||
getCardId() | |||
} else { | |||
showModals('获取设备信息错误!') | |||
} | |||
@@ -444,6 +495,7 @@ | |||
if (str == "9000" || str3 == "9000") { | |||
if (res[2].length > 86 || res[3] >= 12) { | |||
card.cardId = res[2].substring(20, 40); | |||
// card.cardId = '52012511110201724155'; | |||
state.CardVersion = res[2].substring(18, 20), | |||
tools.hideLoadingAlert(); | |||
state.showBtn = true | |||
@@ -800,6 +852,7 @@ | |||
} | |||
//获取发行脚本指令 | |||
async function updateEs(type, applyData) { | |||
console.log('------updateEs------'); | |||
tools.showLoadingAlert('升级中'); | |||
//获取发行脚本指令 | |||
const getCommanData = await getCommands({ | |||
@@ -811,8 +864,9 @@ | |||
//指令解析 | |||
const result = getCommanData.commands; | |||
const array = result.split('~'); | |||
const cmdType = type == 'GEN_OBESAM_UPG' ? '20' : '10'; | |||
let cmdType = type == 'GEN_OBESAM_UPG' ? '20' : '10'; | |||
for (const element of array) { | |||
console.log('updateEs', element, cmdType); | |||
tools.showLoadingAlert('升级中'); | |||
// 让出主线程,确保UI更新 | |||
await new Promise(resolve => setTimeout(resolve, 0)); | |||
@@ -823,6 +877,10 @@ | |||
await processKeyExchange(element, cmdType, applyData); | |||
} else if (element.charAt(0) === 'E') { | |||
await processExtAuth(element, cmdType, applyData); | |||
} else if (element === 'SESAM') { | |||
cmdType = '20'; | |||
} else { | |||
cmdType = '10'; | |||
} | |||
} | |||
return true; |
@@ -100,8 +100,9 @@ | |||
state.transfer = option.transfer | |||
state.isAfter = option.isAfter | |||
console.log(state); | |||
getOrderDetails(orderData.orderId) | |||
if(option.transfer == '1') { | |||
getOrderDetails(orderData.orderId) | |||
} | |||
}) | |||
//获取订单详情 | |||
const getOrderDetails = (orderId) => { |
@@ -309,7 +309,7 @@ | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate(5)"> | |||
<view class="picture-wrapper" v-if="state.userType == 'PERSONAL_USER'" @click="cardFileImageUpdate(10)"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 委托书 </view> | |||
@@ -375,6 +375,22 @@ | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" v-if="state.userType == 'PERSONAL_USER'" @click="cardFileImageUpdate(10)"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 委托书 </view> | |||
<view class="value"> 上传文字清晰的委托书 </view> | |||
<view class="tip"> | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image v-if="!state.form.proxyUrl" class="icon" :src="`${$imgUrl}issuance/weituo.png`" | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"> | |||
</image> | |||
<image v-else class="icon" :src="imgPathMontage(state.form.proxyUrlName)" | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="shibie-wrapper"> | |||
<view class="title"> 识别内容如下 </view> | |||
@@ -644,6 +660,7 @@ | |||
if (resIn.flag == 1) { | |||
// 车辆信息与用户信息不符,上传车主信息 | |||
state.showOwner = true; | |||
state.userType = resIn.userType; | |||
state.form.ownerIdType = "101"; | |||
} else if (resIn.flag == 2) { | |||
if (resIn.approvalStatus == 2) { | |||
@@ -817,7 +834,7 @@ | |||
if (val == 1) { | |||
state.form.vehBodyUrl = data.imageUrl; | |||
state.form.vehBodyUrlName = data.imageName; | |||
} else if (val == 5) { | |||
} else if (val == 10) { | |||
state.form.proxyUrl = data.imageUrl; | |||
state.form.proxyUrlName = data.imageName; | |||
} else { | |||
@@ -837,6 +854,7 @@ | |||
showImg: true, | |||
images: '', | |||
showOwner: false, | |||
userType: null, | |||
data: { | |||
transferLogs: [], | |||
}, |
@@ -119,7 +119,8 @@ | |||
<view v-if="state.orderInfo.orderSource == 'WECHAT' && state.orderInfo.orderStep=='WAITING_RECEIVE' && state.orderInfo.shippingStatus=='WAIT_RECEIVING'" | |||
class="btn btn-primary" @click.stop="gotoConfirmReceipt(state.orderInfo)">确认收货</view> | |||
<view v-if="state.orderInfo.orderSource == 'WECHAT' && (state.orderInfo.orderStep=='WAITING_AUDIT' || state.orderInfo.orderStep=='WAITING_SEND') && state.orderInfo.shippingStatus=='WAIT_SHIPPING'" class="btn btn-primary" @click.stop="gotoEditAddressNew(state.orderInfo)">修改地址</view> | |||
<view v-if="state.orderInfo.orderSource == 'WECHAT' && state.orderInfo.canEvaluate== true" class="btn btn-primary" @click.stop="gotoEvaluateProduct(state.orderInfo)">去评价产品</view> | |||
<!--//评价暂不上线 | |||
<view v-if="state.orderInfo.orderSource == 'WECHAT' && state.orderInfo.canEvaluate== true" class="btn btn-primary" @click.stop="gotoEvaluateProduct(state.orderInfo)">去评价产品</view>--> | |||
<view v-if="state.orderInfo.orderStep=='ORDER_PAID'" class="btn btn-primary" @click.stop="gotoOrderSign(state.orderInfo)">签约 | |||
</view> | |||
<view |
@@ -222,7 +222,7 @@ | |||
const data = res; | |||
console.log(data); | |||
if (data.paymentStatus == 1) { | |||
gotoEditUserOrUnitInfo() | |||
// gotoEditUserOrUnitInfo() | |||
} | |||
state.dataArray = data.datas; | |||
for (let i = 0; i < state.dataArray.length; i++) { | |||
@@ -269,6 +269,7 @@ | |||
onShow(() => { | |||
// 支付完跳转到广告页,回来再次查询跳转 (签约完回来也要查询) | |||
if (state.payOK) { | |||
console.log("刷新页面",state) | |||
refreshFirst() | |||
} | |||
}) | |||
@@ -357,71 +358,74 @@ | |||
console.log("输出内容", options); | |||
requestNew(payQuery, options).then((res) => { | |||
const data = res; | |||
console.log(data); | |||
console.log("1111",data); | |||
if (data.paymentStatus == 1) { | |||
gotoEditUserOrUnitInfo(); | |||
// isValueCard 1 储值卡 2 记账卡 | |||
if (state.orderQuery == '1') { | |||
console.log("state.qtSign", state.qtSign, state.qtSign == '0') | |||
// 记账卡 | |||
if (state.cardType == '1') { | |||
// 去诺德签约 | |||
if (state.qtSign == '0') { | |||
// 去签约,已经签约完,回来查订单详情,如果是激活就去激活 | |||
orderDetail().then((res) => { | |||
if (res['orderStep'] == OrderStatus['待激活']) { | |||
// 已签约 | |||
gotoActiveOrder(getItem('orderQueryActivate')) | |||
} else { | |||
// 未签约 | |||
if (state.qdSignAppId) { | |||
uni.navigateToMiniProgram({ | |||
appId: state.qdSignAppId, | |||
path: state.qdSignUrl, | |||
extraData: {}, | |||
envVersion: 'trial', | |||
success(res) { | |||
state.payOK = true | |||
console.log(res); | |||
}, | |||
complete(res) { | |||
console.log(res); | |||
}, | |||
fail(res) { | |||
console.log(res); | |||
// 未成功跳转到车主小程序 | |||
}, | |||
}); | |||
} else { | |||
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl)) | |||
tools.toUrl(`/subpackage/personal-center/webview?url=` + params) | |||
} | |||
} | |||
}) | |||
} else { | |||
// 签约 | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}` | |||
}); | |||
} | |||
} else { | |||
gotoActiveOrder(getItem('orderQueryActivate')) | |||
} | |||
} else { | |||
if (state.isValueCard == 1) { | |||
// 不签约 | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
}) | |||
} else { | |||
// 签约 | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}` | |||
}); | |||
} | |||
} | |||
// if (state.orderQuery == '1') { | |||
// console.log("state.qtSign", state.qtSign, state.qtSign == '0') | |||
// // 记账卡 | |||
// if (state.cardType == '1') { | |||
// // 去诺德签约 | |||
// if (state.qtSign == '0') { | |||
// // 去签约,已经签约完,回来查订单详情,如果是激活就去激活 | |||
// orderDetail().then((res) => { | |||
// if (res['orderStep'] == OrderStatus['待激活']) { | |||
// // 已签约 | |||
// gotoActiveOrder(getItem('orderQueryActivate')) | |||
// } else { | |||
// // 未签约 | |||
// if (state.qdSignAppId) { | |||
// uni.navigateToMiniProgram({ | |||
// appId: state.qdSignAppId, | |||
// path: state.qdSignUrl, | |||
// extraData: {}, | |||
// envVersion: 'trial', | |||
// success(res) { | |||
// state.payOK = true | |||
// console.log(res); | |||
// }, | |||
// complete(res) { | |||
// console.log(res); | |||
// }, | |||
// fail(res) { | |||
// console.log(res); | |||
// // 未成功跳转到车主小程序 | |||
// }, | |||
// }); | |||
// } else { | |||
// const params = encodeURIComponent(JSON.stringify(state.qdSignUrl)) | |||
// tools.toUrl(`/subpackage/personal-center/webview?url=` + params) | |||
// } | |||
// } | |||
// }) | |||
// } else { | |||
// console.log("前往签约3") | |||
// // 签约 | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}` | |||
// }); | |||
// } | |||
// } else { | |||
// gotoActiveOrder(getItem('orderQueryActivate')) | |||
// } | |||
// } else { | |||
// if (state.isValueCard == 1) { | |||
// // 不签约 | |||
// uni.switchTab({ | |||
// url: "/pages/order/order" | |||
// }) | |||
// } else { | |||
// console.log("前往签约2") | |||
// // 签约 | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}` | |||
// }); | |||
// } | |||
// } | |||
} | |||
state.dataArray = data.datas; | |||
for (let i = 0; i < state.dataArray.length; i++) { | |||
@@ -500,40 +504,71 @@ | |||
showLoading: true, | |||
} | |||
requestNew(payAfterOrder, options).then((res) => { | |||
console.log("res",res) | |||
if (res.orderStep === 'WAITING_ACTIVE') { | |||
// 前往激活 | |||
gotoActiveOrder(getItem('orderQueryActivate')); | |||
} else if (res.orderStep === 'ORDER_PAID') { | |||
// 前往签约 | |||
if (res.qtSign) { | |||
// 黔通智联签约 | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}` | |||
}); | |||
} else if (res.qdAppId){ | |||
// 其他渠道签约 | |||
uni.navigateToMiniProgram({ | |||
appId: res.qdAppId, | |||
path: res.qdSignUrl, | |||
extraData: {}, | |||
envVersion: 'trial', | |||
success(res) { | |||
state.payOK = true | |||
console.log(res); | |||
}, | |||
complete(res) { | |||
console.log(res); | |||
}, | |||
fail(res) { | |||
console.log(res); | |||
// 未成功跳转到车主小程序 | |||
}, | |||
console.log("前往激活") | |||
if(state.jhOk){ | |||
uni.showModal({ | |||
title: "*激活检测*", | |||
content: "您还没有激活成功,将要去激活", | |||
showCancel: false, | |||
confirmText: "我知道了", | |||
success() { | |||
state.jhOk = true | |||
gotoActiveOrder(getItem('orderQueryActivate')); | |||
} | |||
}); | |||
} else { | |||
// 其他渠道签约 | |||
const params = encodeURIComponent(JSON.stringify(res.qdSignUrl)) | |||
tools.toUrl(`/subpackage/personal-center/webview?url=` + params); | |||
}else{ | |||
state.jhOk = true | |||
gotoActiveOrder(getItem('orderQueryActivate')); | |||
} | |||
} else if (res.orderStep === 'ORDER_PAID') { | |||
// 前往签约 | |||
console.log("前往签约1") | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}` | |||
}); | |||
// if (res.qtSign) { | |||
// // 黔通智联签约 | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}` | |||
// }); | |||
// } else if (res.qdAppId){ | |||
// // 其他渠道签约 | |||
// uni.navigateToMiniProgram({ | |||
// appId: res.qdAppId, | |||
// path: res.qdSignUrl, | |||
// extraData: {}, | |||
// envVersion: 'trial', | |||
// success(res) { | |||
// state.payOK = true | |||
// console.log(res); | |||
// }, | |||
// complete(res) { | |||
// console.log(res); | |||
// }, | |||
// fail(res) { | |||
// console.log(res); | |||
// // 未成功跳转到车主小程序 | |||
// }, | |||
// }); | |||
// } else { | |||
// // 其他渠道签约 | |||
// const params = encodeURIComponent(JSON.stringify(res.qdSignUrl)) | |||
// tools.toUrl(`/subpackage/personal-center/webview?url=` + params); | |||
// } | |||
}else{ | |||
uni.showModal({ | |||
content: "订单待审核,可在ETC订单查看", | |||
showCancel: false, | |||
confirmText: "我知道了", | |||
success() { | |||
uni.redirectTo({ | |||
url: `/pages/order/order` | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
@@ -619,6 +654,7 @@ | |||
qdSignAppId: "", | |||
qtSign: "", | |||
payOK: false, | |||
jhOk: false, | |||
cardType: "", | |||
}); | |||
</script> |
@@ -65,6 +65,8 @@ | |||
import { | |||
msg, navTo | |||
} from "@/utils/utils"; | |||
let signFlag = "NO";//触发按钮标识 | |||
const savaHandle = () => { | |||
console.log("state.productId.length", state.productId.length, "111", state.typeScanCode) | |||
@@ -236,6 +238,7 @@ | |||
}); | |||
// 查协议 | |||
const queryAgreement = () => { | |||
if(signFlag === "NO") return; | |||
const options = { | |||
type: 2, | |||
data: { | |||
@@ -383,6 +386,7 @@ | |||
} else { | |||
state.isSign = false | |||
} | |||
signFlag = "YES" | |||
console.log("查询是否签署协议", res) | |||
let data = res; |
@@ -26,27 +26,34 @@ | |||
</template> | |||
<script setup lang="ts"> | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { onLoad,onShow } from "@dcloudio/uni-app"; | |||
import { reactive } from "vue"; | |||
import { etcQyList } from "@/utils/network/api.js"; | |||
import { etcQyList ,payAfterOrder} from "@/utils/network/api.js"; | |||
import { request, requestNew } from "@/utils/network/request.js"; | |||
import { fileURL } from "@/datas/fileURL.js"; | |||
import navBar from "@/components/nav-bar/nav-bar2.vue"; | |||
import navBgCar from "./components/nav-bg-car1"; | |||
const imgURL = `${fileURL}image/`; | |||
import { navTo } from "@/utils/utils"; | |||
import useOrderSkip from "@/composables/order/useOrderSkip"; | |||
import { | |||
setItem, getItem | |||
} from "@/utils/storage"; | |||
const tools = require("../../static/etcUtil/tools.js"); | |||
const { gotoActiveOrder } = useOrderSkip(); | |||
const qianyueAction = (val) => { | |||
gotoEditUserOrUnitInfo() | |||
console.log(val); | |||
// #ifdef MP-ALIPAY | |||
navTo( | |||
`/subpackage/orders/sign-up-ali?orderId=${state.orderId}&orderQuery=${state.orderQuery}`, | |||
); | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
navTo( | |||
`/subpackage/orders/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&orderQuery=${state.orderQuery}`, | |||
); | |||
// #endif | |||
// // #ifdef MP-ALIPAY | |||
// navTo( | |||
// `/subpackage/orders/sign-up-ali?orderId=${state.orderId}&orderQuery=${state.orderQuery}`, | |||
// ); | |||
// // #endif | |||
// // #ifdef MP-WEIXIN | |||
// navTo( | |||
// `/subpackage/orders/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&orderQuery=${state.orderQuery}`, | |||
// ); | |||
// // #endif | |||
}; | |||
//解析URL获取参数 | |||
@@ -67,6 +74,48 @@ | |||
} | |||
return theRequest; | |||
}; | |||
onShow(() => { | |||
// 支付完跳转到广告页,回来再次查询跳转 (签约完回来也要查询) | |||
console.log("刷新页面之前===========",state) | |||
if (state.payOK) { | |||
console.log("刷新页面",state) | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderNo: state.orderId | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
} | |||
requestNew(payAfterOrder, options).then((res) => { | |||
if (res.orderStep === 'WAITING_ACTIVE') { | |||
if(state.jhOk){ | |||
uni.showModal({ | |||
title: "*激活检测*", | |||
content: "您还没有激活成功,点击签约可直达激活", | |||
showCancel: false, | |||
confirmText: "我知道了", | |||
}); | |||
}else{ | |||
// 前往激活 | |||
console.log("前往激活") | |||
state.jhOk = false | |||
gotoActiveOrder(getItem('orderQueryActivate')); | |||
} | |||
} else if (res.orderStep === 'ORDER_PAID') { | |||
uni.showModal({ | |||
title: "*签约检测*", | |||
content: "您还没有签约成功,请重新签约", | |||
showCancel: false, | |||
confirmText: "我知道了", | |||
}); | |||
} | |||
}) | |||
// gotoEditUserOrUnitInfo() | |||
} | |||
}) | |||
onLoad((option : any) => { | |||
if (option.q) { | |||
const q = decodeURIComponent(option.q); // 获取到二维码原始链接内容 | |||
@@ -118,6 +167,78 @@ | |||
// }); | |||
}); | |||
const gotoEditUserOrUnitInfo = () => { | |||
// if (state.orderQuery == '1') { | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderNo: state.orderId | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
} | |||
requestNew(payAfterOrder, options).then((res) => { | |||
console.log("res",res) | |||
if (res.orderStep === 'WAITING_ACTIVE') { | |||
state.jhOk = true | |||
// 前往激活 | |||
console.log("前往激活") | |||
gotoActiveOrder(getItem('orderQueryActivate')); | |||
} else if (res.orderStep === 'ORDER_PAID') { | |||
// 前往签约 | |||
console.log("前往签约1") | |||
if (res.qtSign) { | |||
// 黔通智联签约 | |||
// #ifdef MP-ALIPAY | |||
navTo( | |||
`/subpackage/orders/sign-up-ali?orderId=${state.orderId}&orderQuery=${state.orderQuery}`, | |||
); | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
navTo( | |||
`/subpackage/orders/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&orderQuery=${state.orderQuery}`, | |||
); | |||
// #endif | |||
} else if (res.qdAppId){ | |||
state.payOK = true | |||
// 其他渠道签约 | |||
uni.navigateToMiniProgram({ | |||
appId: res.qdAppId, | |||
path: res.qdSignUrl, | |||
extraData: {}, | |||
envVersion: 'trial', | |||
success(res) { | |||
state.payOK = true | |||
console.log(res); | |||
}, | |||
complete(res) { | |||
console.log(res); | |||
}, | |||
fail(res) { | |||
console.log(res); | |||
// 未成功跳转到车主小程序 | |||
}, | |||
}); | |||
} else { | |||
// 其他渠道签约 | |||
const params = encodeURIComponent(JSON.stringify(res.qdSignUrl)) | |||
tools.toUrl(`/subpackage/personal-center/webview?url=` + params); | |||
} | |||
}else{ | |||
uni.showModal({ | |||
content: "订单待审核,可在ETC订单查看", | |||
showCancel: false, | |||
confirmText: "我知道了", | |||
success() { | |||
uni.redirectTo({ | |||
url: `/pages/order/order` | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
const state = reactive({ | |||
data: { | |||
show: false, | |||
@@ -126,6 +247,8 @@ | |||
list: [], | |||
id: "", | |||
clientFee: "", | |||
payOK: false, | |||
jhOk: false, | |||
orderId: "", | |||
orderQuery: "0" | |||
}); |
@@ -120,7 +120,7 @@ | |||
<!-- 上传照片 --> | |||
<view class="upload-section" v-if="formData.activeType == '2'"> | |||
<view class="section-title">上传照片</view> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate(100)"> | |||
<view class="picture-wrapper" @click="takePhotoMode('3')"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 行驶证主页 </view> | |||
@@ -129,14 +129,14 @@ | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image v-if="!formData.vehPosImgUrl" class="icon" :src="`${$imgUrl}issuance/xz.png`" | |||
<image v-if="!vehicleFrontData.imageName" class="icon" :src="`${$imgUrl}issuance/xz.png`" | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"> | |||
</image> | |||
<image v-else class="icon" :src="imgPathMontage(formData.vehPosImgUrlName)" | |||
<image v-else class="icon" :src="vehicleFrontData.imageName" | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate(101)"> | |||
<view class="picture-wrapper" @click="takePhotoMode('4')"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 行驶证副页 </view> | |||
@@ -145,10 +145,10 @@ | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image v-if="!formData.vehNegImgUrl" class="icon" :src="`${$imgUrl}issuance/xf.png`" | |||
<image v-if="!vehicleBackData.imageName" class="icon" :src="`${$imgUrl}issuance/xf.png`" | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"> | |||
</image> | |||
<image v-else class="icon" :src="imgPathMontage(formData.vehNegImgUrlName)" | |||
<image v-else class="icon" :src="imgPathMontage(vehicleBackData.imageName)" | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image> | |||
</view> | |||
</view> | |||
@@ -204,7 +204,7 @@ import { onLoad } from '@dcloudio/uni-app' | |||
import carNumberInput from './components/car-number-input.vue' | |||
import { requestNew } from "@/utils/network/request.js"; | |||
import { | |||
queryVehicle, sendMessage | |||
queryVehicle, sendMessage, vehicCharge | |||
} from "@/utils/network/api.js"; | |||
import { | |||
getCodeName, getDicWithType | |||
@@ -212,6 +212,7 @@ import { | |||
import { msg, strReplace, imgPathMontage, hasLogin, uploadFile, compressImage, chooseImageCompress, navTo } from "@/utils/utils"; | |||
import uploadImg from '@/components/uploadOcr'; | |||
import useOrderSkip from "@/composables/order/useOrderSkip"; | |||
import { setItem,getItem } from "@/utils/storage"; | |||
//办理订单按钮跳转业务逻辑 | |||
const { | |||
gotoCancelOrder, | |||
@@ -305,16 +306,22 @@ const close = (e) => { | |||
isTakePhotoModeShow.value = e | |||
} | |||
const vehicleFrontData = reactive({}); | |||
const vehicleBackData = reactive({}) | |||
const ocrResult = (data) => { | |||
console.log('输出内容=====================', choiceIndex.value); | |||
console.log("上传数据:", data) | |||
// 委托书 | |||
formData.proxyUrl = data.imageUrl; | |||
formData.proxyUrlName = data.imageName; | |||
console.log("上传数据:", data) | |||
if (choiceIndex.value == "3") { | |||
Object.assign(vehicleFrontData, data); | |||
} else if (choiceIndex.value === "4") { | |||
Object.assign(vehicleBackData, data); | |||
} | |||
} | |||
const isTakePhotoModeShow = ref(false); | |||
const choiceIndex = ref(0); | |||
const choiceIndex = ref(''); | |||
const takePhotoMode = (index) => { | |||
console.log("index", index) | |||
isTakePhotoModeShow.value = true | |||
@@ -548,7 +555,7 @@ const nextStep = () => { | |||
} | |||
if(formData.activeType == '2') { | |||
if (!formData.vehPosImgUrl) { | |||
if (!vehicleFrontData.imageName) { | |||
uni.showToast({ | |||
title: '请上传行驶证正面照', | |||
icon: 'none' | |||
@@ -556,7 +563,7 @@ const nextStep = () => { | |||
return | |||
} | |||
if (!formData.vehNegImgUrl) { | |||
if (!vehicleBackData.imageName) { | |||
uni.showToast({ | |||
title: '请上传行驶证反面照', | |||
icon: 'none' | |||
@@ -584,6 +591,8 @@ const nextStep = () => { | |||
// 提交数据 | |||
console.log('表单数据:', formData) | |||
let requests = []; | |||
if(activationType.value === 'other') { | |||
const options = { | |||
type: 2, | |||
@@ -594,21 +603,66 @@ const nextStep = () => { | |||
}, | |||
showLoading: true, | |||
} | |||
requestNew('/iaw/active/checkSendCode', options).then(res => { | |||
next(); | |||
}) | |||
requests.push(requestNew('/iaw/active/checkSendCode', options)); | |||
} | |||
// if(formData.activeType == '2') { | |||
// requests.push(getCharacter()); | |||
// } | |||
if(requests.length == 0) { | |||
next(); | |||
return; | |||
} | |||
Promise.all(requests).then(res => { | |||
next(); | |||
}) | |||
} | |||
// 获取车辆使用性质 | |||
const getCharacter = () => { | |||
let approvedCount; | |||
if (vehicleBackData.apc.indexOf('人') > 0) { | |||
approvedCount = vehicleBackData.apc.replace("人", ""); | |||
} else { | |||
approvedCount = vehicleBackData.apc; | |||
} | |||
next(); | |||
let totalMass; | |||
if (vehicleBackData.gross.toString().indexOf('kg') > 0) { | |||
totalMass = vehicleBackData.gross.replace("kg", ""); | |||
} else { | |||
totalMass = vehicleBackData.gross; | |||
} | |||
let data = { | |||
"approvedCount": approvedCount, | |||
// "axleCount": state.form.axleCount, | |||
"totalMass": totalMass, | |||
// "vanType": state.form.vanType, | |||
"vehicleDimensions": vehicleBackData.overall.replaceAll("x", "X"), | |||
"plateNum": activationType.value === 'other' ? formData.carNumber : formData.vehiclePlate, | |||
"vehicleTypeName": vehicleFrontData.vehicle, | |||
"vehicleUsePropertName": vehicleFrontData.character | |||
} | |||
let params = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return requestNew(vehicCharge, params) | |||
} | |||
const next = () => { | |||
console.log(formData); | |||
if(formData.activeType == '1') { | |||
console.log('formData', formData); | |||
let carNumber = activationType.value == 'self' ? formData.vehiclePlate : formData.carNumber; | |||
setItem('vehicleId', `${carNumber}_${formData.colorCode}`) | |||
// if(formData.activeType == '1') { | |||
setItem('vehicleUrl', { | |||
front: vehicleFrontData.imageName, | |||
back: vehicleBackData.imageName | |||
}) | |||
navTo(`/subpackage/after-sale/activation/operation-tips?id=${formData.orderId}&orderId=${formData.orderNo}&cardStatus=${undefined}&obuStatus=${undefined}&transfer=${formData.activeType}`); | |||
} else { | |||
// } else { | |||
} | |||
// } | |||
} | |||
</script> | |||
@@ -55,6 +55,7 @@ export function request(code, options = {}, start = false) { | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn' | |||
options.url = | |||
envs[process.env.NODE_ENV].baseUrl + "/ndev/api/interfaceMidGroundIn"; | |||
//默认json数据格式提交` | |||
let contentType = "application/x-www-form-urlencoded"; | |||
@@ -318,7 +319,8 @@ export function requestNew(code, options = {}, start = false, clie = () => {}) { | |||
}; | |||
console.log("Common", Common, getItem("customerObj")); | |||
// options.url = envs[process.env.NODE_ENV].baseUrl+'/prod' + code | |||
options.url = envs[process.env.NODE_ENV].baseUrl + "/newDev/ndev" + code; | |||
options.url = envs[process.env.NODE_ENV].baseUrl + "/newProd/prod" + code; | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + "/newDev/ndev" + code; | |||
//默认json数据格式提交` | |||
let contentType = "application/json"; | |||
@@ -523,7 +523,8 @@ export const uploadFile = (tempImagePath, imageType) => { | |||
console.log("tempImagePath", tempImagePath, tempImagePath.size,imageType) | |||
return new Promise((resolve, reject) => { | |||
uni.uploadFile({ | |||
url: 'https://qtzl.etcjz.cn/newDev/minIo/upload', //仅为示例,非真实的接口地址 | |||
// url: 'https://qtzl.etcjz.cn/newDev/minIo/upload', //测试 | |||
url: 'https://qtzl.etcjz.cn/newProd/minIo/upload', //仅为示例,非真实的接口地址 | |||
filePath: tempImagePath, | |||
name: 'file', | |||
formData: { | |||
@@ -569,12 +570,12 @@ export const uploadFile = (tempImagePath, imageType) => { | |||
resolve({ imageUrl: JSON.parse(uploadFileRes.data).data.ossFilePath }) | |||
return | |||
} | |||
const magType = imageType == 10?1:imageType; | |||
const options = { | |||
type: 2, | |||
data: { | |||
type: imageType, | |||
type: magType, | |||
imagePath: JSON.parse(uploadFileRes.data).data.ossFilePath, | |||
}, | |||
method: "POST", |