diff --git a/src/app/routes/sys-setting/components/network-freight/new/new.component.html b/src/app/routes/sys-setting/components/network-freight/new/new.component.html index 88f3aaf1..9edc49c6 100644 --- a/src/app/routes/sys-setting/components/network-freight/new/new.component.html +++ b/src/app/routes/sys-setting/components/network-freight/new/new.component.html @@ -4,11 +4,11 @@ * @Author : Shiming * @Date : 2022-02-17 15:01:33 * @LastEditors : Shiming - * @LastEditTime : 2022-02-17 20:51:29 + * @LastEditTime : 2022-02-18 14:34:32 * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\network-freight\\new\\new.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + @@ -24,16 +24,16 @@
万元
- +
营业执照法人信息
- +
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
上传后系统会自动识别并填写
- +
正面照(人像面)
@@ -42,7 +42,7 @@
- +
背面照(国徽面)
@@ -60,7 +60,7 @@
- +
\ No newline at end of file diff --git a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts index 3dca83ae..f9100693 100644 --- a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts @@ -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); } }