fix bug
This commit is contained in:
@ -89,7 +89,6 @@ export class NetworkFreightNewComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private router: Router, public service: SystemService, private route: ActivatedRoute) {}
|
constructor(private router: Router, public service: SystemService, private route: ActivatedRoute) {}
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.route.snapshot.params.id == 'undefined')
|
|
||||||
if(this.route.snapshot.params.id !== 'undefined') {
|
if(this.route.snapshot.params.id !== 'undefined') {
|
||||||
this.dataListInit(this.route.snapshot.params.id)
|
this.dataListInit(this.route.snapshot.params.id)
|
||||||
this.subText = '确认编辑'
|
this.subText = '确认编辑'
|
||||||
@ -101,6 +100,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
|||||||
console.log(res);
|
console.log(res);
|
||||||
this.sf2FormData = res
|
this.sf2FormData = res
|
||||||
this.sf1FormData = res.enterpriseInfoVO
|
this.sf1FormData = res.enterpriseInfoVO
|
||||||
|
this.sf1FormData.legalPersonIdentityVO.isLoingDate = this.sf1FormData.legalPersonIdentityVO.validEndTime !== null ? false : true;
|
||||||
this.sf1FormData.licensePhotoWatermark = [
|
this.sf1FormData.licensePhotoWatermark = [
|
||||||
{
|
{
|
||||||
uid: -1,
|
uid: -1,
|
||||||
@ -182,9 +182,16 @@ export class NetworkFreightNewComponent implements OnInit {
|
|||||||
delete params.enterpriseInfoDTO.legalPersonIdentityVO
|
delete params.enterpriseInfoDTO.legalPersonIdentityVO
|
||||||
console.log(params);
|
console.log(params);
|
||||||
params.enterpriseInfoDTO.enterpriseAddressCode = this.sf1.value?.enterpriseAddressCode?.[2];
|
params.enterpriseInfoDTO.enterpriseAddressCode = this.sf1.value?.enterpriseAddressCode?.[2];
|
||||||
|
if(this.route.snapshot.params.id !== 'undefined') {
|
||||||
|
params.id = this.route.snapshot.params.id
|
||||||
|
}
|
||||||
this.service.request(this.service.$api_networkTransporter_save, params).subscribe(res => {
|
this.service.request(this.service.$api_networkTransporter_save, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('网络货运人新增成功');
|
if(this.route.snapshot.params.id !== 'undefined') {
|
||||||
|
this.service.msgSrv.success('修改成功');
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.success('新增成功');
|
||||||
|
}
|
||||||
this.goBack();
|
this.goBack();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user