Merge branch 'feature/partner' of https://gitlab.eascs.com/tms-ui/tms-obc-web into feature/partner
This commit is contained in:
		| @ -124,8 +124,8 @@ export class FreightAccountService extends ShipperBaseService { | ||||
|   // 根据预收款ID获取收款单明细 | ||||
|   $api_get_advance_collection_detail = '/api/fcc/ficoBrmYsk/getBrmYskByYskblaId'; | ||||
|  | ||||
|   constructor(public injector: Injector, public eaCacheSrv: EACacheService) { | ||||
|     super(injector, eaCacheSrv); | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|   } | ||||
|  | ||||
|   getReceiptUrl(url: string, params: any) { | ||||
|  | ||||
| @ -28,7 +28,7 @@ export class InsuranceManagementService extends ShipperBaseService { | ||||
|   //  保险费公司认证 | ||||
|   $api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`; | ||||
|  | ||||
|   constructor(public injector: Injector, public eaCacheSrv: EACacheService) { | ||||
|     super(injector, eaCacheSrv); | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -190,7 +190,7 @@ export class OrderManagementService extends ShipperBaseService { | ||||
|       }) | ||||
|     ); | ||||
|   } | ||||
|   constructor(public injector: Injector, public eaCacheSrv: EACacheService) { | ||||
|     super(injector, eaCacheSrv); | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -60,7 +60,7 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|           ui: { | ||||
|             widget: 'autocomplete', | ||||
|             placeholder:'请选择', | ||||
|             asyncData: () => this.service.request(this.service.$api_fuzzyQuery).pipe( | ||||
|             asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( | ||||
|               map((res: any) => { | ||||
|                 console.log('111',res) | ||||
|                 return []; | ||||
| @ -81,7 +81,7 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|           default: '0', | ||||
|         }, | ||||
|         roleIds: { | ||||
|           title: '角色', | ||||
|           title: '', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
| @ -89,6 +89,7 @@ export class ParterChannelSalesEditComponent implements OnInit { | ||||
|             mode: 'multiple', | ||||
|             maxMultipleCount: 5, | ||||
|             asyncData: () => { | ||||
|          | ||||
|               return this.service.request(this.service.$api_getAppRoleList).pipe( | ||||
|                 map((res: any) => { | ||||
|                   return res | ||||
|  | ||||
| @ -64,27 +64,27 @@ export class ParterChannelSalesListComponent implements OnInit { | ||||
|     this.columns = [ | ||||
|       { | ||||
|         title: '销售渠道姓名', | ||||
|         index: 'name1' | ||||
|         index: 'name' | ||||
|       }, | ||||
|       { | ||||
|         title: '手机号', | ||||
|         index: 'name1' | ||||
|         index: 'telephone' | ||||
|       }, | ||||
|       { | ||||
|         title: '所属组织', | ||||
|         index: 'name1' | ||||
|         index: 'organLable' | ||||
|       }, | ||||
|       { | ||||
|         title: '职级', | ||||
|         index: 'name1' | ||||
|         index: 'station' | ||||
|       }, | ||||
|       { | ||||
|         title: '等级', | ||||
|         index: 'name1' | ||||
|         index: 'postLevel' | ||||
|       }, | ||||
|       { | ||||
|         title: '省市', | ||||
|         index: 'name1' | ||||
|         index: 'residencePlace' | ||||
|       }, | ||||
|       { | ||||
|         title: '邀请码', | ||||
|  | ||||
| @ -75,6 +75,7 @@ export class ParterLevelConfigEditComponent implements OnInit { | ||||
|     if(!this.sf.valid) return; | ||||
|     this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('保存成功!') | ||||
|         this.modalRef.destroy(true); | ||||
|       } else { | ||||
|         this.service.msgSrv.error(res.msg); | ||||
|  | ||||
| @ -45,21 +45,22 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|       properties: { | ||||
|         gradeName: { | ||||
|           type: 'string', | ||||
|           title: '等级姓名' | ||||
|           title: '等级姓名', | ||||
|         }, | ||||
|         stateLocked: { | ||||
|           type: 'string', | ||||
|           title: '状态', | ||||
|           enum:[{label:'是',value:'1'},{label:'否',value:'2'}], | ||||
|           enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}], | ||||
|           ui:{ | ||||
|             widget:'select' | ||||
|             widget:'select', | ||||
|           } | ||||
|         }, | ||||
|       } | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         grid: { span: 8, gutter: 4 } | ||||
|         width:300, | ||||
|         grid: { span: 12, gutter: 4 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
| @ -76,7 +77,7 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|       }, | ||||
|       { | ||||
|         title: '创建时间', | ||||
|         index: 'name1' | ||||
|         index: 'createTime' | ||||
|       }, | ||||
|       { | ||||
|         title: '启用时间', | ||||
| @ -84,7 +85,10 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|       }, | ||||
|       { | ||||
|         title: '状态', | ||||
|         index: 'name1' | ||||
|         index: 'stateLocked', | ||||
|         format: (item: any) => { | ||||
|           return item.stateLocked ? '禁用':'启用' | ||||
|         } | ||||
|       }, | ||||
|       { | ||||
|         title: '操作', | ||||
| @ -97,10 +101,12 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|           { | ||||
|             text: '禁用', | ||||
|             click: (_record, _modal, _instance) => this.stop(_record), | ||||
|             iif:(item)=>!item.stateLocked | ||||
|           }, | ||||
|           { | ||||
|             text: '启用', | ||||
|             click: (_record, _modal, _instance) => this.restart(_record), | ||||
|             iif:(item)=>item.stateLocked | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
| @ -145,30 +151,30 @@ export class ParterLevelConfigListComponent implements OnInit { | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   restart(id: any) { | ||||
|   restart(item: any) { | ||||
|     this.modalService.confirm({ | ||||
|       nzTitle: '<i>冻结确认</i>', | ||||
|       nzContent: `<b>确定启用该账号吗?</br>`, | ||||
|       // nzOnOk: () => | ||||
|       //   this.service.request('', '').subscribe(res => { | ||||
|       //     if (res) { | ||||
|       //       this.service.msgSrv.success('冻结成功!'); | ||||
|       //       this.st.reload(); | ||||
|       //     } | ||||
|       //   }) | ||||
|       nzOnOk: () => | ||||
|         this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { | ||||
|           if (res) { | ||||
|             this.service.msgSrv.success('启用成功!'); | ||||
|             this.st.reload(); | ||||
|           } | ||||
|         }) | ||||
|     }); | ||||
|   } | ||||
|   stop(id: any) { | ||||
|   stop(item: any) { | ||||
|     this.modalService.confirm({ | ||||
|       nzTitle: '<i>冻结确认</i>', | ||||
|       nzContent: `<b>确定禁用该账号吗?</br>`, | ||||
|       // nzOnOk: () => | ||||
|       //   this.service.request('', '').subscribe(res => { | ||||
|       //     if (res) { | ||||
|       //       this.service.msgSrv.success('冻结成功!'); | ||||
|       //       this.st.reload(); | ||||
|       //     } | ||||
|       //   }) | ||||
|       nzOnOk: () => | ||||
|         this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { | ||||
|           if (res) { | ||||
|             this.service.msgSrv.success('冻结成功!'); | ||||
|             this.st.reload(); | ||||
|           } | ||||
|         }) | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|  | ||||
| @ -13,6 +13,8 @@ export class ChannelSalesService extends BaseService { | ||||
|   $api_save = '/api/mdc/partnerGradeConfig/save'; | ||||
|   // 删除合伙人等级配置表 | ||||
|   $api_del = '/api/mdc/partnerGradeConfig/deletebatch'; | ||||
|   // 启用/禁用等级配置 | ||||
|   $api_updatePartnerGradeConfig = '/api/mdc/partnerGradeConfig/updatePartnerGradeConfig'; | ||||
|  | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|  | ||||
| @ -36,8 +36,7 @@ | ||||
|       <se [col]="1" label="合伙人名称"> {{selectItem?.enterpriseName}} </se> | ||||
|       <se [col]="1" label="返佣模板" required> | ||||
|         <nz-select [(ngModel)]="templateId" style="width: 100%"> | ||||
|           <nz-option nzValue="jack" nzLabel="Jack"></nz-option> | ||||
|           <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> | ||||
|           <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of customers"></nz-option> | ||||
|         </nz-select> | ||||
|       </se> | ||||
|     </div> | ||||
|  | ||||
| @ -25,6 +25,7 @@ export class PartnerListComponent { | ||||
|   @ViewChild('editTemplate', { static: true }) | ||||
|   editTemplate: any; | ||||
|   templateId: any; | ||||
|   templates: any[] = []; | ||||
|  | ||||
|   @ViewChild('editCannel', { static: true }) | ||||
|   editCannel: any; | ||||
| @ -32,7 +33,13 @@ export class PartnerListComponent { | ||||
|  | ||||
|   selectItem: any = {}; | ||||
|  | ||||
|   constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {} | ||||
|   constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) { | ||||
|     this.service.getRebateConfig().subscribe(res => { | ||||
|       if (res) { | ||||
|         this.customers = res; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     if (this.sf) { | ||||
| @ -60,6 +67,10 @@ export class PartnerListComponent { | ||||
|       nzTitle: '修改返佣模板', | ||||
|       nzContent: this.editTemplate, | ||||
|       nzOnOk: () => { | ||||
|         if (!this.templateId) { | ||||
|           this.service.msgSrv.warning('请选择返佣模板'); | ||||
|           return false; | ||||
|         } | ||||
|         this.confirmEditTemplate(); | ||||
|         return false; | ||||
|       } | ||||
| @ -367,9 +378,9 @@ export class PartnerListComponent { | ||||
|             text: '详情', | ||||
|             click: item => { | ||||
|               if (item.partnerType === 1) { | ||||
|                 this.router.navigate([`/partner/partner-list/etp-detail/${item.appUserId}`]); | ||||
|                 this.router.navigate([`/partner/partner-list/etp-detail/${item.id}`]); | ||||
|               } else { | ||||
|                 this.router.navigate([`/partner/partner-list/personal-detail/${item.appUserId}`]); | ||||
|                 this.router.navigate([`/partner/partner-list/personal-detail/${item.id}`]); | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|  | ||||
| @ -121,19 +121,19 @@ | ||||
|       </div> | ||||
|     </sv> | ||||
|     <sv label="身份证有效期" col="1"> | ||||
|       <nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " | ||||
|       <nz-date-picker [(ngModel)]="detailData.adminUserInfo.validStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " | ||||
|         [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar"> | ||||
|       </nz-date-picker> | ||||
|       - | ||||
|       <ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime"> | ||||
|       <ng-container *ngIf="!isEdit && !detailData?.adminUserInfo.validEndTime && detailData?.adminUserInfo.validStartTime"> | ||||
|         <label style="padding-left: 11px">长期</label> | ||||
|       </ng-container> | ||||
|       <nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " | ||||
|       <nz-date-picker [(ngModel)]="detailData.adminUserInfo.validEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " | ||||
|         [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar"> | ||||
|       </nz-date-picker> | ||||
|       <ng-container *ngIf="isEdit"> | ||||
|         <label nz-checkbox [ngModel]="!!!detailData.operatingEndTime" | ||||
|           (ngModelChange)="$event ? (detailData.operatingEndTime = '') : ''" class="ml-sm">长期</label> | ||||
|         <label nz-checkbox [ngModel]="!!!detailData.adminUserInfo.validEndTime" | ||||
|           (ngModelChange)="$event ? (detailData.adminUserInfo.validEndTime = '') : ''" class="ml-sm">长期</label> | ||||
|       </ng-container> | ||||
|     </sv> | ||||
|   </sv-container> | ||||
| @ -165,12 +165,14 @@ | ||||
|       </p> | ||||
|     </sv-title> | ||||
|     <sv label="公司名称"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.enterpriseName" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit ? '' : '-'" /> | ||||
|       <!-- <input nz-input type="text" [(ngModel)]="" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit ? '' : '-'" /> --> | ||||
|       {{detailData.enterpriseName}} | ||||
|     </sv> | ||||
|     <sv label="统一社会信用代码"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit" | ||||
|         [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> | ||||
|       <!-- <input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit" | ||||
|         [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> --> | ||||
|       {{detailData.unifiedSocialCreditCode}} | ||||
|     </sv> | ||||
|     <sv label="营业执照" col="2"> | ||||
|       <ng-container *ngTemplateOutlet=" | ||||
| @ -306,14 +308,9 @@ | ||||
|     </ng-container> | ||||
|     <div *ngIf="data[key]" (mouseover)="detailData[hover] = true" (mouseleave)="detailData[hover] = false" | ||||
|       (click)="$event.cancelBubble = true" class="image-hover"> | ||||
|       <img [src]="data[key]" style="width: 200px; height: 160px" (click)="service.showImg(data[key])" /> | ||||
|       <div class="mask" *ngIf="detailData[hover] && isEdit"></div> | ||||
|       <div class="mask-over" *ngIf="detailData[hover] && isEdit"> | ||||
|         <i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(data, key, key2)"></i> | ||||
|         <div style="display: flex; align-items: center"> | ||||
|           <i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="service.showImg(data[key])"></i> | ||||
|         </div> | ||||
|       </div> | ||||
|       <img nz-image [nzSrc]="data[key]" style="width: 200px; height: 160px" /> | ||||
|       <i nz-icon *ngIf="detailData[hover] && isEdit" nzType="close-circle" nzTheme="fill" class="delete-icon" | ||||
|         (click)="deleteImg(data, key, key2)"></i> | ||||
|     </div> | ||||
|   </nz-upload> | ||||
| </ng-template> | ||||
|  | ||||
| @ -27,4 +27,11 @@ | ||||
|     z-index : 999 !important; | ||||
|     width   : 100% !important; | ||||
|   } | ||||
|  | ||||
|   .image-hover .delete-icon { | ||||
|     top        : unset !important; | ||||
|     right      : unset !important; | ||||
|     margin-top : -15px; | ||||
|     margin-left: -15px; | ||||
|   } | ||||
| } | ||||
| @ -253,49 +253,35 @@ export class PartnerDetailComponent implements OnInit, OnDestroy { | ||||
|   } | ||||
|  | ||||
|   save() { | ||||
|     if (this.enterpriseAddressCode?.length > 3) { | ||||
|       this.service.msgSrv.warning('所属城市不能超过3个'); | ||||
|       return; | ||||
|     } | ||||
|     const dateil = { ...this.detailData }; | ||||
|     Object.assign(dateil.legalPersonIdentity, { | ||||
|       validStartTime: this.datePipe.transform(dateil.legalPersonIdentity.validStartTime, 'yyyy-MM-dd'), | ||||
|       validEndTime: this.datePipe.transform(dateil.legalPersonIdentity.validEndTime, 'yyyy-MM-dd') | ||||
|     }); | ||||
|     Object.assign(dateil.adminUserInfo, { | ||||
|       validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'), | ||||
|       validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd') | ||||
|     }); | ||||
|     const params = {}; | ||||
|     Object.assign(params, { | ||||
|       adminMobile: dateil.adminMobile, | ||||
|       adminAppUserId: dateil.adminAppUserId, | ||||
|       adminUserInfo: { ...dateil.adminUserInfo }, | ||||
|       bankAccount: dateil.bankAccount, | ||||
|       businessScope: dateil.businessScope, | ||||
|       createBank: dateil.createBank, | ||||
|       creditPhoto: dateil.creditPhoto, | ||||
|       creditPhotoWatermark: dateil.creditPhotoWatermark, | ||||
|       enterpriseAddress: dateil.enterpriseAddress, | ||||
|       enterpriseAddressCode: this.enterpriseAddressCode[2], | ||||
|       enterpriseLogo: dateil.enterpriseLogo, | ||||
|       enterpriseName: dateil.enterpriseName, | ||||
|       ...dateil, | ||||
|       cityCodesList: this.enterpriseAddressCode, | ||||
|       enterpriseRegistrationTime: this.datePipe.transform(dateil.enterpriseRegistrationTime, 'yyyy-MM-dd'), | ||||
|       enterpriseType: dateil.enterpriseType, | ||||
|       id: dateil.id, | ||||
|       legalPersonIdentityDTO: { ...dateil.legalPersonIdentity }, | ||||
|       licensePhoto: dateil.licensePhoto, | ||||
|       licensePhotoWatermark: dateil.licensePhotoWatermark, | ||||
|       networkTransporter: dateil.networkTransporter, | ||||
|       oftenUsedServices: dateil.oftenUsedServices, | ||||
|       operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'), | ||||
|       operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'), | ||||
|       promotersTelephone: dateil.promotersTelephone, | ||||
|       registerAddress: dateil.registerAddress, | ||||
|       registerPhone: dateil.registerPhone, | ||||
|       registrationCapital: dateil.registrationCapital, | ||||
|       taxAuthority: dateil.taxAuthority, | ||||
|       unifiedSocialCreditCode: dateil.unifiedSocialCreditCode | ||||
|       operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd') | ||||
|     }); | ||||
|      | ||||
|     this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('企业合伙人修改成功'); | ||||
|         this.initData(); | ||||
|         this.isEdit = false; | ||||
|       } | ||||
|     }); | ||||
|     // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { | ||||
|     //   if (res) { | ||||
|     //     this.service.msgSrv.success('企业修改成功'); | ||||
|     //     this.initData(); | ||||
|     //     this.isEdit = false; | ||||
|     //   } | ||||
|     // }); | ||||
|   } | ||||
|  | ||||
|   // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 | ||||
| @ -304,85 +290,77 @@ export class PartnerDetailComponent implements OnInit, OnDestroy { | ||||
|       idCardUrl: imgurl, | ||||
|       side: isFront | ||||
|     }; | ||||
|     // this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { | ||||
|     //   if (res) { | ||||
|     //     if (type === 1) { | ||||
|     //       // 法定代表人证件照 | ||||
|     //       if (isFront === 'front') { | ||||
|     //         // 正面 | ||||
|     //         if (res.name) { | ||||
|     //           this.detailData.legalPersonIdentity.name = res.name; | ||||
|     //         } | ||||
|     //         if (res.number) { | ||||
|     //           this.detailData.legalPersonIdentity.certificateNumber = res.number; | ||||
|     //         } | ||||
|     //       } | ||||
|     //       if (isFront === 'back') { | ||||
|     //         // 背面 | ||||
|     //         if (res.validFrom) { | ||||
|     //           this.detailData.legalPersonIdentity.validStartTime = res.validFrom; | ||||
|     //         } | ||||
|     //         if (res.validTo) { | ||||
|     //           this.detailData.legalPersonIdentity.validEndTime = res.validTo; | ||||
|     //         } else { | ||||
|     //           this.detailData.legalPersonIdentity.validEndTime = null; | ||||
|     //         } | ||||
|     //       } | ||||
|     //     } | ||||
|     //     // 企业管理员证件照 | ||||
|     //     if (type === 0) { | ||||
|     //       if (isFront === 'front') { | ||||
|     //         // 正面 | ||||
|     //         if (res.name) { | ||||
|     //           this.detailData.adminUserInfo.name = res.name; | ||||
|     //         } | ||||
|     //         if (res.number) { | ||||
|     //           this.detailData.adminUserInfo.certificateNumber = res.number; | ||||
|     //         } | ||||
|     //       } | ||||
|     //     } | ||||
|     //   } | ||||
|     // }); | ||||
|     this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { | ||||
|       if (res) { | ||||
|         if (type === 1) { | ||||
|           // 法定代表人证件照 | ||||
|           if (isFront === 'front') { | ||||
|             // 正面 | ||||
|             if (res.name) { | ||||
|               this.detailData.legalPersonIdentity.name = res.name; | ||||
|             } | ||||
|             if (res.number) { | ||||
|               this.detailData.legalPersonIdentity.certificateType = 0; | ||||
|               this.detailData.legalPersonIdentity.certificateNumber = res.number; | ||||
|             } | ||||
|           } | ||||
|           if (isFront === 'back') { | ||||
|             // 背面 | ||||
|             if (res.validFrom) { | ||||
|               this.detailData.legalPersonIdentity.validStartTime = res.validFrom; | ||||
|             } | ||||
|             if (res.validTo) { | ||||
|               this.detailData.legalPersonIdentity.validEndTime = res.validTo; | ||||
|             } else { | ||||
|               this.detailData.legalPersonIdentity.validEndTime = null; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         // 企业管理员证件照 | ||||
|         if (type === 0) { | ||||
|           if (isFront === 'front') { | ||||
|             // 正面 | ||||
|             if (res.name) { | ||||
|               this.detailData.adminUserInfo.name = res.name; | ||||
|             } | ||||
|             if (res.number) { | ||||
|               this.detailData.adminUserInfo.certificateNumber = res.number; | ||||
|             } | ||||
|           } | ||||
|           if (isFront === 'back') { | ||||
|             // 背面 | ||||
|             if (res.validFrom) { | ||||
|               this.detailData.adminUserInfo.validStartTime = res.validFrom; | ||||
|             } | ||||
|             if (res.validTo) { | ||||
|               this.detailData.adminUserInfo.validEndTime = res.validTo; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   // 识别营业执照 | ||||
|   checkBusinessLicense(imgurl: any) { | ||||
|     // this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { | ||||
|     //   if (res) { | ||||
|     //     if (res.registrationNumber) { | ||||
|     //       this.detailData.unifiedSocialCreditCode = res.registrationNumber; | ||||
|     //     } | ||||
|     //     if (res.name) { | ||||
|     //       this.detailData.enterpriseName = res.name; | ||||
|     //     } | ||||
|     //     if (res.type) { | ||||
|     //       this.detailData.enterpriseType = res.type; | ||||
|     //     } | ||||
|     //     if (res.addressRegionCodes) { | ||||
|     //       this.detailData.enterpriseAddressCode = res.addressRegionCodes; | ||||
|     //     } | ||||
|     //     if (res.address) { | ||||
|     //       this.detailData.enterpriseAddress = res.address; | ||||
|     //     } | ||||
|     //     if (res.registeredCapital) { | ||||
|     //       this.detailData.registrationCapital = res.registeredCapital; | ||||
|     //     } | ||||
|     //     if (res.foundDate) { | ||||
|     //       this.detailData.enterpriseRegistrationTime = res.foundDate; | ||||
|     //     } | ||||
|     //     if (res.businessTermStartDate) { | ||||
|     //       this.detailData.operatingStartTime = res.businessTermStartDate; | ||||
|     //     } | ||||
|     //     if (res.businessTermEndDate) { | ||||
|     //       this.detailData.operatingEndTime = res.businessTermEndDate; | ||||
|     //     } else { | ||||
|     //       this.detailData.operatingEndTime = null; | ||||
|     //     } | ||||
|     //     if (res.businessScope) { | ||||
|     //       this.detailData.businessScope = res.businessScope; | ||||
|     //     } | ||||
|     //   } | ||||
|     // }); | ||||
|     this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { | ||||
|       if (res) { | ||||
|         // if (res.registrationNumber) { | ||||
|         //   this.detailData.unifiedSocialCreditCode = res.registrationNumber; | ||||
|         // } | ||||
|         // if (res.name) { | ||||
|         //   this.detailData.enterpriseName = res.name; | ||||
|         // } | ||||
|         if (res.businessTermStartDate) { | ||||
|           this.detailData.operatingStartTime = res.businessTermStartDate; | ||||
|         } | ||||
|         if (res.businessTermEndDate) { | ||||
|           this.detailData.operatingEndTime = res.businessTermEndDate; | ||||
|         } else { | ||||
|           this.detailData.operatingEndTime = null; | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } { | ||||
|  | ||||
| @ -87,8 +87,9 @@ | ||||
|         [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> | ||||
|     </sv> | ||||
|     <sv label="手机号"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit" | ||||
|         [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> | ||||
|       <!-- <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit" | ||||
|         [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> --> | ||||
|         {{detailData.adminUserInfo.mobile}} | ||||
|     </sv> | ||||
|     <sv label="身份证号"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit" | ||||
| @ -173,14 +174,9 @@ | ||||
|     </ng-container> | ||||
|     <div *ngIf="data[key]" (mouseover)="detailData[hover] = true" (mouseleave)="detailData[hover] = false" | ||||
|       (click)="$event.cancelBubble = true" class="image-hover"> | ||||
|       <img [src]="data[key]" style="width: 200px; height: 160px" (click)="service.showImg(data[key])" /> | ||||
|       <div class="mask" *ngIf="detailData[hover] && isEdit"></div> | ||||
|       <div class="mask-over" *ngIf="detailData[hover] && isEdit"> | ||||
|         <i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(data, key, key2)"></i> | ||||
|         <div style="display: flex; align-items: center"> | ||||
|           <i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="service.showImg(data[key])"></i> | ||||
|         </div> | ||||
|       </div> | ||||
|       <img nz-image [nzSrc]="data[key]" style="width: 200px; height: 160px" /> | ||||
|       <i nz-icon *ngIf="detailData[hover] && isEdit" nzType="close-circle" nzTheme="fill" class="delete-icon" | ||||
|         (click)="deleteImg(data, key, key2)"></i> | ||||
|     </div> | ||||
|   </nz-upload> | ||||
| </ng-template> | ||||
| @ -27,4 +27,11 @@ | ||||
|     z-index : 999 !important; | ||||
|     width   : 100% !important; | ||||
|   } | ||||
|  | ||||
|   .image-hover .delete-icon { | ||||
|     top        : unset !important; | ||||
|     right      : unset !important; | ||||
|     margin-top : -15px; | ||||
|     margin-left: -15px; | ||||
|   } | ||||
| } | ||||
| @ -152,10 +152,7 @@ export class PersonalPartnerDetailComponent implements OnInit { | ||||
|       data[key] = file.response.data?.fullFileWatermarkPath; | ||||
|       data[key2] = file.response.data?.fullFilePath; | ||||
|       if (id === 'legalFront' || id === 'legalBack') { | ||||
|         this.checkIdCard(file.response.data?.fullFilePath, id === 'legalFront' ? 'front' : 'back', 1); | ||||
|       } | ||||
|       if (id === 'certificateBackFront' || id === 'certificateBack') { | ||||
|         this.checkIdCard(file.response.data?.fullFilePath, id === 'certificateBackFront' ? 'front' : 'back', 0); | ||||
|         this.checkIdCard(file.response.data?.fullFilePath, id === 'legalFront' ? 'front' : 'back'); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| @ -215,95 +212,53 @@ export class PersonalPartnerDetailComponent implements OnInit { | ||||
|   } | ||||
|  | ||||
|   save() { | ||||
|     const dateil = { ...this.detailData }; | ||||
|     Object.assign(dateil.legalPersonIdentity, { | ||||
|       validStartTime: this.datePipe.transform(dateil.legalPersonIdentity.validStartTime, 'yyyy-MM-dd'), | ||||
|       validEndTime: this.datePipe.transform(dateil.legalPersonIdentity.validEndTime, 'yyyy-MM-dd') | ||||
|     if (this.enterpriseAddressCode?.length > 3) { | ||||
|       this.service.msgSrv.warning('所属城市不能超过3个'); | ||||
|       return; | ||||
|     } | ||||
|     const dateil = { ...this.detailData, cityCodesList: this.enterpriseAddressCode }; | ||||
|     Object.assign(dateil.adminUserInfo, { | ||||
|       validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'), | ||||
|       validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd') | ||||
|     }); | ||||
|     const params = {}; | ||||
|     Object.assign(params, { | ||||
|       adminMobile: dateil.adminMobile, | ||||
|       adminAppUserId: dateil.adminAppUserId, | ||||
|       adminUserInfo: { ...dateil.adminUserInfo }, | ||||
|       bankAccount: dateil.bankAccount, | ||||
|       businessScope: dateil.businessScope, | ||||
|       createBank: dateil.createBank, | ||||
|       creditPhoto: dateil.creditPhoto, | ||||
|       creditPhotoWatermark: dateil.creditPhotoWatermark, | ||||
|       enterpriseAddress: dateil.enterpriseAddress, | ||||
|       enterpriseAddressCode: this.enterpriseAddressCode[2], | ||||
|       enterpriseLogo: dateil.enterpriseLogo, | ||||
|       enterpriseName: dateil.enterpriseName, | ||||
|       enterpriseRegistrationTime: this.datePipe.transform(dateil.enterpriseRegistrationTime, 'yyyy-MM-dd'), | ||||
|       enterpriseType: dateil.enterpriseType, | ||||
|       id: dateil.id, | ||||
|       legalPersonIdentityDTO: { ...dateil.legalPersonIdentity }, | ||||
|       licensePhoto: dateil.licensePhoto, | ||||
|       licensePhotoWatermark: dateil.licensePhotoWatermark, | ||||
|       networkTransporter: dateil.networkTransporter, | ||||
|       oftenUsedServices: dateil.oftenUsedServices, | ||||
|       operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'), | ||||
|       operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'), | ||||
|       promotersTelephone: dateil.promotersTelephone, | ||||
|       registerAddress: dateil.registerAddress, | ||||
|       registerPhone: dateil.registerPhone, | ||||
|       registrationCapital: dateil.registrationCapital, | ||||
|       taxAuthority: dateil.taxAuthority, | ||||
|       unifiedSocialCreditCode: dateil.unifiedSocialCreditCode | ||||
|  | ||||
|     this.service.request(this.service.$api_save_personal_partner, dateil).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('个人合伙人修改成功'); | ||||
|         this.initData(); | ||||
|         this.isEdit = false; | ||||
|       } | ||||
|     }); | ||||
|     // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { | ||||
|     //   if (res) { | ||||
|     //     this.service.msgSrv.success('企业修改成功'); | ||||
|     //     this.initData(); | ||||
|     //     this.isEdit = false; | ||||
|     //   } | ||||
|     // }); | ||||
|   } | ||||
|  | ||||
|   // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 | ||||
|   checkIdCard(imgurl: any, isFront: string, type: number) { | ||||
|   checkIdCard(imgurl: any, isFront: string) { | ||||
|     const params = { | ||||
|       idCardUrl: imgurl, | ||||
|       side: isFront | ||||
|     }; | ||||
|     // this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { | ||||
|     //   if (res) { | ||||
|     //     if (type === 1) { | ||||
|     //       // 法定代表人证件照 | ||||
|     //       if (isFront === 'front') { | ||||
|     //         // 正面 | ||||
|     //         if (res.name) { | ||||
|     //           this.detailData.legalPersonIdentity.name = res.name; | ||||
|     //         } | ||||
|     //         if (res.number) { | ||||
|     //           this.detailData.legalPersonIdentity.certificateNumber = res.number; | ||||
|     //         } | ||||
|     //       } | ||||
|     //       if (isFront === 'back') { | ||||
|     //         // 背面 | ||||
|     //         if (res.validFrom) { | ||||
|     //           this.detailData.legalPersonIdentity.validStartTime = res.validFrom; | ||||
|     //         } | ||||
|     //         if (res.validTo) { | ||||
|     //           this.detailData.legalPersonIdentity.validEndTime = res.validTo; | ||||
|     //         } else { | ||||
|     //           this.detailData.legalPersonIdentity.validEndTime = null; | ||||
|     //         } | ||||
|     //       } | ||||
|     //     } | ||||
|     //     // 企业管理员证件照 | ||||
|     //     if (type === 0) { | ||||
|     //       if (isFront === 'front') { | ||||
|     //         // 正面 | ||||
|     //         if (res.name) { | ||||
|     //           this.detailData.adminUserInfo.name = res.name; | ||||
|     //         } | ||||
|     //         if (res.number) { | ||||
|     //           this.detailData.adminUserInfo.certificateNumber = res.number; | ||||
|     //         } | ||||
|     //       } | ||||
|     //     } | ||||
|     //   } | ||||
|     // }); | ||||
|     this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { | ||||
|       if (res) { | ||||
|         // 企业管理员证件照 | ||||
|         if (isFront === 'front') { | ||||
|           // 正面 | ||||
|           if (res.name) { | ||||
|             this.detailData.adminUserInfo.name = res.name; | ||||
|           } | ||||
|           if (res.number) { | ||||
|             this.detailData.adminUserInfo.certificateNumber = res.number; | ||||
|           } | ||||
|         } | ||||
|         if (isFront === 'back') { | ||||
|           // 背面 | ||||
|           if (res.validFrom) { | ||||
|             this.detailData.adminUserInfo.validStartTime = res.validFrom; | ||||
|           } | ||||
|           if (res.validTo) { | ||||
|             this.detailData.adminUserInfo.validEndTime = res.validTo; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -1,10 +1,10 @@ | ||||
| import { Injectable, Injector } from '@angular/core'; | ||||
| import { BaseService, EACacheService } from '@shared'; | ||||
| import { BaseService, EACacheService, ShipperBaseService } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { ImageViewComponent } from 'src/app/shared/components/imagelist'; | ||||
|  | ||||
| @Injectable() | ||||
| export class PartnerListService extends BaseService { | ||||
| export class PartnerListService extends ShipperBaseService { | ||||
|   $mock_url = '/rule?_allow_anonymous=true'; | ||||
|  | ||||
|   // 查询合伙人信息-分页 | ||||
| @ -18,13 +18,13 @@ export class PartnerListService extends BaseService { | ||||
|   // 获取合伙人信息 | ||||
|   $api_get_personal_partner_detail = '/api/mdc/partner/getPersonally'; | ||||
|   // 审核合伙人 | ||||
|   $api_audit_partner= '/api/mdc/partner/audit'; | ||||
|   $api_audit_partner = '/api/mdc/partner/audit'; | ||||
|   // 修改返佣模板 | ||||
|   $api_update_partner_template= '/api/mdc/partner/updateTemplate'; | ||||
|   $api_update_partner_template = '/api/mdc/partner/updateTemplate'; | ||||
|   // 更新渠道销售 | ||||
|   $api_update_partner_channel= '/api/mdc/partner/updateChannelSale'; | ||||
|   $api_update_partner_channel = '/api/mdc/partner/updateChannelSale'; | ||||
|   // 重新发起CRM | ||||
|   $api_resend_crm= '/api/mdc/partner/reSendCrm'; | ||||
|   $api_resend_crm = '/api/mdc/partner/reSendCrm'; | ||||
|   // 查询合伙人修改渠道渠道销售记录 | ||||
|   $api_get_personal_channel_list = '/api/mdc/partnerChannelRelLog/list/page'; | ||||
|   // 冻结/启用企业业 | ||||
|  | ||||
| @ -99,8 +99,8 @@ export class TicketService extends ShipperBaseService { | ||||
|   // 查询快递轨迹 | ||||
|   $api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes'; | ||||
|  | ||||
|   constructor(public injector: Injector, public eaCacheSrv: EACacheService) { | ||||
|     super(injector, eaCacheSrv); | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|   } | ||||
|  | ||||
|   reviewPDF(url: string) { | ||||
|  | ||||
| @ -136,8 +136,8 @@ export class UsermanageService extends ShipperBaseService { | ||||
|   // 查询司机配置列表 | ||||
|   $api_configPage = '/api/mdc/cuc/driver/list/configPage'; | ||||
|  | ||||
|   constructor(public injector: Injector, private nzModalService: NzModalService, public eaCacheSrv: EACacheService) { | ||||
|     super(injector, eaCacheSrv); | ||||
|   constructor(public injector: Injector, private nzModalService: NzModalService) { | ||||
|     super(injector); | ||||
|   } | ||||
|  | ||||
|   showImg(url: any) { | ||||
|  | ||||
| @ -17,10 +17,10 @@ export class ShipperBaseService extends BaseService { | ||||
|   $api_get_network_freight_forwarder_one = `/api/mdc/cuc/networkTransporter/get`; // 获取网络货运人 | ||||
|   // 根据FullKey获取系统子配置(树) | ||||
|   $api_getSysConfigTreeByParentFullKey = `/api/mdc/pbc/sysConfig/getSysConfigTreeByParentFullKey`; | ||||
|   envCache: any; | ||||
|   constructor(public injector: Injector, public eaCacheSrv: EACacheService) { | ||||
|   // 获取全部返佣配置 | ||||
|   $api_get_rebate_config = `/api/mdc/rebateConfig/list/listRebateConfig`; | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|     this.envCache = this.eaCacheSrv.get(cacheConf.env); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
| @ -44,22 +44,22 @@ export class ShipperBaseService extends BaseService { | ||||
|    * 获取所属项目 | ||||
|    * @returns | ||||
|    */ | ||||
|    getEnterpriseProject(params?: any) { | ||||
|   getEnterpriseProject(params?: any) { | ||||
|     return this.request(this.$api_get_enterprise_project, params).pipe( | ||||
|       map((res: any) => { | ||||
|         if (!res) { | ||||
|           return []; | ||||
|         } | ||||
|         const list = res.map(((item: any) => { | ||||
|         const list = res.map((item: any) => { | ||||
|           return { | ||||
|             label: item.projectName, | ||||
|             value: item.id | ||||
|           } | ||||
|         })) | ||||
|           }; | ||||
|         }); | ||||
|         const obj = [{ value: '', label: '全部' }]; | ||||
|         return [...obj, ...list]; | ||||
|       }) | ||||
|     ) | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
| @ -204,4 +204,23 @@ export class ShipperBaseService extends BaseService { | ||||
|       }) | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 获取全部返佣配置 | ||||
|    * @returns | ||||
|    */ | ||||
|   getRebateConfig() { | ||||
|     const params = {}; | ||||
|     return this.request(this.$api_get_rebate_config, params, 'POST').pipe( | ||||
|       map(res => { | ||||
|         if (res) { | ||||
|           return res.map((m: any) => { | ||||
|             return { label: m.configName, value: m.id }; | ||||
|           }); | ||||
|         } else { | ||||
|           return []; | ||||
|         } | ||||
|       }) | ||||
|     ); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user