// export const fileURL = 'http://47.94.96.52/' | // export const fileURL = 'http://47.94.96.52/' | ||||
// export const fileURL = 'http://222.85.144.89:19002/default-bucket/' | // export const fileURL = 'http://222.85.144.89:19002/default-bucket/' | ||||
export const downloadFileURL = envs[process.env.NODE_ENV].baseUrl + '/user-export-excel/' | |||||
export const downloadFileURL = envs[process.env.NODE_ENV].baseUrl + '/default-bucket/' | |||||
export const fileURL = envs[process.env.NODE_ENV].baseUrl + '/default-bucket/' | export const fileURL = envs[process.env.NODE_ENV].baseUrl + '/default-bucket/' | ||||
export const fileURLList = envs[process.env.NODE_ENV].baseUrl + "/" | export const fileURLList = envs[process.env.NODE_ENV].baseUrl + "/" | ||||
export const vehiclePlateColorPai = [{ | export const vehiclePlateColorPai = [{ | ||||
id: 0, | id: 0, | ||||
color: '蓝牌' | |||||
color: '蓝牌', | |||||
showColor:"rgb(56,139,252)", | |||||
}, | }, | ||||
{ | { | ||||
id: 1, | id: 1, | ||||
color: '黄牌' | |||||
color: '黄牌', | |||||
showColor:"rgb(255,156,0)", | |||||
}, | }, | ||||
{ | { | ||||
id: 2, | id: 2, | ||||
color: '黑牌' | |||||
color: '黑牌', | |||||
showColor:"rgb(0,0,0)", | |||||
}, | }, | ||||
{ | { | ||||
id: 3, | id: 3, | ||||
color: '白牌' | |||||
color: '白牌', | |||||
showColor:"white", | |||||
}, | }, | ||||
{ | { | ||||
id: 4, | id: 4, | ||||
color: '渐变绿牌' | |||||
color: '渐变绿牌', | |||||
showColor:"rgb(56,139,252)", | |||||
}, | }, | ||||
{ | { | ||||
id: 5, | id: 5, | ||||
color: '黄绿双拼牌' | |||||
color: '黄绿双拼牌', | |||||
showColor:"rgb(252,204,1)", | |||||
}, | }, | ||||
{ | { | ||||
id: 6, | id: 6, | ||||
color: '蓝白渐变牌' | |||||
color: '蓝白渐变牌', | |||||
showColor:"rgb(56,139,252)", | |||||
}, | }, | ||||
{ | { | ||||
id: 9, | id: 9, | ||||
color: '未确定' | |||||
color: '未确定', | |||||
showColor:"", | |||||
}, | }, | ||||
{ | { | ||||
id: 11, | id: 11, | ||||
color: '绿牌' | |||||
color: '绿牌', | |||||
showColor:"rgb(26,250,31)", | |||||
}, | }, | ||||
{ | { | ||||
id: 12, | id: 12, | ||||
color: '红牌' | |||||
color: '红牌', | |||||
showColor:"red", | |||||
} | } | ||||
] | ] | ||||
export const getVehiclePlateColorPai = (id = 0) => { | export const getVehiclePlateColorPai = (id = 0) => { | ||||
let colors = vehiclePlateColorPai.filter(item => item.id == id); | let colors = vehiclePlateColorPai.filter(item => item.id == id); | ||||
return colors[0] ? colors[0].color : '' | return colors[0] ? colors[0].color : '' | ||||
} | |||||
// 获取车牌展示颜色 | |||||
export const getVehiclePlateColorPaiShow = (id = 0) => { | |||||
let colors = vehiclePlateColorPai.filter(item => item.id == id); | |||||
return colors[0] ? colors[0].showColor : '' | |||||
} | } |
], | ], | ||||
"subPackages": [{ | "subPackages": [{ | ||||
"root": "subpackage/after-sale", //售后相关 | "root": "subpackage/after-sale", //售后相关 | ||||
"pages": [{ | |||||
"pages": [ | |||||
{ | |||||
"path": "month-statement/select-car", | |||||
"style": { | |||||
"navigationBarTitleText": "选择车辆", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | |||||
"path": "month-statement/month-statement-query-list", | |||||
"style": { | |||||
"navigationBarTitleText": "月结单查询", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
},{ | |||||
"path": "progress-query/progress-query-business-details", | "path": "progress-query/progress-query-business-details", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "业务审核记录详情", | "navigationBarTitleText": "业务审核记录详情", | ||||
}, | }, | ||||
{ | { | ||||
"root": "subpackage/personal-center", //个人中心 | "root": "subpackage/personal-center", //个人中心 | ||||
"pages": [{ | |||||
"pages": [ | |||||
{ | |||||
"path": "car-details", | |||||
"style": { | |||||
"navigationBarTitleText": "车辆详情", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | |||||
"path": "get-code", | "path": "get-code", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "验证", | "navigationBarTitleText": "验证", |
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="car-item" v-for="(item,index) in state.list"> | |||||
<image :src="`${$imgUrl}che.png`" class="car-pic" mode="aspectFill"></image> | |||||
<view class="car-info"> | |||||
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text | |||||
class="color">{{item.color}}</text></view> | |||||
<view class="car-item" v-for="(item,index) in state.list" > | |||||
<image @click="carDetails(item)" :src="`${$imgUrl}che.png`" class="car-pic" mode="aspectFill"></image> | |||||
<view class="car-info" @click="carDetails(item)"> | |||||
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color" :style="{ background: item.showColor}">{{item.color}}</text></view> | |||||
<view class="card-no">卡号:{{item.cardId}}</view> | <view class="card-no">卡号:{{item.cardId}}</view> | ||||
<view class="card-no">签号:{{item.obuId}}</view> | <view class="card-no">签号:{{item.obuId}}</view> | ||||
</view> | </view> | ||||
stringToJson | stringToJson | ||||
} from "@/utils/network/encryption.js"; | } from "@/utils/network/encryption.js"; | ||||
import filter from '@/components/filter/filter.vue'; | import filter from '@/components/filter/filter.vue'; | ||||
import { vehiclePlateColor, vehiclePlateColorPai } from "@/datas/vehiclePlateColor.js"; | |||||
import { vehiclePlateColor, vehiclePlateColorPai,getVehiclePlateColorPaiShow } from "@/datas/vehiclePlateColor.js"; | |||||
const height = ref(null); | const height = ref(null); | ||||
const top = ref(null); | const top = ref(null); | ||||
const margin = ref(null); | const margin = ref(null); | ||||
state.data.opId = getItem(StorageKeys.OpenId); | state.data.opId = getItem(StorageKeys.OpenId); | ||||
mobile.value = getItem("mobile"); | mobile.value = getItem("mobile"); | ||||
}); | }); | ||||
const carDetails=(item)=>{ | |||||
const params = encodeURIComponent(JSON.stringify(item)) | |||||
uni.navigateTo({ | |||||
url:`/subpackage/personal-center/car-details?params=${params}` | |||||
}) | |||||
} | |||||
const goTrajectory = () => { | const goTrajectory = () => { | ||||
if (state.isTrajectory) { | if (state.isTrajectory) { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
for (var j = 0; j < vehiclePlateColorPai.length; j++) { | for (var j = 0; j < vehiclePlateColorPai.length; j++) { | ||||
if (data[i].vehiclePlateColor == vehiclePlateColorPai[j]['id']) { | if (data[i].vehiclePlateColor == vehiclePlateColorPai[j]['id']) { | ||||
data[i].color = vehiclePlateColorPai[j]['color'] | data[i].color = vehiclePlateColorPai[j]['color'] | ||||
data[i].showColor = vehiclePlateColorPai[j]['showColor'] | |||||
} | } | ||||
} | } | ||||
} | } | ||||
padding: 4rpx 8rpx; | padding: 4rpx 8rpx; | ||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
color: white; | color: white; | ||||
background-color: rgb(6, 112, 255); | |||||
display: inline-block; | display: inline-block; | ||||
margin-left: 20rpx; | margin-left: 20rpx; | ||||
font-size: 24rpx; | font-size: 24rpx; |
<u-input placeholder='请输入7-16位字母加数字组成的账号' type="text" v-model="state.form.name" /> | <u-input placeholder='请输入7-16位字母加数字组成的账号' type="text" v-model="state.form.name" /> | ||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="对公用户密码"> | <u-form-item label="对公用户密码"> | ||||
<u-input placeholder='请输入对公用户密码' type="text" v-model="state.form.password" /> | |||||
<u-input placeholder='请输入对公用户密码' type="text" v-model="state.form.passWord" /> | |||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="支付密码"> | <u-form-item label="支付密码"> | ||||
<u-input placeholder='请输入支付密码' type="text" v-model="state.form.consumePassword" /> | <u-input placeholder='请输入支付密码' type="text" v-model="state.form.consumePassword" /> | ||||
url3: '', // | url3: '', // | ||||
url4: '', // | url4: '', // | ||||
name: '',//对公用户登录名 | name: '',//对公用户登录名 | ||||
password: '',//对公用户登录密码 | |||||
passWord: '',//对公用户登录密码 | |||||
consumePassword: '', //支付密码 | consumePassword: '', //支付密码 | ||||
// type:'',//公司证件类型 | // type:'',//公司证件类型 | ||||
code: '', //公司证件编码 | code: '', //公司证件编码 | ||||
'idCardBackImageUrl': state.form.url4, //经办人身份证反面 | 'idCardBackImageUrl': state.form.url4, //经办人身份证反面 | ||||
'bankAddress': state.form.bankAddress, //开户行 | 'bankAddress': state.form.bankAddress, //开户行 | ||||
'bankCardId': state.form.bankCardId, //充值银行卡号 | 'bankCardId': state.form.bankCardId, //充值银行卡号 | ||||
'password': state.form.password, //密码 | |||||
'passWord': state.form.passWord, //密码 | |||||
'consumePassword': state.form.consumePassword,//支付密码 | 'consumePassword': state.form.consumePassword,//支付密码 | ||||
}, | }, | ||||
method: "POST", | method: "POST", |
<text>储蓄卡</text> | <text>储蓄卡</text> | ||||
<text class="tips-card">{{getCodeName('CARD_STATE_TYPE',orderInfos.cardStatus)}}</text> | <text class="tips-card">{{getCodeName('CARD_STATE_TYPE',orderInfos.cardStatus)}}</text> | ||||
</view> | </view> | ||||
<view class="choose-item"> 有效期:{{orderInfos.cardEnableTime }}</view> | |||||
<view class="choose-item"> 有效期:{{orderInfos.cardExpireTime }}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- <text>储蓄卡</text> --> | <!-- <text>储蓄卡</text> --> | ||||
<text class="tips-card">{{getCodeName('OBU_STATE_TYPE',orderInfos.obuStatus)}}</text> | <text class="tips-card">{{getCodeName('OBU_STATE_TYPE',orderInfos.obuStatus)}}</text> | ||||
</view> | </view> | ||||
<view class="choose-item"> 有效期:{{orderInfos.obuEnableTime }} </view> | |||||
<view class="choose-item"> 有效期:{{orderInfos.obuExpireTime }} </view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
orderDetail, | orderDetail, | ||||
cardRenewal, | cardRenewal, | ||||
writeCardBack, | writeCardBack, | ||||
cardModifyConfirm | |||||
cardModifyConfirm, | |||||
obuRenewal | |||||
} from "@/utils/network/api.js"; | } from "@/utils/network/api.js"; | ||||
obuStatus: "", | obuStatus: "", | ||||
cardEnableTime: "", | cardEnableTime: "", | ||||
obuEnableTime: "", | obuEnableTime: "", | ||||
cardExpireTime:"", | |||||
obuExpireTime:"" | |||||
}); | }); | ||||
onLoad((option) => { | onLoad((option) => { | ||||
console.log(res); | console.log(res); | ||||
if (res.status) { | if (res.status) { | ||||
getCardRenewal() | getCardRenewal() | ||||
getObuRenewal() | |||||
} | } | ||||
}) | }) | ||||
}; | }; | ||||
request(orderDetail, options).then((res) => { | request(orderDetail, options).then((res) => { | ||||
let orderInfo = JSON.parse(res.bizContent); | let orderInfo = JSON.parse(res.bizContent); | ||||
console.log(orderInfo); | |||||
console.log("orderInfo",orderInfo); | |||||
orderInfos.orderId = orderInfo.orderId; | orderInfos.orderId = orderInfo.orderId; | ||||
orderInfos.ownerName = orderInfo.ownerName; | orderInfos.ownerName = orderInfo.ownerName; | ||||
orderInfos.ownerIdtype = orderInfo.ownerIdtype; | orderInfos.ownerIdtype = orderInfo.ownerIdtype; | ||||
orderInfos.obuStatus = orderInfo.obuStatus; | orderInfos.obuStatus = orderInfo.obuStatus; | ||||
orderInfos.cardEnableTime = orderInfo.cardEnableTime.substring(0, 10); | orderInfos.cardEnableTime = orderInfo.cardEnableTime.substring(0, 10); | ||||
orderInfos.obuEnableTime = orderInfo.obuEnableTime.substring(0, 10); | orderInfos.obuEnableTime = orderInfo.obuEnableTime.substring(0, 10); | ||||
orderInfos.cardExpireTime = orderInfo.cardExpireTime; | |||||
orderInfos.obuExpireTime = orderInfo.obuExpireTime; | |||||
console.log("orderInfos.cardExpiretime",orderInfos.cardExpiretime,orderInfo.cardExpiretime) | |||||
}); | }); | ||||
}; | }; | ||||
//卡签续期 请求 | |||||
//卡续期 请求 | |||||
const getCardRenewal = () => { | const getCardRenewal = () => { | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, | ||||
uni.redirectTo({ | uni.redirectTo({ | ||||
url: "/pages/service/service" | url: "/pages/service/service" | ||||
}) | }) | ||||
// navTo("/pages/service/service") | |||||
} | } | ||||
//关闭弹窗 | //关闭弹窗 | ||||
state.showPopup = false; | state.showPopup = false; | ||||
} | } | ||||
//卡停用/启用 请求 | |||||
// const getCardStopOrStart = () => { | |||||
// const options = { | |||||
// type: 2, | |||||
// data: { | |||||
// cardId: orderInfos.cardId, | |||||
// operation: 1,//1停用2启用 | |||||
// }, | |||||
// method: "POST", | |||||
// showLoading: true, | |||||
// }; | |||||
// request(cardStopOrStart, options).then((res) => { | |||||
// let result = stringToJson(res.bizContent); | |||||
// console.log(result); | |||||
// // let cmdArray = []; | |||||
// // tools.showLoadingAlert("正在执行指令"); | |||||
// // bluetoothUtil.transCmd(cmdArray, "10", function(res: any) { | |||||
// // tools.hideLoadingAlert(); | |||||
// // console.log(res); | |||||
// // }) | |||||
// }) | |||||
// }; | |||||
//设备升级 请求 | |||||
// const getDeviceUpgrade = () => { | |||||
// const options = { | |||||
// type: 2, | |||||
// data: { | |||||
// cardId: orderInfos.cardId, | |||||
// vehiclePlate: orderInfos.vehiclePlate, | |||||
// expireTime:"", | |||||
// customerName:orderInfos.ownerName, | |||||
// customerIdNum:orderInfos.ownerIdnum, | |||||
// vehiclePlateColor:orderInfos.vehiclePlateColor, | |||||
// }, | |||||
// method: "POST", | |||||
// showLoading: true, | |||||
// }; | |||||
// request(deviceUpgrade, options).then((res) => { | |||||
// let result = stringToJson(res.bizContent); | |||||
// console.log(result); | |||||
// // let cmdArray = []; | |||||
// // tools.showLoadingAlert("正在执行指令"); | |||||
// // bluetoothUtil.transCmd(cmdArray, "10", function(res: any) { | |||||
// // tools.hideLoadingAlert(); | |||||
// // console.log(res); | |||||
// // }) | |||||
// }) | |||||
// } | |||||
//签续期 请求 | |||||
const getObuRenewal = () => { | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
obuId: orderInfos.obuId, | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(obuRenewal, options).then((res) => { | |||||
let result = stringToJson(res.bizContent); | |||||
let cmdArray = result.command.split(","); | |||||
console.log(cmdArray); | |||||
console.log(result.cosRecordId); | |||||
if (cmdArray.length > 0) { | |||||
tools.showLoadingAlert("正在执行指令"); | |||||
bluetoothUtil.transCmd(cmdArray, "20", function(res) { | |||||
tools.hideLoadingAlert(); | |||||
let status = res[cmdArray.length - 1].substring(res[cmdArray.length - 1].length - | |||||
4, res[cmdArray.length - 1].length); | |||||
// if (status == "9000") { | |||||
// getCommandBack(result.command, result.cosRecordId, res.toString()); | |||||
// } | |||||
}) | |||||
} | |||||
}) | |||||
}; | |||||
</script> | </script> | ||||
<style> | <style> |
<template> | |||||
<view class="content"> | |||||
<view class="top-content"> | |||||
<view class="example-body"> | |||||
<uni-datetime-picker v-model="state.range" type="daterange" /> | |||||
<button size="mini" style="color: #ffffff; | |||||
backgroundColor: rgb(118, 200, 77); | |||||
borderColor: rgb(118, 200, 77); | |||||
font-size: 26rpx; | |||||
flex-shrink: 0;margin-left: 20rpx;" @click="search()">搜索</button> | |||||
</view> | |||||
</view> | |||||
<view class="uni-container" v-if="state.listData.length>0"> | |||||
<view class="list-item" v-for="(item,index) in state.listData"> | |||||
<view><text>姓名:</text><text>{{item.customerName}}</text></view> | |||||
<view><text>证件号码:</text><text>{{item.customerIdNum}}</text></view> | |||||
<view><text>通行次数:</text><text>{{item.num}}</text></view> | |||||
<view><text>通行年月:</text><text>{{item.handleDate}}</text></view> | |||||
<view><text>通行车牌号:</text><text>{{state.vehicleNum}}</text></view> | |||||
<view><text>通行车牌颜色:</text><text>{{state.vehicleColor}}</text></view> | |||||
<view><text>月通行总额:</text><text>{{item.money/100}}元</text></view> | |||||
</view> | |||||
<view class="bottom-line" v-if="state.flags">我是有底线的~~~</view> | |||||
</view> | |||||
<view v-else class="uni-container" style="text-align: center;"> | |||||
暂无数据 | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script setup lang="ts"> | |||||
import { reactive } from "vue"; | |||||
import { | |||||
businessType | |||||
} from "@/datas/businessType.js" | |||||
import empty from "@/components/empty/empty.vue"; | |||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app"; | |||||
import { monthStatementApi,getUserMsg } from "@/utils/network/api.js"; | |||||
import { stringToJson } from "@/utils/network/encryption"; | |||||
import { request } from "@/utils/network/request.js"; | |||||
import { getItem, StorageKeys } from "@/utils/storage"; | |||||
import { getVehiclePlateColor} from "@/datas/vehiclePlateColor"; | |||||
const state = reactive({ | |||||
startTime: Date.now(), //日期 | |||||
listData: [], | |||||
range: ['', ''], | |||||
flags: false, | |||||
vehicleId:"", | |||||
customerIdNum:"", | |||||
vehicleNum:"", | |||||
vehicleColor:"" | |||||
}) | |||||
onLoad((option) => { | |||||
console.log("option",option.vehicleId) | |||||
state.vehicleId = option.vehicleId; | |||||
state.vehicleNum = option.vehicleId.split('_')[0]; | |||||
console.log("option.vehicleId.split('_')[1]",getVehiclePlateColor(option.vehicleId.split('_')[1])) | |||||
state.vehicleColor = getVehiclePlateColor(option.vehicleId.split('_')[1]); | |||||
getUserinfo() | |||||
}) | |||||
const getUserinfo = () => { | |||||
const options = { | |||||
type: 2, | |||||
data: {openId: getItem('openId')}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(getUserMsg, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
console.log(data,"用户信息"); | |||||
state.customerIdNum=data.customerIdNum | |||||
}); | |||||
} | |||||
//业务完成日志 | |||||
const search = () => { | |||||
var data = { | |||||
startDate: state.range[0], | |||||
endDate: state.range[1], | |||||
vehicleId:state.vehicleId, | |||||
customerIdNum:state.customerIdNum | |||||
}; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(monthStatementApi, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
state.listData = stringToJson(res.bizContent).data | |||||
console.log("业务完成日志", state.listData,) | |||||
}); | |||||
} | |||||
</script> | |||||
<style scoped> | |||||
.top-content { | |||||
position: fixed; | |||||
left: 0; | |||||
top: 0; | |||||
background-color: white; | |||||
width: 100%; | |||||
padding: 20rpx; | |||||
box-sizing: border-box; | |||||
} | |||||
.content { | |||||
font-size: 32rpx; | |||||
padding: 20rpx 30rpx; | |||||
background-color: #EEF7F7; | |||||
min-height: 100vh; | |||||
} | |||||
.card { | |||||
display: flex; | |||||
margin: 0 20rpx; | |||||
align-items: center; | |||||
} | |||||
.title { | |||||
margin-bottom: 20rpx; | |||||
} | |||||
.uni-container { | |||||
margin: 50rpx 0; | |||||
margin-top: 150rpx; | |||||
} | |||||
/deep/.uni-table-th, | |||||
/deep/.uni-table-td { | |||||
padding: 0 !important; | |||||
font-size: 12px !important; | |||||
} | |||||
/deep/.uni-date__x-input, | |||||
/deep/.uni-select { | |||||
font-size: 13px; | |||||
height: 30px; | |||||
line-height: 30px; | |||||
} | |||||
/deep/.uni-stat__select { | |||||
width: 360rpx; | |||||
} | |||||
/deep/.uni-select__selector-empty, | |||||
/deep/.uni-select__selector-item { | |||||
font-size: 13px !important; | |||||
} | |||||
/deep/.uni-date { | |||||
width: 73% !important; | |||||
} | |||||
.example-body { | |||||
display: flex; | |||||
align-items: center; | |||||
margin-top: 20rpx; | |||||
} | |||||
/deep/.uni-date-x { | |||||
height: 76rpx !important; | |||||
} | |||||
.list-item { | |||||
width: 95%; | |||||
border-radius: 10rpx; | |||||
margin: 30rpx auto; | |||||
font-size: 28rpx; | |||||
border: 1rpx solid #ccc; | |||||
padding: 12rpx; | |||||
box-sizing: border-box; | |||||
background-color: white; | |||||
} | |||||
.list-item>view { | |||||
margin-bottom: 10rpx; | |||||
} | |||||
.bottom-line { | |||||
text-align: center; | |||||
margin: 30rpx 0; | |||||
} | |||||
</style> |
<template> | |||||
<view class="selectCar-box"> | |||||
<view v-if="state.list&&state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list" | |||||
:key="i"> | |||||
<view class="iten-left"> | |||||
<image :src="`${$imgUrl}che.png`" mode="aspectFill"></image> | |||||
<text>{{item.vehiclePlate}}</text> | |||||
</view> | |||||
<view class="choose-item"> | |||||
<view class="active" v-if="flag==i"> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view v-else> | |||||
<empty title='暂无找到相关车辆信息' /> | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script lang="ts" setup> | |||||
import empty from "@/components/empty/empty.vue"; | |||||
import { | |||||
reactive, | |||||
ref | |||||
} from "vue" | |||||
import { | |||||
navTo | |||||
} from "@/utils/utils" | |||||
import { | |||||
onLoad, | |||||
} from "@dcloudio/uni-app"; | |||||
import { | |||||
orderList | |||||
} from "@/utils/network/api.js"; | |||||
import { | |||||
request | |||||
} from "@/utils/network/request.js"; | |||||
import { | |||||
getItem, | |||||
StorageKeys, | |||||
} from "@/utils/storage"; | |||||
import { | |||||
stringToJson | |||||
} from "@/utils/network/encryption"; | |||||
const state = reactive({ | |||||
list: [] //车辆list | |||||
}); | |||||
const flag = ref('0') //默认选择0 | |||||
onLoad(() => { | |||||
quanCheckActionTrue().then((item : any) => { | |||||
state.list = item.data | |||||
}) | |||||
}); | |||||
const quanCheckActionTrue = () => { | |||||
let source = "" | |||||
// #ifdef MP-ALIPAY | |||||
source ="ALI" | |||||
// #endif | |||||
// #ifdef MP-WEIXIN | |||||
source ="WECHAT" | |||||
// #endif | |||||
var data = { | |||||
opId: getItem(StorageKeys.OpenId), | |||||
source: source, //渠道为小程序 | |||||
tabIndex: '0', //0全部 | |||||
orderStep: '11', //11 为已完成” | |||||
isValueCard: "", | |||||
orderStatus: "1" | |||||
}; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
return new Promise(async (resolve, reject) => { | |||||
const res = await request(orderList, options); | |||||
const data = stringToJson(res.bizContent); | |||||
resolve(data); | |||||
}).catch((error) => { | |||||
reject(error); | |||||
}); | |||||
} | |||||
const choose = (i, item) => { | |||||
flag.value = i | |||||
navTo(`/subpackage/after-sale/month-statement/month-statement-query-list?vehicleId=${item.vehicleId}`) | |||||
} | |||||
</script> | |||||
<style> | |||||
page { | |||||
width: 100%; | |||||
height: 100%; | |||||
background-color: #EEF7F7; | |||||
} | |||||
</style> | |||||
<style lang="scss" scoped> | |||||
.flex { | |||||
display: flex; | |||||
justify-content: center; | |||||
} | |||||
.selectCar-box { | |||||
// width: 100%; | |||||
height: 100%; | |||||
padding: 30rpx; | |||||
.item { | |||||
padding: 20rpx; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
height: 130rpx; | |||||
background: #FFFFFF; | |||||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8); | |||||
border-radius: 20rpx; | |||||
margin-bottom: 30rpx; | |||||
.iten-left { | |||||
display: flex; | |||||
align-items: center; | |||||
image { | |||||
width: 150rpx; | |||||
height: 90rpx; | |||||
} | |||||
text { | |||||
margin-left: 20rpx; | |||||
font-size: 32rpx; | |||||
font-family: Noto Sans S Chinese; | |||||
font-weight: 400; | |||||
color: #333333; | |||||
} | |||||
} | |||||
.choose-item { | |||||
width: 44rpx; | |||||
height: 44rpx; | |||||
background: #FFFFFF; | |||||
border: 2rpx solid #00B38B; | |||||
border-radius: 50%; | |||||
margin-right: 20rpx; | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
box-sizing: content-box; | |||||
} | |||||
.active { | |||||
width: 34rpx; | |||||
height: 34rpx; | |||||
background: #00B38B; | |||||
border-radius: 50%; | |||||
} | |||||
} | |||||
} | |||||
</style> |
<template> | |||||
<view class="allContent"> | |||||
<view class="list-item"> | |||||
<view><text>车牌号:</text><text>{{state.tableData['vehiclePlate']}}</text></view> | |||||
<view><text>车牌颜色:</text><text>{{state.tableData['color']}}</text></view> | |||||
<view><text>所有人:</text><text>{{state.tableData['ownerName']}}</text></view> | |||||
<view><text>车辆类型:</text><text>{{state.tableData['vehicleType']}}</text></view> | |||||
<view><text>车辆识别代号:</text><text>{{state.tableData['vin']}}</text></view> | |||||
<view><text>发动机号码:</text><text>{{state.tableData['engineNum']}}</text></view> | |||||
<view><text>核定载人数:</text><text>{{state.tableData['approvedCount']}}人</text></view> | |||||
<view><text>整备质量:</text><text>{{state.tableData['maintenaceMass']}}kg</text></view> | |||||
<view><text>外廊尺寸:</text><text>{{state.tableData['vehicleDimensions']}}</text></view> | |||||
<view><text>总质量:</text><text>{{state.tableData['totalMass']}}Kg</text></view> | |||||
<view><text>车轴数:</text><text>{{state.tableData['axleCount']}}轴</text></view> | |||||
<view><text>状态:</text><text>{{state.tableData['status']}}</text></view> | |||||
<view><text>行驶证主页:</text><image mode="widthFix" :src="state.tableData['vehPosImgUrl']"></image></view> | |||||
<view><text>行驶证副业:</text><image mode="widthFix" :src="state.tableData['vehNegImgUrl']"></image></view> | |||||
<view><text>车头照:</text><image mode="widthFix" :src="state.tableData['vehBodyUrl']"></image></view> | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script setup lang="ts"> | |||||
import { reactive } from "vue"; | |||||
import { onLoad } from "@dcloudio/uni-app"; | |||||
const state = reactive({ | |||||
tableData: {}, //上一个页面传递过来的参数 | |||||
}); | |||||
onLoad((options) => { | |||||
state.tableData = JSON.parse(decodeURIComponent(options.params)) | |||||
console.log("options.promoteId", 1111, state.tableData) | |||||
}) | |||||
</script> | |||||
<style scoped> | |||||
.allContent { | |||||
background-color: #EEF7F7; | |||||
margin-top: 20rpx; | |||||
overflow: hidden; | |||||
} | |||||
.list-item { | |||||
width: 95%; | |||||
border-radius: 10rpx; | |||||
font-size: 28rpx; | |||||
border: 1rpx solid #ccc; | |||||
padding: 12rpx; | |||||
box-sizing: border-box; | |||||
background-color: white; | |||||
} | |||||
.list-item>view { | |||||
margin-bottom: 20rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.list-item>view>text:first-child { | |||||
width: 30%; | |||||
display: inline-block; | |||||
} | |||||
.list-item>view>text:last-child { | |||||
width: 70%; | |||||
display: inline-block; | |||||
word-break: break-all; | |||||
} | |||||
image{ | |||||
width: 220rpx; | |||||
} | |||||
</style> |
}; | }; | ||||
request(downloadBills, options).then((res) => { | request(downloadBills, options).then((res) => { | ||||
let result = stringToJson(res.bizContent) | let result = stringToJson(res.bizContent) | ||||
console.log(downloadFileURL+result.ossFilePath); | |||||
console.log("downloadFileURL",downloadFileURL+result.ossFilePath); | |||||
download(downloadFileURL+result.ossFilePath) | download(downloadFileURL+result.ossFilePath) | ||||
}) | }) | ||||
} | } |
<template> | <template> | ||||
<view v-if="state.list.length!=0"> | <view v-if="state.list.length!=0"> | ||||
<view class="car-item" v-for="(item,index) in state.list"> | <view class="car-item" v-for="(item,index) in state.list"> | ||||
<image :src="`${$imgUrl}che.png`" class="car-pic"></image> | |||||
<view class="car-info"> | |||||
<image :src="`${$imgUrl}che.png`" class="car-pic" @click="carDetails(item)"></image> | |||||
<view class="car-info" @click="carDetails(item)"> | |||||
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color">{{item.color}}</text></view> | <view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color">{{item.color}}</text></view> | ||||
<view class="card-no">卡号:{{item.cardId}}</view> | <view class="card-no">卡号:{{item.cardId}}</view> | ||||
<view class="card-no">签号:{{item.obuId}}</view> | <view class="card-no">签号:{{item.obuId}}</view> | ||||
onLoad((option : any) => { | onLoad((option : any) => { | ||||
queryCarMsg(); | queryCarMsg(); | ||||
}) | }) | ||||
const carDetails=(item)=>{ | |||||
const params = encodeURIComponent(JSON.stringify(item)) | |||||
uni.navigateTo({ | |||||
url:`/subpackage/personal-center/car-details?params=${params}` | |||||
}) | |||||
} | |||||
const queryCarMsg = () => { | const queryCarMsg = () => { | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
//卡签操作 | //卡签操作 | ||||
export const cardRenewal = "891" //ASS-卡续期 | export const cardRenewal = "891" //ASS-卡续期 | ||||
export const obuRenewal = "899" //ASS-签续期 | |||||
export const cardStopOrStart = "892" //ASS-卡停/启用 | export const cardStopOrStart = "892" //ASS-卡停/启用 | ||||
export const deviceUpgrade = "896" //BDS-设备升级接口 | export const deviceUpgrade = "896" //BDS-设备升级接口 | ||||
export const cardModifyConfirm = "898" //ASS-卡信息变更确认 | export const cardModifyConfirm = "898" //ASS-卡信息变更确认 | ||||
export const getEquityListApi = "a2656146d9c24c86b8ea7aabbe3dbf97" //获取全部加购权益列表 | export const getEquityListApi = "a2656146d9c24c86b8ea7aabbe3dbf97" //获取全部加购权益列表 | ||||
export const addEquityListApi = "783e1feed98740b691f6c49c6d76f7d5" //全部权益列表购买 | export const addEquityListApi = "783e1feed98740b691f6c49c6d76f7d5" //全部权益列表购买 | ||||
export const showEquityListApi = "2af868adcf2f44ceb7a94c659ba2cee1" //展示权益列表购买 | export const showEquityListApi = "2af868adcf2f44ceb7a94c659ba2cee1" //展示权益列表购买 | ||||
export const auditQueryApi = "38b105703c854c118202bb411c924b88" //通用审核查询接口 | |||||
export const auditQueryApi = "38b105703c854c118202bb411c924b88" //通用审核查询接口 | |||||
export const monthStatementApi = "ae645d3be9ef49028db588e0ffa5d808" //月结单查询 |