fix bug
This commit is contained in:
@ -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.
|
||||
-->
|
||||
<page-header-wrapper [title]="'新增网络货运人'"></page-header-wrapper>
|
||||
<page-header-wrapper [title]="TabText"></page-header-wrapper>
|
||||
<nz-card>
|
||||
<sf #sf1 [ui]="ui" [schema]="schema1" [formData]="sf1FormData" [button]="'none'">
|
||||
<ng-template sf-template="title1" let-me let-ui="ui" let-schema="schema">
|
||||
@ -24,16 +24,16 @@
|
||||
<div class="pr">万元</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template sf-template="legalPersonIdentityDTO/title2" let-me let-ui="ui" let-schema="schema">
|
||||
<ng-template sf-template="legalPersonIdentityVO/title2" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">营业执照法人信息</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="legalPersonIdentityDTO/tipsC" let-me let-ui="ui" let-schema="schema">
|
||||
<ng-template sf-template="legalPersonIdentityVO/tipsC" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="pr">
|
||||
<div>请上传身份证原件的高清照片,若上传复印件,则需申请人签字;</div>
|
||||
<div>上传后系统会自动识别并填写</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="legalPersonIdentityDTO/tipsA" let-me let-ui="ui" let-schema="schema">
|
||||
<ng-template sf-template="legalPersonIdentityVO/tipsA" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="pr">
|
||||
<dl class="tips">
|
||||
<dt>正面照(人像面)</dt>
|
||||
@ -42,7 +42,7 @@
|
||||
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="legalPersonIdentityDTO/tipsB" let-me let-ui="ui" let-schema="schema">
|
||||
<ng-template sf-template="legalPersonIdentityVO/tipsB" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="pr">
|
||||
<dl class="tips">
|
||||
<dt>背面照(国徽面)</dt>
|
||||
@ -60,7 +60,7 @@
|
||||
</sf>
|
||||
|
||||
<div style="padding-left: 379px">
|
||||
<button nz-button type="button" nzType="primary" (click)="submitForm()">确认新增</button>
|
||||
<button nz-button type="button" nzType="primary" (click)="submitForm()">{{subText}}</button>
|
||||
<button nz-button (click)="goBack()">返回</button>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -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