This commit is contained in:
wangshiming
2022-03-04 15:21:52 +08:00
parent dabe8ba00e
commit d4dd453308
2 changed files with 18 additions and 28 deletions

View File

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

View File

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