fix bug
This commit is contained in:
@ -407,7 +407,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
params: { dictKey: 'insure:packaged:goods' },
|
||||
containsAllLabel: false,
|
||||
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: '必填项' }];
|
||||
} else {
|
||||
return [];
|
||||
@ -421,7 +421,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
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: '必填项' }];
|
||||
} else {
|
||||
return [];
|
||||
@ -1383,7 +1383,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
// 计算保价费金额
|
||||
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 = {
|
||||
insuranceType,
|
||||
goodsValue: this.sf4.value.goodsValue,
|
||||
|
||||
Reference in New Issue
Block a user