diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.ts b/src/app/routes/usercenter/components/driver/detail/detail.component.ts index cc40c688..508573cd 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.ts @@ -53,7 +53,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { }); // 获取驾驶证信息 this.service - .request(this.service.$api_get_driver_license, { appUserId: this.route.snapshot.params.id }, 'POST', false) + .request(this.service.$api_get_driver_license, { appUserId: this.route.snapshot.params.id }) .subscribe(res => { if (res) { this.driverDetail = res; @@ -61,7 +61,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { }); // 获取从业资格证信息 this.service - .request(this.service.$api_get_driver_practice_seniority, { appUserId: this.route.snapshot.params.id }, 'POST', false) + .request(this.service.$api_get_driver_practice_seniority, { appUserId: this.route.snapshot.params.id }) .subscribe(res => { if (res) { this.licenseDetail = res; @@ -69,7 +69,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { }); // 获取载具信息 this.service - .request(this.service.$api_get_driver_car_license, { appUserId: this.route.snapshot.params.id }, 'POST', false) + .request(this.service.$api_get_driver_car_license, { appUserId: this.route.snapshot.params.id }) .subscribe(res => { if (res) { this.carList = res; diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.html b/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.html index 6af7e0d5..8ceacda6 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.html +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.html @@ -1,4 +1,4 @@ - + diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.ts index f32ed35d..add2219e 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.ts +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/audit-admin/audit-admin.component.ts @@ -38,7 +38,6 @@ export class AuditAdminComponent implements OnInit { } initSF(user?: any) { - console.log(user); this.schema = { properties: { oldAdminName: { @@ -89,7 +88,7 @@ export class AuditAdminComponent implements OnInit { ui: { placeholder: '审核不通过需要说明原因', widget: 'textarea', - autosize: { minRows: 2, maxRows: 6 } + autosize: { minRows: 3, maxRows: 6 } } } } diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts index bf3c0579..55cb415f 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts @@ -75,7 +75,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { /** * 查看详情 */ - View(record: any) { + ViewAdimin(record: any) { const modal = this.modal.create({ nzContent: AuditAdminComponent, nzComponentParams: { i: { ...record } }, @@ -119,6 +119,12 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { }); } + View(record: any) { + this.router.navigate(['./view', record.id], { + relativeTo: this.ar + }); + } + // 切换Tab changeTab(item: any) { this.tabType = item.type; @@ -201,7 +207,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { fixed: 'right', width: '180px', className: 'text-center', - buttons: [{ text: '审核', click: _record => this.View(_record) }] + buttons: [{ text: '审核', click: _record => this.ViewAdimin(_record) }] } ]; } diff --git a/src/app/routes/usercenter/components/freight/list/new/new.component.html b/src/app/routes/usercenter/components/freight/list/new/new.component.html index 20fc3078..76f4ac8a 100644 --- a/src/app/routes/usercenter/components/freight/list/new/new.component.html +++ b/src/app/routes/usercenter/components/freight/list/new/new.component.html @@ -1,109 +1,96 @@ - - - -
企业基本信息
-
- -
营业执照法人信息
-
- -
- 请上传营业执照原件的高清照片,若上传复印件,则需加盖公司印章; -
上传后系统会自动识别并填写
-
-
- -
万元
-
+ + + +
企业基本信息
+
+ +
+ 请上传营业执照原件的高清照片,若上传复印件,则需加盖公司印章; +
上传后系统会自动识别并填写
+
+
+ +
万元
+
- -
-
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
-
上传后系统会自动识别并填写
-
-
- -
-
-
正面照(人像面)
-
示例
-
-
-
-
- -
-
-
背面照(国徽面)
-
示例
-
-
-
-
- -
- - -
公司其他补充信息
-
- -
企业管理员信息
-
- - -
-
请上传该企业授权您成为本系统企业管理员的文件的高清照片,需加盖公司印章
-
上传后系统会自动识别并填写
-
-
-
- -
-
-
-
示例
-
-
-
-
- -
-
{{ telephone }} 默认当前登录账号绑定的手机号
-
-
- -
-
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
-
上传后系统会自动识别并填写
-
-
- -
-
-
正面照(人像面)
-
示例
-
-
-
-
- -
-
-
背面照(国徽面)
-
示例
-
-
-
-
- -
- + +
营业执照法人信息
+
+ +
+
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
+
上传后系统会自动识别并填写
+
+
+ +
+
+
正面照(人像面)
+
示例
+
+
+
+
+ +
+
+
背面照(国徽面)
+
示例
+
+
+
+
+
-
- - -
-
-
+ + +
企业开票信息
+
+ +
企业管理员信息
+
+ + +
+
请上传该企业授权您成为本系统企业管理员的文件的高清照片,需加盖公司印章
+
上传后系统会自动识别并填写
+
+
+
+
+ +
+
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
+
上传后系统会自动识别并填写
+
+
+ +
+
+
正面照(人像面)
+
示例
+
+
+
+
+ +
+
+
背面照(国徽面)
+
示例
+
+
+
+
+ +
+ + +
+ + +
+ + \ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/list/new/new.component.less b/src/app/routes/usercenter/components/freight/list/new/new.component.less index 55bf514e..952a200c 100644 --- a/src/app/routes/usercenter/components/freight/list/new/new.component.less +++ b/src/app/routes/usercenter/components/freight/list/new/new.component.less @@ -35,7 +35,7 @@ .pa { position: absolute; - top : 35px; + top : 50px; left : 150px; } @@ -102,8 +102,29 @@ } } - .ant-row { - margin-left: 100px; + .ant-form-item { + margin-left: 180px; + } + + nz-date-picker, + nz-input-number { + width: 100% !important; + } + + .input-back { + nz-form-item { + margin-left: 0px; + + .ant-form-item-label { + flex: 0 !important; + } + + .ant-form-item-control { + margin-left: 20px !important; + } + } + } + } } \ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/list/new/new.component.ts b/src/app/routes/usercenter/components/freight/list/new/new.component.ts index df20847f..47b73c8a 100644 --- a/src/app/routes/usercenter/components/freight/list/new/new.component.ts +++ b/src/app/routes/usercenter/components/freight/list/new/new.component.ts @@ -11,630 +11,130 @@ import { SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema, - SFUploadWidgetSchema, + SFUploadWidgetSchema } from '@delon/form'; import { ModalHelper } from '@delon/theme'; import { EnvironmentService } from '@env/environment.service'; import { NzCascaderOption } from 'ng-zorro-antd/cascader'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { of } from 'rxjs'; import { map } from 'rxjs/operators'; +import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service'; // import { AccountService } from '../../services/account.service'; // import { AccountComponentsImgViewComponent } from '../img-view/img-view.component'; @Component({ selector: 'app-account-components-freight-new', templateUrl: './new.component.html', - styleUrls: ['./new.component.less'], + styleUrls: ['./new.component.less'] }) export class FreightComponentsListNewComponent implements OnInit { - url = `/rule?_allow_anonymous=true`; + private imageConfig = { + action: apiConf.waterFileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + fileSize: 5120, + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + name: 'multipartFile', + multiple: false, + listType: 'picture-card' + }; + + private dateConfig = { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'date', + format: 'yyyy-MM-dd', + placeholder: '请选择' + }; @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf1', { static: false }) sf1!: SFComponent; - // @ViewChild('sf2', { static: false }) - // sf2!: SFComponent; - // @ViewChild('sf3', { static: false }) - // sf3!: SFComponent; - telephone = ''; - record: any = {}; - i: any; - schema!: SFSchema; - schema1!: SFSchema; - // schema2!: SFSchema; - // schema3!: SFSchema; - ui!: SFUISchema; + schema: SFSchema = this.initOthersSF(); + schema1: SFSchema = this.initBasicInfoSF(); + ui: SFUISchema = { + '*': { + spanLabelFixed: 180, + grid: { span: 24 } + }, + $title1: { + spanLabelFixed: 0 + }, + $title99: { + spanLabelFixed: 0 + }, + $title2: { + spanLabelFixed: 0 + }, + $registrationCapital: { + spanLabelFixed: 180, + grid: { xxl: 13, xl: 18, lg: 24, md: 24 } + }, + $unit: { + spanLabelFixed: 100, + grid: { span: 6 } + }, + $isLoingDate: { + spanLabelFixed: 100, + grid: { span: 6 } + } + }; - id!: string; - isEdit!: boolean; - subStep = 0; infoData: any = {}; infoData1: any = {}; - infoData2: any = { - accountName: '', - }; - infoData3: any = {}; - branchBankName = ''; - bankArea = ''; - bankName = ''; - bankLogoUrl = ''; - bankRegion: any[] = []; - branchBanks: any[] = []; - signingPeriod = 2; - pdfSrc: any; - result = true; enterpriseAddressCodeStr = ''; enterpriseAddressCode: any; enterpriseBusinessAddressCodeStr = ''; enterpriseBusinessAddressCode = ''; - taxpayerTypeStr = ''; regionData: any = []; - aptitudes: any = []; + constructor( private routerinfo: ActivatedRoute, public msg: NzMessageService, private router: Router, private modalService: NzModalService, - private modal: ModalHelper, + private service: UsermanageService ) {} ngOnInit() { - this.id = this.routerinfo.snapshot.queryParams.id; - - if (this.routerinfo.snapshot.queryParams.id) { - this.isEdit = true; - this.getApplicationInfo(this.routerinfo.snapshot.queryParams.id); - } else { - this.getUserDetail(); - } - this.initSF(); + this.getRegionToThree(''); } - initSF() { - this.schema = { - properties: { - title1: { - title: '', - type: 'string', - ui: { - widget: 'custom', - }, - }, - - // tipsE: { - // title: '', - // type: 'string', - // ui: { - // widget: 'custom', - // offsetControl: 6, - // }, - // }, - tipsD: { - title: '企业授权函', - type: 'string', - ui: { - widget: 'custom', - }, - }, - tipsE: { - title: '', - type: 'string', - ui: { - widget: 'custom', - offsetControl: 6, - }, - }, - certificatePhotoFront2: { - type: 'string', - title: '', - ui: { - offsetControl: 6, - action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', - fileSize: 5120, - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', - data: { - // appId: this.envSrv.getEnvironment().appId, - }, - name: 'multipartFile', - multiple: false, - listType: 'picture-card', - change: (args) => { - if (args.type === 'success') { - this.checkIdCard(args.fileList[0].response.url, 0, 1); - } - }, - } as SFUploadWidgetSchema, - }, - region2: { - type: 'number', - title: '常用服务', - enum: this.regionData, - // default: [110000, 110100, 110105], - ui: { - width: 700, - widget: 'cascader', - valueProperty: 'regionCode', - labelProperty: 'name', - change: (ngModel: string | any[]) => { - const len = ngModel.length - 1; - this.enterpriseAddressCode = ngModel[len]; - // this.getRegionDetailByCode(ngModel[len],'name', 1); // 获取省市区名称 - }, - selectionChange: (values: NzCascaderOption[]) => { - // 获取省市区名称 - const len = values.length - 1; - this.enterpriseAddressCodeStr = values[len].regionFullName.split(',').reverse().join(''); - }, - }, - }, - contactsName: { - title: '推广业务员手机号', - type: 'string', - minLength: 1, - maxLength: 32, - ui: { - width: 700, - placeholder: '请输入您的真实姓名', - errors: { - required: '请输入您的真实姓名', - }, - }, - }, - title99: { - title: '', - type: 'string', - ui: { - widget: 'custom', - }, - }, - tipsA: { - title: '企业管理员证件照', - type: 'string', - ui: { - widget: 'custom', - }, - }, - certificatePhotoFront: { - type: 'string', - title: '', - ui: { - offsetControl: 6, - action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', - fileSize: 5120, - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', - data: { - // appId: this.envSrv.getEnvironment().appId, - }, - name: 'multipartFile', - multiple: false, - listType: 'picture-card', - change: (args) => { - if (args.type === 'success') { - this.checkIdCard(args.fileList[0].response.url, 0, 1); - } - }, - } as SFUploadWidgetSchema, - }, - tipsB: { - title: '', - type: 'string', - ui: { - widget: 'custom', - offsetControl: 6, - }, - }, - certificatePhotoBack: { - type: 'string', - title: '', - ui: { - offsetControl: 6, - action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', - fileSize: 5120, - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', - data: { - // appId: this.envSrv.getEnvironment().appId, - }, - name: 'multipartFile', - multiple: false, - listType: 'picture-card', - change: (args) => { - if (args.type === 'success') { - this.checkIdCard(args.fileList[0].response.url, 1, 1); - } - }, - } as SFUploadWidgetSchema, - }, - name: { - title: '企业管理员姓名', - type: 'string', - maxLength: 8, - ui: { - width: 700, - placeholder: '请输入营业执照上的企业管理员姓名', - }, - }, - certificateNumber: { - title: '企业管理员身份证号', - type: 'string', - format: 'id-card', - minLength: 1, - maxLength: 18, - ui: { - width: 700, - placeholder: '请输入法定代表人身份证号码', - }, - }, - telephone: { - title: '企业管理员手机号', - type: 'string', - maxLength: 11, - format: 'mobile', - ui: { - placeholder: '请输入企业管理员手机号', - }, - }, - }, - required: ['contactsName'], - }; - this.schema1 = { - properties: { - title1: { - title: '', - type: 'string', - ui: { - widget: 'custom', - }, - }, - tips: { - title: '', - type: 'string', - ui: { - widget: 'custom', - offsetControl: 6, - }, - }, - enterpriseQualificationCertificate: { - type: 'string', - title: '营业执照', - ui: { - action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', - fileSize: 5120, - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', - data: { - // appId: this.envSrv.getEnvironment().appId, - }, - name: 'multipartFile', - multiple: false, - listType: 'picture-card', - change: (args) => { - if (args.type === 'success') { - this.checkBusinessLicense(args.fileList[0].response.url); - } - }, - } as SFUploadWidgetSchema, - }, - unifiedSocialCreditCode: { - title: '统一社会信用代码', - type: 'string', - minLength: 1, - maxLength: 18, - ui: { - width: 700, - optionalHelp: - '为了企业用户的使用体验,若公司代码即统一社会信用代码已在本应用其他关联平台注册,则此处填写的公司资料将同步更新至对应已注册的平台', - placeholder: '请输入营业执照上的统一社会信用代码', - errors: { - required: '请输入18位公司代码', - }, - }, - }, - enterpriseName: { - title: '公司名称', - type: 'string', - minLength: 2, - maxLength: 100, - ui: { - width: 700, - placeholder: '请输入公司名称', - errors: { - required: '请输入公司名称', - }, - }, - }, - enterpriseType: { - title: '公司类型', - type: 'string', - minLength: 1, - maxLength: 30, - ui: { - width: 700, - placeholder: '请输入公司类型', - errors: { - required: '请输入公司类型', - }, - }, - }, - region: { - type: 'number', - title: '营业执照所在地', - enum: this.regionData, - // default: [110000, 110100, 110105], - ui: { - width: 700, - widget: 'cascader', - valueProperty: 'regionCode', - labelProperty: 'name', - change: (ngModel: string | any[]) => { - const len = ngModel.length - 1; - this.enterpriseAddressCode = ngModel[len]; - // this.getRegionDetailByCode(ngModel[len],'name', 1); // 获取省市区名称 - }, - selectionChange: (values: NzCascaderOption[]) => { - // 获取省市区名称 - const len = values.length - 1; - this.enterpriseAddressCodeStr = values[len].regionFullName.split(',').reverse().join(''); - }, - }, - }, - enterpriseAddress: { - title: '营业执照详细地址', - type: 'string', - minLength: 1, - maxLength: 240, - ui: { - width: 700, - widget: 'textarea', - autosize: { minRows: 2, maxRows: 5 }, - placeholder: '请输入营业执照上的完整详细地址', - errors: { - required: '请输入营业执照上的完整详细地址', - }, - } as SFTextareaWidgetSchema, - }, - title2: { - title: '', - type: 'string', - ui: { - widget: 'custom', - }, - }, - tipsC: { - title: '法定代表人证件照', - type: 'string', - ui: { - widget: 'custom', - // offsetControl: 6, - }, - }, - tipsA: { - title: '', - type: 'string', - ui: { - widget: 'custom', - offsetControl: 6, - }, - }, - certificatePhotoFront: { - type: 'string', - title: '', - ui: { - offsetControl: 6, - action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', - fileSize: 5120, - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', - data: { - // appId: this.envSrv.getEnvironment().appId, - }, - name: 'multipartFile', - multiple: false, - listType: 'picture-card', - change: (args) => { - if (args.type === 'success') { - this.checkIdCard(args.fileList[0].response.url, 0, 1); - } - }, - } as SFUploadWidgetSchema, - }, - tipsB: { - title: '', - type: 'string', - ui: { - widget: 'custom', - offsetControl: 6, - }, - }, - certificatePhotoBack: { - type: 'string', - title: '', - ui: { - offsetControl: 6, - action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', - fileSize: 5120, - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', - data: { - // appId: this.envSrv.getEnvironment().appId, - }, - name: 'multipartFile', - multiple: false, - listType: 'picture-card', - change: (args) => { - if (args.type === 'success') { - this.checkIdCard(args.fileList[0].response.url, 1, 1); - } - }, - } as SFUploadWidgetSchema, - }, - name: { - title: '法人姓名', - type: 'string', - maxLength: 8, - ui: { - width: 700, - placeholder: '请输入营业执照上的法人姓名', - }, - }, - region2: { - type: 'number', - title: '法人证件类型', - enum: this.regionData, - // default: [110000, 110100, 110105], - ui: { - width: 700, - widget: 'cascader', - valueProperty: 'regionCode', - labelProperty: 'name', - change: (ngModel: string | any[]) => { - const len = ngModel.length - 1; - this.enterpriseAddressCode = ngModel[len]; - // this.getRegionDetailByCode(ngModel[len],'name', 1); // 获取省市区名称 - }, - selectionChange: (values: NzCascaderOption[]) => { - // 获取省市区名称 - const len = values.length - 1; - this.enterpriseAddressCodeStr = values[len].regionFullName.split(',').reverse().join(''); - }, - }, - }, - certificateNumber: { - title: '法定代表人身份证号码', - type: 'string', - format: 'id-card', - minLength: 1, - maxLength: 18, - ui: { - width: 700, - placeholder: '请输入法定代表人身份证号码', - }, - }, - validStartTime: { - title: '身份证有效开始日期', - type: 'string', - ui: { - widget: 'date', - format: 'yyyy-MM-dd', - placeholder: '请选择', - errors: { - required: '请选择开始日期', - }, - change: (i) => { - // this.sf1?.setValue('/dateType1', false); - }, - } as SFDateWidgetSchema, - }, - validEndTime: { - title: '身份证有效截止日期', - type: 'string', - ui: { - widget: 'date', - format: 'yyyy-MM-dd', - placeholder: '请选择', - errors: { - required: '请选择截止日期', - }, - change: (i) => { - this.sf1?.setValue('/dateType1', false); - }, - } as SFDateWidgetSchema, - }, - dateType1: { - title: '长期', - type: 'boolean', - // enum: [{ label: '长期', value: true }], - ui: { - widget: 'checkbox', - change: (i) => this.longTime(i, 'schema11'), - } as SFCheckboxWidgetSchema, - }, - }, - required: [ - 'enterpriseQualificationCertificate', - 'unifiedSocialCreditCode', - 'enterpriseName', - 'enterpriseType', - 'region', - 'enterpriseAddress', - 'registrationCapital', - 'enterpriseRegistrationTime', - 'operatingEndTime', - 'operatingStartTime', - 'dateType', - 'businessScope', - 'certificatePhotoFront', - 'certificatePhotoBack', - 'name', - 'certificateNumber', - 'validStartTime', - 'validEndTime', - 'dateType1', - ], - }; - - this.ui = { - '*': { - spanLabelFixed: 180, - grid: { span: 24 }, - }, - $title1: { - spanLabelFixed: 0, - }, - $title99: { - spanLabelFixed: 0, - }, - $title2: { - spanLabelFixed: 0, - }, - $title3: { - spanLabelFixed: 0, - }, - $registrationCapital: { - spanLabelFixed: 180, - grid: { span: 11 }, - }, - $unit: { - spanLabelFixed: 100, - grid: { span: 6 }, - }, - }; - } submitForm() { - + console.log(this.sf.value); + console.log(this.sf1.value); + const sfVlaue = this.sf.value; + const params = {}; + Object.assign( + params, + { ...this.sf1.value }, + { ...this.sf.value }, + { + enterpriseAddressCode: this.sf1.value.enterpriseAddressCode[2], + oftenUsedServices: sfVlaue.oftenUsedServices, + registerAddress: sfVlaue.registerAddress, + registerPhone: sfVlaue.registerPhone, + creditPhoto: sfVlaue.creditPhoto, + creditPhotoWatermark: sfVlaue.creditPhotoWatermark, + promotersTelephone: sfVlaue.promotersTelephone, + networkTransporter: sfVlaue.networkTransporter, + adminUserInfo: { + certificateNumber: sfVlaue.certificateNumber, + certificatePhotoBack: sfVlaue.certificatePhotoBack, + certificatePhotoBackWatermark: sfVlaue.certificatePhotoBackWatermark, + certificatePhotoFront: sfVlaue.certificatePhotoFront, + certificatePhotoFrontWatermark: sfVlaue.certificatePhotoFrontWatermark, + name: sfVlaue.name + } + } + ); + this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { + console.log(res); + }); } // submitForm() { // // 营业执照基本信息 @@ -764,363 +264,23 @@ export class FreightComponentsListNewComponent implements OnInit { // } // }); // } - getUserDetail() { - // this.service.http.post(this.service.$api_get_current_user_detail).subscribe((res) => { - // if (res) { - // this.infoData.telephone = res.data.phone; - // this.initSF(); - // } - // }); - } viewImg(image: any) { // this.modal.createStatic(AccountComponentsImgViewComponent, { i: { imgUrl: image } }).subscribe(() => { // // this.st.reload(); // }); } - getRegionToThree() { + getRegionToThree(regionCode: string) { // 获取一、二、三级地区详情 - // this.service.http.post(this.service.$api_getRegionToThree).subscribe((res) => { - // this.regionData = res.data; - // this.initSF(); - // }); - } - getApplicationInfo(id: string) { - // 查询申请信息详情 - const params: any = { - id, - }; - // this.service.http.post(this.service.$api_getSupplierEntryDetailInfo, params).subscribe((res) => { - // this.infoData.updateTime = res.data.updateTime; - // this.infoData.auditStatus = res.data.auditStatus; - // this.infoData.auditOpinion = res.data.auditOpinion; - // this.infoData1.contactsName = res.data.contactsName; - // this.infoData1.operationUserPhone = res.data.contactsPhone; - // this.infoData1.enterpriseName = res.data.enterpriseName; - // this.infoData1.unifiedSocialCreditCode = res.data.unifiedSocialCreditCode; - // this.infoData1.enterpriseType = res.data.enterpriseType; - // this.infoData1.registrationCapital = res.data.registrationCapital; - // this.infoData1.enterpriseRegistrationTime = res.data.operatingStartTime; - // this.infoData1.enterpriseRegistrationTime = res.data.operatingStartTime; - // this.infoData1.operatingStartTime = res.data.operatingStartTime; - // this.infoData1.operatingEndTime = res.data.operatingEndTime; - // this.infoData1.operatingEndTime = res.data.operatingEndTime; - // this.enterpriseAddressCodeStr = res.data.enterpriseAddressCodeStr; - // this.infoData1.enterpriseAddress = res.data.enterpriseAddress; - // this.infoData1.enterpriseBusinessAddress = res.data.enterpriseAddress; - // this.infoData1.businessScope = res.data.businessScope; - // this.infoData1.name = res.data.name; - // this.infoData1.certificateNumber = res.data.certificateNumber; - // this.infoData1.validStartTime = res.data.validStartTime; - // this.infoData1.validEndTime = res.data.validEndTime; - // this.infoData1.certificatePhotoFront = res.data.certificatePhotoFront; - // this.infoData1.enterpriseQualificationCertificate = res.data.enterpriseQualificationCertificate; - // this.infoData1.certificatePhotoBackurl = res.data.certificatePhotoBack; - // this.infoData1.certificatePhotoFronturl = res.data.certificatePhotoFront; - // this.infoData1.enterpriseQualificationCertificateurl = res.data.enterpriseQualificationCertificate; - - // this.infoData1.certificatePhotoBack = res.data.certificatePhotoBack; - // this.signingPeriod = res.data.signingPeriod; - // if (res.data) { - // // 申请人信息 - // this.infoData.certificatePhotoBack = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoBack, - // response: { - // url: res.data.certificatePhotoBack, - // }, - // }, - // ]; - // this.infoData.certificatePhotoFront = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoFront, - // response: { - // url: res.data.certificatePhotoFront, - // }, - // }, - // ]; - // if (!res.data.validEndTime) { - // this.infoData1.dateType1 = true; - // // this.sf.getProperty('/validStartTime').schema.readOnly = true; - // // this.sf.getProperty('/validEndTime').schema.readOnly = true; - // } - // } - // if (res.data) { - // // 营业执照基本信息 - // this.infoData1.enterpriseQualificationCertificate = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.enterpriseQualificationCertificate, - // response: { - // url: res.data.enterpriseQualificationCertificate, - // }, - // }, - // ]; - // this.infoData1.certificatePhotoFront = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoFront, - // response: { - // url: res.data.certificatePhotoFront, - // }, - // }, - // ]; - // this.infoData1.certificatePhotoBack = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoBack, - // response: { - // url: res.data.certificatePhotoBack, - // }, - // }, - // ]; - // this.infoData1.unifiedSocialCreditCode = res.data.unifiedSocialCreditCode; - // this.infoData1.enterpriseName = res.data.enterpriseName; - // this.infoData1.enterpriseType = res.data.enterpriseType; - // this.infoData1.enterpriseAddress = res.data.enterpriseAddress; - // // this.infoData1.enterpriseAddressCodeStr = res.data.businessLicenseJson.enterpriseAddressCodeStr; - // // this.infoData1.enterpriseBusinessAddressCodeStr = res.data.businessLicenseJson.enterpriseBusinessAddressCodeStr; - // this.infoData1.registrationCapital = res.data.registrationCapital; - // this.infoData1.enterpriseRegistrationTime = res.data.enterpriseRegistrationTime; - // this.infoData1.operatingStartTime = res.data.operatingStartTime; - // this.infoData1.operatingEndTime = res.data.operatingEndTime; - // this.infoData1.businessScope = res.data.businessScope; - // this.enterpriseAddressCodeStr = res.data.enterpriseAddressCodeStr; - // this.enterpriseAddressCode = +res.data.enterpriseAddressCode; - // this.getRegionDetailByCode(res.data.enterpriseAddressCode); - - // this.enterpriseBusinessAddressCodeStr = res.data.enterpriseBusinessAddressCodeStr; - // this.enterpriseBusinessAddressCode = res.data.enterpriseBusinessAddressCode; - // if (!res.data.operatingEndTime) { - // this.infoData1.dateType = true; - // } - // this.infoData.contactsName = res.data.contactsName; - // this.infoData.telephone = res.data.contactsPhone; - // } - - // if (res.data.auditStatus === 0 || res.data.auditStatus === 2 || res.data.auditStatus === 3) { - // // 1:待审核,2:复审,3:终审,5:已驳回 - // } else if (res.data.auditStatus === 1) { - // // 4:待签约 - // // this.getPdf(); - // // this.getEnterpriseInfo(this.id); - // } else if (res.data.auditStatus === 4) { - // // 6:已终止,7:已成功 - // this.step = 3; - // } - // this.initSF(); - // }); - } - getApplicationInfo2(id: string) { - // 查询申请信息详情 - const params: any = { - id, - }; - // this.service.http.post(this.service.$api_getSupplierEntryDetailInfo, params).subscribe((res) => { - // this.infoData.updateTime = res.data.updateTime; - // this.infoData.auditStatus = res.data.auditStatus; - // this.infoData.auditOpinion = res.data.auditOpinion; - // this.infoData1.contactsName = res.data.contactsName; - // this.infoData1.enterpriseName = res.data.enterpriseName; - // this.infoData1.unifiedSocialCreditCode = res.data.unifiedSocialCreditCode; - // this.infoData1.enterpriseType = res.data.enterpriseType; - // this.infoData1.registrationCapital = res.data.registrationCapital; - // this.infoData1.enterpriseRegistrationTime = res.data.operatingStartTime; - // this.infoData1.enterpriseRegistrationTime = res.data.operatingStartTime; - // this.infoData1.operatingStartTime = res.data.operatingStartTime; - // this.infoData1.operatingEndTime = res.data.operatingEndTime; - // this.infoData1.operatingEndTime = res.data.operatingEndTime; - // this.enterpriseAddressCodeStr = res.data.enterpriseAddressCodeStr; - // this.infoData1.enterpriseAddress = res.data.enterpriseAddress; - // this.infoData1.enterpriseBusinessAddress = res.data.enterpriseAddress; - // this.infoData1.businessScope = res.data.businessScope; - // this.infoData1.name = res.data.name; - // this.infoData1.certificateNumber = res.data.certificateNumber; - // this.infoData1.validStartTime = res.data.validStartTime; - // this.infoData1.validEndTime = res.data.validEndTime; - // this.infoData1.certificatePhotoFront = res.data.certificatePhotoFront; - // this.infoData1.enterpriseQualificationCertificate = res.data.enterpriseQualificationCertificate; - // this.infoData1.certificatePhotoBackurl = res.data.certificatePhotoBack; - // this.infoData1.certificatePhotoFronturl = res.data.certificatePhotoFront; - // this.infoData1.enterpriseQualificationCertificateurl = res.data.enterpriseQualificationCertificate; - - // this.infoData1.certificatePhotoBack = res.data.certificatePhotoBack; - // this.signingPeriod = res.data.signingPeriod; - // if (res.data) { - // // 申请人信息 - // this.infoData.certificatePhotoBack = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoBack, - // response: { - // url: res.data.certificatePhotoBack, - // }, - // }, - // ]; - // this.infoData.certificatePhotoFront = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoFront, - // response: { - // url: res.data.certificatePhotoFront, - // }, - // }, - // ]; - // if (!res.data.validEndTime) { - // this.infoData1.dateType = true; - // // this.sf.getProperty('/validStartTime').schema.readOnly = true; - // // this.sf.getProperty('/validEndTime').schema.readOnly = true; - // } - // } - // if (res.data) { - // // 营业执照基本信息 - // this.infoData1.enterpriseQualificationCertificate = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.enterpriseQualificationCertificate, - // response: { - // url: res.data.enterpriseQualificationCertificate, - // }, - // }, - // ]; - // this.infoData1.certificatePhotoFront = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoFront, - // response: { - // url: res.data.certificatePhotoFront, - // }, - // }, - // ]; - // this.infoData1.certificatePhotoBack = [ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: res.data.certificatePhotoBack, - // response: { - // url: res.data.certificatePhotoBack, - // }, - // }, - // ]; - // this.infoData1.unifiedSocialCreditCode = res.data.unifiedSocialCreditCode; - // this.infoData1.enterpriseName = res.data.enterpriseName; - // this.infoData1.enterpriseType = res.data.enterpriseType; - // this.infoData1.enterpriseAddress = res.data.enterpriseAddress; - // // this.infoData1.enterpriseAddressCodeStr = res.data.businessLicenseJson.enterpriseAddressCodeStr; - // // this.infoData1.enterpriseBusinessAddressCodeStr = res.data.businessLicenseJson.enterpriseBusinessAddressCodeStr; - // this.infoData1.registrationCapital = res.data.registrationCapital; - // this.infoData1.enterpriseRegistrationTime = res.data.enterpriseRegistrationTime; - // this.infoData1.operatingStartTime = res.data.operatingStartTime; - // this.infoData1.operatingEndTime = res.data.operatingEndTime; - // this.infoData1.businessScope = res.data.businessScope; - // this.enterpriseAddressCodeStr = res.data.enterpriseAddressCodeStr; - // this.enterpriseAddressCode = +res.data.enterpriseAddressCode; - // this.getRegionDetailByCode(res.data.enterpriseAddressCode); - - // this.enterpriseBusinessAddressCodeStr = res.data.enterpriseBusinessAddressCodeStr; - // this.enterpriseBusinessAddressCode = res.data.enterpriseBusinessAddressCode; - // if (!res.data.operatingEndTime) { - // this.infoData1.dateType1 = true; - // } - // this.infoData.contactsName = res.data.contactsName; - // this.infoData.telephone = res.data.contactsPhone; - // this.infoData1.operationUserPhone = res.data.contactsPhone; - // } - // this.initSF(); - // }); - } - reloadApply() { - // 重新申请入驻 - this.modalService.confirm({ - nzTitle: '确定要重新申请入驻吗?', - nzContent: '当前申请已填写的资料将清空,重新申请需要重新填写资料', - nzOnOk: () => - new Promise((resolve, reject) => { - this.sf.reset(); - resolve(1); - }).catch(() => console.log('Oops errors!')), - }); + this.service + .request(this.service.$api_get_region_by_code, { regionCode }) + .pipe(map(data => data.map((item: any) => ({ label: item.regionFullName, value: item.regionCode, ...item })))) + .subscribe(res => { + this.regionData = res; + this.schema1 = this.initBasicInfoSF(); + }); } - updateBranchList(bankId: any, regionCode: any) { - // return this.service - // .loadBranchBankList(bankId, regionCode) - // .pipe( - // map((data) => { - // return data.map((m) => { - // return { label: m.branchName, value: m.branchCode }; - // }); - // }), - // ) - // .subscribe((res) => { - // // this.sf2.getProperty('/bankBranchName')!.schema.enum = res; - // // this.sf2.getProperty('/bankBranchName')!.widget.reset(res || res[0]); - // this.branchBanks = res || []; - // // this.initSF(); - // }); - } - loadBranchBanks(bankId: any, regionCode: any) { - // this.service - // .loadBranchBankList(bankId, regionCode) - // .pipe( - // map((data) => { - // return data.map((m) => { - // return { label: m.branchName, value: m.branchCode }; - // }); - // }), - // ) - // .subscribe((res: any[]) => { - // this.branchBanks = res || []; - // this.getUserDetail(); - this.loadBrandDist(); - this.updateBranchList(bankId, regionCode); - // }); - } - loadBrandDist() { - // this.service.http.post(this.service.$api_get_all_region).subscribe((res) => { - // const data = res.data; - // data.forEach((item: { children: any[] }) => { - // item.children.forEach((element: { isLeaf: boolean }) => { - // element.isLeaf = true; - // }); - // }); - // // this.sf2.getProperty('/bankAreaArr').schema.enum = data; - // // this.sf2.getProperty('/bankAreaArr').widget.reset(data); - // this.bankRegion = data; - // this.initSF(); - // }); - } - - getProvinceData() { - // return this.service.http.post(this.service.$api_getRegionByCode, { regionCode: '' }).pipe( - // map((res) => { - // return res.data.map((m: { name: any; regionCode: any }) => { - // return { label: m.name, value: m.regionCode }; - // }); - // }), - // ); - } updateArea(parentId: string, target: string, type: number, nextTarget: string, sfObj: SFComponent): any { // 改变二级数据时,同时清空三级数据 if (type === 2 && sfObj) { @@ -1150,64 +310,15 @@ export class FreightComponentsListNewComponent implements OnInit { // }); } } - getCategoryList() { - // return this.service.http.post(this.service.$api_getCategoryList, { id: '' }).pipe( - // map((data) => { - // return data.data.map((m: { name: any; id: any }) => { - // return { label: m.name, value: m.id }; - // }); - // }), - // ); - // .subscribe((res) => { - // this.sf3.getProperty('/classify').schema.enum = res; - // this.sf3.getProperty('/classify').widget.reset(res || res[0]); - // }); - } - getEnterpriseInfo(id: any) { - // 查询企业信息详情 - const params: any = { - id, - }; - // this.service.http.post(this.service.$api_getEnterpriseInfo, params).subscribe((res) => { - // this.signingPeriod = res.data.signingPeriod; - // }); - } - - - - auditSupplier(contractNo: any) { - // 审核供应商,签署成功需要调此接口 - const params = { - auditStatus: 7, - id: this.id, - contractNum: contractNo, - }; - // this.service.request(this.service.$api_auditSupplier, params).subscribe((res) => { - // this.service.msgSrv.success('签署成功!'); - // this.step = 3; - // this.infoData.auditStatus = 7; - // }); - } - cancel(): void { - this.msg.info('已取消'); - } /* * 根据地区code查询地区详情 * code:请求参数 * type:参数 name:获取省市区名称,fullcode:获取省市区code * num:参数 1:第一个地区选择,2:第二个地区选择 */ - getRegionDetailByCode(code: any) { + getRegionDetailByCode(regionCode: any) { // 根据地区code查询地区详情 - // this.service.http.post(this.service.$api_getRegionDetailByCode, { regionCode: code }).subscribe((res) => { - // // 供选择地区保存-获取省市区名称 - // // 第二个地区选择 - - // const a = res.data.regionFullCodes.split(','); - - // this.sf1?.setValue('/region', [+a[0], +a[1], +a[2]]); - // this.enterpriseBusinessAddressCodeStr = res.data.regionFullName.replace(/,/g, ''); - // }); + return this.service.request(this.service.$api_get_region_by_code, { regionCode }); } longTime(i: boolean | SFSchemaEnum[], type: string) { if (type === 'schema') { @@ -1244,42 +355,7 @@ export class FreightComponentsListNewComponent implements OnInit { } } } - prev() { - // 返回上一步 - if (this.subStep > 0) { - this.subStep--; - } - if (this.subStep === 2) { - if (this.id) { - this.loadBranchBanks(this.infoData2.bankCode, this.infoData2.bankAddressCode); - } else { - this.loadBrandDist(); - } - } - } - clearData() { - // 重新申请 - const params: any = { - id: this.id, - }; - // this.service.request(this.service.$api_deleteApplyCache, params).subscribe((res) => { - // if (res) { - // this.service.msgSrv.success('已清除申请资料,请重新申请!'); - // this.edit(); - // this.id = ''; - // this.infoData = {}; - // this.infoData1 = {}; - // this.infoData2 = { - // accountName: '', - // }; - // this.infoData3 = {}; - // } - // }); - } - edit() { - this.subStep = 0; - this.getApplicationInfo2(this.routerinfo.snapshot.queryParams.id); - } + goPage(page: string) { if (page === 'list') { this.router.navigate(['./account/role']); @@ -1290,15 +366,11 @@ export class FreightComponentsListNewComponent implements OnInit { goBack() { window.history.go(-1); } - onChange(result: Date): void {} - refreshPage() { - window.location.reload(); - } checkIdCard(imgurl: any, isFront: number, type: number) { // 识别身份证 参数isFront:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证 const params = { idCardImagePath: imgurl, - isFront, + isFront }; // this.service.request(this.service.$api_checkIdCard, params).subscribe((res) => { // if (res) { @@ -1350,7 +422,7 @@ export class FreightComponentsListNewComponent implements OnInit { checkBusinessLicense(imgurl: any) { // 识别营业执照 const params = { - licenseImagePath: imgurl, + licenseImagePath: imgurl }; // this.service.request(this.service.$api_checkBusinessLicense, params).subscribe((res) => { // if (res) { @@ -1394,7 +466,504 @@ export class FreightComponentsListNewComponent implements OnInit { // }); } - // resetForm(): void { - // this.infoData.reset(); - // } + private initBasicInfoSF(): SFSchema { + return { + properties: { + title1: { title: '', type: 'string', ui: { widget: 'custom' } }, + tips: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } }, + licensePhoto: { title: '', type: 'string', ui: { hidden: true } }, + licensePhotoWatermark: { + type: 'string', + title: '营业执照', + ui: { + ...this.imageConfig, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + data: { + appId: this.service.envSrv.getEnvironment().appId + }, + change: args => { + if (args.type === 'success') { + this.sf1.setValue('/licensePhoto', args.fileList[0].response.data.fullFilePath); + this.checkBusinessLicense(args.fileList[0].response.data.fullFileWatermarkPath); + } + } + } as SFUploadWidgetSchema + }, + unifiedSocialCreditCode: { + title: '统一社会信用代码', + type: 'string', + minLength: 1, + maxLength: 18, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + optionalHelp: + '为了企业用户的使用体验,若公司代码即统一社会信用代码已在本应用其他关联平台注册,则此处填写的公司资料将同步更新至对应已注册的平台', + placeholder: '请输入营业执照上的统一社会信用代码', + errors: { + required: '请输入18位公司代码' + } + } + }, + enterpriseName: { + title: '公司名称', + type: 'string', + minLength: 1, + maxLength: 100, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入公司名称', + errors: { + required: '请输入公司名称' + } + } + }, + enterpriseType: { + title: '公司类型', + type: 'string', + minLength: 1, + maxLength: 30, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入公司类型', + errors: { + required: '请输入公司类型' + } + } + }, + enterpriseAddressCode: { + type: 'number', + title: '营业执照所在地', + // default: [110000, 110100, 110105], + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'cascader', + valueProperty: 'regionCode', + labelProperty: 'name', + asyncData: (node: any, index: any) => { + return new Promise(resolve => { + this.getRegionDetailByCode(node?.regionCode || '').subscribe( + res => { + node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1 })); + }, + _ => {}, + () => { + resolve(); + } + ); + }); + }, + change: (ngModel: string | any[]) => { + console.log(ngModel); + } + } as SFCascaderWidgetSchema + }, + enterpriseAddress: { + title: '营业执照详细地址', + type: 'string', + minLength: 1, + maxLength: 240, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'textarea', + autosize: { minRows: 2, maxRows: 5 }, + placeholder: '请输入营业执照上的完整详细地址', + errors: { + required: '请输入营业执照上的完整详细地址' + } + } as SFTextareaWidgetSchema + }, + registrationCapital: { + title: '注册资本', + type: 'number', + minimum: 1, + maximum: 99999999999999999999, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入营业执照上的注册资本', + errors: { + required: '请输入营业执照上的注册资本' + }, + precision: 0 + } + }, + unit: { title: '', type: 'string', ui: { widget: 'text', class: 'input-back' }, default: '万元' }, + enterpriseRegistrationTime: { + title: '成立日期', + type: 'string', + ui: { + ...this.dateConfig, + errors: { + required: '请选择开始日期' + }, + change: i => { + // this.sf1?.setValue('/dateType1', false); + } + } as SFDateWidgetSchema + }, + operatingEndTime: { + title: '营业期限', + type: 'string', + ui: { + ...this.dateConfig, + errors: { + required: '请选择截止日期' + }, + change: i => { + this.sf1?.setValue('/isLoingDate', false); + } + } as SFDateWidgetSchema + }, + isLoingDate: { + title: '长期', + type: 'boolean', + ui: { class: 'input-back', widget: 'checkbox', change: i => this.longTime(i, 'schema11') } as SFCheckboxWidgetSchema + }, + businessScope: { + title: '经营范围', + type: 'string', + minLength: 1, + maxLength: 240, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'textarea', + autosize: { minRows: 3, maxRows: 5 }, + placeholder: '请输入营业执照上的营经营范围', + errors: { + required: '请输入营业执照上的营经营范围' + } + } as SFTextareaWidgetSchema + }, + taxAuthority: { + title: '税务机关', + type: 'string', + minLength: 1, + maxLength: 30, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入营业执照上的税务机关', + errors: { + required: '请输入营业执照上的税务机关' + } + } + }, + + legalPersonIdentityDTO: { + type: 'object', + properties: { + title2: { title: '', type: 'string', ui: { widget: 'custom' } }, + tipsC: { title: '法定代表人证件照', type: 'string', ui: { widget: 'custom' } }, + tipsA: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } }, + certificatePhotoFrontWatermark: { + type: 'string', + title: '', + ui: { + ...this.imageConfig, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + data: { + // appId: this.envSrv.getEnvironment().appId, + }, + change: args => { + if (args.type === 'success') { + this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); + } + } + } as SFUploadWidgetSchema + }, + tipsB: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } }, + certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBackWatermark: { + type: 'string', + title: '', + ui: { + ...this.imageConfig, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + data: { + // appId: this.envSrv.getEnvironment().appId, + }, + change: args => { + if (args.type === 'success') { + this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); + } + } + } as SFUploadWidgetSchema + }, + name: { + title: '法人姓名', + type: 'string', + maxLength: 8, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入营业执照上的法人姓名' + } + }, + certificateType: { + type: 'string', + title: '法人证件类型', + enum: [ + { label: '大陆身份证', value: 0 }, + { label: '港澳居民通行证', value: 1 }, + { label: '香港居民通行证', value: 2 } + ], + default: 0, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'select' + } + }, + certificateNumber: { + title: ' 法定代表人证件号', + type: 'string', + format: 'id-card', + minLength: 1, + maxLength: 18, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入法定代表人证件号' + } + }, + validStartTime: { + title: '法人证件有效开始日期', + type: 'string', + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'date', + format: 'yyyy-MM-dd', + placeholder: '请选择', + errors: { + required: '请选择开始日期' + }, + change: i => { + // this.sf1?.setValue('/dateType1', false); + } + } as SFDateWidgetSchema + }, + validEndTime: { + title: '法人证件有效截止日期', + type: 'string', + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'date', + format: 'yyyy-MM-dd', + placeholder: '请选择', + errors: { + required: '请选择截止日期' + }, + change: i => { + this.sf1?.setValue('/isLoingDate', false); + } + } as SFDateWidgetSchema + }, + isLoingDate: { + title: '长期', + type: 'boolean', + ui: { + spanLabelFixed: 100, + grid: { span: 6 }, + class: 'input-back', + widget: 'checkbox', + change: i => this.longTime(i, 'schema11') + } as SFCheckboxWidgetSchema + } + }, + required: [ + 'tipsC', + 'certificatePhotoFront', + 'certificatePhotoBack', + 'name', + 'certificateType', + 'certificateNumber', + 'validStartTime', + 'validEndTime' + ] + } + }, + required: [ + 'licensePhotoWatermark', + 'unifiedSocialCreditCode', + 'enterpriseName', + 'enterpriseType', + 'enterpriseAddressCode', + 'enterpriseAddress', + 'registrationCapital', + 'enterpriseRegistrationTime', + 'operatingEndTime', + 'operatingStartTime', + 'businessScope' + ] + }; + } + + private initOthersSF(): SFSchema { + return { + properties: { + title1: { title: '', type: 'string', ui: { widget: 'custom' } }, + createBank: { + title: '开户银行', + type: 'string', + ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' } + }, + bankAccount: { + title: '银行账号', + type: 'string', + ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' } + }, + registerAddress: { + title: ' 注册地址', + type: 'string', + ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入注册地址' } + }, + registerPhone: { + title: ' 注册电话', + type: 'string', + ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入注册电话' } + }, + + title99: { title: '', type: 'string', ui: { widget: 'custom' } }, + adminMobile: { + title: ' 企业管理员手机号', + type: 'string', + ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入业务员电话' } + }, + tipsA: { + title: '企业管理员证件照', + type: 'string', + ui: { + widget: 'custom' + } + }, + certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoFrontWatermark: { + type: 'string', + title: '', + ui: { + ...this.imageConfig, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + data: { + // appId: this.envSrv.getEnvironment().appId, + }, + change: args => { + if (args.type === 'success') { + this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); + } + } + } as SFUploadWidgetSchema + }, + tipsB: { + title: '', + type: 'string', + ui: { + widget: 'custom', + offsetControl: 6 + } + }, + certificatePhotoBackWatermark: { + type: 'string', + title: '', + ui: { + ...this.imageConfig, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + data: { + // appId: this.envSrv.getEnvironment().appId, + }, + change: args => { + if (args.type === 'success') { + this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); + } + } + } as SFUploadWidgetSchema + }, + name: { + title: '企业管理员姓名', + type: 'string', + maxLength: 8, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入营业执照上的企业管理员姓名' + } + }, + certificateNumber: { + title: '企业管理员身份证号', + type: 'string', + format: 'id-card', + minLength: 1, + maxLength: 18, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入法定代表人身份证号码' + } + }, + tipsD: { title: '企业授权函', type: 'string', ui: { widget: 'custom' }, default: 1 }, + creditPhoto: { title: '', type: 'string', ui: { hidden: true } }, + creditPhotoWatermark: { + type: 'string', + title: '', + ui: { + ...this.imageConfig, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + data: { + // appId: this.envSrv.getEnvironment().appId, + }, + change: args => { + if (args.type === 'success') { + this.sf.setValue('/creditPhoto', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); + } + } + } as SFUploadWidgetSchema + }, + oftenUsedServices: { + type: 'string', + title: '常用服务', + enum: [ + { label: '整车发货', value: 10 }, + { label: '大宗发货', value: 20 } + ], + default: '', + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + promotersTelephone: { + title: '推广业务员手机号', + type: 'string', + minLength: 1, + maxLength: 32, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入您的真实姓名', + errors: { + required: '请输入您的真实姓名' + } + } + }, + networkTransporter: { + type: 'string', + title: '网络货运人', + enum: [ + { label: '全部', value: 0 }, + { label: '大宗发货', value: 20 } + ], + default: 0, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + } + }, + required: ['createBank', '银行账号', 'adminMobile', 'name', 'certificateNumber', 'tipsD', 'creditPhoto'] + }; + } } diff --git a/src/app/routes/usercenter/components/freight/user/detail/detail.component.html b/src/app/routes/usercenter/components/freight/user/detail/detail.component.html index 51bfcadf..78a778c5 100644 --- a/src/app/routes/usercenter/components/freight/user/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.html @@ -10,22 +10,22 @@