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 new file mode 100644 index 00000000..4aafe892 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.html @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + 深圳市xxxx科技有限公司{{ detailData?.shoppFeignVO?.publicity }} + + + + + + 4545456655645{{ detailData?.shoppFeignVO?.introduction }} + 认证时间:2021-09-02 12.53.32 + + + 服务评级: + + + + + 启用 + + + 冻结 + + + 开通支付权限 + + + 关闭支付权限 + + + + + + + + + + + + + + + 确定冻结该企业吗? + + 停用后,该企业将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作 + + + + + + + + + + + 确定启用该企业吗? + + 启用后,该企业将恢复正常使用功能,请再次确认 + + + + + + + + + + + 确定关闭该企业支付权限吗? + + 停用后,该企业将被限制使用支付功能,请谨慎操作 + + + + + + + + + + + 确定开通该企业支付权限吗? + + 启用后,该企业将恢复正常支付功能,请再次确认 + + + + + + + 联系信息人 + + {{ detailData?.contactsName }} + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + + + + 公司基本信息 + + {{ detailData?.enterpriseName }} + + + {{ detailData?.unifiedSocialCreditCode }} + + + {{ detailData?.enterpriseType }} + + + {{ detailData?.registrationCapital }} + 万元 + + + {{ detailData?.enterpriseRegistrationTime }} + + + + {{ detailData?.operatingStartTime }} 至 {{ detailData?.operatingEndTime }} + + 长期 + {{ detailData?.operatingStartTime }} 至 长期 + + + + + {{ detailData?.enterpriseAddressCodeStr }} + + + {{ detailData?.enterpriseAddress }} + + + + + {{ detailData?.enterpriseAddressCodeStr }} + + + {{ detailData?.enterpriseAddress }} + + + + + {{ detailData?.enterpriseAddressCodeStr }} + + + {{ detailData?.enterpriseAddress }} + + + + + {{ detailData?.businessScope }} + + + + + + + + 法人信息 + + {{ detailData?.name }} + + + {{ detailData?.certificateNumber }} + + + {{ detailData?.validStartTime }} - + {{ detailData?.validEndTime ? detailData?.validEndTime : '长期' }} + + + + + + + + 银行结算信息 + + {{ detailData?.name }} + + + {{ detailData?.certificateNumber }} + + + {{ detailData?.validStartTime }} + + + + + + + + 取消 + 确认 + + diff --git a/src/app/routes/usercenter/components/freight/user/detail/detail.component.less b/src/app/routes/usercenter/components/freight/user/detail/detail.component.less new file mode 100644 index 00000000..48f605d9 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.less @@ -0,0 +1,46 @@ +@import '~@delon/theme/index'; +:host { + ::ng-deep { + .ant-steps-dot { + .ant-steps-item-content { + width: 200px; + } + .ant-steps-item-icon { + margin-left: 96px; + } + .ant-steps-item-tail::after { + margin-left: 40px; + } + } + .success { + color: @success-color; + } + + .warning { + color: @warning-color; + } + + .error { + color: @error-color; + } + } + .mt16 { + margin-top: 16px; + } + .user-info { + display: flex; + font-size: 16px; + .enterprise-name { + margin-right: 15px; + } + img { + width: 64px; + height: 64px; + margin-right: 15px; + border-radius: 50%; + } + .user-info-des { + margin-bottom: 5px; + } + } +} diff --git a/src/app/routes/usercenter/components/freight/user/detail/detail.component.spec.ts b/src/app/routes/usercenter/components/freight/user/detail/detail.component.spec.ts new file mode 100644 index 00000000..00666a0b --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.spec.ts @@ -0,0 +1,31 @@ +/* + * @Author: your name + * @Date: 2021-11-29 20:19:08 + * @LastEditTime: 2021-11-29 20:31:00 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\detail\detail.component.spec.ts + */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { FreightComponentsListDetailComponent } from './detail.component'; + +describe('FreightComponentsListDetailComponent', () => { + let component: FreightComponentsListDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [FreightComponentsListDetailComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FreightComponentsListDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts b/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts new file mode 100644 index 00000000..809f567f --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts @@ -0,0 +1,255 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { UsermanageService } from '../../../../services/usercenter.service'; + +@Component({ + selector: 'app-supplier-components-list-view', + templateUrl: './detail.component.html', + styleUrls: ['./detail.component.less'], +}) +export class FreightComponentsListDetailComponent implements OnInit { + i: any; + url = `/rule?_allow_anonymous=true`; + @ViewChild('st', { static: false }) st!: STComponent; + detailData: any; + isShow = false; + isVisible = false; + modalTitle = '有效期'; + modalName = ''; + ui!: SFUISchema; + schema!: SFSchema; + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema1!: SFSchema; + @ViewChild('sf1', { static: false }) sf1!: SFComponent; + validData: any = ['suppliersType']; + suppliersData: any = {}; + + constructor( + private http: _HttpClient, + private modal: ModalHelper, + public service: UsermanageService, + private route: ActivatedRoute, + private modalHelper: ModalHelper, + private msgSrv: NzMessageService, + ) {} + + ngOnInit() { + console.log(this.route.snapshot); + // this.initData(); + this.initSF(); + this.initSF1(); + // this.launchSign(); + } + /** + * 初始化查询表单 + */ + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + effectiveDate: { + title: '有效期', + type: 'string', + ui: { + widget: 'date', + format: 'yyyy-MM-dd 00:00:00', + // hidden: this.modalName === 'effectiveDate' ? false : true, + } as SFDateWidgetSchema, + }, + }, + required: ['effectiveDate'], + }; + this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; + } + initSF1() { + this.schema1 = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + suppliersType: { + type: 'string', + title: '类型', + enum: [ + { label: '非外部供应商', value: 0 }, + { label: '外部供应商', value: 1 }, + ], + default: '', + ui: { + widget: 'select', + change: (args: any) => { + console.log(args, 'args'); + this.suppliersData.suppliersType = args; + if (args === 1) { + this.validData = ['suppliersType', 'externalSuppliersId']; + } else { + this.validData = ['suppliersType']; + this.suppliersData.externalSuppliersId = ''; + } + this.initSF1(); + }, + }, + }, + externalSuppliersId: { + title: '外部供应商id', + type: 'string', + default: '', + ui: { + visibleIf: { suppliersType: (value: any) => value === 1 }, + }, + }, + }, + required: this.validData, + }; + } + showModal(name: any) { + this.modalName = name; + if (name === 'effectiveDate') { + this.isShow = true; + } else { + this.isVisible = true; + } + } + async initData() { + console.log(this.route.snapshot, 'this.route.snapshot'); + + const params = { + tenantId: this.route.snapshot.params.id, + // tenantId: this.route.snapshot.queryParams.tenantId, + }; + const res = await this.service.asyncRequest(this.service.$api_get_supplier_info, params); + // // 商品资质 + // if (res.enterpriseBusinessJson) { + // res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : []; + // } + // // // 申请人身份证证件 + // // res.applyUserJson.imagelist = []; + // // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoFront); + // // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoBack); + // // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate); + + // 法人身份证证件 + const imagelist = []; + imagelist.push(res?.certificatePhotoFront); + imagelist.push(res?.certificatePhotoBack); + res.certificatePhoto = imagelist; + + // 营业执照 + res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate + ? res.enterpriseQualificationCertificate.split(',') + : []; + + // 返回所在地 + res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode); + + this.detailData = res; + this.suppliersData = { + suppliersType: res?.suppliersType, + externalSuppliersId: res?.externalSuppliersId, + }; + } + + /** + * 根据地区code查询地区详情 + * @param code 地区代码 + */ + async getRegionFullName(code: any) { + const params = { + regionCode: code, + }; + const res = await this.service.asyncRequest(this.service.$api_get_region_detailByCode, params, 'POST', true); + // if (res && res.regionFullName) { + // const arr = res.regionFullName.split(','); + // res.regionFullName = arr.reverse().join('-'); + // } + return res && res.regionFullName; + } + add() { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + goBack() { + window.history.go(-1); + } + /** + * 冻结 + */ + freezeOrResume(type: number) { + console.log(type) + // this.service.http + // .post(this.service.$api_set_freezeOrResume, { + // tenantId: this.route.snapshot.params.id, + // // tenantId: this.route.snapshot.queryParams.tenantId, + // status: type, + // }) + // .subscribe((res) => { + // if (res.data === true) { + // if (type === 0) { + // this.service.msgSrv.success(`启用成功!`); + // } else if (type === 1) { + // this.service.msgSrv.success(`冻结成功!`); + // } + // this.ngOnInit(); + // } else { + // this.service.msgSrv.error(res.msg || '操作失败!'); + // } + // }); + } + PayOrResume(type: number) { + console.log(type) + // this.service.http + // .post(this.service.$api_set_freezeOrResume, { + // tenantId: this.route.snapshot.params.id, + // // tenantId: this.route.snapshot.queryParams.tenantId, + // status: type, + // }) + // .subscribe((res) => { + // if (res.data === true) { + // if (type === 0) { + // this.service.msgSrv.success(`启用成功!`); + // } else if (type === 1) { + // this.service.msgSrv.success(`冻结成功!`); + // } + // this.ngOnInit(); + // } else { + // this.service.msgSrv.error(res.msg || '操作失败!'); + // } + // }); + } + + handleCancel(name: any) { + if (name === 'effectiveDate') { + this.isShow = false; + } else { + this.isVisible = false; + } + } + handleOK(name: any) { + const params: any = { + tenantId: this.route.snapshot.params.id, + // tenantId: this.route.snapshot.queryParams.tenantId, + }; + + if (name === 'effectiveDate') { + params.effectiveDate = this.sf?.value?.effectiveDate; + } else { + Object.assign(params, this.sf1?.value); + } + this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => { + if (res.data === true) { + this.service.msgSrv.success(`编辑成功!`); + this.ngOnInit(); + } else { + this.service.msgSrv.error(res.msg || '编辑失败!'); + } + if (name === 'effectiveDate') { + this.isShow = false; + } else { + this.isVisible = false; + } + }); + } +} diff --git a/src/app/routes/usercenter/components/freight/user/new/new.component.html b/src/app/routes/usercenter/components/freight/user/new/new.component.html new file mode 100644 index 00000000..fe0400fa --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/new/new.component.html @@ -0,0 +1,109 @@ + + + + + + 营业执照基本信息 + + + 营业执照法人信息 + + + + 请上传营业执照原件的高清照片,若上传复印件,则需加盖公司印章; + 上传后系统会自动识别并填写 + + + + 万元 + + + + + 请上传身份证原件的高清照片,若上传复印件,则需申请人签字; + 上传后系统会自动识别并填写 + + + + + + 正面照(人像面) + 示例 + + + + + + + + 背面照(国徽面) + 示例 + + + + + + + + + 公司其他补充信息 + + + 企业管理员信息 + + + + + 请上传该企业授权您成为本系统企业管理员的文件的高清照片,需加盖公司印章 + 上传后系统会自动识别并填写 + + + + + + + + 示例 + + + + + + + {{ telephone }} 默认当前登录账号绑定的手机号 + + + + + 请上传身份证原件的高清照片,若上传复印件,则需申请人签字; + 上传后系统会自动识别并填写 + + + + + + 正面照(人像面) + 示例 + + + + + + + + 背面照(国徽面) + 示例 + + + + + + + + + + 确认新增 + 返回 + + + diff --git a/src/app/routes/usercenter/components/freight/user/new/new.component.less b/src/app/routes/usercenter/components/freight/user/new/new.component.less new file mode 100644 index 00000000..55bf514e --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/new/new.component.less @@ -0,0 +1,109 @@ +:host { + ::ng-deep { + nz-card { + .page-title { + margin-bottom: 39px; + color : #333; + font-weight : 500; + font-size : 20px; + line-height : 28px; + text-align : center; + } + + .step-title { + display: block; + width : 800px !important; + margin : 0 auto; + } + + .myForm { + width : 680px; + margin: 5rem auto; + } + + .steps-content { + min-height: 250px; + } + + .btn-submit { + margin-top: 16px; + } + + .pr { + position: relative; + } + + .pa { + position: absolute; + top : 35px; + left : 150px; + } + + .tips { + display : flex; + margin-bottom: 0; + color : #333; + + dt { + width: 150px; + } + + dd { + width : 190px; + margin-bottom: 0; + text-align : center; + } + } + + .form-title { + margin-bottom: 10px; + padding-left : 8px; + color : #333; + font-weight : 700; + font-size : 18px; + line-height : 20px; + border-left : solid 3px #1890ff; + } + + .form-content { + padding: 48px 32px; + } + + .apply-sv { + margin : 16px 0; + padding : 20px; + background : #f8f8f8; + border-radius: 2px; + } + + .result-date { + font-size: 12px; + } + + .result-tips { + color : #ff4d4f; + font-size: 14px; + } + + .sv-img { + display : inline-block; + width : 104px; + height : 104px; + margin-right : 20px; + padding : 8px; + background : #fff; + border : 1px solid rgba(0, 0, 0, 0.15); + border-radius: 2px; + + img { + width : 100%; + height: 100%; + } + } + } + + .ant-row { + margin-left: 100px; + } + } +} \ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/user/new/new.component.ts b/src/app/routes/usercenter/components/freight/user/new/new.component.ts new file mode 100644 index 00000000..df20847f --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/new/new.component.ts @@ -0,0 +1,1400 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { apiConf } from '@conf/api.conf'; +import { + SFCascaderWidgetSchema, + SFCheckboxWidgetSchema, + SFComponent, + SFDateWidgetSchema, + SFSchema, + SFSchemaEnum, + SFSelectWidgetSchema, + SFTextareaWidgetSchema, + SFUISchema, + 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 { map } from 'rxjs/operators'; +// 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'], +}) +export class FreightComponentsListNewComponent implements OnInit { + url = `/rule?_allow_anonymous=true`; + + @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; + + 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, + ) {} + 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(); + } + 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() { + + } + // submitForm() { + // // 营业执照基本信息 + // if (!this.sf.value.contactsName) { + // // this.service.msgSrv.warning('请填写申请人姓名'); + // return; + // } + // if (!this.sf1.value.enterpriseQualificationCertificate) { + // // this.service.msgSrv.warning('请上传营业执照'); + // return; + // } + // if (!this.sf1.value.unifiedSocialCreditCode) { + // // this.service.msgSrv.warning('请填写统一社会信用代码'); + // return; + // } + // if (!this.sf1.value.enterpriseName) { + // // this.service.msgSrv.warning('请填写公司名称'); + // return; + // } + // if (!this.sf1.value.enterpriseType) { + // // this.service.msgSrv.warning('请填写公司类型'); + // return; + // } + // if (!this.sf1.value.region) { + // // this.service.msgSrv.warning('请选择所在地区'); + // return; + // } + // if (!this.sf1.value.enterpriseAddress) { + // // this.service.msgSrv.warning('请填写营业执照详细地址'); + // return; + // } + // if (!this.sf1.value.registrationCapital) { + // // this.service.msgSrv.warning('请填写注册资本'); + // return; + // } + // if (!this.sf1.value.enterpriseRegistrationTime) { + // // this.service.msgSrv.warning('请选择成立日期'); + // return; + // } + // if (!this.sf1.value.operatingStartTime) { + // // this.service.msgSrv.warning('请选择营业期限开始日期'); + // return; + // } + // if (this.sf1.value.dateType !== true) { + // if (!this.sf1.value.operatingEndTime) { + // this.service.msgSrv.warning('请选择营业期限结束日期'); + // return; + // } + // if (this.sf1.value.operatingEndTime <= this.sf1.value.operatingStartTime) { + // this.service.msgSrv.warning('营业期限结束日期不能小于或等于开始日期'); + // return; + // } + // } + // if (!this.sf1.value.businessScope) { + // this.service.msgSrv.warning('请填写经营范围'); + // return; + // } + // if (!this.sf1.value.certificatePhotoFront) { + // this.service.msgSrv.warning('请上传身份证正面照'); + // return; + // } + // if (!this.sf1.value.certificatePhotoBack) { + // this.service.msgSrv.warning('请上传身份证反面照'); + // return; + // } + // if (!this.sf1.value.name) { + // this.service.msgSrv.warning('请填写法定代表人'); + // return; + // } + // if (!this.sf1.value.certificateNumber) { + // this.service.msgSrv.warning('请填写法定代表人身份证号'); + // return; + // } + // if (!this.sf1.value.validStartTime) { + // this.service.msgSrv.warning('请选择身份证有效开始日期'); + // return; + // } + // if (this.sf1.value.dateType1 !== true) { + // if (!this.sf1.value.validEndTime) { + // this.service.msgSrv.warning('请选择身份证有效截止日期'); + // return; + // } + // if (this.sf1.value.validEndTime <= this.sf1.value.validStartTime) { + // this.service.msgSrv.warning('身份证有效截止日期不能小于或等于开始日期'); + // return; + // } + // } + // const params: any = { + // contactsName: this.sf.value.contactsName, + // contactsPhone: this.sf.value.telephone, + // certificateNumber: this.sf1.value.certificateNumber, + // unifiedSocialCreditCode: this.sf1.value.unifiedSocialCreditCode, + // enterpriseAddressCodeStr: this.sf1.value.enterpriseAddressCodeStr, + // enterpriseAddressCode: this.sf1.value.region[2], + // enterpriseAddress: this.sf1.value.enterpriseAddress, + // enterpriseName: this.sf1.value.enterpriseName, + // enterpriseNameAbbreviation: this.sf1.value.enterpriseNameAbbreviation, + // enterpriseQualificationCertificate: this.sf1.value.enterpriseQualificationCertificate, + // enterpriseType: this.sf1.value.enterpriseType, + // enterpriseTelephone: this.sf1.value.enterpriseTelephone, + // enterpriseRegistrationTime: this.sf1.value.enterpriseRegistrationTime, + // businessScope: this.sf1.value.businessScope, + // operatingEndTime: this.sf1.value.operatingEndTime, + // operatingStartTime: this.sf1.value.operatingStartTime, + // organizationCode: this.sf1.value.organizationCode, + // registrationCapital: this.sf1.value.registrationCapital, + + // legalPersonIdentity: { + // // ...this.sf1.value, + // validStartTime: this.sf1.value.validStartTime, + // validEndTime: this.sf1.value.validEndTime, + // certificatePhotoBack: this.sf1.value.certificatePhotoBack, + // certificateNumber: this.sf1.value.certificateNumber, + // certificatePhotoFront: this.sf1.value.certificatePhotoFront, + // certificateType: this.sf1.value.certificateType, + // handCertificate: this.sf1.value.handCertificate, + // name: this.sf1.value.name, + // }, + // }; + // if (this.routerinfo.snapshot.queryParams.id) { + // params.id = this.routerinfo.snapshot.queryParams.id; + // } + // delete params?.tips; + // this.service.http.post(this.service.$api_supplierSubmitInfo, params).subscribe((res) => { + // if (res) { + // this.getApplicationInfo(res.data?.id); + // } + // }); + // } + 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() { + // 获取一、二、三级地区详情 + // 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!')), + }); + } + + 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) { + sfObj.getProperty(nextTarget)!.schema.enum = []; + sfObj.getProperty(nextTarget)!.widget.reset([]); + sfObj.getProperty(nextTarget)!.setValue(null, true); + } + + if (!parentId && sfObj) { + sfObj.getProperty(target)!.schema.enum = []; + sfObj.getProperty(target)!.widget.reset([]); + sfObj.getProperty(target)!.setValue(null, true); + } else { + // return this.service.http + // .get(this.service.$api_getRegionByCode, { regionCode: parentId }) + // .pipe( + // map((res) => { + // return res.data.map((m: { regionFullName: string; name: any; regionCode: any }) => { + // const fullName = m.regionFullName.split(',').reverse().join(''); + // return { label: m.name, value: m.regionCode, fullName }; + // }); + // }), + // ) + // .subscribe((res) => { + // sfObj.getProperty(target)!.schema.enum = res; + // sfObj.getProperty(target)!.widget.reset(res); + // }); + } + } + 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) { + // 根据地区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, ''); + // }); + } + longTime(i: boolean | SFSchemaEnum[], type: string) { + if (type === 'schema') { + if (i) { + // this.sf?.setValue('/validStartTime', Date); + this.sf?.setValue('/validEndTime', Date); + // this.sf.getProperty('/validStartTime').schema.readOnly = true; + this.sf.getProperty('/validEndTime')!.schema.readOnly = true; + } else { + // this.sf.getProperty('/validStartTime').schema.readOnly = false; + this.sf.getProperty('/validEndTime')!.schema.readOnly = false; + } + } + if (type === 'schema1') { + if (i) { + // this.sf1?.setValue('/operatingStartTime', Date); + this.sf1?.setValue('/operatingEndTime', Date); + // this.sf1.getProperty('/operatingStartTime').schema.readOnly = true; + this.sf1.getProperty('/operatingEndTime')!.schema.readOnly = true; + } else { + // this.sf1.getProperty('/operatingStartTime').schema.readOnly = false; + this.sf1.getProperty('/operatingEndTime')!.schema.readOnly = false; + } + } + if (type === 'schema11') { + if (i) { + // this.sf1?.setValue('/validStartTime', Date); + this.sf1?.setValue('/validEndTime', Date); + // this.sf1.getProperty('/validStartTime').schema.readOnly = true; + this.sf1.getProperty('/validEndTime')!.schema.readOnly = true; + } else { + // this.sf1.getProperty('/validStartTime').schema.readOnly = false; + this.sf1.getProperty('/validEndTime')!.schema.readOnly = false; + } + } + } + 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']); + } else { + this.router.navigate(['./account/apply-list']); + } + } + 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, + }; + // this.service.request(this.service.$api_checkIdCard, params).subscribe((res) => { + // if (res) { + // if (type === 0) { + // // 申请人身份证 + // if (isFront === 0) { + // // 正面 + // if (res.name) { + // this.sf.setValue('/name', res.name); + // } + // if (res.idCardNumber) { + // this.sf.setValue('/certificateNumber', res.idCardNumber); + // } + // } + // if (isFront === 1) { + // // 背面 + // if (res.validFrom) { + // this.sf.setValue('/validStartTime', res.validFrom); + // } + // if (res.validTo) { + // this.sf.setValue('/validEndTime', res.validTo); + // } + // } + // } + // if (type === 1) { + // // 法定代表人身份证 + // if (isFront === 0) { + // // 正面 + // if (res.name) { + // this.sf1.setValue('/name', res.name); + // } + // if (res.idCardNumber) { + // this.sf1.setValue('/certificateNumber', res.idCardNumber); + // } + // } + // if (isFront === 1) { + // // 背面 + // if (res.validFrom) { + // this.sf1.setValue('/validStartTime', res.validFrom); + // } + // if (res.validTo) { + // this.sf1.setValue('/validEndTime', res.validTo); + // } + // } + // } + // } + // }); + } + checkBusinessLicense(imgurl: any) { + // 识别营业执照 + const params = { + licenseImagePath: imgurl, + }; + // this.service.request(this.service.$api_checkBusinessLicense, params).subscribe((res) => { + // if (res) { + // if (res.unifiedSocialCreditCode) { + // this.sf1.setValue('/unifiedSocialCreditCode', res.unifiedSocialCreditCode); + // } + // if (res.enterpriseName) { + // this.sf1.setValue('/enterpriseName', res.enterpriseName); + // } + // if (res.enterpriseType) { + // this.sf1.setValue('/enterpriseType', res.enterpriseType); + // } + // if (res.addressRegionCodes) { + // this.sf1.setValue('/region', res.addressRegionCodes); + // } + // if (res.address) { + // this.sf1.setValue('/enterpriseAddress', res.address); + // } + // if (res.foundDate) { + // this.sf1.setValue('/enterpriseRegistrationTime', res.foundDate); + // } + // if (res.registeredCapital) { + // this.sf1.setValue('/registrationCapital', res.registeredCapital); + // } + // if (res.businessTermStartDate) { + // this.sf1.setValue('/operatingStartTime', res.businessTermStartDate); + // } + // if (res.businessTermEndDate) { + // this.sf1.setValue('/operatingEndTime', res.businessTermEndDate); + // } + // if (res.businessScope) { + // this.sf1.setValue('/businessScope', res.businessScope); + // } + // const len = res.addressRegionCodes.length - 1; + // this.enterpriseAddressCode = res.addressRegionCodes[len]; + // this.enterpriseAddressCodeStr = res.addressRegionNames; + // if (!res.businessTermEndDate) { + // this.sf1.setValue('/dateType', true); + // } + // } + // }); + } + + // resetForm(): void { + // this.infoData.reset(); + // } +} diff --git a/src/app/routes/usercenter/components/freight/user/user.component.html b/src/app/routes/usercenter/components/freight/user/user.component.html new file mode 100644 index 00000000..b0d2de52 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/user.component.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + 4"> + + + + + 新建 + 导出 + 查询 + 重置 + + {{ !_$expand ? '展开' : '收起' }} + + + + + + + + + + + + + + + {{ item.enterpriseName }} + + + + + + {{ item.contactsPhone }} + + + + 冻结 + 正常 + + + diff --git a/src/app/routes/usercenter/components/freight/user/user.component.spec.ts b/src/app/routes/usercenter/components/freight/user/user.component.spec.ts new file mode 100644 index 00000000..e695c14a --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/user.component.spec.ts @@ -0,0 +1,23 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { FreightComponentsListComponent } from './list.component'; + +describe('FreightComponentsListComponent', () => { + let component: FreightComponentsListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [FreightComponentsListComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FreightComponentsListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/usercenter/components/freight/user/user.component.ts b/src/app/routes/usercenter/components/freight/user/user.component.ts new file mode 100644 index 00000000..28210434 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/user.component.ts @@ -0,0 +1,228 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { UsermanageService } from '../../../services/usercenter.service'; +@Component({ + selector: 'app-Freight-components-user', + templateUrl: './user.component.html', +}) +export class FreightComponentsUserComponent implements OnInit { + _$expand = false; + url = `/rule?_allow_anonymous=true`; + + ui!: SFUISchema; + schema!: SFSchema; + columns!: STColumn[]; + datalist = [ + { + storeName: '企业名称', + contactsName: '152746565', + enterpriseName: '湖南', + unifiedSocialCreditCode: '45454', + contactsPhone: '*97889461561', + effectiveDateStr: '废弃eww', + enStatusStr2: '正常', + enStatusStr3: '正常', + unifiedSocialCreditCode3: '常用服务', + unifiedSocialCreditCode2: '正常', + tenantId: 1 + }, + { + storeName: '企业名称', + contactsName: '152746565', + enterpriseName: '湖南', + unifiedSocialCreditCode: '45454', + contactsPhone: '*97889461561', + effectiveDateStr: '废弃eww', + enStatusStr2: '正常', + enStatusStr3: '正常', + unifiedSocialCreditCode3: '常用服务', + unifiedSocialCreditCode2: '正常', + tenantId: 2 + }, + ] + @ViewChild('st', { static: false }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + + constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} + /** + * 查询字段个数navigate + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + + /** + * 查询参数 + */ + get reqParams() { + const params: any = { + ...(this.sf && this.sf.value), + }; + if (this.sf?.value.effectiveDate) { + params.effectiveDateStart = this.sf?.value.effectiveDate[0]; + params.effectiveDateEnd = this.sf?.value.effectiveDate[1]; + } + delete params.effectiveDate; + delete params.expand; + return params; + } + + get selectedRows() { + return this.st?.list.filter((item) => item.checked) || []; + } + + ngOnInit() { + this.initSF(); + this.initST(); + this.ar.url.subscribe((params) => { + this.st?.load(1); + }); + } + dataProcess(data: STData[]): STData[] { + return data.map((i, index) => { + i.showSortFlag = false; + return i; + }); + } + initSF() { + this.schema = { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true, + }, + }, + storeName: { title: '企业名称', type: 'string', ui: { showRequired: false } }, + contactsName: { + title: '联系人', + type: 'string', + ui: { + showRequired: false, + }, + }, + unifiedSocialCreditCode: { + title: '税源地', + type: 'string', + ui: { + showRequired: false, + }, + }, + enStatus: { + type: 'string', + title: '货主状态', + enum: [ + { label: '全部', value: '' }, + { label: '正常', value: 0 }, + { label: '冻结', value: 1 }, + { label: '废弃', value: 2 }, + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value, + }, + }, + }, + enStatus2: { + type: 'string', + title: 'CRM审核状态', + enum: [ + { label: '全部', value: '' }, + { label: '正常', value: 0 }, + { label: '冻结', value: 1 }, + { label: '废弃', value: 2 }, + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value, + }, + }, + }, + }, + }; + this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; + } + + initST() { + this.columns = [ + // { title: '', type: 'checkbox', className: 'text-center' }, + { title: '企业名称', className: 'text-center', index: 'storeName' }, + { title: '联系人', className: 'text-center', index: 'contactsName' }, + { title: '税源地', className: 'text-center', render: 'enterpriseName' }, + { title: '累计运单金额', className: 'text-center', index: 'unifiedSocialCreditCode' }, + { title: '道运证', className: 'text-center', index: 'contactsPhone', + render: 'contactsPhone' + }, + { title: '企业状态', className: 'text-center', index: 'effectiveDateStr', + type: 'badge', + badge: { + 正常: { text: '正常', color: 'success' }, + 冻结: { text: '冻结', color: 'warning' }, + 废弃: { text: '废弃', color: 'default' }, + }, + }, + { + title: 'CRM审核状态', + className: 'text-center', + index: 'enStatusStr2', + type: 'badge', + badge: { + 正常: { text: '正常', color: 'success' }, + 冻结: { text: '冻结', color: 'warning' }, + 废弃: { text: '废弃', color: 'default' }, + }, + }, + { + title: '代收权限', + className: 'text-center', + index: 'enStatusStr3', + type: 'badge', + badge: { + 正常: { text: '正常', color: 'success' }, + 冻结: { text: '冻结', color: 'warning' }, + 废弃: { text: '废弃', color: 'default' }, + }, + }, + { title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode3' }, + { title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' }, + { + title: '操作', + width: '170px', + className: 'text-center', + buttons: [ + { + text: '查看', + click: (item) => { + this.router.navigate(['./detail', item.tenantId], { relativeTo: this.ar }); + // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); + }, + }, + ], + }, + ]; + } + daoyun(item: any) { + this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar }); + } + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + creat() { + this.router.navigate(['./new',], { relativeTo: this.ar }); + } + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } +} diff --git a/src/app/routes/usercenter/components/freight/user/view/view.component.html b/src/app/routes/usercenter/components/freight/user/view/view.component.html new file mode 100644 index 00000000..96d0bc91 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/view/view.component.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + 深圳市xxxx科技有限公司{{ detailData?.shoppFeignVO?.publicity }} + + + + + + 4545456655645{{ detailData?.shoppFeignVO?.introduction }} + 认证时间:2021-09-02 12.53.32 + + + 服务评级: + + + + + + + + 道路运输经营许可证 + + + 取消 + 确认 + + + + + diff --git a/src/app/routes/usercenter/components/freight/user/view/view.component.less b/src/app/routes/usercenter/components/freight/user/view/view.component.less new file mode 100644 index 00000000..48f605d9 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/view/view.component.less @@ -0,0 +1,46 @@ +@import '~@delon/theme/index'; +:host { + ::ng-deep { + .ant-steps-dot { + .ant-steps-item-content { + width: 200px; + } + .ant-steps-item-icon { + margin-left: 96px; + } + .ant-steps-item-tail::after { + margin-left: 40px; + } + } + .success { + color: @success-color; + } + + .warning { + color: @warning-color; + } + + .error { + color: @error-color; + } + } + .mt16 { + margin-top: 16px; + } + .user-info { + display: flex; + font-size: 16px; + .enterprise-name { + margin-right: 15px; + } + img { + width: 64px; + height: 64px; + margin-right: 15px; + border-radius: 50%; + } + .user-info-des { + margin-bottom: 5px; + } + } +} diff --git a/src/app/routes/usercenter/components/freight/user/view/view.component.spec.ts b/src/app/routes/usercenter/components/freight/user/view/view.component.spec.ts new file mode 100644 index 00000000..6e2a7782 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/view/view.component.spec.ts @@ -0,0 +1,23 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { FreightComponentsListViewComponent } from './view.component'; + +describe('FreightComponentsListViewComponent', () => { + let component: FreightComponentsListViewComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [FreightComponentsListViewComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FreightComponentsListViewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/usercenter/components/freight/user/view/view.component.ts b/src/app/routes/usercenter/components/freight/user/view/view.component.ts new file mode 100644 index 00000000..f72bb40a --- /dev/null +++ b/src/app/routes/usercenter/components/freight/user/view/view.component.ts @@ -0,0 +1,257 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { UsermanageService } from '../../../../services/usercenter.service'; +import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; +import { Observable, Observer } from 'rxjs'; +@Component({ + selector: 'app-Freight-components-list-view', + templateUrl: './view.component.html', + styleUrls: ['./view.component.less'], +}) +export class FreightComponentsListViewComponent implements OnInit { + i: any; + url = `/rule?_allow_anonymous=true`; + + @ViewChild('st', { static: false }) st!: STComponent; + detailData: any = { + status: 0 + }; + isShow = false; + isVisible = false; + modalTitle = '有效期'; + modalName = ''; + ui!: SFUISchema; + schema!: SFSchema; + @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('sf1', { static: false }) sf1!: SFComponent; + validData: any = ['FreightsType']; + FreightsData: any = {}; + + constructor( + private http: _HttpClient, + private modal: ModalHelper, + public service: UsermanageService, + private route: ActivatedRoute, + private modalHelper: ModalHelper, + private msgSrv: NzMessageService, + ) {} + + ngOnInit() { + console.log(this.route.snapshot); + this.initData(); + this.initSF(); + // this.launchSign(); + } + /** + * 初始化查询表单 + */ + initSF() { + this.schema = { + properties: { + name: { + title: '许可证号', + type: 'string', + maxLength: 20, + ui: { + placeholder: '请输入角色名称', + }, + }, + phone: { + title: '业户名称', + type: 'string', + maxLength: 20, + ui: { + placeholder: '请输入业户名称', + }, + }, + roleDescription: { + title: '地址', + type: 'string', + maxLength: 30, + ui: { + placeholder: '请输入地址', + widget: 'textarea', + }, + }, + effectiveDate: { + title: '发证日期', + type: 'string', + ui: { + widget: 'date', + format: 'yyyy-MM-dd 00:00:00', + // hidden: this.modalName === 'effectiveDate' ? false : true, + } as SFDateWidgetSchema, + }, + phone3: { + title: '有效期', + type: 'string', + ui: { + placeholder: '请输入业户名称', + }, + }, + phone4: { + title: '有效期截止', + type: 'string', + ui: { + placeholder: '请输入业户名称', + }, + }, + phone5: { + title: '经营范围', + type: 'string', + ui: { + placeholder: '请输入业户名称', + }, + }, + avatar: { + type: 'string', + title: '证照', + ui: { + // action: environment.UPLOAD_URL, + fileType: 'image/png,image/jpeg,image/jpg,image/png,image/gif,image/bmp', + limit: 1, + limitFileCount: 1, + resReName: 'url', + urlReName: 'url', + widget: 'upload', + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + data: { + // appId: environment.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args) => { + if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.fileList[0].response.url, + response: { + url: args.fileList[0].response.url, + }, + }, + ]; + this.sf?.setValue('/avatar', avatar); + } + }, + beforeUpload: (file: any, _fileList) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + }, + } as SFUploadWidgetSchema, + }, + }, + required: ['name', 'phone'], + }; + this.ui = { '*': { spanLabelFixed: 200, grid: {offset:4, span: 12 } } }; + } + showModal(name: any) { + this.modalName = name; + if (name === 'effectiveDate') { + this.isShow = true; + } else { + this.isVisible = true; + } + } + async initData() { + console.log(this.route.snapshot, 'this.route.snapshot'); + + const params = { + tenantId: this.route.snapshot.params.id, + }; + } + + /** + * 根据地区code查询地区详情 + * @param code 地区代码 + */ + async getRegionFullName(code: any) { + const params = { + regionCode: code, + }; + const res = await this.service.asyncRequest(this.service.$api_get_region_detailByCode, params, 'POST', true); + // if (res && res.regionFullName) { + // const arr = res.regionFullName.split(','); + // res.regionFullName = arr.reverse().join('-'); + // } + return res && res.regionFullName; + } + add() { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + goBack() { + window.history.go(-1); + } + /** + * 冻结 + */ + freezeOrResume(type: number) { + this.service.http + .post(this.service.$api_set_freezeOrResume, { + tenantId: this.route.snapshot.params.id, + // tenantId: this.route.snapshot.queryParams.tenantId, + status: type, + }) + .subscribe((res) => { + if (res.data === true) { + if (type === 0) { + this.service.msgSrv.success(`启用成功!`); + } else if (type === 1) { + this.service.msgSrv.success(`冻结成功!`); + } + this.ngOnInit(); + } else { + this.service.msgSrv.error(res.msg || '操作失败!'); + } + }); + } + + handleCancel(name: any) { + if (name === 'effectiveDate') { + this.isShow = false; + } else { + this.isVisible = false; + } + } + handleOK(name: any) { + const params: any = { + tenantId: this.route.snapshot.params.id, + // tenantId: this.route.snapshot.queryParams.tenantId, + }; + + if (name === 'effectiveDate') { + params.effectiveDate = this.sf?.value?.effectiveDate; + } else { + Object.assign(params, this.sf1?.value); + } + this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => { + if (res.data === true) { + this.service.msgSrv.success(`编辑成功!`); + this.ngOnInit(); + } else { + this.service.msgSrv.error(res.msg || '编辑失败!'); + } + if (name === 'effectiveDate') { + this.isShow = false; + } else { + this.isVisible = false; + } + }); + } +} diff --git a/src/app/routes/usercenter/usercenter-routing.module.ts b/src/app/routes/usercenter/usercenter-routing.module.ts index 83e2ef69..ca4cb7bd 100644 --- a/src/app/routes/usercenter/usercenter-routing.module.ts +++ b/src/app/routes/usercenter/usercenter-routing.module.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-29 15:22:34 - * @LastEditTime: 2021-11-30 10:29:19 + * @LastEditTime: 2021-11-30 15:12:16 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\usercenter\usercenter-routing.module.ts @@ -15,6 +15,7 @@ import { FreightComponentsListDetailComponent } from './components/freight/list/ import { FreightComponentsListComponent } from './components/freight/list/list.component'; import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component'; import { FreightComponentsListViewComponent } from './components/freight/list/view/view.component'; +import { FreightComponentsUserComponent } from './components/freight/user/user.component'; const routes: Routes = [ @@ -25,6 +26,7 @@ const routes: Routes = [ { path: 'freight/list/detail/:id', component: FreightComponentsListDetailComponent }, { path: 'freight/enterprise', component: FreightComponentsEnterpriseAuditComponent }, { path: 'freight/enterprise/view/:id', component: FreightComponentsEnterpriseAuditViewComponent }, + { path: 'freight/user', component: FreightComponentsUserComponent }, ]; @NgModule({ diff --git a/src/app/routes/usercenter/usercenter.module.ts b/src/app/routes/usercenter/usercenter.module.ts index 3dac1057..6a275546 100644 --- a/src/app/routes/usercenter/usercenter.module.ts +++ b/src/app/routes/usercenter/usercenter.module.ts @@ -14,6 +14,7 @@ import { FreightComponentsListDetailComponent } from './components/freight/list/ import { FreightComponentsListComponent } from './components/freight/list/list.component'; import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component'; import { FreightComponentsListViewComponent } from './components/freight/list/view/view.component'; +import { FreightComponentsUserComponent } from './components/freight/user/user.component'; import { UsercenterRoutingModule } from './usercenter-routing.module'; const COMPONENTS = [ @@ -22,7 +23,8 @@ const COMPONENTS = [ FreightComponentsListNewComponent, FreightComponentsListDetailComponent, FreightComponentsEnterpriseAuditComponent, - FreightComponentsEnterpriseAuditViewComponent + FreightComponentsEnterpriseAuditViewComponent, + FreightComponentsUserComponent ]; @NgModule({ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index ccce72da..cd533255 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -69,6 +69,11 @@ "hide": true, "icon": "anticon anticon-dashboard", "link": "/usercenter/freight/enterprise/view/:id" + }, + { + "text": "用户列表", + "icon": "anticon anticon-dashboard", + "link": "/usercenter/user" } ] }
深圳市xxxx科技有限公司{{ detailData?.shoppFeignVO?.publicity }}
4545456655645{{ detailData?.shoppFeignVO?.introduction }}
认证时间:2021-09-02 12.53.32