瀏覽代碼

修改问题

yxb
yangteng 11 月之前
父節點
當前提交
5178563eda
共有 36 個檔案被更改,包括 616 行新增1585 行删除
  1. 5
    3
      components/viewfinder.vue
  2. 1
    0
      composables/order/useOrderList.ts
  3. 23
    0
      functional-pages/request-payment.js
  4. 12
    2
      login/login.vue
  5. 1
    1
      manifest.json
  6. 1
    9
      pages.json
  7. 10
    8
      pages/bluetooth/bluetooth.vue
  8. 1
    0
      pages/index/index.vue
  9. 4
    3
      pages/order/components/order-list-item-new.vue
  10. 0
    1
      pages/order/order.vue
  11. 3
    1
      static/etcUtil/index.js
  12. 3
    14
      subpackage/after-sale/ETC-log-off/log-off-confirm.vue
  13. 8
    9
      subpackage/after-sale/ETC-log-off/upload-card.vue
  14. 10
    4
      subpackage/after-sale/activation-once-again/activation-once-again-ali.vue
  15. 4
    9
      subpackage/after-sale/activation-once-again/activation-once-again.vue
  16. 0
    1
      subpackage/after-sale/activation-once-again/select-car.vue
  17. 259
    107
      subpackage/after-sale/activation/activate.vue
  18. 0
    1
      subpackage/after-sale/additional-equipment/additional-equipment-confirm.vue
  19. 15
    40
      subpackage/after-sale/card-Renewal/renewal-confirm.vue
  20. 5
    5
      subpackage/after-sale/card-loss-reporting/cardloss-confirm.vue
  21. 2
    2
      subpackage/after-sale/deviceInfo/deviceInfo.vue
  22. 14
    40
      subpackage/after-sale/equipment-upgrade/upgrade-confirm.vue
  23. 6
    2
      subpackage/after-sale/js/publicRequest.ts
  24. 3
    2
      subpackage/after-sale/replace-equipment/replace-equipment-confirm.vue
  25. 4
    7
      subpackage/after-sale/to-bookkeeping-card/confirm.vue
  26. 4
    7
      subpackage/after-sale/transfer-ownership/transfer-confirm.vue
  27. 54
    14
      subpackage/after-sale/transfer-page.vue
  28. 0
    1159
      subpackage/carPark/etc/etcActivate.vue
  29. 51
    42
      subpackage/carPark/etc/etcDeviceInfo.vue
  30. 1
    6
      subpackage/orders/car-release.vue
  31. 3
    1
      subpackage/orders/order-details-new.vue
  32. 14
    3
      subpackage/personal-center/car-message-change.vue
  33. 14
    2
      subpackage/personal-center/install-activation-order.vue
  34. 75
    73
      subpackage/service/equity/equity.vue
  35. 4
    2
      utils/network/api.js
  36. 2
    5
      utils/network/request.js

+ 5
- 3
components/viewfinder.vue 查看文件

@@ -178,8 +178,10 @@
// srcImg.value = res.tempImagePath
startPhoto.value = false
cameraContext.stopRecord();
getViewPosition(res.tempImagePath)
console.log('拍照成功:', res.tempImagePath);
emit('confirmReturn', res)
// getViewPosition(res.tempImagePath)
return
// console.log('拍照成功:', res.tempImagePath);
},
fail: (error) => {
console.error('拍照失败:', error);
@@ -300,4 +302,4 @@
border-radius: 16rpx;
z-index: 2;
}
</style>
</style>

+ 1
- 0
composables/order/useOrderList.ts 查看文件

@@ -26,6 +26,7 @@ export default function useOrderList() {
})

