fix bug
This commit is contained in:
@ -50,9 +50,13 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
@ViewChild('sf1', { static: false })
|
||||
sf1!: SFComponent;
|
||||
sf1FormData: any = {
|
||||
legalPersonIdentityDTO: {
|
||||
legalPersonIdentityVO: {
|
||||
certificatePhotoFrontWatermark: '',
|
||||
certificatePhotoBackWatermark: '',
|
||||
},
|
||||
};;
|
||||
subText = '确认新增'
|
||||
TabText = '新增网络货运人'
|
||||
sf2FormData: any = {};
|
||||
schema: SFSchema = this.initOthersSF();
|
||||
schema1: SFSchema = this.initBasicInfoSF();
|
||||
@ -88,6 +92,8 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
console.log(this.route.snapshot.params.id == 'undefined')
|
||||
if(this.route.snapshot.params.id !== 'undefined') {
|
||||
this.dataListInit(this.route.snapshot.params.id)
|
||||
this.subText = '确认编辑'
|
||||
this.TabText = '编辑网络货运人'
|
||||
}
|
||||
}
|
||||
dataListInit(id: any) {
|
||||
@ -104,24 +110,25 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
response: this.sf1FormData.licensePhotoWatermark
|
||||
},
|
||||
];
|
||||
console.log(this.sf1FormData);
|
||||
// 营业执照法人信息
|
||||
console.log(this.sf1FormData.legalPersonIdentityVO.certificatePhotoFrontWatermark)
|
||||
// this.sf1FormData.legalPersonIdentityDTO.certificatePhotoFrontWatermark = [
|
||||
// {
|
||||
// uid: -1,
|
||||
// name: 'LOGO',
|
||||
// status: 'done',
|
||||
// url: this.sf1FormData.legalPersonIdentityDTO.certificatePhotoFrontWatermark,
|
||||
// response: this.sf1FormData.legalPersonIdentityDTO.certificatePhotoFrontWatermark
|
||||
// },
|
||||
// ];
|
||||
this.sf1FormData.certificatePhotoBackWatermark = [
|
||||
|
||||
this.sf1FormData.legalPersonIdentityVO.certificatePhotoFrontWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.sf1FormData.certificatePhotoBackWatermark,
|
||||
response: this.sf1FormData.certificatePhotoBackWatermark,
|
||||
url: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark,
|
||||
response: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark
|
||||
},
|
||||
];
|
||||
this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark,
|
||||
response: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark,
|
||||
},
|
||||
];
|
||||
const province = this.sf1FormData.fullRegionVO.provinceCode
|
||||
@ -166,12 +173,14 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
params,
|
||||
{
|
||||
...this.sf.value ,
|
||||
enterpriseInfoDTO: this.sf1.value
|
||||
enterpriseInfoDTO: {
|
||||
...this.sf1.value,
|
||||
legalPersonIdentityDTO: this.sf1.value.legalPersonIdentityVO
|
||||
}
|
||||
}
|
||||
);
|
||||
delete params.enterpriseInfoDTO.legalPersonIdentityVO
|
||||
console.log(params);
|
||||
console.log(this.sf.value);
|
||||
console.log(this.sf1.value);
|
||||
params.enterpriseInfoDTO.enterpriseAddressCode = this.sf1.value?.enterpriseAddressCode?.[2];
|
||||
this.service.request(this.service.$api_networkTransporter_save, params).subscribe(res => {
|
||||
if (res) {
|
||||
@ -201,11 +210,11 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
if (isFront === 'front') {
|
||||
// 正面
|
||||
if (res.name) {
|
||||
this.sf1.setValue('/legalPersonIdentityDTO/name', res.name);
|
||||
this.sf1.setValue('/legalPersonIdentityVO/name', res.name);
|
||||
}
|
||||
if (res.number) {
|
||||
this.sf1.setValue('/legalPersonIdentityDTO/certificateType', 0);
|
||||
this.sf1.setValue('/legalPersonIdentityDTO/certificateNumber', res.number);
|
||||
this.sf1.setValue('/legalPersonIdentityVO/certificateType', 0);
|
||||
this.sf1.setValue('/legalPersonIdentityVO/certificateNumber', res.number);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -227,6 +236,8 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
|
||||
// 识别营业执照
|
||||
checkBusinessLicense(imgurl: any) {
|
||||
console.log('触发了识别');
|
||||
|
||||
this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
|
||||
if (res) {
|
||||
if (res.registrationNumber) {
|
||||
@ -485,7 +496,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
|
||||
legalPersonIdentityDTO: {
|
||||
legalPersonIdentityVO: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
title2: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||
@ -499,7 +510,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
|
||||
this.sf1.setValue('/legalPersonIdentityVO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
|
||||
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1);
|
||||
}
|
||||
}
|
||||
@ -516,7 +527,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
|
||||
this.sf1.setValue('/legalPersonIdentityVO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
|
||||
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user