This commit is contained in:
wangshiming
2022-03-04 15:08:30 +08:00
parent 05b878ddcd
commit 2c46fd77bd
9 changed files with 143 additions and 91 deletions

View File

@ -228,13 +228,15 @@
</ng-template>
</sf>
</nz-card>
<nz-card>
<div class="card-title">服务信息</div>
<div nz-row>
<div nz-col nzSpan="16">
<sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
<ng-template sf-template="freeInsurance" let-i let-ui="ui">
<ng-template sf-template="freeInsurance1" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template>
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template>
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template>
@ -243,10 +245,10 @@
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="3000000"
[nzMax]="2000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-3000000之间数值"
nzPlaceHolder="请输入50000-2000000之间数值"
></nz-input-number>
</div>
</ng-template>
@ -258,9 +260,10 @@
></span>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知</p>
<p>港澳台、西藏不在投保范围内,不予承保</p>
<p>保价费最低收费2元请按真实货值填写录入的所有信息必须确保真实不如实录入的内容不承担对应赔偿责任。</p>
<p>①请仔细阅读《投保告知函》;</p>
<p>香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保</p>
<p>最低保费12元/每单单次运输保额仅限200万元以内</p>
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
</ng-template>
</div>
</ng-template>

View File

@ -411,7 +411,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
properties: {
insuranceType: {
type: 'string',
title: '增值服务套餐',
title: '服务包',
ui: {
widget: 'select',
asyncData: () => {
@ -419,10 +419,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
map((res: any) => {
return [...res];
})
);
)
},
change: (tag: any, org: any) => {
this.getInsurersPrice(tag);
if(tag === '3'){
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
}else {
this.getInsurersPrice(tag);
}
}
},
default: '3'
@ -430,31 +435,39 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
type1: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'],
enum: ['资源曝光率 +10', '车源匹配率 +10'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema,
default: ['资源曝光率 +10', '车源匹配率 +10']
},
type2: {
type: 'string',
title: '',
enum: ['资源曝光率 +20', '车源匹配率 +20'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
default: ['资源曝光率 +20', '车源匹配率 +20']
},
type2: {
freeInsurance1: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '2' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
},
freeInsurance: {
type: 'string',
title: '赠送保险',
title: '赠送基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value !== '3' }
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '赠送综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
insurancePackagedGoods: {
@ -480,7 +493,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
title: '货物价值',
ui: {
widget: 'custom',
descriptionI18n: '输入50000-3000000之间数值',
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
},
@ -514,7 +526,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
$type2: {
grid: { span: 24 }
},
$freeInsurance: {
$freeInsurance1: {
grid: { span: 24 }
},
$freeInsurance2: {
grid: { span: 24 }
}
};
@ -1199,13 +1214,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
}
// 计算里程,时间
if (this.startInfo?.[0]?.area && this.endInfo?.[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); //计算保费金额
});
}
});
this.sf3data = {
@ -1314,14 +1330,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
default:
break;
}
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); //计算保费金额
});
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); //计算保费金额
});
}
}
});
}
@ -1365,7 +1381,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
});
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;