onLoad((option) => {
console.log('=============输出内容',option)
if (!option.index) {
data.tabIndex = 0
} else {

+ 23
- 0
functional-pages/request-payment.js 查看文件

@@ -0,0 +1,23 @@
/*
* @Author: gaorf30153 gaorf30153@hundsun.com
* @Date: 2024-06-26 08:41:43
* @LastEditors: gaorf30153 gaorf30153@hundsun.com
* @LastEditTime: 2024-06-26 08:59:33
* @FilePath: \wxminipro\miniprogram\functional-pages\request-payment.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
exports.beforeRequestPayment = function (paymentArgs, callback) {
// 自定义的参数,此处应为从插件传递过来的 paymentArgs
console.log(paymentArgs)
var error = null
var requestPaymentArgs = {
//该对象为下单所需参数,以后端接口返回的为准!!
timeStamp: paymentArgs.timeStamp,
nonceStr: paymentArgs.nonceStr,
package: paymentArgs.package,
signType: paymentArgs.signType,
paySign: paymentArgs.paySign,
}
callback(error, requestPaymentArgs) //重点:返回requestPaymentArgs
console.log(requestPaymentArgs)
}

+ 12
- 2
login/login.vue 查看文件

@@ -89,13 +89,18 @@
username: "", //用户名
password: "", //密码
code: "", //验证码
back: 0, //从app扫码看协议过来 登录了 还需要回到手机号验证页面 0 是原本的登录 1 要回去的登录
back: 0, //从app扫码看协议过来 登录了 还需要回到手机号验证页面 0 是原本的登录 1 要回去的登录 2运维跳转过来得中转页
params:{}
});

onLoad((option) => {
if (option.back == 1) {
state.back = option.back
}
if (option.back == 2) {
state.back = option.back
state.params = JSON.parse(decodeURIComponent(option.params))
}
uni.$on("login", (data) => {
state.username = data.phone;
});
@@ -177,7 +182,12 @@
uni.navigateBack({
delta: 1
})
} else {
} else if (state.back == 2) {
const params = encodeURIComponent(JSON.stringify(state.params))
uni.redirectTo({
url:`/subpackage/after-sale/transfer-page?params=${params}`
})
} else{
uni.switchTab({
url: '/pages/index/index'
})

+ 1
- 1
manifest.json 查看文件

@@ -73,7 +73,7 @@
"requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"],
"plugins": {
"issuer-plugin": {
"version": "dev-6124a94c780bba48fa11c972bcca2c98",
"version": "dev-a7735d459012b025db1aadce13fb7287",
"provider": "wxa2d9acdd1054e69b"
}
}

+ 1
- 9
pages.json 查看文件

@@ -1952,15 +1952,7 @@
"style": {
"navigationBarTitleText": "设备信息"
}
}
// {
// "path": "etc/etcActivate",
// "style": {
// "navigationBarTitleText": "设备信息"
// }
// }
}
]
}
],

+ 10
- 8
pages/bluetooth/bluetooth.vue 查看文件

@@ -310,12 +310,13 @@
_name = "智载";
break;
case "ETC":
if (name.split("-")[1] == "KC" || name.split("-")[1].indexOf('C') || name.split("-")[1].indexOf('K')) {
if (name.split("-")[1] == "KC" || name.split("-")[1].indexOf('C')>0 || name.split("-")[1].indexOf('K')>0) {
_name = "前装-科畅";
console.log("前装-科畅")
} else if (name.split("-")[1] == "JL") {
_name = "前装-聚力";
_name = "前装-聚力"; //共用
} else if (name.split("-")[1] == "WJ") {
_name = "前装-万集";
_name = "前装-万集"; //共用
} else if (name.split("-")[1] == "JY") {
_name = "前装-金溢";
}
@@ -438,8 +439,8 @@
);
break;
case "ETC":
console.log("device.name=====", device.name, device.name.includes("KC"))
if (device.name.includes("KC") || device.name.includes("K") || device.name.includes("C")) {
console.log("device.name=====", device.name, device.name.includes("KC"),device.name.includes("JY"),device.name.includes("KC") || device.name.includes("K") || device.name.includes("C"))
if (device.name.includes("KC") || device.name.includes("K")) {
kcApi.connectDevice(
device,
function (res) {
@@ -470,6 +471,7 @@
}
);
}else if (device.name.includes("JY")) {
console.log("进来了JY",device.name.includes("JY"))
jyApiEtc.connectDevice(
device,
function (res) {
@@ -607,9 +609,9 @@
function oks() {
//routeType 1.激活(订单来) 2.圈存 (/pages/recharge/recharge来)3.ping码解锁 4.信息读取 5从哪里来回哪里去监听bluetoothLink 7消费明细去圈存 8单位账户圈存 9对公账户修复
if (routeType.value == "1") {
uni.navigateTo({
url: `/subpackage/after-sale/activation/activate?transfer=${state.transfer}`,
});
uni.navigateTo({
url: `/subpackage/after-sale/activation/activate?transfer=${state.transfer}`,
});
} else if (routeType.value == "2") {
uni.navigateTo({
url: `/pages/recharge/recharge-weixin?connectSuccess=${state.connectSuccess}`,

+ 1
- 0
pages/index/index.vue 查看文件

@@ -288,6 +288,7 @@
const title = ref("我是测试");
const statusBarHeight = ref(0)


//监听页面滚动
onPageScroll((e) => {
if (e.scrollTop > statusBarHeight.value) {

+ 4
- 3
pages/order/components/order-list-item-new.vue 查看文件

@@ -95,19 +95,20 @@
<view class="btns" v-else-if="item.orderStep == OrderStatus.待激活">
<view class="btn btn-normal" @click.stop="gotoReturnOrder(item)" v-if="item.applyReturn">申请退货</view>
<view class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view>
<view class="btn btn-normal" @click.stop="gotoReplenishmentOrder(item)" v-if="item.deviceType==deviceType">申请补货</view>
<view class="btn btn-primary" @click.stop="gotoReplenishmentOrder(item)">申请补货</view>
<view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
<view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view>
</view>
<!-- ORDER_STEP_31(31, "异地-售前退货"),
ORDER_STEP_32(32, "异地-售前退货后确认收货"),
ORDER_STEP_33(33, "异地-售前换货"),
ORDER_STEP_33(33, "异地-售前换货"), 33包含换货和补货 如果item.orderType=='REPLENISHMENT'是补货 就不展示换货
ORDER_STEP_34(34, "异地-售前换货后确认收货"), -->
<view class="btns" v-else-if="item.orderStep == 31">
<view class="btn btn-primary" @click.stop="gotoReturnOrder(item)" >退货</view>
</view>
<view class="btns" v-else-if="item.orderStep==33">
<view class="btn btn-primary" @click.stop="gotoExchangeOrder(item)">换货</view>
<view class="btn btn-primary" @click.stop="gotoExchangeOrder(item)" v-if="item.orderType!='REPLENISHMENT'">换货</view>
<!-- <view class="btn btn-primary" @click.stop="gotoReplenishmentOrder(item)" v-if="item.orderType=='REPLENISHMENT'">申请补货</view> -->
</view>
<!-- 已完成 售后订单不允许评价产品,储值卡转记账卡除外-->

+ 0
- 1
pages/order/order.vue 查看文件

@@ -162,7 +162,6 @@
console.log("apppppppp",)
getList()
}

}

const props = defineProps({

+ 3
- 1
static/etcUtil/index.js 查看文件

@@ -177,7 +177,8 @@ function transCmd(cmdArr, type, func, callBack = null) {
break;
case "ETC":
//-------------deviceName前装-科畅
if (datas.getData("deviceName").includes("KC")||datas.getData("deviceName").includes("K")) {
console.log("datas.-----",datas.getData("deviceName"),datas.getData("deviceName").includes("KC"),datas.getData("deviceName").includes("K"))
if (datas.getData("deviceName").includes("KC")|| datas.getData("deviceName").includes("K")) {
console.log('kc执行内容====', cmdArr, type)
kcApi.transCmd(cmdArr, type, function(res) {
console.log('kc执行内容====11111', res)
@@ -275,6 +276,7 @@ function transCmd(cmdArr, type, func, callBack = null) {
break;
case "WQ":
wqApi.transCmd(cmdArr, type, function(res) {
console.log('握奇执行结果:===========', res)
if (res.code == 0) {
func(res.data);
} else {

+ 3
- 14
subpackage/after-sale/ETC-log-off/log-off-confirm.vue 查看文件

@@ -53,7 +53,7 @@
{{state.data.cardId}}
</view>
<view class="tips">
<text>储蓄卡</text>
<text>{{state.cardType=="23"?'记账卡':'储值卡'}}</text>
<text class="tips-card">{{getCodeName('CARD_STATE_TYPE',state.data.cardStatus)}}</text>
</view>
</view>
@@ -72,7 +72,6 @@
{{state.data.obuId}}
</view>
<view class="tips">
<!-- <text>储蓄卡</text> -->
<text class="tips-card">{{getCodeName('OBU_STATE_TYPE',state.data.obuStatus)}}</text>
</view>
</view>
@@ -117,6 +116,7 @@
obuStatus: undefined,
},
type: undefined,
cardType:""
});

/*视图进入后操作*/
@@ -124,6 +124,7 @@
queryOrderDetail(option.id).then((val : any) => {
console.log("option", val)
state.data = val
state.cardType=val.cardId.substring(8,10)
})

});
@@ -132,16 +133,7 @@
});
/*下一步*/
const nextACtion = () => {

queryCckChangejzCardJY().then(val => {
// if (state.data.cardId.length > 0 && state.data.obuId.length < 1) {
// state.type = 1 //只有卡

// } else if (state.data.cardId.length < 1 && state.data.obuId.length > 0) {
// state.type = 2 //只有设备
// } else if (state.data.cardId.length > 0 && state.data.obuId.length > 0) {
// state.type = 3 //两者都有
// }
let obj = {
type: state.type,
customerIdnum: state.data.customerIdnum,
@@ -156,11 +148,9 @@
`/subpackage/after-sale/ETC-log-off/etc-log-off?params=${params}`
)
})

}

