fix bug
This commit is contained in:
		| @ -269,8 +269,8 @@ | ||||
|       </label> | ||||
|     </sv-title> | ||||
|     <sv label="法定代表人"> | ||||
|       <input nz-input type="text" maxlength="32" [(ngModel)]="detailData.legalPersonIdentityVO.name" [readonly]="!isEdit" | ||||
|         [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> | ||||
|       <input nz-input type="text" maxlength="32" [(ngModel)]="detailData.legalPersonIdentityVO.name" | ||||
|         [readonly]="!isEdit" [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|     <sv label="身份证号码"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber" [readonly]="!isEdit" | ||||
| @ -358,19 +358,23 @@ | ||||
|   <sv-container col="3" class="mt16"> | ||||
|     <sv-title>合伙人信息</sv-title> | ||||
|     <sv label="合伙人名称"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.createBank" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.partnerEnterpriseName" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|     <sv label="手机号"> | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactMobile" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|     <sv label="管理员"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.bankAccount" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactName + ' ' + partnerInfo.partnerContactMobile" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|     <sv label="绑定时间"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.registerPhone" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.enterprisePartnerRelTime" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|     <sv label="结算时间段"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.registerAddress" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.settStartTime" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|   </sv-container> | ||||
| @ -378,20 +382,45 @@ | ||||
|   <sv-container col="3" class="mt16"> | ||||
|     <sv-title>渠道销售信息</sv-title> | ||||
|     <sv label="姓名"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.createBank" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.channelName" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|     <sv label="手机号"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.bankAccount" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.channelMobile" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|     <sv label="绑定时间"> | ||||
|       <input nz-input type="text" [(ngModel)]="detailData.registerPhone" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|       <input nz-input type="text" [(ngModel)]="partnerInfo.enterpriseChannelRelTime" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|         [placeholder]="isEdit?'':'-'"> | ||||
|     </sv> | ||||
|   </sv-container> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
| <nz-tabset > | ||||
|   <nz-tab nzTitle="修改合伙人记录"> | ||||
|     <st #st [data]="service.$api_findEnterpricePartnerRelLog" [columns]="columns" | ||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParamsCar }" | ||||
|     [res]="{ reName: { list: 'data'} }" [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" | ||||
|     [loading]="false"> | ||||
|     <ng-template st-row="remark" let-item let-index="index"> | ||||
|       <span *ngIf="item.remark" class="overflowText" nz-tooltip [nzTooltipTitle]="item.remark">{{ item.remark }}</span> | ||||
|       <span *ngIf="item.remark === null">--</span> | ||||
|     </ng-template> | ||||
|   </st> | ||||
|   </nz-tab> | ||||
|   <nz-tab nzTitle="修改渠道销售记录"> | ||||
|     <st #st1 multiSort bordered [columns]="recordColumns" [ps]="20" [data]="service.$api_findEnterpriceChannelRelLog" | ||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||
|     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||
|     [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" [loading]="false"> | ||||
|     <ng-template st-row="remark" let-item let-index="index"> | ||||
|       <span *ngIf="item.remark" class="overflowText" nz-tooltip [nzTooltipTitle]="item.remark">{{ item.remark }}</span> | ||||
|       <span *ngIf="item.remark === null">--</span> | ||||
|     </ng-template> | ||||
| </st> | ||||
|   </nz-tab> | ||||
| </nz-tabset> | ||||
| </nz-card> | ||||
| <ng-template #PopconfirmTempalte let-title="title" let-content="content"> | ||||
|   <div class="ant-popover-message"> | ||||
|     <i nz-icon nzType="info-circle" nzTheme="fill"></i> | ||||
|  | ||||
| @ -43,4 +43,16 @@ | ||||
|       left: 106px; | ||||
|     } | ||||
|   } | ||||
|   .overflowText { | ||||
|     display: -webkit-box; | ||||
|     max-width: 155px; | ||||
|     height: 40px; | ||||
|     overflow: hidden; | ||||
|     text-align: left; | ||||
|     text-overflow: -o-ellipsis-lastline; | ||||
|     text-overflow: ellipsis; | ||||
|     -webkit-line-clamp: 2; | ||||
|     line-clamp: 2; | ||||
|     -webkit-box-orient: vertical; | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; | ||||
| import { ActivatedRoute, Router } from '@angular/router'; | ||||
| import { apiConf } from '@conf/api.conf'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { DatePipe, _HttpClient } from '@delon/theme'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { fromEvent, Subscription } from 'rxjs'; | ||||
| @ -13,11 +14,14 @@ import { UsermanageService } from '../../../../services/usercenter.service'; | ||||
|   providers: [DatePipe] | ||||
| }) | ||||
| export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   @ViewChild('st1') private readonly st1!: STComponent; | ||||
|   @ViewChild('approvedModal', { static: false }) | ||||
|   approvedModal!: any; | ||||
|   @ViewChild('redectModal', { static: false }) | ||||
|   redectModal!: any; | ||||
|  | ||||
|   columns: STColumn[] = []; | ||||
|   recordColumns!: STColumn[]; | ||||
|   detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } }; | ||||
|   tempalateData = { ...this.detailData }; | ||||
|   suppliersData: any = {}; | ||||
| @ -35,7 +39,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|   networkTransporter = null; | ||||
|   roleId = null; | ||||
|   customerServiceId = null; | ||||
|  | ||||
|   partnerInfo: any = {}; | ||||
|   esignCheckStatus: any = { | ||||
|     0: '不通过', | ||||
|     1: '通过', | ||||
| @ -43,16 +47,31 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|   }; | ||||
|  | ||||
|   billEvaluate = null; | ||||
|  | ||||
|   scrollTop = 0; | ||||
|   subscribeScoll!: Subscription; | ||||
|   /** | ||||
|  * 查询参数 | ||||
|  */ | ||||
|   get reqParamsCar() { | ||||
|     const params = { | ||||
|       id: this.route.snapshot.params.id, | ||||
|       bindType: 0 | ||||
|     } | ||||
|     return { ...params }; | ||||
|   } | ||||
|   get reqParams() { | ||||
|     const params = { | ||||
|       id: this.route.snapshot.params.id, | ||||
|     } | ||||
|     return { ...params }; | ||||
|   } | ||||
|   constructor( | ||||
|     public service: UsermanageService, | ||||
|     private route: ActivatedRoute, | ||||
|     private nzModalService: NzModalService, | ||||
|     private router: Router, | ||||
|     private datePipe: DatePipe | ||||
|   ) {} | ||||
|   ) { } | ||||
|   ngOnDestroy(): void { | ||||
|     this.subscribeScoll.unsubscribe(); | ||||
|   } | ||||
| @ -62,12 +81,80 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|       this.initData(); | ||||
|       this.loadltdId(); | ||||
|       this.loadRoles(); | ||||
|       this.initST(); | ||||
|       this.initRecordST() | ||||
|       this.loadCustomerServices(); | ||||
|       this.loadPartnerInfo() | ||||
|     }); | ||||
|     this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => { | ||||
|       this.scrollTop = document.documentElement.scrollTop; | ||||
|     }); | ||||
|   } | ||||
|   /** | ||||
| * 初始化数据列表 | ||||
| */ | ||||
|   initST() { | ||||
|     this.columns = [ | ||||
|       { title: '修改后合伙人', index: 'newPartnerName', className: 'text-center' }, | ||||
|       { title: '修改前合伙人', index: 'originalPartnerNamel', className: 'text-center' }, | ||||
|       { title: '备注', render: 'remark', className: 'text-center' }, | ||||
|       { title: '结算起算日', index: 'settStartTime', className: 'text-center' }, | ||||
|       { title: '生效节点', index: 'effectiveNode', className: 'text-center', type: 'enum', enum: { | ||||
|         1: '立即生效', | ||||
|         2: 'CRM审核后生效', | ||||
|         3: '审核通过生效', | ||||
|       } }, | ||||
|       { | ||||
|         title: 'CRM审核状态', index: 'effectiveStatus', | ||||
|         type: 'enum', | ||||
|         enum: { | ||||
|           0: '已失效', | ||||
|           1: '未生效', | ||||
|           2: '已生效', | ||||
|         }, | ||||
|         className: 'text-center' | ||||
|       }, | ||||
|       { title: '修改时间', render: 'modifyTime', className: 'text-center' }, | ||||
|       { title: '生效时间', render: 'effectiveTime', className: 'text-center' }, | ||||
|       { title: '操作人', render: 'approvalUser', className: 'text-center' }, | ||||
|  | ||||
|     ]; | ||||
|   } | ||||
|   /** | ||||
|    * 初始化数据列表 | ||||
|    */ | ||||
|   initRecordST() { | ||||
|     this.recordColumns = [ | ||||
|       { title: '修改后渠道销售', index: 'newChannelName', className: 'text-center' }, | ||||
|       { title: '修改前渠道销售地', index: 'originalChannelName', className: 'text-center' }, | ||||
|       { title: '备注', render: 'remark', className: 'text-center' }, | ||||
|       { title: '生效节点', index: 'effectiveNode', className: 'text-center', type: 'enum', enum: { | ||||
|         1: '立即生效', | ||||
|         2: 'CRM审核后生效', | ||||
|         3: '审核通过生效', | ||||
|       } }, | ||||
|       { | ||||
|         title: 'CRM审核状态', index: 'effectiveStatus', | ||||
|         type: 'enum', | ||||
|         enum: { | ||||
|           0: '已失效', | ||||
|           1: '未生效', | ||||
|           2: '已生效', | ||||
|         }, | ||||
|         className: 'text-center' | ||||
|       }, | ||||
|       { title: '修改时间', render: 'mybidDetailInfo', className: 'text-center' }, | ||||
|       { title: '生效时间', index: 'eeffectiveTime', className: 'text-center' }, | ||||
|       { title: '操作人', index: 'approvalUser', className: 'text-center' } | ||||
|     ]; | ||||
|   } | ||||
|   loadPartnerInfo(){ | ||||
|     this.service.request(this.service.$api_getEnterpriceRel, {id: this.route.snapshot.params.id}).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.partnerInfo = res; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|   loadltdId() { | ||||
|     this.service.getNetworkFreightForwarder().subscribe(res => { | ||||
|       if (res) { | ||||
| @ -273,7 +360,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|         res => { | ||||
|           node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1, value: item.regionCode, label: item.name })); | ||||
|         }, | ||||
|         _ => {}, | ||||
|         _ => { }, | ||||
|         () => { | ||||
|           resolve(node); | ||||
|         } | ||||
| @ -286,17 +373,17 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|     this.isEdit = false; | ||||
|   } | ||||
|  | ||||
|   save(data: any){ | ||||
|   save(data: any) { | ||||
|     const dateil = { ...this.detailData }; | ||||
|     Object.assign(dateil.legalPersonIdentityVO, { | ||||
|       validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'), | ||||
|       validEndTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validEndTime, 'yyyy-MM-dd') | ||||
|     }); | ||||
|     if (!this.detailData?.enterpriseName || !this.detailData?.enterpriseAddress) {  | ||||
|     if (!this.detailData?.enterpriseName || !this.detailData?.enterpriseAddress) { | ||||
|       this.service.msgSrv.error('请完善企业基本信息!') | ||||
|       return false; | ||||
|     } | ||||
|     if (!this.detailData.legalPersonIdentityVO.name || !this.detailData.legalPersonIdentityVO.certificateNumber) {  | ||||
|     if (!this.detailData.legalPersonIdentityVO.name || !this.detailData.legalPersonIdentityVO.certificateNumber) { | ||||
|       this.service.msgSrv.error('请完善法人信息!') | ||||
|       return false; | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user