This commit is contained in:
wangshiming
2022-03-08 14:38:12 +08:00
parent cc2dc19a3d
commit 83deb7c465
2 changed files with 10 additions and 8 deletions

View File

@ -407,7 +407,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
params: { dictKey: 'insure:packaged:goods' }, params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false, containsAllLabel: false,
validator: val => { validator: val => {
if (this.sf5.value?.insuranceType !=='3' && this.isEmpty(val)) { if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }]; return [{ keyword: 'required', message: '必填项' }];
} else { } else {
return []; return [];
@ -421,7 +421,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: { ui: {
widget: 'custom', widget: 'custom',
validator: val => { validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }]; return [{ keyword: 'required', message: '必填项' }];
} else { } else {
return []; return [];
@ -1383,7 +1383,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
// 计算保价费金额 // 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) { if ( this.sf5.value?.insuranceType !=='3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0 ) {
const params = { const params = {
insuranceType, insuranceType,
goodsValue: this.sf4.value.goodsValue, goodsValue: this.sf4.value.goodsValue,

View File

@ -156,13 +156,15 @@
<nz-card nzTitle="服务信息"> <nz-card nzTitle="服务信息">
<sv-container> <sv-container>
<sv label="增值服务套餐"> <sv label="服务包">
{{ i?.insuranceTypeLabel }} {{ i?.insuranceTypeLabel}}
</sv> </sv>
<sv label="货物价值" *ngIf="i?.insuranceType !== '3'"> <sv label="货物价值">
{{ i?.goodsValue | currency }} {{i?.goodsValue !==null?(i?.goodsValue|currency)+'元':'-'}}
</sv>
<sv label="保价费金额">
{{i?.insurancePremium!==null?(i?.insurancePremium |currency)+'元':'-'}}
</sv> </sv>
<sv label="保价费金额" *ngIf="i?.insuranceType !== '3'"> {{ i?.insurancePremium | currency }} 元 </sv>
</sv-container> </sv-container>
</nz-card> </nz-card>
<nz-card [nzTitle]="'运费信息到货后' + i?.paymentDays + '天内支付运费'"> <nz-card [nzTitle]="'运费信息到货后' + i?.paymentDays + '天内支付运费'">