const queryCckChangejzCardJY = () => {

return new Promise(async (resolve, reject) => {
const res = await request(cckChangejzCardJY, {
type: 2,
@@ -206,7 +196,6 @@
<style lang="scss" scoped>
.selectCar-box {
padding: 30rpx;

.title {
font-size: 30rpx;
font-family: Microsoft YaHei UI;

+ 8
- 9
subpackage/after-sale/ETC-log-off/upload-card.vue 查看文件

@@ -357,14 +357,13 @@
console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://'))
compressImage(res.tempFilePaths[0], (res) => {
console.log("过来了", res)
if (state.choiceIndex == 3) {
form.licenseFrontUrl = res.tempFilePath;
} else {
form.licenseReverseUrl = res.tempFilePath;
if (state.choiceIndex == 3 || state.choiceIndex == 4) {
state.showImg = false
state.images = res.tempFilePath
state.phoneType = state.choiceIndex
state.isTakePhotoModeShow = false
return
}
state.phoneType = state.choiceIndex
state.showImg = false
state.isTakePhotoModeShow = false
})
},
})
@@ -385,12 +384,12 @@
state.isTakePhotoModeShow = false
uploadFile(val.tempImagePath, imageType, etcCarOcrCard).then((data) => {
// uploadFile(val.tempImagePath, state.choiceIndex, ocrAllQuery).then((data) => {
console.log('输出内容=====================', state.choiceIndex)
console.log('输出内容=====================', state.choiceIndex,data)
if (state.choiceIndex === "3") {
form.licenseFrontUrl = data.imageUrl;
} else {
form.licenseReverseUrl = data.imageUrl;
console.log('=====================', state.form.vehNegImgUrl, state)
console.log('=====================', state)
}
state.isTakePhotoModeShow = false
})

+ 10
- 4
subpackage/after-sale/activation-once-again/activation-once-again-ali.vue 查看文件

@@ -300,10 +300,16 @@
orderInfos.cardStatus = orderInfo.cardStatus;
orderInfos.obuId = orderInfo.obuId;
orderInfos.obuStatus = orderInfo.obuStatus;
let arr = orderInfo.vehicleDimensions.split("X");
orderInfos.outlineL = parseInt(arr[0]); //外廓 长
orderInfos.outlineW = parseInt(arr[1]); //外廓 宽
orderInfos.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
if(orderInfo.vehicleDimensions){
let arr = orderInfo.vehicleDimensions.split("X");
orderInfos.outlineL = parseInt(arr[0]); //外廓 长
orderInfos.outlineW = parseInt(arr[1]); //外廓 宽
if(arr[2].includes('mm')){
orderInfos.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
}else{
orderInfos.outlineH = parseInt(arr[2]); //外廓 高
}
}

orderInfos.type = orderInfo.type;
orderInfos.axleCount = orderInfo.vehicleAxleCount;

+ 4
- 9
subpackage/after-sale/activation-once-again/activation-once-again.vue 查看文件

@@ -8,7 +8,7 @@
</view>
<view class="details-item">
<view> 用户名称: </view>
<text>{{ orderInfos.ownerName }}</text>
<text>{{ orderInfos.customerName }}</text>
</view>
<view class="details-item">
<view> 用户证件类型: </view>
@@ -45,7 +45,7 @@
<view class="card-center">
<view class="card-center-head"> {{orderInfos.cardId}} </view>
<view class="tips">
<text>储蓄卡</text>
<!-- <text>储蓄卡</text> -->
<text class="tips-card">{{getCodeName('CARD_STATE_TYPE',orderInfos.cardStatus)}}</text>
</view>
</view>
@@ -174,7 +174,7 @@
//订单
const orderInfos = reactive({
orderId: "",
ownerName: "",
customerName: "",
ownerIdtype: "",
ownerIdnum: "",
vehiclePlate: "",
@@ -273,7 +273,7 @@
let orderInfo = JSON.parse(res.bizContent);
console.log(orderInfo);
orderInfos.orderId = orderInfo.orderId;
orderInfos.ownerName = orderInfo.ownerName;
orderInfos.customerName = orderInfo.customerName;
orderInfos.ownerIdtype = orderInfo.ownerIdtype;
orderInfos.ownerIdnum = orderInfo.ownerIdnum;
orderInfos.vehiclePlate = orderInfo.vehiclePlate;
@@ -284,11 +284,6 @@
orderInfos.cardStatus = orderInfo.cardStatus;
orderInfos.obuId = orderInfo.obuId;
orderInfos.obuStatus = orderInfo.obuStatus;
let arr = orderInfo.vehicleDimensions.split("X");
orderInfos.outlineL = parseInt(arr[0]); //外廓 长
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;

+ 0
- 1
subpackage/after-sale/activation-once-again/select-car.vue 查看文件

@@ -146,7 +146,6 @@ import { deviceType } from "@/utils/network/difference";
}

.selectCar-box {
// width: 100%;
height: 100%;
padding: 30rpx;


+ 259
- 107
subpackage/after-sale/activation/activate.vue 查看文件

@@ -23,8 +23,9 @@
<text>{{ fileDataStrings.obuId }}</text>
</view>
</view>
<view class="up_btn">
<button aria-disabled="true" @click="btn" :disabled="disabled" v-if="!state.isSuccess">
<view class="up_btn" v-if="state.showBtn">
<button aria-disabled="true" @click="btn" v-if="!state.isSuccess" :disabled="!state.disabled"
:class="state.disabled?'button':'hui'">
点击开始激活
</button>
<button aria-disabled="true" @click="back" v-else>
@@ -91,8 +92,12 @@
obuStatus: "",
isSuccess: false, //是否激活成功
showPopup: false,
transfer: 0 //0 是原来的激活 1 是过户激活
transfer: 0, //0 是原来的激活 1 是过户激活
showBtn: true,
disabled: true
})
let snums = 0

onLoad((option) => {
//读取传入 存储的数据orderInfo
let orderData = getItem("orderInfo");
@@ -141,7 +146,6 @@
wheelCount: 0,
isJH: ""
});
const disabled = ref(false);
let cmdRandNum = '';
let orderInfo = {};

@@ -163,9 +167,6 @@
vehiclePlate: "", //车牌
vehiclePlateColor: 0, //车牌颜色
vehicleDimensions: "",
outlineL: 0, //外廓 长
outlineW: 0, //外廓 宽
outlineH: 0, //外廓 高
wheelCount: 0, //车轮数
vehicleIdNo: "", //车牌号
vehiclePlateColorStr: "",
@@ -173,48 +174,124 @@
customerId: "",
orderId: ""
});
function cmdResult() {
const options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
orderId: orderInfo.orderId,
issueType: state.transfer?2:1 //1正常激活 2 过户激活
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};
console.log("options==",options)
//BDS-二发指令申请
request('4b001421f5354c248a7759971881b52f', options)
.then((res) => {
tools.hideLoadingAlert();
console.log("在线激活 请求");
console.log(stringToJson(res.bizContent));
const datas = stringToJson(res.bizContent).data;
tools.showLoadingAlert("执行指令");
console.log("datas===",datas)
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) {
console.log("res申请",res)
implementCmd(datas.transOrderId,datas.cmd,res.toString(),datas.stepNo)
}, () => {
showModals('在线激活异常')
});
})
.catch((err) => {
console.log(err);
});L
}
function implementCmd(transOrderId, cmd, cmdResult, stepNo) {
const options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
transOrderId, //步骤号
cmd,
cmdResult,
stepNo
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};
console.log("options2222",options)
//BDS-二发指令回传
request('88d98f2db7df4f06b22d58b507db7854', options)
.then((res) => {
tools.hideLoadingAlert();
console.log(stringToJson(res.bizContent));
const datas = stringToJson(res.bizContent).data;
console.log("在线激活 请求",datas);
tools.showLoadingAlert("执行指令");
if (datas.stepNo == 100) {
msg("激活成功")
setTimeout(() => {
uni.navigateTo({
url: "/subpackage/after-sale/deviceInfo/deviceInfo",
});
}, 2000)
} else {
console.log("datas.stepNo",datas.stepNo)
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) {
implementCmd(transOrderId,datas.cmd,res.toString(),datas.stepNo)
}, () => {
showModals('在线激活异常')
});
}
})
.catch((err) => {
console.log(err);
});
}

//开始激活 按钮事件
const btn = () => {
console.log('orderInfo参数', orderInfo)
if (state.transfer) {
// 获取cardId
getCardId()
// 过户激活 1
// 1. 过户激活申请 2.设备升级 3.过户升级(跟过户升级一样) 4.79(BDS-安装申请)(后台数据)-
// >76(VFJ-OBU在线激活)(指令接口)->80(BDS-安装确认)->73(BDS-卡签绑定)(指令接口)->51(BDS-写卡指令返回)(指令接口)
} else {
console.log("=================================")
if (orderInfo) {
//根据订单详情走相应的断步功能
const cardId = orderInfo.cardId;
const cardStatus = orderInfo.cardStatus != null ? orderInfo.cardStatus : '0'
const obuId = orderInfo.obuId;
const obuStatus = orderInfo.obuStatus != null ? orderInfo.obuStatus : '9'
console.log('当前卡签状态', cardId, obuId, cardStatus, obuStatus)
console.log('输出内容', obu.obuId, '=======', fileDataStrings.obuId, obu.obuId != fileDataStrings.obuId)
if (fileDataStrings.obuId) {
if (obu.obuId + '' != fileDataStrings.obuId + '') {
tools.showModalAlert("订单设备号信息与当前设备号信息不符!");
return
}
}
if (!cardId) { //卡发行
getCardId()
} else if (cardId && cardStatus == '0') { //卡发行
getCardId()
} else if (!obuId) { //OBU发行
getObuApply();
} else if (obuId && obuStatus == '9') { //OBU发行
getObuApply();
} else if (cardId && obuId && (obuStatus == '1' || obuStatus == '11' || obuStatus ==
'0')) {
getInstallApply(); //激活
} else {
getCardId()
}
}
}
state.disabled = false
console.log('orderInfo参数', orderInfo, state.disabled)
cmdResult()
// //0 是原来的激活 1 是过户激活
// if (state.transfer) {
// // 获取cardId
// getCardId()
// // 过户激活 1
// // 1. 过户激活申请 2.设备升级 3.过户升级(跟过户升级一样) 4.79(BDS-安装申请)(后台数据)-
// // >76(VFJ-OBU在线激活)(指令接口)->80(BDS-安装确认)->73(BDS-卡签绑定)(指令接口)->51(BDS-写卡指令返回)(指令接口)
// } else {
// console.log("=================================")
// if (orderInfo) {
// //根据订单详情走相应的断步功能
// const cardId = orderInfo.cardId;
// const cardStatus = orderInfo.cardStatus != null ? orderInfo.cardStatus : '0'
// const obuId = orderInfo.obuId;
// const obuStatus = orderInfo.obuStatus != null ? orderInfo.obuStatus : '9'
// console.log('当前卡签状态', cardId, obuId, cardStatus, obuStatus)
// console.log('输出内容', obu.obuId, '=======', fileDataStrings.obuId, obu.obuId != fileDataStrings.obuId)
// if (fileDataStrings.obuId) {
// if (obu.obuId + '' != fileDataStrings.obuId + '') {
// tools.showModalAlert("订单设备号信息与当前设备号信息不符!");
// return
// }
// }
// if (!cardId) { //卡发行
// getCardId()
// } else if (cardId && cardStatus == '0') { //卡发行
// getCardId()
// } else if (!obuId) { //OBU发行
// getObuApply();
// } else if (obuId && obuStatus == '9') { //OBU发行
// getObuApply();
// } else if (cardId && obuId && (obuStatus == '1' || obuStatus == '11' || obuStatus == '0')) {
// getInstallApply(); //激活
// } else {
// getCardId()
// }
// }
// }

};

