This commit is contained in:
Taric Xin
2022-04-12 16:58:00 +08:00
parent 7178081da8
commit 82217dfc7b

View File

@ -436,13 +436,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
map((res: any) => { map((res: any) => {
return [...res]; return [...res];
}) })
) );
}, },
change: (tag: any, org: any) => { change: (tag: any, org: any) => {
if(tag === '3'){ if (tag === '3') {
this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null); this.sf5.setValue('/insuranceRate', null);
}else { } else {
this.getInsurersPrice(tag); this.getInsurersPrice(tag);
} }
} }
@ -455,7 +455,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
ui: { ui: {
widget: 'custom', widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' } visibleIf: { insuranceType: (value: string) => value === '0' }
} , }
}, },
type2: { type2: {
type: 'string', type: 'string',
@ -468,7 +468,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
insurancePremium: { insurancePremium: {
type: 'string', type: 'string',
title: '服务包费用', title: '服务包费用',
readOnly:true, readOnly: true,
ui: { ui: {
visibleIf: { insuranceType: (value: string) => value !== '3' } visibleIf: { insuranceType: (value: string) => value !== '3' }
} }
@ -495,9 +495,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
widget: 'custom', widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' } visibleIf: { insuranceType: (value: string) => value === '1' }
} }
}
}, },
}, required: ['insurancePremium']
required: [ 'insurancePremium']
}; };
this.ui5 = { this.ui5 = {
'*': { '*': {
@ -562,8 +562,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
receiptUserPhone: { receiptUserPhone: {
type: 'string', type: 'string',
title: '联系电话', title: '联系电话',
format: 'mobile',
maxLength: 11, maxLength: 11,
ui: { ui: {
errors: {
format: '请输入正确联系电话格式'
},
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
@ -955,8 +959,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
...this.sf6.value, ...this.sf6.value,
expenseDTOList: expenseList, expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays, paymentDays: this.sf7.value.paymentDays,
subtotal :this.sf7.value.subtotal, subtotal: this.sf7.value.subtotal,
total:this.sf7.value.total, total: this.sf7.value.total,
estimatedKilometers: this.totalDistance, estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime, estimatedTravelTime: this.totalTime,
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
@ -999,7 +1003,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
nzContent: AmapPoiPickerComponent, nzContent: AmapPoiPickerComponent,
nzWidth: 900, nzWidth: 900,
nzOnOk: item => { nzOnOk: item => {
if(item?.poi) { if (item?.poi) {
const poi = item.poi; const poi = item.poi;
const locList = poi.pois; const locList = poi.pois;
switch (type) { switch (type) {
@ -1030,10 +1034,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.getInsurersPrice(); // 计算保费金额 this.getInsurersPrice(); // 计算保费金额
}); });
} }
return true return true;
} else { } else {
this.service.msgSrv.warning('请重新手动选择地址!') this.service.msgSrv.warning('请重新手动选择地址!');
return false return false;
} }
} }
}); });
@ -1211,13 +1215,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
} }
// 运费信息价格变更 // 运费信息价格变更
priceChange(event:any, i:any){ priceChange(event: any, i: any) {
i.setValue(event); i.setValue(event);
if(event>=99999){ if (event >= 99999) {
this.modalService.warning({ this.modalService.warning({
nzTitle: '可输入的最大金额为99999元', nzTitle: '可输入的最大金额为99999元'
}); });
} }
this.payChange() this.payChange();
} }
} }