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('确认到车成功!')
|
||||
|
||||
@ -99,7 +99,6 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
},
|
||||
imgUrl2: {
|
||||
@ -138,11 +137,10 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
}
|
||||
},
|
||||
required: ['reason']
|
||||
required: ['time']
|
||||
};
|
||||
} else {
|
||||
this.schema = {
|
||||
@ -210,7 +208,6 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
},
|
||||
imgUrl2: {
|
||||
@ -249,11 +246,10 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
}
|
||||
},
|
||||
required: ['time', 'weight']
|
||||
required: ['time']
|
||||
};
|
||||
}
|
||||
|
||||
@ -268,15 +264,15 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
}
|
||||
save(value: any): void {
|
||||
if(this.Status === 1) {
|
||||
if(!value.time) {
|
||||
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_insertWholeStartCarInfo, params).subscribe((res) => {
|
||||
@ -286,18 +282,18 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if(!value.time || !this.data.weight) {
|
||||
if(!value?.time) {
|
||||
this.service.msgSrv.warning('必填项为空!')
|
||||
return;
|
||||
}
|
||||
console.log(value)
|
||||
const params = {
|
||||
id: this.i.id,
|
||||
imgUrl1: value.imgUrl1.data.fullFilePath,
|
||||
imgUrl2: value.imgUrl2.data.fullFilePath,
|
||||
time: value.time,
|
||||
volume: this.data.volume,
|
||||
weight: this.data.weight
|
||||
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
|
||||
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
|
||||
time: value?.time,
|
||||
volume: this.data?.volume,
|
||||
weight: this.data?.weight
|
||||
}
|
||||
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
|
||||
this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => {
|
||||
|
||||
Reference in New Issue
Block a user