@@ -229,6 +306,7 @@
method: "POST",
showLoading: true,
};
state.disabled = false
request(IFCODE.orderDetail, options).then((res) => {
orderInfo = JSON.parse(res.bizContent);
console.log("orderInfo", orderInfo);
@@ -241,32 +319,35 @@
fileDataStrings.customerTel = orderInfo.customerTel;
fileDataStrings.customerId = orderInfo.customerId;
fileDataStrings.orderId = orderInfo.orderId;
let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor
searchVehicleInfoQuery(vehicleId).then((orderInfo) => {
fileDataStrings.approvedCount = parseInt(orderInfo.approvedCount); //核载人数
fileDataStrings.vehicleVin = orderInfo.vin;
fileDataStrings.vehicleEngineNum = orderInfo.engineNum;
fileDataStrings.axleCount = parseInt(orderInfo.axleCount); //轴数
fileDataStrings.engineNum = orderInfo.engineNum; //发动机
fileDataStrings.type = parseInt(orderInfo.type); //类型
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色
console.log("车辆信息", orderInfo)
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions;
let arr = orderInfo.vehicleDimensions.split("X");
console.log("orderInfo.vehicleDimensions", orderInfo.vehicleDimensions.split("X"))
fileDataStrings.outlineL = parseInt(arr[0]); //外廓 长
fileDataStrings.outlineW = parseInt(arr[1]); //外廓 宽
fileDataStrings.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号
fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
.vehiclePlateColor);
console.log("fileDataStrings", fileDataStrings);
})
getObuId();
fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
.vehiclePlateColor);
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌
// let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor
// searchVehicleInfoQuery(vehicleId).then((orderInfo) => {
// console.log("orderInfo1111", orderInfo)
// fileDataStrings.approvedCount = parseInt(orderInfo.approvedCount); //核载人数
// fileDataStrings.vehicleVin = orderInfo.vin;
// fileDataStrings.vehicleEngineNum = orderInfo.engineNum;
// fileDataStrings.axleCount = parseInt(orderInfo.axleCount); //轴数
// fileDataStrings.engineNum = orderInfo.engineNum; //发动机
// fileDataStrings.type = parseInt(orderInfo.type); //类型
// fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌
// fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色
// console.log("车辆信息", orderInfo)
// fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions;
// fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号
// fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
// .vehiclePlateColor);
// console.log("fileDataStrings", fileDataStrings);
// })
cancelOrderRequest(orderInfo.orderId)
}
});


getObuId();
};
//更换设备 去注销前订单的 卡签
const cancelOrderRequest = (orderId) => {
@@ -298,53 +379,41 @@
console.log('获取OBU号执行结果' + status, res)
//第一次获取随机数
if (status == "9000") {
state.disabled = true
obu.obuId = res[1].substring(20, 36);
console.log("obu.obuId===========", obu.obuId, res[1].substring(20, 36))
console.log(containsEnglishCharacters(card.obuId), '获取OBU号执行结果=========' + obu.obuId)
obu.vin = res[1].substring(18, 20);
obu.version = res[1].substring(18, 19) >= 4 ? "4x" : "2x";
cmdRandNum = res[2].substring(0, res[2].length - 4);
state.showBtn = true
} else {
showModals('获取设备信息错误!')
}
}, () => {
showModals('获取设备信息错误')
});
};

//获取fileData
const getFileData = (fun) => {
//调用方式
request('6ed853e432fb4811a3c0d7d27034bd39', {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
fileData: fileDataStrings.vehiclePlate,
nLen: 24
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
}).then((les) => {
let result = stringToJson(les.bizContent);
let res1 = result.gbkFileData; //车牌号
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

let res3 = IntegerToHexString(fileDataStrings.type, 2); //类型
let userTypeNumber = fileDataStrings.userType == 'PERSONAL_USER' ? 1 : 2
console.log("userTypeNumber", userTypeNumber)
let res4 = IntegerToHexString(userTypeNumber, 2); //用户类型
let res5 = IntegerToHexString(fileDataStrings.outlineL, 4); //车辆尺寸 长
let res6 = IntegerToHexString(fileDataStrings.outlineW, 2); //车辆尺寸 宽
let res7 = IntegerToHexString(fileDataStrings.outlineH, 2); //车辆尺寸 高
let res8 = IntegerToHexString(4, 2); //获取轮数
let res9 = IntegerToHexString(fileDataStrings.axleCount, 2); //轴数

let res10 = IntegerToHexString(null, 4); //轴距32
let res11 = IntegerToHexString(fileDataStrings.approvedCount, 6); //核载人数

let res12 = AsciToHexString(fileDataStrings.vehicleVin, 32); //车编号

// let res12 = JSON.parse(res.bizContent).gbkFileData; //车编号
let res13 = AsciToHexString(fileDataStrings.vehicleEngineNum, 32); //发动机
console.log(les, '=========123', )
fun(res1 + res2 + res3 + res4 + res5 + res6 + res7 + res8 + res9 + res10 + res11 + res12 + res13);
searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor, cmdRandNum).then((
orderInfo) => {
console.log("orderInfo==", orderInfo, orderInfo.fileData)
fun(orderInfo.fileData);
})
};

function containsEnglishCharacters(str) {
// // 使用正则表达式匹配英文字母
// const regex = /[a-zA-Z]/;
// return regex.test(str);

// 使用正则表达式匹配纯数字
const regex = /^\d+$/;
return regex.test(str);
}


/**
* 获取卡号 读卡
*/
@@ -369,6 +438,17 @@
if (str == "9000" || str3 == "9000") {
if (res[2].length > 86 || res[3] >= 12) {
card.cardId = res[2].substring(20, 40); //卡号

if (!containsEnglishCharacters(card.cardId)) {
if (snums > 2) {
showModals('获取卡信息错误')
return
}
snums++
getCardId()
return
}

card.startTime = res[2].substring(40, 48); //启用
card.endTime = res[2].substring(48, 56);
card.version = res[2].substring(18, 19) >= 4 ? "4x" : "2x";
@@ -393,12 +473,32 @@
console.error("CMD_READBINARY指令长度不符" + res[2])
tools.hideLoadingAlert();
}
} else {
showModals('获取卡信息错误!')
}
console.error("CMD_READBINARY指令长度不符" + res[2])
tools.hideLoadingAlert();
}, () => {
showModals('获取卡信息错误')
});
};

function showModals(msg) {
uni.showModal({
title: '提示',
content: msg,
showCancel: false,
success: function(res) {
if (res.confirm) {
uni.navigateBack()
console.log('用户点击确定1');
} else if (res.cancel) {
console.log('用户点击取消1');
}
}
});
}

// *------------------------------------*
// OBU开卡模块
// *------------------------------------*
@@ -434,6 +534,8 @@
bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
tools.hideLoadingAlert();
getCommandBack(result.command, result.cosRecordId, res.toString());
}, () => {
showModals('写卡指令信息错误!')
});
})
};
@@ -470,7 +572,9 @@
tools.hideLoadingAlert();
let response = res.toString();
getCommandBack(result.command, cosRecordId, response);
});
}, () => {
showModals('写卡指令返回错误!')
})
} else {
getWriteCard();
}
@@ -538,6 +642,8 @@
const getObuApply = () => {
console.log('======OBU发行申请======')
tools.showLoadingAlert("加载中");

console.log('获取OBU号执行结果=========' + obu.obuId)
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
@@ -554,6 +660,8 @@
tools.hideLoadingAlert();
modifyFileInfo()
})


};

