fix bug
This commit is contained in:
		| @ -768,20 +768,20 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|     // 货物核载信息最大值 | ||||
|     // 货物运输费(小计)最大值 | ||||
|     const getlimitvaluesParms = [ | ||||
|       this.service.limitKeys.weight, | ||||
|       this.service.limitKeys.volume, | ||||
|       this.service.limitKeys.piece, | ||||
|       this.service.limitKeys.maxDays, | ||||
|       this.service.limitKeys.intervalDays, | ||||
|       this.service.limitKeys.maxTimes | ||||
|       this.service?.limitKeys?.weight, | ||||
|       this.service?.limitKeys?.volume, | ||||
|       this.service?.limitKeys?.piece, | ||||
|       this.service?.limitKeys?.maxDays, | ||||
|       this.service?.limitKeys?.intervalDays, | ||||
|       this.service?.limitKeys?.maxTimes | ||||
|     ]; | ||||
|     this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => { | ||||
|       const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue; | ||||
|       const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue; | ||||
|       const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue; | ||||
|       const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxDays)[0].itemValue; | ||||
|       const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.intervalDays)[0].itemValue; | ||||
|       const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0].itemValue; | ||||
|       const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys?.weight)[0].itemValue; | ||||
|       const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys?.volume)[0].itemValue; | ||||
|       const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys?.piece)[0].itemValue; | ||||
|       const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys?.maxDays)[0].itemValue; | ||||
|       const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys?.intervalDays)[0].itemValue; | ||||
|       const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys?.maxTimes)[0].itemValue; | ||||
|       this.limitValues = { | ||||
|         maxWeight: Number(maxWeight), | ||||
|         maxVolume: Number(maxVolume), | ||||
| @ -912,16 +912,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|     } | ||||
|     const num = (Number(this.validateForm1.value.unloadingTime) - Number(this.validateForm1.value.loadingTime)) / (24 * 60 * 60 * 1000); | ||||
|     if (num > this.limitValues.maxDays) { | ||||
|       this.service.msgSrv.error(`当前计划装卸货时间间隔已超出限定值【${this.limitValues.maxDays}天】`); | ||||
|       this.service.msgSrv.error(`当前计划装卸货时间间隔已超出限定值【${this.limitValues?.maxDays}天】`); | ||||
|       return; | ||||
|     } | ||||
|     if ( | ||||
|       this.sf4.value.weight > this.limitValues.maxWeight || | ||||
|       this.sf4.value.volume > this.limitValues.maxVolume || | ||||
|       this.sf4.value.number > this.limitValues.maxPiece | ||||
|       this.sf4.value?.weight > this.limitValues?.maxWeight || | ||||
|       this.sf4.value?.volume > this.limitValues?.maxVolume || | ||||
|       this.sf4.value?.number > this.limitValues?.maxPiece | ||||
|     ) { | ||||
|       this.service.msgSrv.error( | ||||
|         `当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】` | ||||
|         `当前货物核载信息已超出限定值【${this.limitValues?.maxWeight}吨、${this.limitValues?.maxVolume}方、${this.limitValues?.maxPiece}件】` | ||||
|       ); | ||||
|       return; | ||||
|     } | ||||
|  | ||||
| @ -662,20 +662,20 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|     // 货物核载信息最大值 | ||||
|     // 货物运输费(小计)最大值 | ||||
|     const getlimitvaluesParms = [ | ||||
|       this.service.limitKeys.weight, | ||||
|       this.service.limitKeys.volume, | ||||
|       this.service.limitKeys.piece, | ||||
|       this.service.limitKeys.maxDays, | ||||
|       this.service.limitKeys.intervalDays, | ||||
|       this.service.limitKeys.maxTimes | ||||
|       this.service.limitKeys?.weight, | ||||
|       this.service.limitKeys?.volume, | ||||
|       this.service.limitKeys?.piece, | ||||
|       this.service.limitKeys?.maxDays, | ||||
|       this.service.limitKeys?.intervalDays, | ||||
|       this.service.limitKeys?.maxTimes | ||||
|     ]; | ||||
|     this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => { | ||||
|       const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue; | ||||
|       const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue; | ||||
|       const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue; | ||||
|       const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxDays)[0].itemValue; | ||||
|       const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.intervalDays)[0].itemValue; | ||||
|       const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0].itemValue; | ||||
|       const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys?.weight)[0].itemValue; | ||||
|       const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys?.volume)[0].itemValue; | ||||
|       const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys?.piece)[0].itemValue; | ||||
|       const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys?.maxDays)[0].itemValue; | ||||
|       const intervalDays = res.filter((item: any) => item.itemKey === this.service?.limitKeys?.intervalDays)[0].itemValue; | ||||
|       const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0]?.itemValue; | ||||
|       this.limitValues = { | ||||
|         maxWeight: Number(maxWeight), | ||||
|         maxVolume: Number(maxVolume), | ||||
| @ -871,12 +871,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|       return; | ||||
|     } | ||||
|     if ( | ||||
|       this.sf4.value.weight > this.limitValues.maxWeight || | ||||
|       this.sf4.value.volume > this.limitValues.maxVolume || | ||||
|       this.sf4.value.number > this.limitValues.maxPiece | ||||
|       this.sf4.value?.weight > this.limitValues?.maxWeight || | ||||
|       this.sf4.value?.volume > this.limitValues?.maxVolume || | ||||
|       this.sf4.value?.number > this.limitValues?.maxPiece | ||||
|     ) { | ||||
|       this.service.msgSrv.error( | ||||
|         `当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】` | ||||
|         `当前货物核载信息已超出限定值【${this.limitValues?.maxWeight}吨、${this.limitValues?.maxVolume}方、${this.limitValues?.maxPiece}件】` | ||||
|       ); | ||||
|       return; | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user