This commit is contained in:
wangshiming
2022-03-31 13:43:43 +08:00
parent 98926ea2cc
commit a1b294eb8a
4 changed files with 114 additions and 154 deletions

View File

@ -436,14 +436,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
map((res: any) => {
return [...res];
})
);
)
},
change: (tag: any, org: any) => {
if (tag === '3') {
if(tag === '3'){
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
} else {
console.log(tag);
}else {
this.getInsurersPrice(tag);
}
}
@ -453,29 +452,23 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
type1: {
type: 'string',
title: '',
enum: ['货源曝光率 +10', '车源匹配率 +10'],
readOnly: true,
ui: {
widget: 'checkbox',
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema,
default: ['货源曝光率 +10', '车源匹配率 +10']
} ,
},
type2: {
type: 'string',
title: '',
enum: ['货源曝光率 +20', '车源匹配率 +20'],
readOnly: true,
ui: {
widget: 'checkbox',
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema,
default: ['货源曝光率 +20', '车源匹配率 +20']
}
},
insurancePremium: {
type: 'string',
title: '服务包费用',
readOnly: true,
readOnly:true,
ui: {
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
@ -502,9 +495,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
}
},
},
required: ['insurancePremium']
required: [ 'insurancePremium']
};
this.ui5 = {
'*': {
@ -962,6 +955,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
...this.sf6.value,
expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays,
subtotal :this.sf7.value.subtotal,
total:this.sf7.value.total,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
@ -1192,7 +1187,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) {
console.log(insuranceType);
console.log(this.totalDistance);
if (insuranceType !== '3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0) {
if (insuranceType !== '3' && this.totalDistance > 0) {
const params = {
insuranceType,
goodsValue: this.sf4.value.goodsValue,
@ -1209,4 +1204,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
});
}
}
// 运费信息价格变更
priceChange(event:any, i:any){
i.setValue(event);
if(event>=99999){
this.modalService.warning({
nzTitle: '可输入的最大金额为99999元',
});
}
this.payChange()
}
}