Compare commits
46 Commits
8891738455
...
prod-24-06
Author | SHA1 | Date | |
---|---|---|---|
beff1bb6f9 | |||
0a65f7c641 | |||
1bd80326ec | |||
51351b37a4 | |||
ee1ecb1a55 | |||
77195c619f | |||
9e32f377b0 | |||
53be990a24 | |||
f8432ffbba | |||
a6156be569 | |||
8af98c5ef3 | |||
82ddcf67d6 | |||
441d4eb2d4 | |||
1a1336e7ec | |||
5fa462ed00 | |||
2e39152396 | |||
007fcb9e59 | |||
046d253072 | |||
d152323607 | |||
9cf7e1e424 | |||
c872a9d4d8 | |||
6866491a06 | |||
957ee45d75 | |||
916c667d7c | |||
2c59b0f5a0 | |||
5cf2559335 | |||
43bb5a0f1e | |||
b120960c80 | |||
5dd995d82d | |||
87c2e0301a | |||
ae4c177204 | |||
e9324dc580 | |||
d78810a503 | |||
ceb521ed49 | |||
a3948addd1 | |||
0a3eb81c12 | |||
6f861ad9cb | |||
7aa3241046 | |||
903237fd03 | |||
2c66c4bb0a | |||
eb0c77e155 | |||
3d62c84fa8 | |||
70ec1ae4ed | |||
5d5c283e99 | |||
bed3856384 | |||
867cbee6c7 |
@ -178,3 +178,23 @@ export function userOperationPermissions(){
|
||||
method:'POST',
|
||||
})
|
||||
}
|
||||
|
||||
// 上传图片
|
||||
export function uploadImage(data){
|
||||
return request({
|
||||
url:'/order/uploadImage',
|
||||
method:'POST',
|
||||
contentType:'multipart/form-data',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// ocr 识别
|
||||
export function ocrHandler(data){
|
||||
return request({
|
||||
url:'/agg-api/tencent-ocr/unifiedOCR',
|
||||
method:'POST',
|
||||
contentType:'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
BIN
src/assets/trainBg.png
Normal file
BIN
src/assets/trainBg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
@ -70,7 +70,14 @@ const routes = [
|
||||
meta: {
|
||||
title: '审核完成-详情'
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
path: "/settlementDetail",
|
||||
name: 'settlementDetail',
|
||||
component: () => import('@/views/workOrder/settlementDetail.vue'),
|
||||
meta: {
|
||||
title: '结算单详情'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/invoicingNotify",
|
||||
@ -167,6 +174,14 @@ const routes = [
|
||||
meta: {
|
||||
title:'案件详情'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/newTrainingList',
|
||||
name: 'newTrainingList',
|
||||
component:()=>import('@/views/newcomerTraining/newTrainingList.vue'),
|
||||
meta: {
|
||||
title:'新人培训'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -5,7 +5,14 @@ const formatDate = date => {
|
||||
const day = tempDate.getDate()
|
||||
return `${[year, month, day].map(formatNumber).join('-')}`
|
||||
}
|
||||
|
||||
const formatDate1 = date => {
|
||||
let value=date.replace(/\./g, '/')
|
||||
let tempDate = new Date(value)
|
||||
const year = tempDate.getFullYear()
|
||||
const month = tempDate.getMonth() + 1
|
||||
const day = tempDate.getDate()
|
||||
return `${[year, month, day].map(formatNumber).join('/')}`
|
||||
}
|
||||
const formatNumber = n => {
|
||||
n = n.toString()
|
||||
return n[1] ? n : `0${n}`
|
||||
@ -40,5 +47,6 @@ module.exports = {
|
||||
formatNumber,
|
||||
formatDate,
|
||||
leftCopy,
|
||||
timeFormat
|
||||
timeFormat,
|
||||
formatDate1
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ service.interceptors.request.use(
|
||||
let token = localStorage.getItem('token');
|
||||
// alert(token);
|
||||
// let token='4099761587129c46b03c9316c9e866c9'
|
||||
// let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJTSENTR1lTIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MDgzMjY3NTAsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjUwMTk3LCJuYW1lIjoi5LiK5rW35rWL6K-V5L6b5bqU5ZWGIiwic3VwcGxpZXJOYW1lIjoi5LiK5rW35rWL6K-V5pyN5Yqh5ZWGIiwic3VwcGxpZXJJZCI6MzMwNDEsInN1cHBsaWVyVHlwZSI6MSwiaXNaZCI6MCwidXNlcm5hbWUiOiJTSENTR1lTIiwidXNlclR5cGUiOiJyZXNjdWVBcHAiLCJkZXZpY2VJZCI6IjJjMGU0N2JiMWQxNGYzYTY3YjhkOGRjMTUyM2VhMmQ3MCIsImF1dGhvcml0aWVzIjpbXX0sInNjb3BlIjpbImFsbCJdLCJpc3MiOiJodHRwczovL3Npbm9hc3Npc3QuY29tIiwiZXhwIjoxNzA4NDEzMTUwLCJpYXQiOjE3MDgzMjY3NTB9.hJ4TkZpsDW0c_-o4qopSxNyLyCtCRuuLzKAvH1xQgOw'
|
||||
// let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MTI0NTQ5NTMsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiJDLeS4iua1t-a1i-ivleacjeWKoeWVhiIsInN1cHBsaWVySWQiOjMzMDQxLCJzdXBwbGllclR5cGUiOjIsInVzZXJuYW1lIjoic29uZyIsInVzZXJUeXBlIjoicmVzY3VlQXBwIiwiZGV2aWNlSWQiOiIyMmI0OWNhMjBmOWI4MzMwZDk4NzIxNzNmMzllYTY4YmMiLCJhdXRob3JpdGllcyI6W119LCJzY29wZSI6WyJhbGwiXSwiaXNzIjoiaHR0cHM6Ly9zaW5vYXNzaXN0LmNvbSIsImV4cCI6MTcxMjU0MTM1MywiaWF0IjoxNzEyNDU0OTUzfQ.sPU9_OD_TOWcTwqmlawEGyo4mCPrEaRYw2R02gnvYJw'
|
||||
// console.log("tokentokentoken",token)
|
||||
if (reqUrl.includes("/driverApp")) {
|
||||
config.headers['token'] = `${token}`;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="wrap driverAdd">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
:title="id ? '修改司机信息' : '添加司机'"
|
||||
@ -11,15 +11,87 @@
|
||||
@click-left="h5GoBack"
|
||||
/>
|
||||
</div>
|
||||
<cell-group label="司机姓名" placeholder="请输入司机姓名" v-model="driverName" :disabled="supplierType ==1 ? true:false"/>
|
||||
<cell-group label="手机号码" v-model="driverPhone" placeholder="请输入手机号" />
|
||||
<cell-group label="身份证号" v-model="identityCardNumber" placeholder="请输入身份证号" />
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>身份证正面</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="identityCardFrontList"
|
||||
:after-read="identityCardFrontHandler"
|
||||
:max-size="5 * 1024 * 1024"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
<div class="lineBot"></div>
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>身份证反面</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="identityCardContraryList"
|
||||
:after-read="identityCardBackHandler"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
<div class="lineBot"></div>
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>驾驶证主页</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="drivingLicenceFrontList"
|
||||
:after-read="drivingLicenceFrontHandler"
|
||||
max-count="1"
|
||||
:max-size="5 * 1024 * 1024"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
<div class="lineBot"></div>
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>驾驶证副页</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="drivingLicenceContraryList"
|
||||
:after-read="drivingLicenceContraryHandler"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
<div class="lineBot"></div>
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<span>头像</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="iconList"
|
||||
:after-read="iconListHandler"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
<div class="lineBot"></div>
|
||||
<!-- :disabled="supplierType ==1 ? true:false"-->
|
||||
<cell-group label="司机姓名" placeholder="司机姓名" v-model="driverName" disabled />
|
||||
<cell-group label="手机号码" v-model="driverPhone" placeholder="手机号码" />
|
||||
<cell-group label="身份证号" v-model="identityCardNumber" placeholder="身份证号" disabled />
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>准驾车型</span>
|
||||
</div>
|
||||
<select id="mySelect" class="mySelect" v-model="drivingModel" >
|
||||
<select id="mySelect" class="mySelect" v-model="drivingModel" disabled >
|
||||
<option value="A1">A1</option>
|
||||
<option value="A2">A2</option>
|
||||
<option value="A3">A3</option>
|
||||
@ -63,9 +135,10 @@
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {saveDriver} from "@/api/mine"
|
||||
import {saveDriver, uploadImage, ocrHandler} from "@/api/mine"
|
||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||
import CellGroup from "@/components/cellGroup.vue"
|
||||
import {formatDate1} from "@/utils/common"
|
||||
export default {
|
||||
name: "driverAdd",
|
||||
mixins:[myMixins],
|
||||
@ -80,7 +153,22 @@ export default {
|
||||
activeIcon: require('@/assets/check.png'),
|
||||
inactiveIcon: require('@/assets/uncheck.png'),
|
||||
supplierType:'',
|
||||
createTime:''
|
||||
createTime:'',
|
||||
identityCardFront: '', // 身份证正面
|
||||
identityCardFrontList: [], // 身份证正面 列表
|
||||
identityCardContrary: '', // 身份证反面
|
||||
identityCardContraryList: [], // 身份证反面 列表
|
||||
drivingLicenceFront: '', // 驾驶证正面
|
||||
drivingLicenceFrontList: [], // 驾驶证正面 列表
|
||||
drivingLicenceContrary: '', // 驾驶证反面
|
||||
drivingLicenceContraryList: [], // 驾驶证反面 列表
|
||||
icon: '',
|
||||
iconList: [],
|
||||
driverInfo: {},
|
||||
drivingLicenceName: '',
|
||||
idCardAuthority:'',
|
||||
idCardValidStartTime:'',
|
||||
idCardValidEndTime:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -92,6 +180,30 @@ export default {
|
||||
this.states = this.$route.params?.states;
|
||||
this.supplierType=this.$route.params?.supplierType;
|
||||
this.createTime=this.$route.params?.createTime;
|
||||
this.driverInfo.drivingBeginDate = this.$route.params?.drivingBeginDate;
|
||||
this.drivingLicenceContrary = this.$route.params?.drivingLicenceContrary;
|
||||
this.drivingLicenceFront = this.$route.params?.drivingLicenceFront;
|
||||
this.driverInfo.drivingLicenceValidityDate = this.$route.params?.drivingLicenceValidityDate;
|
||||
this.icon = this.$route.params?.icon;
|
||||
this.identityCardContrary = this.$route.params?.identityCardContrary;
|
||||
this.identityCardFront = this.$route.params?.identityCardFront;
|
||||
this.driverInfo.lssueDate = this.$route.params?.lssueDate;
|
||||
this.drivingLicenceName = this.$route.params?.drivingLicenceName;
|
||||
if( this.identityCardFront ) {
|
||||
this.identityCardFrontList = [{ url : this.identityCardFront }];
|
||||
}
|
||||
if( this.identityCardContrary ) {
|
||||
this.identityCardContraryList = [{ url : this.identityCardContrary }];
|
||||
}
|
||||
if( this.drivingLicenceFront ) {
|
||||
this.drivingLicenceFrontList = [{ url : this.drivingLicenceFront }];
|
||||
}
|
||||
if( this.drivingLicenceContrary ) {
|
||||
this.drivingLicenceContraryList = [{ url : this.drivingLicenceContrary }];
|
||||
}
|
||||
if( this.icon ) {
|
||||
this.iconList = [{ url : this.icon }];
|
||||
}
|
||||
const selectElement = document.getElementById('mySelect');
|
||||
selectElement.addEventListener('change', function() {
|
||||
const selectedValue = selectElement.value;
|
||||
@ -103,25 +215,173 @@ export default {
|
||||
isUse(e){
|
||||
this.states=e
|
||||
},
|
||||
async submitBtn(){
|
||||
await saveDriver({
|
||||
driverId:this.id ? this.id : '',
|
||||
driverName:this.driverName ,
|
||||
driverPhone:this.driverPhone,
|
||||
identityCardNumber:this.identityCardNumber,
|
||||
drivingModel:this.drivingModel,
|
||||
states:Number(this.states),
|
||||
createTime:this.createTime || ''
|
||||
})
|
||||
if(this.id){
|
||||
this.$toast('修改成功')
|
||||
async identityCardFrontHandler(file) { // 上传身份证正面照片
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData)
|
||||
this.identityCardFront = res.data;
|
||||
await this.idCardOcrHandler();
|
||||
},
|
||||
async identityCardBackHandler(file) { // 上传身份证反面照片
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData)
|
||||
this.identityCardContrary = res.data;
|
||||
await this.idCardBackOcrHandler();
|
||||
},
|
||||
async drivingLicenceFrontHandler(file) { // 上传驾驶证主页
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData)
|
||||
this.drivingLicenceFront = res.data;
|
||||
await this.drivingLicenceOcrHandler();
|
||||
},
|
||||
async drivingLicenceContraryHandler(file) { // 上传驾驶证副页
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData)
|
||||
this.drivingLicenceContrary = res.data;
|
||||
},
|
||||
async iconListHandler(file) { // 上传头像
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData)
|
||||
this.icon = res.data;
|
||||
},
|
||||
async idCardOcrHandler() { // 身份证正面 ocr识别
|
||||
this.driverName = '';
|
||||
this.identityCardNumber = '';
|
||||
let res = await ocrHandler({
|
||||
ocrType: 1,
|
||||
imageUrl: this.identityCardFront,
|
||||
cardSide: 'FRONT'
|
||||
})
|
||||
this.driverName = res?.data?.name;
|
||||
this.identityCardNumber = res?.data?.idNum;
|
||||
let aaa=''
|
||||
if(this.drivingLicenceName){
|
||||
aaa = this.drivingLicenceName.replace(/[^\u4e00-\u9fff]+/g, '');
|
||||
}
|
||||
let bbb=this.driverName.replace(/[^\u4e00-\u9fff]+/g, '');
|
||||
if( this.drivingLicenceName && aaa != bbb ) {
|
||||
this.$toast('身份证信息与驾驶证信息不匹配')
|
||||
}
|
||||
},
|
||||
async idCardBackOcrHandler() { // 身份证反面 ocr识别
|
||||
let res = await ocrHandler({
|
||||
ocrType: 1,
|
||||
imageUrl: this.identityCardContrary,
|
||||
cardSide: 'BACK'
|
||||
});
|
||||
this.idCardAuthority=res.data.authority
|
||||
if(!res.data.validDate){
|
||||
return
|
||||
}
|
||||
let date=res.data.validDate.split('-')
|
||||
if(date[0]){
|
||||
this.idCardValidStartTime=formatDate1(date[0]) +' '+ '00:00:00';
|
||||
}
|
||||
if(date[1]){
|
||||
if(date[1] == '长期'){
|
||||
this.idCardValidEndTime='2099/12/12' +' '+ '00:00:00';
|
||||
}else{
|
||||
this.$toast('添加成功')
|
||||
this.idCardValidEndTime=formatDate1(date[1]) +' '+ '00:00:00';
|
||||
}
|
||||
}
|
||||
},
|
||||
async drivingLicenceOcrHandler() { // 驾驶证正面 ocr识别
|
||||
this.driverInfo.drivingLicenceValidityDate = '';
|
||||
this.driverInfo.drivingBeginDate = '';
|
||||
this.driverInfo.lssueDate = '';
|
||||
this.drivingModel = '';
|
||||
this.drivingLicenceName = '';
|
||||
let res = await ocrHandler({
|
||||
ocrType: 2,
|
||||
imageUrl: this.drivingLicenceFront,
|
||||
cardSide: 'FRONT'
|
||||
});
|
||||
if( res?.data ) {
|
||||
this.driverInfo.drivingBeginDate = res?.data?.dateOfFirstIssue || '';
|
||||
this.driverInfo.lssueDate = res?.data?.dateOfFirstIssue ? (res?.data?.dateOfFirstIssue + ' 00:00:00') : '';
|
||||
if( res?.data?.endDate.indexOf('长期') != -1 ) {
|
||||
this.driverInfo.drivingLicenceValidityDate = '2099-01-01';
|
||||
} else {
|
||||
this.driverInfo.drivingLicenceValidityDate = res?.data?.endDate;
|
||||
}
|
||||
|
||||
this.drivingModel = res.data?.class_;
|
||||
this.drivingLicenceName = res.data?.name
|
||||
let aaa=''
|
||||
if(this.driverName){
|
||||
aaa = this.driverName.replace(/[^\u4e00-\u9fff]+/g, '');
|
||||
}
|
||||
let bbb = this.drivingLicenceName.replace(/[^\u4e00-\u9fff]+/g, '');
|
||||
if( this.driverName && bbb != aaa ) {
|
||||
this.$toast('身份证信息与驾驶证信息不匹配')
|
||||
}
|
||||
}
|
||||
},
|
||||
async submitBtn(){
|
||||
if(!this.identityCardFront) {
|
||||
this.$toast('身份证正面照未上传')
|
||||
return
|
||||
}
|
||||
if(!this.identityCardContrary) {
|
||||
this.$toast('身份证反面照未上传')
|
||||
return
|
||||
}
|
||||
if(!this.drivingLicenceFront) {
|
||||
this.$toast('驾驶证首页未上传')
|
||||
return
|
||||
}
|
||||
if(!this.drivingLicenceContrary) {
|
||||
this.$toast('驾驶证副页未上传')
|
||||
return
|
||||
}
|
||||
let drivingLicenceName=this.drivingLicenceName.replace(/[^\u4e00-\u9fff]+/g, '');
|
||||
let driverName=this.driverName.replace(/[^\u4e00-\u9fff]+/g, '');
|
||||
|
||||
if( drivingLicenceName != driverName ) {
|
||||
this.$toast('身份证信息与驾驶证信息不匹配')
|
||||
return
|
||||
}
|
||||
if( this.driverInfo.drivingLicenceValidityDate ) {
|
||||
if(this.driverInfo.drivingLicenceValidityDate && new Date(this.driverInfo.drivingLicenceValidityDate).getTime() < new Date().getTime() ) {
|
||||
this.$toast('驾驶证已过期')
|
||||
return
|
||||
}
|
||||
} else {
|
||||
this.$toast('驾驶证信息识别错误,请重新上传')
|
||||
return
|
||||
}
|
||||
await saveDriver({
|
||||
driverId:this.id ? this.id : '',
|
||||
driverName:this.driverName ,
|
||||
driverPhone:this.driverPhone,
|
||||
identityCardNumber:this.identityCardNumber,
|
||||
drivingModel:this.drivingModel,
|
||||
states:Number(this.states),
|
||||
createTime:this.createTime || '',
|
||||
identityCardFront: this.identityCardFront,
|
||||
identityCardContrary: this.identityCardContrary,
|
||||
drivingLicenceFront: this.drivingLicenceFront,
|
||||
drivingLicenceContrary: this.drivingLicenceContrary,
|
||||
icon: this.icon,
|
||||
drivingLicenceName: this.drivingLicenceName,
|
||||
idCardAuthority:this.idCardAuthority,
|
||||
idCardValidStartTime:this.idCardValidStartTime,
|
||||
idCardValidEndTime:this.idCardValidEndTime,
|
||||
...this.driverInfo
|
||||
})
|
||||
if(this.id){
|
||||
this.$toast('修改成功')
|
||||
}else{
|
||||
this.$toast('添加成功')
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.$router.back();
|
||||
},2000)
|
||||
},
|
||||
},
|
||||
},
|
||||
components:{
|
||||
TwoCommonBtn,
|
||||
@ -129,7 +389,12 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.driverAdd .van-field__control:disabled {
|
||||
color: #323643 !important;
|
||||
-webkit-text-fill-color: #323643 !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
@ -137,6 +402,8 @@ export default {
|
||||
@include wh(100%,100%);
|
||||
box-sizing: border-box;
|
||||
padding-left: 16px;
|
||||
padding-bottom: 100px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.mySelect{
|
||||
@include fontWeightSize(bold,13px);
|
||||
|
@ -162,7 +162,16 @@ export default {
|
||||
identityCardNumber:item.identityCardNumber,
|
||||
states:item.states.code,
|
||||
createTime:item.createTime,
|
||||
supplierType:this.supplierType
|
||||
supplierType:this.supplierType,
|
||||
drivingBeginDate: item.drivingBeginDate,
|
||||
drivingLicenceContrary: item.drivingLicenceContrary,
|
||||
drivingLicenceFront: item.drivingLicenceFront,
|
||||
drivingLicenceValidityDate: item.drivingLicenceValidityDate,
|
||||
icon: item.icon,
|
||||
identityCardContrary: item.identityCardContrary,
|
||||
identityCardFront: item.identityCardFront,
|
||||
lssueDate: item.lssueDate,
|
||||
drivingLicenceName: item.drivingLicenceName
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="wrap vehicleAdd">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
:title="id ? '修改车辆信息' : '添加车辆'"
|
||||
@ -12,7 +12,49 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="addContentWrap">
|
||||
<cell-group label="车牌号" placeholder="请输入车牌号" v-model="carNum" />
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>行驶证首页</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="vehicleLicenseFrontList"
|
||||
:after-read="vehicleLicenseFrontHandler"
|
||||
:max-size="5 * 1024 * 1024"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>行驶证副页</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="vehicleLicenseBackList"
|
||||
:after-read="vehicleLicenseBackHandler"
|
||||
:max-size="5 * 1024 * 1024"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>车头照</span>
|
||||
</div>
|
||||
<van-uploader
|
||||
v-model="vehicleFrontPhotoList"
|
||||
:after-read="vehicleFrontPhotoHandler"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
/>
|
||||
</div>
|
||||
|
||||
<cell-group label="车牌号" placeholder="车牌号" disabled v-model="carNum" />
|
||||
<div class="itemContent">
|
||||
<div class="titleType">
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
@ -78,8 +120,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// uploadImage
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {vehicleTypeList,saveVehicle,getInfoById,supplierServiceTree} from "@/api/mine"
|
||||
import {vehicleTypeList,saveVehicle,getInfoById,supplierServiceTree, uploadImage, ocrHandler} from "@/api/mine"
|
||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||
import CellGroup from "@/components/cellGroup.vue";
|
||||
export default {
|
||||
@ -100,7 +143,15 @@ export default {
|
||||
serviceIds:[],//车辆服务种类,
|
||||
supplierServiceList:[],
|
||||
show:false,
|
||||
imageUrl: require('@/assets/arr_right.png')
|
||||
imageUrl: require('@/assets/arr_right.png'),
|
||||
vehicleLicenseFrontList: [],
|
||||
vehicleLicenseBackList: [],
|
||||
vehicleFrontPhotoList: [],
|
||||
vehicleLicenseFront: '', // 行驶证首页
|
||||
vehicleLicenseBack: '', // 行驶证副页
|
||||
vehicleFrontPhoto: '', // 车头照
|
||||
vehicleLicenseInfo: {},
|
||||
vehicleLicenseBackOcrFlag: false, // 行驶证副页 修改时默认不需要 ocr识别
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -116,6 +167,87 @@ export default {
|
||||
await this.getSupplierServiceTree();
|
||||
},
|
||||
methods:{
|
||||
async vehicleLicenseFrontHandler(file) { // 上传 行驶证首页
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData)
|
||||
this.vehicleLicenseFront = res.data;
|
||||
await this.vehicleOcrHandler();
|
||||
},
|
||||
async vehicleLicenseBackHandler(file) { // 上传 行驶证副页
|
||||
this.vehicleLicenseBackOcrFlag = true;
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData);
|
||||
this.vehicleLicenseBack = res.data;
|
||||
await this.vehicleBackOcrHandler();
|
||||
},
|
||||
async vehicleFrontPhotoHandler(file) { // 上传 车头照
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
let res = await uploadImage(formData);
|
||||
this.vehicleFrontPhoto = res.data;
|
||||
},
|
||||
async vehicleOcrHandler() { // 行驶证首页 ocr 识别
|
||||
this.vehicleLicenseInfo.licensePlateNumber = '';
|
||||
this.vehicleLicenseInfo.vehicleType = '';
|
||||
this.vehicleLicenseInfo.owner = '';
|
||||
this.vehicleLicenseInfo.address = '';
|
||||
this.vehicleLicenseInfo.useNature = '';
|
||||
this.vehicleLicenseInfo.model = '';
|
||||
this.vehicleLicenseInfo.vinCode = '';
|
||||
this.vehicleLicenseInfo.engineNumber = '';
|
||||
this.vehicleLicenseInfo.registrationDate = '';
|
||||
this.vehicleLicenseInfo.issueDate = '';
|
||||
this.vehicleLicenseInfo.issueAuthority = '';
|
||||
let res = await ocrHandler({
|
||||
ocrType: 3,
|
||||
imageUrl: this.vehicleLicenseFront,
|
||||
cardSide: 'FRONT'
|
||||
})
|
||||
if ( res?.data?.frontInfo ) {
|
||||
let frontInfo = res?.data?.frontInfo;
|
||||
this.carNum = frontInfo?.plateNo;
|
||||
this.vehicleLicenseInfo.licensePlateNumber = frontInfo?.plateNo;
|
||||
this.vehicleLicenseInfo.vehicleType = frontInfo?.vehicleType;
|
||||
this.vehicleLicenseInfo.owner = frontInfo?.owner;
|
||||
this.vehicleLicenseInfo.address = frontInfo?.address;
|
||||
this.vehicleLicenseInfo.useNature = frontInfo?.useCharacter;
|
||||
this.vehicleLicenseInfo.model = frontInfo?.model;
|
||||
this.vehicleLicenseInfo.vinCode = frontInfo?.vin;
|
||||
this.vehicleLicenseInfo.engineNumber = frontInfo?.engineNo;
|
||||
this.vehicleLicenseInfo.registrationDate = frontInfo?.registerDate;
|
||||
this.vehicleLicenseInfo.issueDate = frontInfo?.issueDate;
|
||||
this.vehicleLicenseInfo.issueAuthority = frontInfo?.seal;
|
||||
}
|
||||
},
|
||||
async vehicleBackOcrHandler() { // 行驶证副页 ocr 识别
|
||||
this.vehicleLicenseInfo.recordNumber = '';
|
||||
this.vehicleLicenseInfo.passengerCapacity = '';
|
||||
this.vehicleLicenseInfo.totalWeight = '';
|
||||
this.vehicleLicenseInfo.curbWeight = '';
|
||||
this.vehicleLicenseInfo.permittedWeight = '';
|
||||
this.vehicleLicenseInfo.overallDimension = '';
|
||||
this.vehicleLicenseInfo.tractionWeight = '';
|
||||
this.vehicleLicenseInfo.backPlateNo = ''; // 行驶证副页 车牌号,仅用来判断 ocr 识别是否成功
|
||||
let res = await ocrHandler({
|
||||
ocrType: 3,
|
||||
imageUrl: this.vehicleLicenseBack,
|
||||
cardSide: 'BACK'
|
||||
})
|
||||
if(res?.data?.backInfo) {
|
||||
let backInfo = res?.data?.backInfo;
|
||||
this.vehicleLicenseInfo.recordNumber = backInfo?.fileNo;
|
||||
this.vehicleLicenseInfo.passengerCapacity = backInfo?.allowNum;
|
||||
this.vehicleLicenseInfo.totalWeight = backInfo?.totalMass;
|
||||
this.vehicleLicenseInfo.curbWeight = backInfo?.curbWeight;
|
||||
this.vehicleLicenseInfo.permittedWeight = backInfo?.loadQuality;
|
||||
this.vehicleLicenseInfo.overallDimension = backInfo?.externalSize;
|
||||
this.vehicleLicenseInfo.tractionWeight = backInfo?.TotalQuasiMass;
|
||||
this.vehicleLicenseInfo.backPlateNo = backInfo?.plateNo;
|
||||
}
|
||||
console.log('this.vehicle', this.vehicleLicenseInfo)
|
||||
},
|
||||
loadAll(i){
|
||||
// console.log(i)
|
||||
this.show = !this.show
|
||||
@ -145,23 +277,54 @@ export default {
|
||||
let res= await getInfoById({
|
||||
vehicleId:this.id
|
||||
})
|
||||
let result=res.data;
|
||||
this.id=result.vehicleId
|
||||
this.carNum=result.plateNumber
|
||||
this.isJoin=result.hasPolymerization.code
|
||||
this.selectedOption=result.vehicleType;
|
||||
this.serviceIds=result.serviceIds
|
||||
let result=res.data;
|
||||
this.id=result.vehicleId
|
||||
this.carNum=result.plateNumber
|
||||
this.isJoin=result.hasPolymerization.code
|
||||
this.selectedOption=result.vehicleType;
|
||||
this.serviceIds=result.serviceIds
|
||||
this.vehicleLicenseFront = result.vehicleLicenseFront;
|
||||
this.vehicleLicenseBack = result.vehicleLicenseBack;
|
||||
this.vehicleFrontPhoto = result.vehicleFrontPhoto;
|
||||
this.vehicleLicenseInfo = result.vehicleLicenseInfo;
|
||||
this.vehicleLicenseFrontList = [{ url : this.vehicleLicenseFront }];
|
||||
this.vehicleLicenseBackList = [{ url : this.vehicleLicenseBack }];
|
||||
this.vehicleFrontPhotoList = [{ url : this.vehicleFrontPhoto }];
|
||||
},
|
||||
isChange(e){
|
||||
this.isJoin=e
|
||||
},
|
||||
async submitBtn(){
|
||||
if( !this.vehicleLicenseFront ) {
|
||||
this.$toast('行驶证主页照片不能为空')
|
||||
return
|
||||
}
|
||||
if( !this.vehicleLicenseBack ) {
|
||||
this.$toast('行驶证副页照片不能为空')
|
||||
return
|
||||
}
|
||||
if( !this.vehicleLicenseBack ) {
|
||||
this.$toast('车头照片不能为空')
|
||||
return
|
||||
}
|
||||
if( !this.vehicleLicenseInfo.licensePlateNumber ) {
|
||||
this.$toast('行驶证主页识别失败')
|
||||
return
|
||||
}
|
||||
if(this.vehicleLicenseBackOcrFlag && !this.vehicleLicenseInfo.backPlateNo ) {
|
||||
this.$toast('行驶证副页识别失败')
|
||||
return
|
||||
}
|
||||
await saveVehicle({
|
||||
vehicleId:this.id ? this.id : '',
|
||||
plateNumber:this.carNum ? this.carNum :'',
|
||||
vehicleType:this.selectedOption ? this.selectedOption : '',
|
||||
hasPolymerization:this.isJoin,
|
||||
serviceIds:this.serviceIds ? this.serviceIds : []
|
||||
serviceIds:this.serviceIds ? this.serviceIds : [],
|
||||
vehicleLicenseFront: this.vehicleLicenseFront,
|
||||
vehicleLicenseBack: this.vehicleLicenseBack,
|
||||
vehicleFrontPhoto: this.vehicleFrontPhoto,
|
||||
vehicleLicenseInfo: this.vehicleLicenseInfo,
|
||||
})
|
||||
if(this.id){
|
||||
this.$toast('修改成功')
|
||||
@ -180,6 +343,12 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.vehicleAdd .van-field__control:disabled {
|
||||
color: #323643 !important;
|
||||
-webkit-text-fill-color: #323643 !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
|
340
src/views/newcomerTraining/newTrainingList.vue
Normal file
340
src/views/newcomerTraining/newTrainingList.vue
Normal file
@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<div class="wrap" :style="{ 'overflow-y': showPoup ? 'hidden' : 'auto' }">
|
||||
<div class="navBar">
|
||||
<van-nav-bar title="新人培训" :border="false" :fixed="true" :safe-area-inset-top="true">
|
||||
<template slot="left" v-if="isFinished">
|
||||
<van-icon name="checked" color="#37ec37" size="20"/>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
<div class="contentWrap" v-show="!showEmpty">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item)">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.pushUser }}</div>
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
</div>
|
||||
<div class="imgWrap"><img :src="item.themePicture"></div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<template v-if="item.listShowButton == null">
|
||||
<div class="status" style="color: #cccccc">已处理</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="status" >未处理</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<div class="empty" v-show="showEmpty">
|
||||
<img src="@/assets/empty.png" />
|
||||
</div>
|
||||
<div class="poupCommon" v-if="showPoup">
|
||||
<div class="container showPoupContainer">
|
||||
<div class="con">
|
||||
<div class="title">培训提醒</div>
|
||||
<div class="content">欢迎使用中道供应商APP。请您先完成培训,阅读文章,并问答相应问题。完成后即可正常使用APP。祝您使用愉快!</div>
|
||||
<div class="line"></div>
|
||||
<div class="btnWrap">
|
||||
<div class="nextBtn" @click="showPoup = false">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="poupCommon" v-if="isFinished">
|
||||
<div class="container finishContainer">
|
||||
<div class="con">
|
||||
<div class="title">提示</div>
|
||||
<div class="content">恭喜您,您已经全部完成培训!现在您可以正常使用我们的app,请前往体验。</div>
|
||||
<div class="line"></div>
|
||||
<div class="btnWrap">
|
||||
<div class="nextBtn" @click="goApp">前往</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { Dialog } from 'vant';
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {pageList} from "@/api/mine"
|
||||
|
||||
export default {
|
||||
name: "newTrainingList",
|
||||
computed: {
|
||||
},
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
pageList:[],
|
||||
keyword:'',
|
||||
show:false,
|
||||
showEmpty:false,
|
||||
isLoading:false,
|
||||
showPoup:true,//进入弹框
|
||||
isFinished:false,
|
||||
// showPoup:false,//进入弹框
|
||||
// isFinished:true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.onRefresh();
|
||||
this.getList();
|
||||
|
||||
},
|
||||
created() {
|
||||
// this.getList();
|
||||
// 每次回答完问题之后返回需重新加结果
|
||||
|
||||
},
|
||||
async activated() {
|
||||
await this.getList()
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
this.getList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
async getList(){
|
||||
let res= await pageList({
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize,
|
||||
docType:1,
|
||||
trainingType:4,
|
||||
})
|
||||
this.pageList=res.data;
|
||||
let aaa=this.pageList.every(item=>item.listShowButton != 1)
|
||||
if(aaa){
|
||||
this.showPoup=false
|
||||
this.isFinished=true
|
||||
// await this.allProcessed()
|
||||
}
|
||||
if(res.data.length === 0){
|
||||
this.showEmpty = true
|
||||
|
||||
}else {
|
||||
this.showEmpty = false
|
||||
}
|
||||
},
|
||||
initShow(){
|
||||
this.keyword= '',
|
||||
this.getList()
|
||||
},
|
||||
goApp(){
|
||||
let data = {"action":"goBack","params":""}
|
||||
var u = navigator.userAgent;
|
||||
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if(isiOS){
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
},
|
||||
/*allProcessed(){
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '恭喜您,您已经全部完成培训!现在您可以正常使用我们的app,请前往体验。',
|
||||
confirmButtonText: '前往',
|
||||
cancelButtonText: '稍后'
|
||||
})
|
||||
.then(() => {
|
||||
let data = {"action":"goBack","params":""}
|
||||
var u = navigator.userAgent;
|
||||
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if(isiOS){
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
console.log("全部处理")
|
||||
},*/
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/common.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/docment.scss";
|
||||
.status{
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
margin-right: 8px;
|
||||
text-align: right
|
||||
}
|
||||
.wrap{
|
||||
position: relative;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.poupCommon{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,.7);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.showPoupContainer{
|
||||
height: 310px;
|
||||
background-size: 320px 310px;
|
||||
.content{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.btnWrap{
|
||||
margin-top: 6px;
|
||||
}
|
||||
}
|
||||
.finishContainer{
|
||||
height: 260px;
|
||||
background-size: 320px 260px;
|
||||
.con{
|
||||
top: 80px !important;
|
||||
}
|
||||
}
|
||||
.container{
|
||||
width: 320px;
|
||||
background-image: url("@/assets/trainBg.png");
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
.con{
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
color: #3364B7;
|
||||
line-height: 26px;
|
||||
width: 70%;
|
||||
margin-left: 35px;
|
||||
text-align: center;
|
||||
}
|
||||
.content{
|
||||
width: 70%;
|
||||
height: 92px;
|
||||
font-size: 14px;
|
||||
color: #4C5361;
|
||||
line-height: 23px;
|
||||
text-align: justify;
|
||||
margin-top: 8px;
|
||||
margin-left: 35px;
|
||||
}
|
||||
.line{
|
||||
width: 285px;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #F1F2F5;
|
||||
}
|
||||
.btnWrap{
|
||||
width: 92%;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
.closeBtn{
|
||||
color: #999B9F;
|
||||
}
|
||||
.line{
|
||||
width: 1px;
|
||||
height: 48px;
|
||||
border-right: 1px solid #F1F2F5;
|
||||
}
|
||||
.nextBtn{
|
||||
color: #3364B7;
|
||||
}
|
||||
}
|
||||
}
|
||||
//.poupWrap{
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// background-color: rgba(0,0,0,.7);
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// .container{
|
||||
// width: 320px;
|
||||
// height: 310px;
|
||||
// background-image: url("@/assets/trainBg.png");
|
||||
// background-size: 320px 310px;
|
||||
// background-repeat: no-repeat;
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// bottom: 0;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// margin: auto;
|
||||
// .con{
|
||||
// position: absolute;
|
||||
// top: 100px;
|
||||
// left: 20px;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// .title{
|
||||
// font-weight: bold;
|
||||
// font-size: 19px;
|
||||
// color: #3364B7;
|
||||
// line-height: 26px;
|
||||
// width: 70%;
|
||||
// margin-left: 35px;
|
||||
// text-align: center;
|
||||
// }
|
||||
// .content{
|
||||
// width: 70%;
|
||||
// height: 92px;
|
||||
// font-size: 14px;
|
||||
// color: #4C5361;
|
||||
// line-height: 23px;
|
||||
// text-align: justify;
|
||||
// margin-top: 8px;
|
||||
// margin-bottom: 20px;
|
||||
// margin-left: 35px;
|
||||
// }
|
||||
// .line{
|
||||
// width: 285px;
|
||||
// height: 1px;
|
||||
// border-bottom: 1px solid #F1F2F5;
|
||||
// }
|
||||
// .btnWrap{
|
||||
// width: 92%;
|
||||
// font-weight: bold;
|
||||
// font-size: 13px;
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
// margin-top: 6px;
|
||||
// height: 40px;
|
||||
// line-height: 40px;
|
||||
// .closeBtn{
|
||||
// color: #999B9F;
|
||||
// }
|
||||
// .line{
|
||||
// width: 1px;
|
||||
// height: 48px;
|
||||
// border-right: 1px solid #F1F2F5;
|
||||
// }
|
||||
// .nextBtn{
|
||||
// color: #3364B7;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
</style>
|
@ -39,22 +39,20 @@
|
||||
<span class="titleLeft">结算类型:</span>
|
||||
<span class="content" >{{ orderInfo.settleType?.label }}</span>
|
||||
</div>
|
||||
<div class="item" >
|
||||
<div class="item">
|
||||
<span class="titleLeft">结算方式:</span>
|
||||
<div class="content" style="width: calc(100% - 84px);display: flex;justify-content: space-between;line-height: 27px" >
|
||||
<span>{{orderInfo.taskSettleType?.label}}</span>
|
||||
<!-- <span>包含公里数:15</span>-->
|
||||
<!-- <span>超出单价:6</span>-->
|
||||
</div>
|
||||
<span class="content" >{{orderInfo.taskSettleType?.label }}</span>
|
||||
<span class="driverPoiBtn" v-if="settleDetail.length>0" style="margin-left: 8px" @click="viewSettlementDoc">查看结算单</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">扣除责任险费:</span>
|
||||
<span class="content">{{orderInfo.policyAmount}} {{orderInfo.cutInsuranceAmount}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="leftTitle fontColor">工单照片:</span><span class="rightContent">
|
||||
<span class="leftTitle fontColor">工单照片:</span>
|
||||
<span class="rightContent">
|
||||
<span class="driverPoiBtn" @click="checkPhoto">查看照片</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="supplierData common" v-show="!auditFormShow">
|
||||
@ -210,7 +208,8 @@
|
||||
<div class="title" style="margin-bottom: 8px"> 备注:{{orderInfo.supplierRemark}}</div>
|
||||
<div class="title" style="margin-bottom: 8px"> 本次补充说明:</div>
|
||||
<div style="display: flex;margin-bottom: 5px">
|
||||
<img v-for="(item,index) in supplierPhotoList" :key="index" class="supplierImg" :src="item.url" @click="delSupplierPhoto(item)">
|
||||
<!-- @click="delSupplierPhoto(item) -->
|
||||
<img v-for="(item,index) in supplierPhotoList" :key="index" class="supplierImg" :src="item.url" @click="viewHandle(item)">
|
||||
</div>
|
||||
<div style="display: flex" >
|
||||
<van-uploader
|
||||
@ -226,7 +225,6 @@
|
||||
</table>
|
||||
</div>
|
||||
<van-dialog v-model="show" title="确定删除此照片吗" show-cancel-button @confirm="handleConfirm"></van-dialog>
|
||||
<!-- <two-common-btn v-show="auditFormShow" class="btn" title1="提交" title2="确定审核" @submitClick1="save" @submitClick="save" />-->
|
||||
<div class="btn" v-show="auditFormShow">
|
||||
<button v-if="orderInfo.checkCount < 3" :class="{'submit' : true,'loading' : loading}" @click="noMultipleClicks(save)">提交</button>
|
||||
<button v-if="accountStatus == 2 || accountStatus == 3" :class="{'submit' : true,'loading1' : loading1}" @click="noMultipleClicks(confirmAudit)" >确定审核</button>
|
||||
@ -243,7 +241,7 @@ import {
|
||||
selectRecordPictureList, deleteImage
|
||||
} from "@/api/mine"
|
||||
import { ImagePreview } from "vant";
|
||||
// import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||
import {orderReportingList} from "@/api/order";
|
||||
export default {
|
||||
name: "accountingView",
|
||||
mixins:[myMixins],
|
||||
@ -356,7 +354,8 @@ export default {
|
||||
},
|
||||
noClick:true,
|
||||
loading: false,
|
||||
loading1: false
|
||||
loading1: false,
|
||||
settleDetail:[],
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -366,6 +365,7 @@ export default {
|
||||
this.queryTime = this.$route.params?.queryTime
|
||||
this.$nextTick(async ()=>{
|
||||
await this.getDetail()
|
||||
await this.getSettlementDetail()
|
||||
})
|
||||
},
|
||||
computed:{
|
||||
@ -383,12 +383,20 @@ export default {
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
viewSettlementDoc(){//查看结算单
|
||||
this.$router.push({
|
||||
name:"settlementDetail",
|
||||
params:{
|
||||
id: this.id, // 参数对象的属性
|
||||
postfix:this.postfix,
|
||||
index:this.activeIndex,
|
||||
queryTime: this.time || this.queryTime,
|
||||
settleDetailList:this.settleDetail
|
||||
}
|
||||
})
|
||||
},
|
||||
checkPhoto(){
|
||||
let isAllowImage = 1
|
||||
console.log("this.orderInfo.userOrderId",this.orderInfo.userOrderId)
|
||||
console.log("this.orderInfo.orderCode",this.orderInfo.orderCode)
|
||||
console.log("this.orderInfo.taskOrderId",this.orderInfo.taskOrderId)
|
||||
console.log("isAllowImage",isAllowImage)
|
||||
let data = {
|
||||
"action": "orderPhoto",
|
||||
"params": {
|
||||
@ -416,12 +424,26 @@ export default {
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
});
|
||||
|
||||
},
|
||||
async getSettlementDetail(){
|
||||
let res = await orderReportingList({
|
||||
queryType:7,
|
||||
userOrderId:this.orderInfo.userOrderId,
|
||||
orderCode: this.orderInfo.orderCode,
|
||||
taskOrderId:this.orderInfo.taskOrderId,
|
||||
searchCostRemark:1
|
||||
})
|
||||
this.settleDetail=res.data
|
||||
console.log("工单列表接口res",this.settleDetail)
|
||||
},
|
||||
handleFileRead(file) {
|
||||
console.log("file",file)
|
||||
},
|
||||
viewHandle(i){
|
||||
console.log("ii",i)
|
||||
},
|
||||
goback(){
|
||||
// console.log("aaaaa",this.queryTime)
|
||||
this.$router.push({
|
||||
name:"workOrderReconciliation",
|
||||
params:{
|
||||
@ -449,8 +471,7 @@ export default {
|
||||
this.form.supplierBasePrice = dilemmaBasePrice
|
||||
this.form.supplierExtraPrice = 0
|
||||
this.form.supplierSettleAmount = dilemmaBasePrice - (parseFloat(this.form.supplierCustomerAmount) || 0)
|
||||
// console.log("困境案件费用总计",this.form.supplierSettleAmount)
|
||||
}else{
|
||||
}else{
|
||||
let data = await accountRecordCompute( {
|
||||
...this.form,
|
||||
settleType:this.orderInfo.settleType?.code
|
||||
@ -458,12 +479,10 @@ export default {
|
||||
this.form.supplierBasePrice = data.data.basePrice
|
||||
this.form.supplierExtraPrice = data.data.extraPrice
|
||||
this.form.supplierSettleAmount = data.data.totalPrice
|
||||
// console.log("计算",this.form.supplierSettleAmount)
|
||||
}
|
||||
// }
|
||||
if(this.form.cutInsuranceAmount == 1 && this.form.policyState === 0){
|
||||
this.form.supplierSettleAmount = parseFloat(parseFloat(this.form.supplierSettleAmount) - parseFloat(this.form.policyAmount || 0)).toFixed(2)
|
||||
// console.log("有责任险",this.form.supplierSettleAmount)
|
||||
}
|
||||
},
|
||||
async pictureList(){
|
||||
@ -785,16 +804,17 @@ export default {
|
||||
.rightContent{
|
||||
width: calc(100% - 90px);
|
||||
@include fontWeightSize(bold,12px);
|
||||
.driverPoiBtn{
|
||||
display: inline-block;
|
||||
padding: 3px 8px;
|
||||
@include bgFontColor(#FFFFFF,#354D93);
|
||||
opacity: .7;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
//margin-left: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
}
|
||||
.driverPoiBtn{
|
||||
display: inline-block;
|
||||
padding: 3px 8px;
|
||||
@include bgFontColor(#FFFFFF,#354D93);
|
||||
opacity: .7;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
//margin-left: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
img{
|
||||
|
@ -163,7 +163,6 @@ export default {
|
||||
this.postfix=this.$route.params?.postfix;
|
||||
this.index=this.$route.params?.index;
|
||||
this.queryTime = this.$route.params?.queryTime
|
||||
console.log("111111111111",this.$route.params?.queryTime)
|
||||
await this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
|
113
src/views/workOrder/settlementDetail.vue
Normal file
113
src/views/workOrder/settlementDetail.vue
Normal file
@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="结算单详情"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="goback"
|
||||
/>
|
||||
</div>
|
||||
<div class="baseInfo">
|
||||
<div class="itemWrap" v-for="(item,index) in settleDetailList" :key="index">{{item.remark}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
|
||||
export default {
|
||||
name: "settlementDetail",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
id:'',
|
||||
postfix:'',
|
||||
orderInfo:{},
|
||||
index:"",
|
||||
queryTime:'',//记录工单对账选择的时间
|
||||
settleDetailList:[]
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.id=this.$route.params?.id;
|
||||
this.postfix=this.$route.params?.postfix;
|
||||
this.index=this.$route.params?.index;
|
||||
this.queryTime = this.$route.params?.queryTime
|
||||
this.settleDetailList=this.$route.params?.settleDetailList
|
||||
console.log(" this.settleDetailList", this.settleDetailList)
|
||||
},
|
||||
methods: {
|
||||
goback(){
|
||||
this.$router.push({
|
||||
name:"accountingView",
|
||||
params:{
|
||||
id: this.id, // 参数对象的属性
|
||||
postfix:this.postfix,
|
||||
activeIndex:this.index,
|
||||
queryTime:this.queryTime
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
}
|
||||
.title{
|
||||
@include fontWeightSize(bold,14px);
|
||||
@include colorOpa(#323643,0.66);
|
||||
}
|
||||
.line{
|
||||
@include wh(100%,2px);
|
||||
opacity: 0.16;
|
||||
border-top: 1px solid;
|
||||
margin-top: 7px;
|
||||
border-image: linear-gradient(270deg, rgba(217, 217, 217, 0.6), rgba(178, 178, 178, 1), rgba(178, 178, 178, 1), rgba(217, 217, 217, 0.6)) 1 1;
|
||||
}
|
||||
.item{
|
||||
@include flexCenter;
|
||||
font-size: 12px !important;
|
||||
font-weight: 400 !important;
|
||||
.titleLeft{
|
||||
opacity: .5;
|
||||
line-height: 27px;
|
||||
}
|
||||
}
|
||||
.itemWrap{
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
img{
|
||||
@include wh(35px,15px);
|
||||
margin-left: 21px;
|
||||
}
|
||||
/*.common{
|
||||
background-color: #FFFFFF;
|
||||
padding: 11px 24px 14px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 10px;
|
||||
}*/
|
||||
.baseInfo{
|
||||
@include wh(100%,100%);
|
||||
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user