fix bug
This commit is contained in:
		| @ -44,7 +44,7 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|   ngOnInit(): void { | ||||
|     console.log(this.i) | ||||
|     this.initData() | ||||
|     this.i.time = this.i.loadingTime; | ||||
|     this.i.time = this.i?.loadingTime; | ||||
|     this.initSF(); | ||||
|   } | ||||
|   initSF() { | ||||
| @ -407,7 +407,7 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|           } as SFUploadWidgetSchema, | ||||
|         } | ||||
|       }, | ||||
|       required: ['time', 'weight' ] | ||||
|       required: ['time' ] | ||||
|     }; | ||||
|   } | ||||
|     this.ui = { | ||||
| @ -422,19 +422,16 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|     }; | ||||
|   } | ||||
|   save(value: any): void { | ||||
|     console.log('444'); | ||||
|     if(this.Status === 1) { | ||||
|       console.log('555'); | ||||
|        | ||||
|       if(!value.time) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|        const params = { | ||||
|         id: this.i.id, | ||||
|         imgUrl1: value.imgUrl1.data.fullFilePath, | ||||
|         imgUrl2: value.imgUrl2.data.fullFilePath, | ||||
|         time: value.time, | ||||
|         imgUrl1: value?.imgUrl1?.data?.fullFilePath, | ||||
|         imgUrl2: value?.imgUrl2?.data?.fullFilePath, | ||||
|         time: value?.time, | ||||
|       } | ||||
|       params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|       this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => { | ||||
| @ -444,12 +441,10 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|         } | ||||
|       }) | ||||
|     } else { | ||||
|       if(!value.time || !this.data.weight) { | ||||
|       if(!value.time ) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|         console.log(value) | ||||
|         console.log(this.i) | ||||
|         const params = { | ||||
|           id: this.i?.id, | ||||
|           imgUrl1: value?.imgUrl1?.data?.fullFilePath, | ||||
| @ -459,7 +454,6 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|           weight: this.data?.weight | ||||
|         } | ||||
|         params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|         console.log(params) | ||||
|         this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => { | ||||
|           if(res) { | ||||
|             this.service.msgSrv.success('确认到车成功!') | ||||
|  | ||||
		Reference in New Issue
	
	Block a user