/**
@@ -607,9 +715,12 @@
} else {
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
}
}, () => {
showModals('修改系统信息错误')
})

}
}, () => {
showModals('修改系统信息错误!')
});
}
})
@@ -628,8 +739,8 @@
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
Status: "0",
random: cmdRandNum, //5202192509222239
obuSerailNo: obu.obuId, //5202192509551922
random: cmdRandNum,
obuSerailNo: obu.obuId,
fileData: ites,
orderId: fileDataStrings.orderId,
}, //请求参数
@@ -654,6 +765,8 @@
transferSureRequest();
}
}
}, () => {
showModals('修改车辆信息错误')
});
}
})
@@ -733,6 +846,8 @@
} else {
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
}
}, () => {
showModals('安装申请异常')
})
})
};
@@ -768,6 +883,8 @@
console.log("在线激活执行指令88888 请求", res);
getObuInstall(0, ""); //status 0 - 安装成功 || 1 - 安装失败
}
}, () => {
showModals('在线激活异常')
});
})
.catch((err) => {
@@ -829,6 +946,8 @@
tools.hideLoadingAlert();
let response = res.toString();
getCommandBackEnd(result.command, result.cosRecordId, response);
}, () => {
showModals('卡签绑定异常!')
});
})
.catch((err) => {
@@ -867,8 +986,11 @@
tools.hideLoadingAlert();
let response = res.toString();
getCommandBackEnd(result.command, cosRecordId, response);
}, () => {
showModals('卡签绑定返回异常!')
});
} else {
state.disabled = true
// #ifdef MP-ALIPAY
uni.closeBluetoothAdapter({
success(res) {
@@ -973,6 +1095,8 @@
if (status == "9000") {
getCommandBackUp(result.command, result.cosRecordId, res.toString());
}
}, () => {
showModals('设备升级异常!')
})
}
})
@@ -1008,6 +1132,8 @@
tools.hideLoadingAlert();
let response = res.toString();
getCommandBackUp(result.command, cosRecordId, response);
}, () => {
showModals('写卡异常!')
});
} else {
obuWriteAgainRequest();
@@ -1151,6 +1277,32 @@
border: #4cd95f;
}

.button {
width: 100%;
height: 80rpx;
line-height: 80rpx;
color: white;
font-size: 32rpx;
text-align: center;
background: linear-gradient(to left, #43a1e0 0%, #13e7c1 100%);
border-radius: 40rpx;
outline: none;
border: #4cd95f;
}

.hui {
width: 100%;
height: 80rpx;
line-height: 80rpx;
color: white;
font-size: 32rpx;
text-align: center;
background: linear-gradient(to left, #b9b9b9 0%, #e7e7e7 100%) !important;
border-radius: 40rpx;
outline: none;
border: #4cd95f;
}

.up_btn button[disabled] {
background-color: rgba(0, 191, 112, 0.5);
color: white;

+ 0
- 1
subpackage/after-sale/additional-equipment/additional-equipment-confirm.vue 查看文件

@@ -72,7 +72,6 @@
{{state.data.obuId}}
</view>
<view class="tips">
<!-- <text>储蓄卡</text> -->
<text class="tips-card">{{getObuStatus(state.data.obuStatus)}}</text>
</view>
</view>

+ 15
- 40
subpackage/after-sale/card-Renewal/renewal-confirm.vue 查看文件

@@ -8,7 +8,7 @@
</view>
<view class="details-item">
<view> 用户名称: </view>
<text>{{ orderInfos.ownerName }}</text>
<text>{{ orderInfos.customerName }}</text>
</view>
<view class="details-item">
<view> 用户证件类型: </view>
@@ -172,7 +172,7 @@
let cmdRandNum = '';
const orderInfos = reactive({
orderId: "",
ownerName: "",
customerName: "",
ownerIdtype: "",
ownerIdnum: "",
vehiclePlate: "",
@@ -260,7 +260,7 @@
let orderInfo = JSON.parse(res.bizContent);
console.log("orderInfo", orderInfo);
orderInfos.orderId = orderInfo.orderId;
orderInfos.ownerName = orderInfo.ownerName;
orderInfos.customerName = orderInfo.customerName;
orderInfos.ownerIdtype = orderInfo.ownerIdtype;
orderInfos.ownerIdnum = orderInfo.ownerIdnum;
orderInfos.vehiclePlate = orderInfo.vehiclePlate;
@@ -456,38 +456,9 @@
};
//获取fileData
const getFileData = (fun) => {
//调用方式
request('6ed853e432fb4811a3c0d7d27034bd39', {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
fileData: fileDataStrings.vehiclePlate,
nLen: 24
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
}).then((les) => {
let result = stringToJson(les.bizContent);
console.log(result, '=========123')
let res1 = result.gbkFileData; //车牌号
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

let res3 = IntegerToHexString(fileDataStrings.type, 2); //类型
let userTypeNumber = fileDataStrings.userType == 'PERSONAL_USER' ? 1 : 2
let res4 = IntegerToHexString(userTypeNumber, 2); //用户类型
let res5 = IntegerToHexString(fileDataStrings.outlineL, 4); //车辆尺寸 长
let res6 = IntegerToHexString(fileDataStrings.outlineW, 2); //车辆尺寸 宽
let res7 = IntegerToHexString(fileDataStrings.outlineH, 2); //车辆尺寸 高
let res8 = IntegerToHexString(4, 2); //获取轮数
let res9 = IntegerToHexString(fileDataStrings.axleCount, 2); //轴数

let res10 = IntegerToHexString(null, 4); //轴距32
let res11 = IntegerToHexString(fileDataStrings.approvedCount, 6); //核载人数

let res12 = AsciToHexString(fileDataStrings.vehicleVin, 32); //车编号

let res13 = AsciToHexString(fileDataStrings.vehicleEngineNum, 32); //发动机

fun(res1 + res2 + res3 + res4 + res5 + res6 + res7 + res8 + res9 + res10 + res11 + res12 + res13);
searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor,cmdRandNum).then((orderInfo) => {
console.log("orderInfo==",orderInfo,orderInfo.fileData)
fun(orderInfo.fileData);
})
};
/**
@@ -609,11 +580,15 @@
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色
console.log("车辆信息", orderInfo)
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions;
let arr = orderInfo.vehicleDimensions.split("X");
console.log("orderInfo.vehicleDimensions", orderInfo.vehicleDimensions.split("X"))
fileDataStrings.outlineL = parseInt(arr[0]); //外廓 长
fileDataStrings.outlineW = parseInt(arr[1]); //外廓 宽
fileDataStrings.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
// let arr = orderInfo.vehicleDimensions.split("X");
// console.log("orderInfo.vehicleDimensions", orderInfo.vehicleDimensions.split("X"))
// fileDataStrings.outlineL = parseInt(arr[0]); //外廓 长
// fileDataStrings.outlineW = parseInt(arr[1]); //外廓 宽
// if(arr[2].indexOf('mm')){
// fileDataStrings.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
// }else{
// fileDataStrings.outlineH = arr[2] //外廓 高
// }
fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号
fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
.vehiclePlateColor);

+ 5
- 5
subpackage/after-sale/card-loss-reporting/cardloss-confirm.vue 查看文件

@@ -52,7 +52,7 @@
{{state.data.cardId}}
</view>
<view class="tips">
<text>储蓄卡</text>
<text>{{state.cardType=="23"?'记账卡':'储值卡'}}</text>
<text class="tips-card">{{getCodeName('CARD_STATE_TYPE',state.data.cardStatus)}}</text>
</view>
</view>
@@ -118,9 +118,6 @@
import {
msg
} from "@/utils/utils";
import {
getCredentialType
} from "@/subpackage/after-sale/js/credentialType.js";

import {
stringToJson
@@ -132,7 +129,8 @@
cardStatus: undefined,
obuStatus: undefined,
},
successTip: "" //成功提示
successTip: "" ,//成功提示
cardType:""
});
const flag = reactive([])
const type = ref('')
@@ -140,6 +138,8 @@
onShow(() => {
queryOrderDetail(state.id).then((val : any) => {
state.data = val
state.cardType=val.cardId.substring(8,10)
console.log(state.cardType)
})
})
onLoad((option) => {

+ 2
- 2
subpackage/after-sale/deviceInfo/deviceInfo.vue 查看文件

@@ -125,7 +125,7 @@
<view class="cell-left">版本号</view>
<view class="cell-right">{{ obu.version }}</view>
</view>
<view class="cell">
<view class="cell" v-if="state.obuStatus">
<view class="cell-left">签状态</view>
<view class="cell-right">{{getCodeName('OBU_STATE_TYPE',state.obuStatus)}}</view>
</view>
@@ -462,7 +462,7 @@
tools.hideLoadingAlert();
let result = stringToJson(res.bizContent);
console.log("153", result)
state.obuStatus = result.data[0].obuStatus
state.obuStatus = result.data[0]?result.data[0].obuStatus:""
})
}
</script>

+ 14
- 40
subpackage/after-sale/equipment-upgrade/upgrade-confirm.vue 查看文件

@@ -55,7 +55,6 @@
<view class="card-center">
<view class="card-center-head"> {{orderInfos.obuId}} </view>
<view class="tips">
<!-- <text>储蓄卡</text> -->
<text class="tips-card">{{getCodeName('OBU_STATE_TYPE',orderInfos.obuStatus)}}</text>
</view>
<view class="choose-item"> 有效期:{{orderInfos.obuExpireTime }} </view>
@@ -175,6 +174,7 @@
customerId: "",
orderId: ""
});
let orderInfo = {};
let cmdRandNum = '';
onLoad((option) => {
console.log("options", option)
@@ -397,39 +397,9 @@
};
//获取fileData
const getFileData = (fun) => {
//调用方式
request('6ed853e432fb4811a3c0d7d27034bd39', {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
fileData: fileDataStrings.vehiclePlate,
nLen: 24
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
}).then((les) => {
let result = stringToJson(les.bizContent);
console.log(les, '=========123')
let res1 = result.gbkFileData; //车牌号
let res2 = IntegerToHexString(fileDataStrings.vehiclePlateColor, 4); //车牌颜色

let res3 = IntegerToHexString(fileDataStrings.type, 2); //类型
let userTypeNumber = fileDataStrings.userType == 'PERSONAL_USER' ? 1 : 2
let res4 = IntegerToHexString(userTypeNumber, 2); //用户类型
let res5 = IntegerToHexString(fileDataStrings.outlineL, 4); //车辆尺寸 长
let res6 = IntegerToHexString(fileDataStrings.outlineW, 2); //车辆尺寸 宽
let res7 = IntegerToHexString(fileDataStrings.outlineH, 2); //车辆尺寸 高
let res8 = IntegerToHexString(4, 2); //获取轮数
let res9 = IntegerToHexString(fileDataStrings.axleCount, 2); //轴数

let res10 = IntegerToHexString(null, 4); //轴距32
let res11 = IntegerToHexString(fileDataStrings.approvedCount, 6); //核载人数

let res12 = AsciToHexString(fileDataStrings.vehicleVin, 32); //车辆识别代号

// let res12 = JSON.parse(res.bizContent).gbkFileData; //车编号
let res13 = AsciToHexString(fileDataStrings.vehicleEngineNum, 32); //发动机

fun(res1 + res2 + res3 + res4 + res5 + res6 + res7 + res8 + res9 + res10 + res11 + res12 + res13);
searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor,cmdRandNum).then((orderInfo) => {
console.log("orderInfo==",orderInfo,orderInfo.fileData)
fun(orderInfo.fileData);
})
};
/**
@@ -529,7 +499,7 @@
showLoading: true,
};
request(orderDetail, options).then((res) => {
let orderInfo = JSON.parse(res.bizContent);
orderInfo = JSON.parse(res.bizContent);
console.log("orderInfo", orderInfo);
console.log("orderInfores", res);
if (orderInfo) {
@@ -552,11 +522,15 @@
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色
console.log("车辆信息", orderInfo)
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions;
let arr = orderInfo.vehicleDimensions.split("X");
console.log("orderInfo.vehicleDimensions", orderInfo.vehicleDimensions.split("X"))
fileDataStrings.outlineL = parseInt(arr[0]); //外廓 长
fileDataStrings.outlineW = parseInt(arr[1]); //外廓 宽
fileDataStrings.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
// let arr = orderInfo.vehicleDimensions.split("X");
// console.log("orderInfo.vehicleDimensions", orderInfo.vehicleDimensions.split("X"))
// fileDataStrings.outlineL = parseInt(arr[0]); //外廓 长
// fileDataStrings.outlineW = parseInt(arr[1]); //外廓 宽
// if(arr[2].indexOf('mm')){
// fileDataStrings.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
// }else{
// fileDataStrings.outlineH = arr[2] //外廓 高
// }
fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号
fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
.vehiclePlateColor);

+ 6
- 2
subpackage/after-sale/js/publicRequest.ts 查看文件

@@ -2,11 +2,12 @@ import { stringToJson } from "@/utils/network/encryption";
import { request } from "@/utils/network/request";
import { searchVehicleInfo } from "@/utils/network/api.js";
// 154接口获取车辆信息
export const searchVehicleInfoQuery = (vehicleId) => {
export const searchVehicleInfoQuery = (vehicleId,random) => {
const options = {
type: 2,
data: {
vehicleId: vehicleId
vehicleId: vehicleId,
random:random
},
method: "POST",
showLoading: true,
@@ -14,6 +15,9 @@ export const searchVehicleInfoQuery = (vehicleId) => {
return new Promise(async (resolve, reject) => {
const res = await request(searchVehicleInfo, options);
const data = stringToJson(res.bizContent).vehicles[0];
if(stringToJson(res.bizContent).fileData){
data['fileData']=stringToJson(res.bizContent).fileData
}
resolve(data);
}).catch((error) => {
reject(error);

+ 3
- 2
subpackage/after-sale/replace-equipment/replace-equipment-confirm.vue 查看文件

@@ -53,7 +53,7 @@
{{state.data.cardId}}
</view>
<view class="tips">
<text>储蓄卡</text>
<text>{{state.cardType=="23"?'记账卡':'储值卡'}}</text>
<text class="tips-card">{{getEtcCardStatus(state.data.cardStatus)}}</text>
</view>
</view>
@@ -72,7 +72,6 @@
{{state.data.obuId}}
</view>
<view class="tips">
<!-- <text>储蓄卡</text> -->
<text class="tips-card">{{getObuStatus(state.data.obuStatus)}}</text>
</view>
</view>
@@ -123,6 +122,7 @@
obuStatus: undefined,
},
type: undefined,
cardType:""
});
const apply = reactive({
data: {
@@ -137,6 +137,7 @@
queryOrderDetail(option.id).then((val : any) => {
console.log("val", val)
state.data = val
state.cardType=val.cardId.substring(8,10)
})

});

+ 4
- 7
subpackage/after-sale/to-bookkeeping-card/confirm.vue 查看文件

@@ -53,7 +53,7 @@
{{state.data.cardId}}
</view>
<view class="tips">
<text>储蓄卡</text>
<text>{{state.cardType=="23"?'记账卡':'储值卡'}}</text>
<text class="tips-card">{{getCodeName('CARD_STATE_TYPE',state.data.cardStatus)}}</text>
</view>
</view>
@@ -81,14 +81,9 @@
} from "@/utils/network/request.js";
import {
orderDetail,
CardlossStatus,
cckChangejzCard
} from "@/utils/network/api.js";

import {
msg
} from "@/utils/utils";

import {
getCodeName
} from "@/datas/queryKey.js";
@@ -102,7 +97,8 @@
cardStatus: undefined,
obuStatus: undefined,
},
type: undefined
type: undefined,
cardType:""
});

/*视图进入后操作*/
@@ -110,6 +106,7 @@
queryOrderDetail(option.id).then((val : any) => {
console.log("订单详情", val)
state.data = val
state.cardType=val.cardId.substring(8,10)
})
});
/*下一步*/

