@@ -88,7 +88,7 @@ | |||
username: "", //用户名 | |||
password: "", //密码 | |||
code: "", //验证码 | |||
back: 0, //从app扫码看协议过来 登录了 还需要回到手机号验证页面 0 是原本的登录 1 要回去的登录 2运维跳转过来得中转页 | |||
back: 0, //从app扫码看协议过来 登录了 还需要回到手机号验证页面 0 是原本的登录 1 要回去的登录(从哪来回哪去) 2运维跳转过来得中转页 | |||
params:{} | |||
}); | |||
@@ -1086,7 +1086,13 @@ | |||
{ | |||
"root": "subpackage/orders", //订单管理模块 | |||
"pages": [ | |||
{ | |||
"path": "transfer-page-sign", | |||
"style": { | |||
"navigationBarTitleText": "订单查询", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "essential-information-two", | |||
"style": { |
@@ -8,15 +8,15 @@ | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">用户姓名</view> | |||
<view class="cell-right">{{ card.userName }}</view> | |||
<view class="cell-right">{{ card.userNameStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">身份证号</view> | |||
<view class="cell-right">{{ card.idNum }}</view> | |||
<view class="cell-right">{{ card.idNumStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">车辆类型</view> | |||
<view class="cell-right">{{ card.type }}</view> | |||
<view class="cell-right">{{ card.typeStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">车牌号</view> | |||
@@ -24,7 +24,7 @@ | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">车牌颜色</view> | |||
<view class="cell-right">{{ card.color }}</view> | |||
<view class="cell-right">{{ card.colorStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">启用时间</view> | |||
@@ -36,7 +36,7 @@ | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">卡签绑定</view> | |||
<view class="cell-right">{{ card.favourable }}</view> | |||
<view class="cell-right">{{ card.favourableStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">校验值</view> | |||
@@ -63,11 +63,11 @@ | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">车辆类型</view> | |||
<view class="cell-right">{{ obu.type }}</view> | |||
<view class="cell-right">{{ obu.typeStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">车辆用户类型</view> | |||
<view class="cell-right">{{ obu.userType }}</view> | |||
<view class="cell-right">{{ obu.userTypeStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">车牌号</view> | |||
@@ -75,7 +75,7 @@ | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">车牌颜色</view> | |||
<view class="cell-right">{{ obu.vehiclePlateColor }}</view> | |||
<view class="cell-right">{{ obu.vehiclePlateColorStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">核定载人数</view> | |||
@@ -115,7 +115,7 @@ | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">是否激活</view> | |||
<view class="cell-right">{{ obu.isJH }}</view> | |||
<view class="cell-right">{{ obu.isJHStr }}</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-left">版本号</view> | |||
@@ -144,7 +144,7 @@ | |||
import { | |||
request,requestNew | |||
} from "@/utils/network/request"; | |||
import {cardObuQuery,obuFileDataDecrypt} from "@/utils/network/api"; | |||
import {cardObuQuery,obuFileDataDecrypt,cardObuQueryinLog} from "@/utils/network/api"; | |||
import { | |||
stringToJson | |||
} from "@/utils/network/encryption"; | |||
@@ -169,15 +169,20 @@ | |||
startTime: "", | |||
endTime: "", | |||
userName: "", | |||
userNameStr:"", | |||
idNum: "", | |||
idNumStr:"", | |||
vehiclePlate: "", | |||
vehiclePlateColor: "", | |||
color: "", | |||
colorStr:"", | |||
version: "", | |||
type: "", | |||
typeStr:"", | |||
favourable: "", | |||
favourableStr:"", | |||
money: "", | |||
v_userType: "", | |||
v_userType: "" | |||
}) | |||
const obu = reactive({ | |||
num: "", | |||
@@ -189,12 +194,16 @@ | |||
axleDistance: "", | |||
engineNum: "", | |||
type: "", | |||
typeStr:"", | |||
userType: "", | |||
userTypeStr:"", | |||
vehiclePlate: "", | |||
vehiclePlateColor: "", | |||
vehiclePlateColorStr:"", | |||
vin: "", | |||
wheelCount: "", | |||
isJH: "", | |||
isJHStr: "", | |||
outsideDimensions: "", | |||
}) | |||
const state = reactive({ | |||
@@ -237,16 +246,17 @@ | |||
card.vehiclePlate = HexToStrig(res[2].substring(56, 80)); | |||
if (res[2].substring(18, 19) >= 4) { | |||
//4x卡 | |||
card.type = getVehicleType(parseInt(res[2].substring(84, 86), 16)); | |||
card.color = getVehiclePlateColor(parseInt(res[2].substring(82, 84), 16)) | |||
card.type = parseInt(res[2].substring(84, 86), 16); | |||
card.typeStr = getVehicleType(parseInt(res[2].substring(84, 86), 16)); | |||
card.color = parseInt(res[2].substring(82, 84), 16) | |||
card.colorStr = getVehiclePlateColor(parseInt(res[2].substring(82, 84), 16)) | |||
} else { | |||
//2x卡--获取车牌颜色 | |||
card.type = "--"; | |||
card.color = getVehiclePlateColor(parseInt(res[2].substring(82, 86), 16)) | |||
card.color =parseInt(res[2].substring(82, 84), 16) | |||
card.colorStr = getVehiclePlateColor(parseInt(res[2].substring(82, 84), 16)) | |||
} | |||
state.vehicleId = card.vehiclePlate + "_" + parseInt(res[2].substring(82, 84), 16) | |||
console.log("card.color===========", card.vehiclePlate, parseInt(res[2].substring(82, 84), | |||
16)) | |||
// 读卡信息 | |||
// getCardList() | |||
//执行0016文件 | |||
@@ -257,9 +267,10 @@ | |||
if (res[1].length > 108) { | |||
console.log("res====",res) | |||
card.userName = HexToStrig(res[1].substring(4, 44)); //姓名 | |||
card.userName = card.userName[0] + '*'.repeat(card.userName.length - 1) | |||
card.idNum = HexToStrig(res[1].substring(44, 108)).replace(/^\d{14}/, | |||
'**************'); //身份证号码 | |||
card.userNameStr = card.userName[0] + '*'.repeat(card.userName.length - 1) | |||
card.idNum = HexToStrig(res[1].substring(44, 108)); //身份证号码 | |||
card.idNumStr = HexToStrig(res[1].substring(44, 108)).replace(/^\d{14}/, | |||
'**************'); //身份证号码 | |||
//获取是否有优惠 | |||
@@ -273,15 +284,16 @@ | |||
if (res[2].length > 131) { | |||
let _str = parseInt(res[2].substring(129, 130), | |||
16); | |||
card.favourable=_str | |||
switch (_str) { | |||
case 0: | |||
card.favourable = "否"; | |||
card.favourableStr = "否"; | |||
break; | |||
case 1: | |||
card.favourable = "是"; | |||
card.favourableStr = "是"; | |||
break; | |||
default: | |||
card.favourable = '未知' + "_" + _str; | |||
card.favourableStr = '未知' + "_" + _str; | |||
break; | |||
} | |||
//回调读取OBU指令 | |||
@@ -326,8 +338,9 @@ | |||
obu.startTime = res[1].substring(36, 44); | |||
obu.endTime = res[1].substring(44, 52); | |||
obu.version = res[1].substring(18, 19) >= 4 ? "4x" : "2x"; | |||
obu.isJH = res[1].substring(53, 54) == "1" ? "是" : res[1].substring(53, 54) == "0" ? | |||
"否" : "其他:" + res[1].substring(53, 54); | |||
obu.isJH = res[1].substring(53, 54) | |||
obu.isJHStr = res[1].substring(53, 54) == "1" ? "是" : res[1].substring(53, 54) == "0" ? | |||
"否" : "其他:" + res[1].substring(53, 54); | |||
console.log("开始执行车辆信息识读"); | |||
let rand = res[1].substring(18, 20) >= 50?'40':'00'; | |||
@@ -350,15 +363,18 @@ | |||
obu.axleCount = res.axleCount; | |||
obu.axleDistance = res.axleDistance; | |||
obu.engineNum = res.engineNumber; | |||
obu.type = getVehicleType(res.collectionType); | |||
obu.type = res.collectionType; | |||
obu.typeStr = getVehicleType(res.collectionType); | |||
obu.userType = res.userType; | |||
if(res.userType == 0){ | |||
obu.userType = "普通车" ; | |||
obu.userTypeStr = "普通车" ; | |||
}else if(res.userType == 6){ | |||
obu.userType = "公务车" ; | |||
obu.userTypeStr = "公务车" ; | |||
} | |||
obu.vehiclePlate = res.vehiclePlate; | |||
//获取车牌颜色 | |||
obu.vehiclePlateColor = getVehiclePlateColor(res.vehiclePlateColor); | |||
obu.vehiclePlateColor = res.vehiclePlateColor; | |||
obu.vehiclePlateColorStr = getVehiclePlateColor(res.vehiclePlateColor); | |||
obu.vin = res.vin; | |||
obu.wheelCount = res.wheelsCount; | |||
obu.outsideDimensions = res.carLong + "x" + res.carWidth + "x" + res.carHeight | |||
@@ -451,11 +467,35 @@ | |||
state.cardStatus = result.cardStatus | |||
if (result.cardType == 1 && result.debitType == 1) { | |||
state.cardTypeName = "预存卡" | |||
card['cardTypeName']=3 | |||
} else if (result.cardType == 2) { | |||
state.cardTypeName = "储值卡" | |||
card['cardTypeName']=2 | |||
} else { | |||
state.cardTypeName = "记账卡" | |||
card['cardTypeName']=1 | |||
} | |||
// 卡签提交得信息 | |||
card['cardStatus']=result.cardStatus | |||
obu['obuStatus']=result.obuStatus?result.obuStatus:"" | |||
cardObuMsgUp() | |||
}) | |||
} | |||
// 签信息提交日志记录 | |||
const cardObuMsgUp = () => { | |||
var data = { | |||
cardLogInfo: card, | |||
obuLogInfo:obu, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(cardObuQueryinLog, options).then((res) => { | |||
tools.hideLoadingAlert(); | |||
console.log("提交成功") | |||
}) | |||
} | |||
</script> |
@@ -0,0 +1,355 @@ | |||
<template> | |||
<view class="content"> | |||
<view><text>车牌号:</text><input placeholder="请输入车牌号" v-model="state.vehiclePlate"/></view> | |||
<view><text>车牌颜色:</text> | |||
<view style="width: 60%;"> | |||
<uni-data-select style="width: 100%;" v-model="state.vehiclePlateColor" :localdata="state.colorRange" @change="changeColor" | |||
:clear="false"></uni-data-select> | |||
</view> | |||
</view> | |||
<view><text>身份证后四位:</text><input placeholder="请输入身份证后四位" v-model="state.idCard"/></view> | |||
<view><text>手机号码:</text><input placeholder="请输入手机号码" v-model="state.mobile"/></view> | |||
<view class="action"> | |||
<button type="default" class="ui-btn" @click="query()"> | |||
查询 | |||
</button> | |||
</view> | |||
</view> | |||
<view class="details" v-if="state.isDetails"> | |||
<view><text>车牌号</text><text class="car">{{state.details['vehiclePlate']}}</text></view> | |||
<view><text>车牌颜色</text><text class="car">{{getVehiclePlateColor(state.details['vehiclePlateColor'])}}</text></view> | |||
<view><text>车主姓名</text><text class="car">{{state.details['ownerName']}}</text></view> | |||
<view v-if="state.details['handlerName']"><text>办理人</text><text class="car">{{state.details['handlerName']}}</text></view> | |||
<view><text>产品名称</text><text class="car">{{state.details['productName']}}</text></view> | |||
<view><text>权益说明</text><text class="car">{{state.details['rightsDesc']}}</text></view> | |||
<view><text>产品金额</text><text class="car">¥{{state.details['productAmount']*0.01}}</text></view> | |||
<view><text>应付金额</text><text class="car">¥{{state.details['productAmount']*0.01}}</text></view> | |||
<view class="noborder other-free">无其他费用</view> | |||
<view class="noborder yansghi"> | |||
<checkbox-group @change="checkboxChange"> | |||
<checkbox :checked="state.checked" style="transform: scale(0.65)" /> | |||
<text class='txt'>我已阅读并同意</text> | |||
</checkbox-group> | |||
<text v-for="(item,index) in state.agreeURL" class="txt xieyi" @click="downAuthD(item)">《{{item.name}}》</text> | |||
</view> | |||
<view class="action" style="margin-bottom: 30rpx;"> | |||
<button type="default" class="ui-btn" @click="savaHandle()" v-if="state.isSign"> | |||
确认办理 | |||
</button> | |||
<button type="default" class="ui-btn" @click="sign()" v-else> | |||
去签署协议 | |||
</button> | |||
</view> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { reactive } from "vue"; | |||
import { onLoad,onShow } from "@dcloudio/uni-app"; | |||
import { | |||
navTo,hasLogin | |||
} from "@/utils/utils" | |||
import {agreementInSertOrder,contractQuery,orderQuery,accountSign,agreeOrderProdcut,envs} from "@/utils/network/api.js"; | |||
import { | |||
getItem, | |||
StorageKeys, | |||
setItem | |||
} from "@/utils/storage"; | |||
import {requestNew} from "@/utils/network/request.js"; | |||
import { msg } from "@/utils/utils"; | |||
import { vehiclePlateColorPai } from "@/datas/vehiclePlateColor.js"; | |||
import { | |||
getVehiclePlateColor | |||
} from "@/datas/vehiclePlateColor"; | |||
const state = reactive({ | |||
checked:false, | |||
agreeURL: [], | |||
agreements:[], | |||
isSign:false, | |||
colorRange:[], | |||
idCard:"", | |||
mobile:"", | |||
vehiclePlate:"", | |||
vehiclePlateColor:"", | |||
details:{}, | |||
isDetails:false, | |||
orderId:"" | |||
}); | |||
onShow(()=>{ | |||
if(state.orderId){ | |||
contractRequest() | |||
} | |||
}) | |||
onLoad(() => { | |||
let getColor = getItem('key')['VEHICLE_COLOR_TYPE']; | |||
for (var k = 0; k < getColor.length; k++) { | |||
let obj = {}; | |||
obj['value'] = getColor[k]['code'] | |||
obj['text'] = getColor[k]['name'] | |||
state.colorRange.push(obj) | |||
} | |||
// 没登录情况 | |||
if (!hasLogin()) { | |||
navTo( `/login/login?back=1`) | |||
}else{ | |||
} | |||
}) | |||
const query=()=>{ | |||
if(!state.vehiclePlate){ | |||
msg('请输入车牌号') | |||
return; | |||
} | |||
if(!state.vehiclePlateColor){ | |||
msg('请选择车牌颜色') | |||
return; | |||
} | |||
if(!state.idCard){ | |||
msg('请输入身份证后四位') | |||
return; | |||
} | |||
if(!state.mobile){ | |||
msg('请输入手机号码') | |||
return; | |||
} | |||
const options = { | |||
type: 2, | |||
data: { | |||
vehiclePlate: state.vehiclePlate, | |||
vehiclePlateColor: state.vehiclePlateColor, | |||
idCard: state.idCard, | |||
mobile: state.mobile, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(orderQuery, options).then((res) => { | |||
console.log("擦寻",res) | |||
state.details=res | |||
state.isDetails=true | |||
state.orderId=res.orderNo | |||
queryAgreement() | |||
}) | |||
} | |||
const savaHandle=()=>{ | |||
if (state.checked) { | |||
agreementConfirm().then((value) => { | |||
console.log("协议确认", value) | |||
let vehicleId=state.details['vehiclePlate']+"_"+state.details['vehiclePlateColor'] | |||
navTo( | |||
`/subpackage/orders/order_payment?orderId=${state.orderId}&&isValueCard=1&vehicleId=${vehicleId}`, | |||
); | |||
}) | |||
} else { | |||
msg("请勾选协议"); | |||
} | |||
} | |||
// 协议确认接口 | |||
const agreementConfirm = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderId: state.orderId, | |||
protocol: state.checked ? 1 : 0, | |||
agreements: state.agreements | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await requestNew(agreeOrderProdcut, options); | |||
const data = res; | |||
console.log("确认协议", data) | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
const checkboxChange = (e) => { | |||
state.checked = !state.checked; | |||
console.log(state.checked); | |||
}; | |||
// 查协议 | |||
const queryAgreement = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderId: state.orderId, //订单编号 | |||
status: 1 | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(agreementInSertOrder, options).then((res) => { | |||
let data = res; | |||
let supAgreeArr = data.data | |||
console.log("data==", supAgreeArr) | |||
for (var m = 0; m < supAgreeArr.length; m++) { | |||
let obj = {} | |||
obj['name'] = supAgreeArr[m]['name'] | |||
for (var k = 0; k < supAgreeArr[m]['address'].length; k++) { | |||
state.agreements.push(supAgreeArr[m]['address'][k]['id']) | |||
obj['url'] = envs[process.env.NODE_ENV].baseUrl + supAgreeArr[m]['address'][k]['url'] | |||
state.agreeURL.push(obj) | |||
} | |||
} | |||
contractRequest() | |||
console.log("查协议", state.agreeURL) | |||
}); | |||
} | |||
const downAuthD = (item) => { | |||
console.log('=======123', item) | |||
console.log("uni.env.USER_DATA_PATH '", uni.env.USER_DATA_PATH + '/' + '产品协议.docx') | |||
// 文件后缀截取 | |||
var index = item.url.lastIndexOf("\."); | |||
let fileType = item.url.substring(index + 1, item.url.length); | |||
console.log("fileType", fileType) | |||
uni.downloadFile({ | |||
url: item.url, | |||
filePath: uni.env.USER_DATA_PATH + '/' + item.name + '.' + fileType, | |||
success(res) { | |||
const filePath = res.filePath | |||
console.log("filePath", filePath) | |||
uni.openDocument({ | |||
filePath: filePath, | |||
fileType: fileType, | |||
showMenu: true, //关键点 | |||
success: function (res) { | |||
}, | |||
fail: function (err) { | |||
msg("打开文档失败"); | |||
} | |||
}); | |||
}, | |||
fail: function (err) { | |||
msg("下载文档失败"); | |||
console.log("err", err) | |||
}, | |||
complete(res) { | |||
} | |||
}) | |||
} | |||
// 查询是否签署协议 | |||
const contractRequest=()=>{ | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderId: state.orderId, //订单编号 | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(contractQuery, options).then((res) => { | |||
if(res.contractState==1){ | |||
state.isSign=true | |||
}else{ | |||
state.isSign=false | |||
} | |||
console.log("查询是否签署协议", res) | |||
}); | |||
} | |||
// 去签署协议 | |||
const sign=()=>{ | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderId: state.orderId, //订单编号 | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(accountSign, options).then((res) => { | |||
navTo(`/subpackage/orders/webView?url=${res.shortUrl}`) | |||
console.log("去签署协议", res.shortUrl) | |||
}); | |||
} | |||
const changeColor = (e) => { | |||
state.vehiclePlateColor = e | |||
console.log(e) | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.content{ | |||
font-size: 30rpx; | |||
background-color: white; | |||
box-sizing: border-box; | |||
padding: 20rpx 30rpx 40rpx 30rpx; | |||
view{ | |||
display: flex; | |||
margin-bottom: 4rpx; | |||
align-items: center; | |||
height: 76rpx; | |||
text{ | |||
width: 22%; | |||
} | |||
input{ | |||
border:1rpx solid #ccc ; | |||
margin-left: 20rpx; | |||
padding: 4rpx 10rpx; | |||
width: 60%; | |||
border-radius: 5rpx; | |||
box-sizing: border-box; | |||
} | |||
} | |||
} | |||
.details{ | |||
font-size: 30rpx; | |||
background-color: white; | |||
box-sizing: border-box; | |||
padding: 20rpx 30rpx; | |||
margin-top: 30rpx; | |||
view{ | |||
border-bottom: 1rpx solid #ccc; | |||
height: 62rpx; | |||
line-height: 62rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
.car{ | |||
font-weight: bold; | |||
} | |||
} | |||
.noborder{ | |||
border-bottom: none; | |||
} | |||
.other-free{ | |||
display: flex; | |||
justify-content: flex-end; | |||
} | |||
.sure{ | |||
margin: 30rpx 0; | |||
} | |||
} | |||
.action{ | |||
margin-top: 30rpx; | |||
} | |||
::v-deep .uni-select{ | |||
height: 58rpx !important; | |||
margin-left: 20rpx; | |||
border:1rpx solid #ccc !important; | |||
box-sizing: border-box !important; | |||
padding-left: 10rpx !important; | |||
} | |||
::v-deep .uni-select__input-text{ | |||
font-size: 30rpx !important; | |||
} | |||
.yansghi{ | |||
height: auto !important; | |||
line-height: normal !important; | |||
display: flex !important; | |||
justify-content: flex-start !important; | |||
flex-shrink: 1 !important; | |||
flex-wrap: wrap !important; | |||
align-items: center !important; | |||
} | |||
</style> |
@@ -456,4 +456,6 @@ export const quanConfirm = "/iaw/cardCharge/cardChargeConfirmWithCosByVfj"; // | |||
export const relieveHandUp = "/iaw/api/afterSale/cardObuHangUp/relieveHandUp"; //解除挂起 | |||
export const contractQuery = "/iaw/anXinSign/contractQuery"; //查询是否去签署协议 | |||
export const accountSign = "/iaw/anXinSign/accountSign"; //查询去签署协议链接 | |||
export const accountSign = "/iaw/anXinSign/accountSign"; //查询去签署协议链接 | |||
export const orderQuery = "/iaw/app/issue/order/orderQuery"; //订单查询(其他地方跳转过来) | |||
export const cardObuQueryinLog = "/iaw/ass/query/cardObuQueryInLog"; //卡签信息提交日志记录 |