Compare commits
8 Commits
dev-2026
...
3438a7f9b3
| Author | SHA1 | Date | |
|---|---|---|---|
| 3438a7f9b3 | |||
| edbc60d3f3 | |||
| 914249cc3a | |||
| 1217b7671c | |||
| bd3e358ec7 | |||
| 9788542b38 | |||
| 65a53ab267 | |||
| 0f70e55e66 |
@@ -8,7 +8,7 @@
|
|||||||
:border="false"
|
:border="false"
|
||||||
:fixed="true"
|
:fixed="true"
|
||||||
:safe-area-inset-top="true"
|
:safe-area-inset-top="true"
|
||||||
@click-left="back"
|
@click-left="h5GoBack"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="addContentWrap">
|
<div class="addContentWrap">
|
||||||
@@ -92,57 +92,6 @@
|
|||||||
</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"
|
||||||
@@ -155,7 +104,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,userOperationPermissions} from "@/api/mine"
|
import { uploadImage, updateInsurance, getInfoById} from "@/api/mine"
|
||||||
import CommonBtn from "@/components/commonBtn.vue"
|
import CommonBtn from "@/components/commonBtn.vue"
|
||||||
export default {
|
export default {
|
||||||
name: "vehicleAdd",
|
name: "vehicleAdd",
|
||||||
@@ -166,7 +115,6 @@ 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,
|
||||||
@@ -182,9 +130,6 @@ export default {
|
|||||||
insurancePicturePhoto: '', // 保单照片
|
insurancePicturePhoto: '', // 保单照片
|
||||||
isMultiple: false, // 是否支持多选
|
isMultiple: false, // 是否支持多选
|
||||||
insuranceCorp: '',
|
insuranceCorp: '',
|
||||||
liabilityInsuranceAmount:'',
|
|
||||||
liabilityInsuranceQuota:'',
|
|
||||||
permissonList:[],
|
|
||||||
insuranceOptions: [{
|
insuranceOptions: [{
|
||||||
name: '太平洋',
|
name: '太平洋',
|
||||||
value: 1
|
value: 1
|
||||||
@@ -238,24 +183,11 @@ 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
|
||||||
@@ -327,14 +259,6 @@ 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)
|
||||||
@@ -347,8 +271,6 @@ 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)
|
||||||
@@ -358,8 +280,7 @@ 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="back"
|
@click-left="h5GoBack"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="addContentWrap">
|
<div class="addContentWrap">
|
||||||
@@ -311,83 +311,9 @@
|
|||||||
</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>
|
</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>
|
|
||||||
<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" />
|
||||||
@@ -418,7 +344,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
<two-common-btn class="btn" @cancelClick="back" @submitClick="submitBtn" />
|
<two-common-btn class="btn" @cancelClick="h5GoBack" @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" />
|
||||||
|
|
||||||
@@ -614,7 +540,6 @@ 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:'',
|
||||||
@@ -632,10 +557,7 @@ export default {
|
|||||||
vehicleInfoChange:false,
|
vehicleInfoChange:false,
|
||||||
insuranceChange:false,
|
insuranceChange:false,
|
||||||
loading: false,
|
loading: false,
|
||||||
liabilityInsuranceAmount:'',
|
|
||||||
liabilityInsuranceQuota:'',
|
|
||||||
insuranceCode:'',
|
|
||||||
insuranceCodeZd:'',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -1030,7 +952,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) : ''
|
||||||
@@ -1108,7 +1030,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)){
|
||||||
@@ -1211,14 +1133,6 @@ 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('行驶证主页照片不能为空')
|
||||||
@@ -1280,26 +1194,12 @@ 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 : '',
|
||||||
@@ -1321,11 +1221,7 @@ 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('修改成功')
|
||||||
@@ -1531,12 +1427,4 @@ 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