+ 4
- 7
subpackage/after-sale/transfer-ownership/transfer-confirm.vue 查看文件

@@ -52,7 +52,7 @@
{{state.data.cardId}}
</view>
<view class="tips">
<text>储蓄卡</text>
<text>{{state.cardType=="23"?'记账卡':'储值卡'}}</text>
<text class="tips-card">{{getCodeName('CARD_STATE_TYPE',state.data.cardStatus)}}</text>
</view>
</view>
@@ -70,7 +70,6 @@
{{state.data.obuId}}
</view>
<view class="tips">
<!-- <text>储蓄卡</text> -->
<text class="tips-card">{{getCodeName('OBU_STATE_TYPE',state.data.obuStatus)}}</text>
</view>
</view>
@@ -100,10 +99,6 @@
orderDetail,
queryGuoHu
} from "@/utils/network/api.js";

import {
msg
} from "@/utils/utils";
import {
getCodeName
} from "@/datas/queryKey.js";
@@ -120,13 +115,15 @@
cardStatus: undefined,
obuStatus: undefined,
orderId: undefined,
}
},
cardType:""
});

/*视图进入后操作*/
onLoad((option) => {
queryOrderDetail(option.id).then((val : any) => {
state.data = val
state.cardType=val.cardId.substring(8,10)
})
/*监听手机号验证后的回调*/
uni.$on('queryCardlossStatus', function (type) {

+ 54
- 14
subpackage/after-sale/transfer-page.vue 查看文件

@@ -49,15 +49,57 @@
// 31发票 32月结单查询

onLoad((options) => {
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)
silentLogin().then(() => {
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{
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"){
jump()
}else{
quanCheckActionTrue().then((item : any) => {
console.log("item====", item, item.data.length)
if (item.data.length == 1) {
@@ -73,12 +115,10 @@
})
}, 1500)
}
})
})


})
}
}
const silentLogin = () => {
if (state.userType == "1") {
var data = {

+ 0
- 1159
subpackage/carPark/etc/etcActivate.vue
文件差異過大導致無法顯示
查看文件


+ 51
- 42
subpackage/carPark/etc/etcDeviceInfo.vue 查看文件

@@ -6,7 +6,15 @@
<view class="cell-left">卡号</view>
<view class="cell-right">{{ card.cardNo }}</view>
</view>
<view class="cell">
<view class="cell" v-if="card.startTime">
<view class="cell-left">启用时间</view>
<view class="cell-right">{{ card.startTime }}</view>
</view>
<view class="cell" v-if="card.endTime">
<view class="cell-left">结束时间</view>
<view class="cell-right">{{ card.endTime }}</view>
</view>
<!-- <view class="cell">
<view class="cell-left">用户姓名</view>
<view class="cell-right">{{ card.userName }}</view>
</view>
@@ -18,10 +26,10 @@
<view class="cell-left">车辆类型</view>
<view class="cell-right">{{ card.type }}</view>
</view>
<!-- <view class="cell">
<view class="cell">
<view class="cell-left">车辆用户类型</view>
<view class="cell-right">{{ card.v_userType }}</view>
</view> -->
</view>
<view class="cell">
<view class="cell-left">车牌号</view>
<view class="cell-right">{{ card.vehiclePlate }}</view>
@@ -57,7 +65,7 @@
<view class="cell" v-if="state.cardTypeName">
<view class="cell-left">卡类型</view>
<view class="cell-right">{{state.cardTypeName}}</view>
</view>
</view> -->
</view>
<view class="info-card">
<view class="title">OBU信息</view>
@@ -149,7 +157,7 @@
request
} from "@/utils/network/request";
import {
obuDecrypt,
decrypt9901,
cardList,
searchObuInfo
} from "@/utils/network/api";
@@ -223,26 +231,26 @@
const getCardId = () => {
//执行0015文件
tools.showLoadingAlert("执行指令");
// if (datas.getData("deviceName").includes("JY")) {
// jyApiEtc.getCardInfo(function(res) {
// if (res.code == '0') {
// var cardInfo = res.cardInfo;
// console.log("res.cardInfo", res.cardInfo)
// card.cardNo = cardInfo.cardId;
// card.startTime = cardInfo.signedDate;
// card.endTime = cardInfo.expiredDate;
// // message = "卡片方标识:" + cardInfo.provider + " 卡片类型:" + cardInfo.cardType + " 卡片版本号:" +
// // cardInfo.cardVersion + " 卡号:" + cardInfo.cardId + " 启用时间:" +
// // cardInfo.signedDate + " 到期时间:" + cardInfo.expiredDate + " 车牌号:" + cardInfo
// // .vehicleNumber +
// // " 用户类型:" + cardInfo.userType + " 车牌颜色:" + cardInfo.plateColor + " 车型:" + cardInfo
// // .vehicleModel;
// getObuId();
// } else {
// tools.alertF("获取卡片信息失败" + res.code);
// }
// })
// } else {
if (datas.getData("deviceName").includes("JY")) {
jyApiEtc.getCardInfo(function(res) {
if (res.code == '0') {
var cardInfo = res.cardInfo;
console.log("res.cardInfo", res.cardInfo)
card.cardNo = cardInfo.cardId;
card.startTime = cardInfo.signedDate;
card.endTime = cardInfo.expiredDate;
// message = "卡片方标识:" + cardInfo.provider + " 卡片类型:" + cardInfo.cardType + " 卡片版本号:" +
// cardInfo.cardVersion + " 卡号:" + cardInfo.cardId + " 启用时间:" +
// cardInfo.signedDate + " 到期时间:" + cardInfo.expiredDate + " 车牌号:" + cardInfo
// .vehicleNumber +
// " 用户类型:" + cardInfo.userType + " 车牌颜色:" + cardInfo.plateColor + " 车型:" + cardInfo
// .vehicleModel;
getObuId();
} else {
tools.alertF("获取卡片信息失败" + res.code);
}
})
} else {
let cmdArr = [cmd.HOME_DIRECTORY, cmd.APPLICATION_DIRECTORY, "00B095002B"];
console.log(cmdArr);
console.log(bluetoothUtil);
@@ -353,7 +361,7 @@
alertF("CMD_READBINARY指令长度不符" + res[2]);

})
// }
}

};
/**
@@ -369,18 +377,18 @@
// })
// }
// return
// if (datas.getData("deviceName").includes("JY")) {
// jyApiEtc.getSystemInfo(function(res) {
// console.log("获取OBU===", res)
// if (res.code == 0) {
// obu.num = res.systemInfo.serialNumber
// obu.startTime = res.systemInfo.signedDate
// obu.endTime = res.systemInfo.expiredDate
// } else {
// tools.alertF("获取OBU信息失败");
// }
// });
// } else {
if (datas.getData("deviceName").includes("JY")) {
jyApiEtc.getSystemInfo(function(res) {
console.log("获取OBU===", res)
if (res.code == 0) {
obu.num = res.systemInfo.serialNumber
obu.startTime = res.systemInfo.signedDate
obu.endTime = res.systemInfo.expiredDate
} else {
tools.alertF("获取OBU信息失败");
}
});
} else {
let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE];
bluetoothUtil.transCmd(cmdArr, '20', function(res) {
var obuStr = res[1];
@@ -433,7 +441,7 @@
})
})
// }
}
};


@@ -444,14 +452,15 @@
const options = {
type: 2,
data: {
obuSerailNo: num,
fileData: data
obuId: num,
encryptedInfo: data
},
method: "POST",
showLoading: true,
};
request(obuDecrypt, options).then((res) => {
request(decrypt9901, options).then((res) => {
const data = stringToJson(res.bizContent)
console.log("decrypt9901",data)
const FileData = data.data.FileData
func(FileData)
});

+ 1
- 6
subpackage/orders/car-release.vue 查看文件

@@ -827,12 +827,7 @@
state.form.vehNegImgUrl = data.imageUrl;
state.form.permittedWeight = data.alc ? data.alc : 0;
state.form.permittedTowWeight = data.towing ? data.towing : 0;
// if (data.towing) {
// console.log("牵引车")
// qian()
// } else {
// notQian()
// }
console.log('=====================', state.form.vehNegImgUrl, state)
}
state.isTakePhotoModeShow = false

+ 3
- 1
subpackage/orders/order-details-new.vue 查看文件

@@ -440,6 +440,7 @@
<view class="btn space" @click="gotoReturnOrder(state.orderInfo)"
v-if="state.orderInfo.applyReturn">申请退货</view>
<view class="btn space" @click="gotoExchangeOrder(state.orderInfo)">申请换货</view>
<view class="btn space" @click.stop="gotoReplenishmentOrder(state.orderInfo)">申请补货</view>
<view class="btn-green space" @click="gotoActiveOrder(state.orderInfo)">去激活</view>
<view class="btn-green" @click.stop="closeOrder(state.orderInfo)"
v-if="state.orderInfo.finishOrder">结束订单</view>
@@ -460,7 +461,8 @@
<view class="btn btn-green" @click="gotoReturnOrder(state.orderInfo)">退货</view>
</view>
<view v-if="state.orderInfo.orderStep == 33" class="btn-status">
<view class="btn btn-green" @click="gotoExchangeOrder(state.orderInfo)">换货</view>
<view class="btn btn-green" @click="gotoExchangeOrder(state.orderInfo)" v-if="state.orderInfo.orderType!='REPLENISHMENT'">换货</view>
<!-- <view class="btn btn-green" @click="gotoReplenishmentOrder(state.orderInfo)" v-if="state.orderInfo.orderType=='REPLENISHMENT'">申请补货</view> -->
</view>
<!-- 异地结束-->
<!-- 订单完成 -->

+ 14
- 3
subpackage/personal-center/car-message-change.vue 查看文件

@@ -44,6 +44,8 @@
:disabled="state.isEnableOCRData" maxlength="18" />
</u-form-item>
<u-form-item label="地址">
<!-- <textarea placeholder='请输入地址' v-model="state.form.address" auto-height style="height: 260rpx;"
:disabled="state.isEnableOCRData" maxlength="50" ></textarea> -->
<u-input placeholder='请输入地址' :autoHeight='true' v-model="state.form.address"
:disabled="state.isEnableOCRData" maxlength="50" />
</u-form-item>
@@ -179,7 +181,7 @@
</view>
</view>
<view class="green-tip">
如识别信息有误,请手动修改,确认无误后,点击下一步!
如识别信息有误,请手动修改,确认无误后点击提交。
</view>
<view class="action">
<button type="default" class="button" @click="savaHandleCar()">
@@ -413,10 +415,19 @@
state.form.approvedCount = allData['approvedCount']
state.form.maintenaceMass = allData['maintenaceMass']
allData['vehicleDimensions']
let arr = allData['vehicleDimensions'].split("X");
let arr=[]
if(allData['vehicleDimensions'].includes('x')){
arr = allData['vehicleDimensions'].split("x");
console.log("arr[2]",arr[2])
state.outlineH = parseInt(arr[2]); //外廓 高
}else{
arr = allData['vehicleDimensions'].split("X");
console.log("arr[2]",arr[2])
state.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
}
state.outlineL = parseInt(arr[0]); //外廓 长
state.outlineW = parseInt(arr[1]); //外廓 宽
state.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
state.form.totalMassShow = allData['totalMass']
state.form.totalMass = allData['totalMass']
state.form.axleCount = allData['axleCount'] ? allData['axleCount'] : 2

+ 14
- 2
subpackage/personal-center/install-activation-order.vue 查看文件

@@ -46,7 +46,7 @@
import { stringToJson } from "@/utils/network/encryption";
import { onLoad, onUnload, onReachBottom, onPullDownRefresh } from "@dcloudio/uni-app";
import { getItem, StorageKeys } from "@/utils/storage";
import { hasLogin, msg, getOrderStatusName, getOrderTypeName } from "@/utils/utils";
import { hasLogin, msg, getOrderStatusName, getOrderTypeName,navTo} from "@/utils/utils";
import { noActivationOrder } from "@/utils/network/api";
import { PageData } from "@/datas/enum";
import useOrderSkip from "@/composables/order/useOrderSkip";
@@ -148,11 +148,23 @@
}

onLoad(() => {
if (!hasLogin()) {
uni.showModal({
title: '提示',
content: '您还未登录小程序,请先登录小程序',
showCancel: false,
success: function (res) {
if (res.confirm) {
navTo(`/login/login?back=1`)
}
}
});
}
//监听订单刷新信息
uni.$on('refreshOrder', (data) => {
refreshList();
});

console.log("guoliale")
refreshList();
});


+ 75
- 73
subpackage/service/equity/equity.vue 查看文件

@@ -283,89 +283,91 @@
}

function copyCode(e, start, items) {
console.log("items", e, items, e.redeemCode)
console.log("e====",e,start,items)
let item = e;
// // 复制兑换码到剪贴板
let code = e.redeemCode ? e.redeemCode : items.redeemCode;
if (item.equityType == 'ZFB') {
uni.navigateTo({
url: `/subpackage/service/zfbqy/zfbqy`
})
return
}
console.log(item, "===e===", e.equityType, items, start);
if (start == 'WAIT_ACTIVATED') { //待激活
uni.showModal({
title: '温馨提示',
content: "激活后,可领取卡卷",
confirmText: "去激活",
success: function(res) {
if (res.confirm) {
uni.navigateTo({
url: '/subpackage/personal-center/install-activation-order',
})
} else if (res.cancel) {
console.log('用户点击取消');
}else{
let code = e.redeemCode ? e.redeemCode : items.redeemCode;
console.log(item, "===e===", e.equityType, items, start);
if (start == 'WAIT_ACTIVATED') { //待激活
uni.showModal({
title: '温馨提示',
content: "激活后,可领取卡卷",
confirmText: "去激活",
success: function(res) {
if (res.confirm) {
uni.navigateTo({
url: '/subpackage/personal-center/install-activation-order',
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
}
});
} else if (start == 'WAIT_USE') { //待领取使用
uni.showModal({
title: '温馨提示',
content: "请在领取后120天内使用,超期失效",
success: function(res) {
if (res.confirm) {
request("a6bd3d8c855548eb8015655ea8d9287b", {
type: 2,
data: {
mobile: getItem('mobile') + "",
notificationType: 'USE',
cardIds: [items.id],
couponId: couponId.value,
equityId: item.singleEquityId,
orderId: items.orderId ? items.orderId : items.purchasedEquityId
},
method: "POST",
showLoading: true,
}).then((item) => {
// uni.setClipboardData({
// data: code,
// success: function() {
// uni.showToast({
// title: '已复制兑换码',
// icon: 'success',
// });
// },
// });
loadExchangeCodes();
uni.showToast({
title: '领取成功,卷码以复制到剪贴板。请前往途虎APP中使用',
icon: 'success',
});
uni.navigateBack();
})
} else if (res.cancel) {
console.log('用户点击取消');
});
} else if (start == 'WAIT_USE') { //待领取使用
uni.showModal({
title: '温馨提示',
content: "请在领取后120天内使用,超期失效",
success: function(res) {
if (res.confirm) {
request("a6bd3d8c855548eb8015655ea8d9287b", {
type: 2,
data: {
mobile: getItem('mobile') + "",
notificationType: 'USE',
cardIds: [items.id],
couponId: couponId.value,
equityId: item.singleEquityId,
orderId: items.orderId ? items.orderId : items.purchasedEquityId
},
method: "POST",
showLoading: true,
}).then((item) => {
// uni.setClipboardData({
// data: code,
// success: function() {
// uni.showToast({
// title: '已复制兑换码',
// icon: 'success',
// });
// },
// });
loadExchangeCodes();
uni.showToast({
title: '领取成功',
icon: 'success',
});
// uni.navigateBack();
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
}
});
// 已使用 USED
// 已过期 EXPIRED
} else if (start == 'USED') { //已使用
console.log("已复制兑换码1111", code)
uni.setClipboardData({
data: code,
success: function() {
console.log("已复制兑换码")
uni.showToast({
title: '已复制兑换码',
icon: 'success',
});
},
});
} else if (start == 'EXPIRED') { //已过期
});
// 已使用 USED
// 已过期 EXPIRED
} else if (start == 'USED') { //已使用
console.log("已复制兑换码1111", code)
uni.setClipboardData({
data: code,
success: function() {
console.log("已复制兑换码")
uni.showToast({
title: '已复制兑换码',
icon: 'success',
});
},
});
} else if (start == 'EXPIRED') { //已过期
}
}
}

function desensitize(str) {

+ 4
- 2
utils/network/api.js 查看文件

@@ -22,7 +22,6 @@ export const appId = "52030131"; //应用appid 综合业务支撑平台使用
export const loginTime = 86400; //登录有效时间(单位s) 1天
export const wechatPayConfigId = "6a9a54bc01f6443faea7ffe132b19f8"; //支付配置编号 微信小程序支付:6a9a54bc01f6443faea7ffe132b19f6
export const aliPayConfigId = "6a9a54bc01f6443123452b1234"; //支付配置编号 支付宝小程序支付:6a9a54bc01f6443123452b1234
// export const aliPayConfigIdTwo = "6a9a54bc01f644312543761234";
export const aliPayConfigIdTwo = "6a9a54bc01f6443123452b1";
//支付宝配置相关
export const aliPayConfigId1 = '202403BB9b6946b9b6704cd39f8d51138871fX92'; //qiantongka10@163.com(设备费)
@@ -308,4 +307,7 @@ export const silentLoginApi = "abaf0013caa24dafad12b0f571e8ee40" // 无感登录
export const carMessageApi = "854899f6244049d69b6ff883f28dcb28" // 车辆信息上传带出车辆信息
export const getZfbOpenid = "62f02a3fd5eb462d9541aa21b78bba06" // 获取支付宝Openid支付宝
export const channelSingQueryApi = "0c6d650d94274ee086008652fa0fe41a"
export const channelSingQueryApi = "0c6d650d94274ee086008652fa0fe41a"
export const decrypt9901 = "c6e7c27e774c493d82c942dc69507d67"

+ 2
- 5
utils/network/request.js 查看文件

@@ -93,7 +93,6 @@ export function request(code, options = {}, start = false) {
'content-type': contentType,
'Access-Token': getItem(StorageKeys.Token)
}
console.log('code', code, options.data)
if (!start) {
//判断code不为空
if (code) {
@@ -103,6 +102,7 @@ export function request(code, options = {}, start = false) {
}), 2);
}
}
console.log('code', code, options.data)
//是否显示加载中
if (options.showLoading) {
uni.showLoading({
@@ -232,7 +232,7 @@ export function request(code, options = {}, start = false) {
success: function(res) {
if (res.confirm) {
uni.navigateTo({
url: `/login/login?back=1`,
url: `/login/login`,
})
}
}
@@ -265,9 +265,6 @@ export function request(code, options = {}, start = false) {
// console.log('请求失败返回参数:', res)
uni.hideLoading()
console.log('请求错误', err)
// if (err == 'openId无效,请核实传参!') {
// setItem(StorageKeys.OpenId, openId);
// }
//处理请求错误
reject(err)
}

Loading…
取消
儲存