fix bug
This commit is contained in:
		| @ -102,15 +102,25 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|   @ViewChild('sf7', { static: false }) sf7!: SFComponent; | ||||
|   schema7: SFSchema = {}; | ||||
|   ui7!: SFUISchema; | ||||
|   formatterRmb = (value: number): string =>{ | ||||
|     if(value){ | ||||
|       let  value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2}); | ||||
|       return `¥ ${value2}`; | ||||
|   limitValues = { | ||||
|     maxWeight: 99999, | ||||
|     maxVolume: 99999, | ||||
|     maxPiece: 99999, | ||||
|     maxDays: 999, | ||||
|     intervalDays: 999, | ||||
|     maxTimes: 999, | ||||
|   } | ||||
|  | ||||
|   formatterRmb = (value: number): string => { | ||||
|     if (value === null || value === undefined) { | ||||
|       return ''; | ||||
|     }else{ | ||||
|       let value2 = Number(value).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); | ||||
|       return `¥${value2}`; | ||||
|     } | ||||
|     return `¥ 0.00` | ||||
|       | ||||
|   } ; | ||||
|   parserRmb = (value: string): string => value.replace('¥ ', '').replace(',',''); | ||||
|      | ||||
|   }; | ||||
|   parserRmb = (value: string): string => value.replace('¥', '').replace(',', ''); | ||||
|   // 页面初始化 | ||||
|   ngOnInit(): void { | ||||
|     this.initSF1(); | ||||
| @ -121,6 +131,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|     this.initSF7(); | ||||
|     this.addStartInfo(); | ||||
|     this.addEndInfo(); | ||||
|     this.getLimitvalue(); | ||||
|   } | ||||
|   initSF1() { | ||||
|     this.schema1 = { | ||||
| @ -658,6 +669,34 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|         grid: { span: 24 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   getLimitvalue() { | ||||
|     // 货物核载信息最大值 | ||||
|     // 货物运输费(小计)最大值 | ||||
|     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.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; | ||||
|       this.limitValues = { | ||||
|         maxWeight: Number(maxWeight), | ||||
|         maxVolume: Number(maxVolume), | ||||
|         maxPiece: Number(maxPiece), | ||||
|         maxDays: Number(maxDays), | ||||
|         intervalDays: Number(intervalDays), | ||||
|         maxTimes: Number(maxTimes), | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
|     // 不可选择的时间 | ||||
|     disabledDateStart = (current: Date): boolean => { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user