|
|
@@ -966,7 +966,7 @@
|
|
|
<el-select clearable v-model="accidentForm.accidentType" placeholder="选择类型" @clear="clearAccidentForm"
|
|
|
@change="ywxxxchange">
|
|
|
<el-option v-for="(item, index) in accidentDataList" :key="index" :label="item.name"
|
|
|
- :value="item.id"></el-option>
|
|
|
+ :value="item.code"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="份数:" style="margin-right:30px;">
|
|
|
@@ -3723,17 +3723,28 @@ export default {
|
|
|
},
|
|
|
// 选择意外险类型
|
|
|
async ywxxxchange(index) {
|
|
|
+ if(!index){
|
|
|
+ return
|
|
|
+ }
|
|
|
this.accidentForm = Object.assign(
|
|
|
this.accidentForm,
|
|
|
- this.accidentDataList.find(val => val.id == index)
|
|
|
+ this.accidentDataList.find(val => val.code == index)
|
|
|
);
|
|
|
this.accidentForm.fen = "1";
|
|
|
- this.accidentPremium = this.accidentForm.premium;
|
|
|
this.accidentLoading = true;
|
|
|
let data = await this.$api.letter.ycgainAccidentSchemeList({
|
|
|
- accidentId: index
|
|
|
+ companyCode:this.accidentForm.companyId,
|
|
|
+ code:index,
|
|
|
+ agreementId:this.accidentForm.agreementId,
|
|
|
+ seatNum:Number(this.carInfo.seatCount)
|
|
|
});
|
|
|
if (data.code == 200) {
|
|
|
+ let num = 0;
|
|
|
+ data.data.forEach(item => {
|
|
|
+ num += Number(item.premium);
|
|
|
+ });
|
|
|
+ this.accidentPremium = num
|
|
|
+ this.accidentForm.premium = num
|
|
|
this.accidentLoading = false;
|
|
|
this.accidenttableData = data.data;
|
|
|
}
|
|
|
@@ -3839,7 +3850,7 @@ export default {
|
|
|
switch (item.namesimple) {
|
|
|
case '永诚财险':
|
|
|
this.accidentForm.agreementId = item.agreementId
|
|
|
- this.$api.letter.ycgainAccidentList({ companyCode: item.id, agreementId: item.agreementId }).then(res => {
|
|
|
+ this.$api.letter.ycgainAccidentList({ companyCode: item.id, agreementId: item.agreementId,seatNum: Number(this.carInfo.seatCount) }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.accidentDataList = res.data;
|
|
|
}
|
|
|
@@ -3964,7 +3975,7 @@ export default {
|
|
|
switch (ins) {
|
|
|
case '永诚财险':
|
|
|
this.accidentForm.agreementId = this.totalCompanyList[index].agreement[0].id;
|
|
|
- this.$api.letter.ycgainAccidentList({ companyCode: this.totalCompanyList[index].id, agreementId: this.totalCompanyList[index].agreement[0].id }).then(res => {
|
|
|
+ this.$api.letter.ycgainAccidentList({ companyCode: this.totalCompanyList[index].id, agreementId: this.totalCompanyList[index].agreement[0].id,seatNum: Number(this.carInfo.seatCount) }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.accidentDataList = res.data;
|
|
|
}
|
|
|
@@ -4029,10 +4040,8 @@ export default {
|
|
|
|
|
|
},
|
|
|
clearAccidentForm() {
|
|
|
- this.accidentForm = {
|
|
|
- fen: "1",
|
|
|
- premium:0
|
|
|
- };
|
|
|
+ this.accidentForm.fen=1
|
|
|
+ this.accidentForm.premium=0
|
|
|
},
|
|
|
clearAccidentFormHB(){
|
|
|
this.hengbangaccidentalDrivingVo={};
|
|
|
@@ -4693,16 +4702,15 @@ export default {
|
|
|
this.iscCrownerShow=false
|
|
|
this.isInsuredShow=false
|
|
|
this.isApplicantShow=false
|
|
|
-
|
|
|
let accidentalDrivingVo = {};
|
|
|
- if (this.accidentForm.id) {
|
|
|
+ if (this.accidentForm.code) {
|
|
|
let data = this.accidentDataList.find(
|
|
|
- val => val.id == this.accidentForm.accidentType
|
|
|
+ val => val.code == this.accidentForm.accidentType
|
|
|
);
|
|
|
accidentalDrivingVo = {
|
|
|
rideRiskCode: data.code ? data.code : "",
|
|
|
rideRiskName: data.name ? data.name : "",
|
|
|
- quantity: this.accidentForm.fen ? this.accidentForm.fen : ""
|
|
|
+ quantity: this.accidentForm.fen ? this.accidentForm.fen : "",
|
|
|
};
|
|
|
}
|
|
|
let params = {
|