Compare commits
8 Commits
3438a7f9b3
...
a136eeff91
| Author | SHA1 | Date | |
|---|---|---|---|
| a136eeff91 | |||
| 9c2c57120b | |||
| f7b37f7a0b | |||
| f5c2d1687f | |||
| a56824ff73 | |||
| b33ecb5a1e | |||
| af9d7cdbf2 | |||
| 1834a1a838 |
@@ -8,7 +8,7 @@
|
|||||||
:border="false"
|
:border="false"
|
||||||
:fixed="true"
|
:fixed="true"
|
||||||
:safe-area-inset-top="true"
|
:safe-area-inset-top="true"
|
||||||
@click-left="h5GoBack"
|
@click-left="back"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="addContentWrap">
|
<div class="addContentWrap">
|
||||||
@@ -92,6 +92,57 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="lineBot" v-if="permissonList?.includes('hasInsuranceAudit')"></div>
|
||||||
|
<div class="itemContent" v-if="permissonList?.includes('hasInsuranceAudit')" style="align-items: center">
|
||||||
|
<div class="titleType" style="width: 60px">
|
||||||
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
|
<span>保费</span>
|
||||||
|
</div>
|
||||||
|
<van-field
|
||||||
|
type="number"
|
||||||
|
class="vanIpt"
|
||||||
|
v-model="liabilityInsuranceAmount"
|
||||||
|
input-align="right"
|
||||||
|
>
|
||||||
|
<template slot="right-icon" >
|
||||||
|
<span style="white-space: nowrap;">元</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</div>
|
||||||
|
<div class="lineBot"></div>
|
||||||
|
<div class="itemContent">
|
||||||
|
<div class="titleType">
|
||||||
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
|
<span>保额</span>
|
||||||
|
</div>
|
||||||
|
<div style="display:flex;align-items: center;justify-content: flex-end">
|
||||||
|
<el-select
|
||||||
|
v-model="liabilityInsuranceQuota"
|
||||||
|
value-key="name"
|
||||||
|
class="elSelect"
|
||||||
|
collapse-tags="collapse-tags"
|
||||||
|
placeholder="请选择" style="width: 55%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in liabilityQuotaOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.value"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select><span style="margin-right: 16px;opacity: .5;">万元</span>
|
||||||
|
</div>
|
||||||
|
<!-- <van-field
|
||||||
|
type="number"
|
||||||
|
class="vanIpt"
|
||||||
|
v-model="liabilityInsuranceQuota"
|
||||||
|
input-align="right"
|
||||||
|
>
|
||||||
|
<template slot="right-icon" >
|
||||||
|
<span style="white-space: nowrap;">万元 </span>
|
||||||
|
</template>
|
||||||
|
</van-field>-->
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<common-btn title="保存" @submitClick="submitBtn"/>
|
<common-btn title="保存" @submitClick="submitBtn"/>
|
||||||
<van-calendar v-model="showDatePicker" :min-date="minDate"
|
<van-calendar v-model="showDatePicker" :min-date="minDate"
|
||||||
@@ -104,7 +155,7 @@
|
|||||||
import {Dialog} from "vant";
|
import {Dialog} from "vant";
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {formatDate1} from "@/utils/common"
|
import {formatDate1} from "@/utils/common"
|
||||||
import { uploadImage, updateInsurance, getInfoById} from "@/api/mine"
|
import { uploadImage, updateInsurance, getInfoById,userOperationPermissions} from "@/api/mine"
|
||||||
import CommonBtn from "@/components/commonBtn.vue"
|
import CommonBtn from "@/components/commonBtn.vue"
|
||||||
export default {
|
export default {
|
||||||
name: "vehicleAdd",
|
name: "vehicleAdd",
|
||||||
@@ -115,6 +166,7 @@ export default {
|
|||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
},
|
},
|
||||||
|
liabilityQuotaOptions:[{value:10},{value:20},{value:30},{value:50},{value:70},{value:80},{value:100},{value:200}],
|
||||||
minDate: new Date(1970, 0, 1), // 设置最小可选日期(1970年1月1日)
|
minDate: new Date(1970, 0, 1), // 设置最小可选日期(1970年1月1日)
|
||||||
maxDate: new Date(2099, 11, 31), // 设置最大可选日期(2099年12月31日)
|
maxDate: new Date(2099, 11, 31), // 设置最大可选日期(2099年12月31日)
|
||||||
showDatePicker: false,
|
showDatePicker: false,
|
||||||
@@ -130,6 +182,9 @@ export default {
|
|||||||
insurancePicturePhoto: '', // 保单照片
|
insurancePicturePhoto: '', // 保单照片
|
||||||
isMultiple: false, // 是否支持多选
|
isMultiple: false, // 是否支持多选
|
||||||
insuranceCorp: '',
|
insuranceCorp: '',
|
||||||
|
liabilityInsuranceAmount:'',
|
||||||
|
liabilityInsuranceQuota:'',
|
||||||
|
permissonList:[],
|
||||||
insuranceOptions: [{
|
insuranceOptions: [{
|
||||||
name: '太平洋',
|
name: '太平洋',
|
||||||
value: 1
|
value: 1
|
||||||
@@ -183,11 +238,24 @@ export default {
|
|||||||
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.id=this.$route.params?.id
|
this.id=this.$route.params?.id
|
||||||
|
await this.getPermissions()
|
||||||
if( this.id){
|
if( this.id){
|
||||||
// await this.vehicleInfo()
|
// await this.vehicleInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
back() {
|
||||||
|
this.$router.push({
|
||||||
|
name:'vehicleAdd',
|
||||||
|
params:{
|
||||||
|
id: this.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getPermissions(){
|
||||||
|
let res = await userOperationPermissions();
|
||||||
|
this.permissonList = res.data
|
||||||
|
},
|
||||||
async vehicleInfo(){
|
async vehicleInfo(){
|
||||||
let res= await getInfoById({
|
let res= await getInfoById({
|
||||||
vehicleId:this.id
|
vehicleId:this.id
|
||||||
@@ -259,6 +327,14 @@ export default {
|
|||||||
this.$toast('保单有效期不能为空')
|
this.$toast('保单有效期不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(this.hasLiabilityInsurance == 1 && this.permissonList?.includes('hasInsuranceAudit') && !this.liabilityInsuranceAmount && this.liabilityInsuranceAmount!=0){
|
||||||
|
this.$toast('保费不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.hasLiabilityInsurance == 1 && !this.liabilityInsuranceQuota){
|
||||||
|
this.$toast('保额不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
let timeObj;
|
let timeObj;
|
||||||
if(this.dateVal) {
|
if(this.dateVal) {
|
||||||
timeObj = this.formatDateTimeRange(this.dateVal)
|
timeObj = this.formatDateTimeRange(this.dateVal)
|
||||||
@@ -271,6 +347,8 @@ export default {
|
|||||||
insuranceCorp: this.hasLiabilityInsurance == 1 ? this.insuranceCorp : '',
|
insuranceCorp: this.hasLiabilityInsurance == 1 ? this.insuranceCorp : '',
|
||||||
liabilityInsuranceStartTime: this.hasLiabilityInsurance == 1 ? (timeObj?.startTime || '' ) : '',
|
liabilityInsuranceStartTime: this.hasLiabilityInsurance == 1 ? (timeObj?.startTime || '' ) : '',
|
||||||
liabilityInsuranceEndTime: this.hasLiabilityInsurance == 1 ? (timeObj?.endTime || '') : '',
|
liabilityInsuranceEndTime: this.hasLiabilityInsurance == 1 ? (timeObj?.endTime || '') : '',
|
||||||
|
liabilityInsuranceQuota:this.liabilityInsuranceQuota || '',
|
||||||
|
liabilityInsuranceAmount:this.liabilityInsuranceAmount || '',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
await updateInsurance(params)
|
await updateInsurance(params)
|
||||||
@@ -280,7 +358,8 @@ export default {
|
|||||||
this.$toast('添加成功')
|
this.$toast('添加成功')
|
||||||
}
|
}
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.$router.back();
|
// this.$router.back();
|
||||||
|
this.back()
|
||||||
},2000)
|
},2000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
:border="false"
|
:border="false"
|
||||||
:fixed="true"
|
:fixed="true"
|
||||||
:safe-area-inset-top="true"
|
:safe-area-inset-top="true"
|
||||||
@click-left="h5GoBack"
|
@click-left="back"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="addContentWrap">
|
<div class="addContentWrap">
|
||||||
@@ -311,9 +311,83 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="lineBot" v-if="permissonList?.includes('hasInsuranceAudit')"></div>
|
||||||
|
<div class="itemContent" v-if="permissonList?.includes('hasInsuranceAudit')">
|
||||||
|
<div class="titleType">
|
||||||
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
|
<span>保费</span>
|
||||||
|
</div>
|
||||||
|
<van-field
|
||||||
|
type="number"
|
||||||
|
class="vanIpt"
|
||||||
|
v-model="liabilityInsuranceAmount"
|
||||||
|
input-align="right"
|
||||||
|
>
|
||||||
|
<template slot="right-icon" >
|
||||||
|
<span style="white-space: nowrap;">元</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</div>
|
||||||
|
<div class="lineBot"></div>
|
||||||
|
<div class="itemContent">
|
||||||
|
<div class="titleType">
|
||||||
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
|
<span>保额</span>
|
||||||
|
</div>
|
||||||
|
<div style="display:flex;align-items: center;justify-content: flex-end">
|
||||||
|
<el-select
|
||||||
|
v-model="liabilityInsuranceQuota"
|
||||||
|
value-key="name"
|
||||||
|
class="elSelect"
|
||||||
|
collapse-tags="collapse-tags"
|
||||||
|
placeholder="请选择" style="width: 55%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in liabilityQuotaOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.value"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select><span style="margin-right: 16px;opacity: .5;">万元</span>
|
||||||
|
</div>
|
||||||
|
<!-- <van-field
|
||||||
|
type="number"
|
||||||
|
class="vanIpt"
|
||||||
|
v-model="liabilityInsuranceQuota"
|
||||||
|
input-align="right"
|
||||||
|
>
|
||||||
|
<template slot="right-icon" >
|
||||||
|
<span style="white-space: nowrap;">万元 </span>
|
||||||
|
</template>
|
||||||
|
</van-field>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="lineBot"></div>
|
||||||
|
<div class="itemContent">
|
||||||
|
<div class="titleType">
|
||||||
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
|
<span>保单号(救援)</span>
|
||||||
|
</div>
|
||||||
|
<van-field
|
||||||
|
class="vanIpt"
|
||||||
|
style="width: 72%"
|
||||||
|
v-model="insuranceCode"
|
||||||
|
input-align="right"
|
||||||
|
> </van-field>
|
||||||
|
</div>
|
||||||
|
<div class="lineBot"></div>
|
||||||
|
<div class="itemContent">
|
||||||
|
<div class="titleType"> <span>保单号(中道物流)</span> </div>
|
||||||
|
<van-field
|
||||||
|
class="vanIpt"
|
||||||
|
style="width: 65%"
|
||||||
|
v-model="insuranceCodeZd"
|
||||||
|
input-align="right"
|
||||||
|
> </van-field>
|
||||||
|
</div>
|
||||||
|
<div class="lineBot"></div>-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<div class="itemContent">
|
<div class="itemContent">
|
||||||
<div class="titleType">
|
<div class="titleType">
|
||||||
<img class="startImg" src="@/assets/start.png" />
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
@@ -344,7 +418,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
<two-common-btn class="btn" @cancelClick="h5GoBack" @submitClick="submitBtn" />
|
<two-common-btn class="btn" @cancelClick="back" @submitClick="submitBtn" />
|
||||||
<van-calendar v-model="showDatePicker" :min-date="minDate"
|
<van-calendar v-model="showDatePicker" :min-date="minDate"
|
||||||
:max-date="maxDate" type="range" @confirm="onConfirm" />
|
:max-date="maxDate" type="range" @confirm="onConfirm" />
|
||||||
|
|
||||||
@@ -540,6 +614,7 @@ export default {
|
|||||||
name: '其他',
|
name: '其他',
|
||||||
value: 14
|
value: 14
|
||||||
}],
|
}],
|
||||||
|
liabilityQuotaOptions:[{value:10},{value:20},{value:30},{value:50},{value:70},{value:80},{value:100},{value:200}],
|
||||||
approvalForm:{
|
approvalForm:{
|
||||||
type:2,
|
type:2,
|
||||||
supplierId:'',
|
supplierId:'',
|
||||||
@@ -557,7 +632,10 @@ export default {
|
|||||||
vehicleInfoChange:false,
|
vehicleInfoChange:false,
|
||||||
insuranceChange:false,
|
insuranceChange:false,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
liabilityInsuranceAmount:'',
|
||||||
|
liabilityInsuranceQuota:'',
|
||||||
|
insuranceCode:'',
|
||||||
|
insuranceCodeZd:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -952,7 +1030,7 @@ export default {
|
|||||||
isVehicleChange(e) {
|
isVehicleChange(e) {
|
||||||
this.vehicleStatus=e
|
this.vehicleStatus=e
|
||||||
},
|
},
|
||||||
async submitAuditHandle(){//提交审核
|
/* async submitAuditHandle(){//提交审核
|
||||||
let urls=[]
|
let urls=[]
|
||||||
this.insurancePictureFiles?.forEach(item => urls.push(item.url))
|
this.insurancePictureFiles?.forEach(item => urls.push(item.url))
|
||||||
let time =this.dateVal ? this.formatDateTimeRange(this.dateVal) : ''
|
let time =this.dateVal ? this.formatDateTimeRange(this.dateVal) : ''
|
||||||
@@ -1030,7 +1108,7 @@ export default {
|
|||||||
this.approvalDialogShow=false
|
this.approvalDialogShow=false
|
||||||
await this.submitBtn();
|
await this.submitBtn();
|
||||||
}
|
}
|
||||||
},
|
},*/
|
||||||
async submitApprovalHandle(){//提交审批-走接口
|
async submitApprovalHandle(){//提交审批-走接口
|
||||||
if(this.vehicleInfoChange){
|
if(this.vehicleInfoChange){
|
||||||
if(!(this.selectedOption.length > 0)){
|
if(!(this.selectedOption.length > 0)){
|
||||||
@@ -1133,6 +1211,14 @@ export default {
|
|||||||
this.vehicleInfoChange=false
|
this.vehicleInfoChange=false
|
||||||
this.insuranceChange=false
|
this.insuranceChange=false
|
||||||
},
|
},
|
||||||
|
back() {
|
||||||
|
this.$router.push({
|
||||||
|
name:'vehicleManage',
|
||||||
|
params:{
|
||||||
|
id: this.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
async submitBtn(){
|
async submitBtn(){
|
||||||
if( !this.vehicleLicenseFront ) {
|
if( !this.vehicleLicenseFront ) {
|
||||||
this.$toast('行驶证主页照片不能为空')
|
this.$toast('行驶证主页照片不能为空')
|
||||||
@@ -1194,12 +1280,26 @@ export default {
|
|||||||
this.$toast('保单有效期不能为空')
|
this.$toast('保单有效期不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if( this.hasLiabilityInsurance == 1){
|
||||||
|
if(this.permissonList.includes('hasInsuranceAudit') && !this.liabilityInsuranceAmount && this.liabilityInsuranceAmount!=0){
|
||||||
|
this.$toast('保费不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(!this.liabilityInsuranceQuota){
|
||||||
|
this.$toast('保额不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
/* if(!this.insuranceCode){
|
||||||
|
this.$toast('保单号(救援)不能为空')
|
||||||
|
return
|
||||||
|
}*/
|
||||||
|
}
|
||||||
let timeObj;
|
let timeObj;
|
||||||
if(this.dateVal) {
|
if(this.dateVal) {
|
||||||
timeObj = this.formatDateTimeRange(this.dateVal)
|
timeObj = this.formatDateTimeRange(this.dateVal)
|
||||||
}
|
}
|
||||||
this.serviceIds = this.$refs.tree.getCheckedKeys(true)
|
this.serviceIds = this.$refs.tree.getCheckedKeys(true)
|
||||||
console.log('1122',this.vehicleStatus)
|
// console.log('1122',this.vehicleStatus)
|
||||||
// return
|
// return
|
||||||
await saveVehicle({
|
await saveVehicle({
|
||||||
vehicleId:this.id ? this.id : '',
|
vehicleId:this.id ? this.id : '',
|
||||||
@@ -1221,7 +1321,11 @@ export default {
|
|||||||
liabilityInsuranceEndTime: this.hasLiabilityInsurance == 1 ? (timeObj?.endTime || '') : '',
|
liabilityInsuranceEndTime: this.hasLiabilityInsurance == 1 ? (timeObj?.endTime || '') : '',
|
||||||
virtualVehicle: this.virtualVehicle,
|
virtualVehicle: this.virtualVehicle,
|
||||||
canSubmitApproval:true,
|
canSubmitApproval:true,
|
||||||
vehicleStatus:this.vehicleStatus
|
vehicleStatus:this.vehicleStatus,
|
||||||
|
liabilityInsuranceAmount:this.liabilityInsuranceAmount,
|
||||||
|
liabilityInsuranceQuota:this.liabilityInsuranceQuota,
|
||||||
|
insuranceCode:this.insuranceCode,
|
||||||
|
insuranceCodeZd:this.insuranceCodeZd,
|
||||||
})
|
})
|
||||||
if(this.id){
|
if(this.id){
|
||||||
this.$toast('修改成功')
|
this.$toast('修改成功')
|
||||||
@@ -1427,4 +1531,12 @@ export default {
|
|||||||
transform: translate(-50%, -50%) rotate(360deg);
|
transform: translate(-50%, -50%) rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.vanIpt{
|
||||||
|
width: 80%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.vanIpt1{
|
||||||
|
width: 72%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user