edit
This commit is contained in:
@ -9,7 +9,13 @@
|
|||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
<page-header-wrapper [title]="'企业审核列表'" [content]="content">
|
<page-header-wrapper [title]="'企业审核列表'" [content]="content">
|
||||||
<nz-card class="mb-md">
|
<ng-template #content>
|
||||||
|
<nz-tabset class="tabs-wrap">
|
||||||
|
<nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
|
||||||
|
</nz-tabset>
|
||||||
|
</ng-template>
|
||||||
|
</page-header-wrapper>
|
||||||
|
<nz-card class="mb-md">
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||||
@ -28,9 +34,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<st #st multiSort [data]="service.$api_get_freight_list" [columns]="tabType===1?enterColumns:adminColumns"
|
<st #st multiSort [data]="service.$api_get_freight_list" [columns]="tabType===1?enterColumns:adminColumns"
|
||||||
[req]="{ process: beforeReq }" [page]=" {}" [loading]="service.http.loading" [scroll]="{ x: '1200px' }">
|
[req]="{ process: beforeReq }" [page]=" {}" [loading]="service.http.loading" [scroll]="{ x: '1200px' }">
|
||||||
@ -48,10 +54,37 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</st>
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<ng-template #content>
|
|
||||||
<nz-tabset class="tabs-wrap">
|
<ng-template #approvedModal>
|
||||||
<nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
|
<div nz-row nzGutter="8">
|
||||||
</nz-tabset>
|
<div nz-col nzSpan="24" se-container [labelWidth]="120">
|
||||||
</ng-template>
|
<se [col]="1" label="公司名称">
|
||||||
</page-header-wrapper>
|
{{ detailData?.enterpriseName }}
|
||||||
|
</se>
|
||||||
|
<se [col]="1" label="网络货运人" required>
|
||||||
|
<nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter">
|
||||||
|
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of ltdId"></nz-option>
|
||||||
|
</nz-select>
|
||||||
|
</se>
|
||||||
|
<se [col]="1" label="企业角色" required>
|
||||||
|
<nz-select nzPlaceHolder="请选择" [(ngModel)]="roleId">
|
||||||
|
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option>
|
||||||
|
</nz-select>
|
||||||
|
</se>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template #redectModal>
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col nzSpan="24" se-container [labelWidth]="120">
|
||||||
|
<se [col]="1" label="公司名称">
|
||||||
|
{{ detailData?.enterpriseName }}
|
||||||
|
</se>
|
||||||
|
<se [col]="1" label="备注" required>
|
||||||
|
<textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" [(ngModel)]="approvalOpinion"></textarea>
|
||||||
|
</se>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
@ -32,6 +32,17 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
|||||||
isActived: false
|
isActived: false
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ViewChild('approvedModal', { static: false })
|
||||||
|
approvedModal!: any;
|
||||||
|
@ViewChild('redectModal', { static: false })
|
||||||
|
redectModal!: any;
|
||||||
|
ltdId: any = [];
|
||||||
|
roles: any = [];
|
||||||
|
detailData: any = null;
|
||||||
|
approvalOpinion = '';
|
||||||
|
networkTransporter = null;
|
||||||
|
roleId = null;
|
||||||
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService) {}
|
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService) {}
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
@ -70,7 +81,25 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* 程序初始化入口
|
* 程序初始化入口
|
||||||
*/
|
*/
|
||||||
ngOnInit() {}
|
ngOnInit() {
|
||||||
|
this.loadltdId();
|
||||||
|
this.loadRoles();
|
||||||
|
}
|
||||||
|
|
||||||
|
loadltdId() {
|
||||||
|
this.service.getNetworkFreightForwarder().subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.ltdId = res;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
loadRoles() {
|
||||||
|
this.service.getRoles({ enterpriseId: 0, projectId: 0 }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.roles = res;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看详情
|
* 查看详情
|
||||||
@ -123,6 +152,56 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auditPass(item: any) {
|
||||||
|
this.detailData = item;
|
||||||
|
this.networkTransporter = null;
|
||||||
|
this.roleId = null;
|
||||||
|
this.modal.create({
|
||||||
|
nzTitle: '审核通过',
|
||||||
|
nzContent: this.approvedModal,
|
||||||
|
nzOnOk: () => {
|
||||||
|
if (!this.networkTransporter || !this.roleId) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.auditEnterprise(20);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
auditNo(item: any) {
|
||||||
|
this.detailData = item;
|
||||||
|
this.approvalOpinion = '';
|
||||||
|
this.roleId = null;
|
||||||
|
this.modal.create({
|
||||||
|
nzTitle: '审核驳回',
|
||||||
|
nzContent: this.redectModal,
|
||||||
|
nzOnOk: () => {
|
||||||
|
if (!this.approvalOpinion) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.auditEnterprise(30);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private auditEnterprise(status: number) {
|
||||||
|
this.service
|
||||||
|
.request(this.service.$api_audit_freight, {
|
||||||
|
approvalStatus: status,
|
||||||
|
id: this.detailData.id,
|
||||||
|
approvalOpinion: this.approvalOpinion,
|
||||||
|
networkTransporter: this.networkTransporter,
|
||||||
|
roleId: this.roleId || null
|
||||||
|
})
|
||||||
|
.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success(status === 20 ? '审核通过' : '驳回成功');
|
||||||
|
}
|
||||||
|
this.st.load(1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
View(record: any) {
|
View(record: any) {
|
||||||
this.router.navigate([`/usercenter/freight/enterprise/detail/${record.id}`]);
|
this.router.navigate([`/usercenter/freight/enterprise/detail/${record.id}`]);
|
||||||
}
|
}
|
||||||
@ -216,7 +295,21 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
|||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: '180px',
|
width: '180px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
buttons: [{ text: '查看', click: _record => this.View(_record), acl: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-view'] } }]
|
buttons: [
|
||||||
|
{ text: '查看', click: _record => this.View(_record), acl: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-view'] } },
|
||||||
|
{
|
||||||
|
text: '通过',
|
||||||
|
click: _record => this.auditPass(_record),
|
||||||
|
acl: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-D-audit'] },
|
||||||
|
iif: item => item.approvalStatus === 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '驳回',
|
||||||
|
click: _record => this.auditNo(_record),
|
||||||
|
acl: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-D-audit'] },
|
||||||
|
iif: item => item.approvalStatus === 10
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user