解决冲突
This commit is contained in:
		| @ -41,7 +41,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|     maxPiece: 99999, |     maxPiece: 99999, | ||||||
|     maxDays: 999, |     maxDays: 999, | ||||||
|     intervalDays: 999, |     intervalDays: 999, | ||||||
|     maxTimes: 999 |     maxTimes: 5 | ||||||
|   }; |   }; | ||||||
|   sf1data: any; // 货源单设置回显 |   sf1data: any; // 货源单设置回显 | ||||||
|   sf3data: any; // 货源单设置回显 |   sf3data: any; // 货源单设置回显 | ||||||
| @ -746,7 +746,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|   addStartInfo() { |   addStartInfo() { | ||||||
|     if (this.startInfo.length < 5) { |     if (this.startInfo.length < this.limitValues.maxTimes) { | ||||||
|       const controlId = this.startInfo.length; |       const controlId = this.startInfo.length; | ||||||
|       this.startInfo.push({ |       this.startInfo.push({ | ||||||
|         detailedAddress: '', |         detailedAddress: '', | ||||||
| @ -800,7 +800,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|     this.validateForm1.removeControl(`loadPhone${index}`); |     this.validateForm1.removeControl(`loadPhone${index}`); | ||||||
|   } |   } | ||||||
|   addEndInfo() { |   addEndInfo() { | ||||||
|     if (this.endInfo.length < 5) { |     if (this.endInfo.length < this.limitValues.maxTimes) { | ||||||
|       const controlId = this.endInfo.length; |       const controlId = this.endInfo.length; | ||||||
|       this.endInfo.push({ |       this.endInfo.push({ | ||||||
|         detailedAddress: '', |         detailedAddress: '', | ||||||
|  | |||||||
| @ -109,7 +109,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|     maxPiece: 99999, |     maxPiece: 99999, | ||||||
|     maxDays: 999, |     maxDays: 999, | ||||||
|     intervalDays: 999, |     intervalDays: 999, | ||||||
|     maxTimes: 999 |     maxTimes: 5 | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   formatterRmb = (value: number): string => { |   formatterRmb = (value: number): string => { | ||||||
| @ -767,7 +767,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|   } |   } | ||||||
|   // 添加 删除发货卸货地址 |   // 添加 删除发货卸货地址 | ||||||
|   addStartInfo() { |   addStartInfo() { | ||||||
|     if (this.startInfo.length < 5) { |     console.log(this.startInfo.length); | ||||||
|  |     console.log(this.limitValues.maxTimes); | ||||||
|  |      | ||||||
|  |     if (this.startInfo.length  < this.limitValues.maxTimes) { | ||||||
|       const controlId = this.startInfo.length; |       const controlId = this.startInfo.length; | ||||||
|       this.startInfo.push({ |       this.startInfo.push({ | ||||||
|         detailedAddress: '', |         detailedAddress: '', | ||||||
| @ -782,11 +785,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       }); |       }); | ||||||
|       this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); |       this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); | ||||||
|       this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required)); |       this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required)); | ||||||
|       this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); |       this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   // 添加 删除发货卸货地址 |   // 添加 删除发货卸货地址 | ||||||
|   subStartInfo(_event: any, index: number) { |   subStartInfo(event: any, index: number) { | ||||||
|     this.startInfo.splice(index, 1); |     this.startInfo.splice(index, 1); | ||||||
|     this.validateForm1.removeControl(`loadAddress${index}`); |     this.validateForm1.removeControl(`loadAddress${index}`); | ||||||
|     this.validateForm1.removeControl(`loadName${index}`); |     this.validateForm1.removeControl(`loadName${index}`); | ||||||
| @ -794,7 +797,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|   } |   } | ||||||
|   // 添加 删除发货卸货地址 |   // 添加 删除发货卸货地址 | ||||||
|   addEndInfo() { |   addEndInfo() { | ||||||
|     if (this.addEndInfo.length < 5) { |     if (this.endInfo.length < this.limitValues.maxTimes) { | ||||||
|       const controlId = this.endInfo.length; |       const controlId = this.endInfo.length; | ||||||
|       this.endInfo.push({ |       this.endInfo.push({ | ||||||
|         detailedAddress: '', |         detailedAddress: '', | ||||||
| @ -809,11 +812,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       }); |       }); | ||||||
|       this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); |       this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); | ||||||
|       this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); |       this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); | ||||||
|       this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); |       this.validateForm1.addControl( | ||||||
|  |         `unloadPhone${controlId}`, | ||||||
|  |         new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]) | ||||||
|  |       ); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   // 添加 删除发货卸货地址 |   // 添加 删除发货卸货地址 | ||||||
|   subEndInfo(_event: any, index: number) { |   subEndInfo(event: any, index: number) { | ||||||
|     this.endInfo.splice(index, 1); |     this.endInfo.splice(index, 1); | ||||||
|     this.validateForm1.removeControl(`unloadAddress${index}`); |     this.validateForm1.removeControl(`unloadAddress${index}`); | ||||||
|     this.validateForm1.removeControl(`unloadName${index}`); |     this.validateForm1.removeControl(`unloadName${index}`); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user