This commit is contained in:
Taric Xin
2021-12-14 20:30:50 +08:00
parent b887055dbe
commit d0403784eb
8 changed files with 494 additions and 216 deletions

View File

@ -54,8 +54,8 @@
nzType="close-circle" nzTheme="fill" class="mr-xs"></i>驳回
</label>
<div style="float: right;">
<button nz-button nzType="default" nzDanger (click)="auditPass()">审核通过</button>
<button nz-button nzType="default" nzDanger (click)="auditNo()">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="auditPass()" *ngIf="userIdentityDetail.certificationStatus===0">审核通过</button>
<button nz-button nzType="default" nzDanger (click)="auditNo()" *ngIf="userIdentityDetail.certificationStatus===0">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
</div>
</sv-title>
@ -86,15 +86,14 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="姓名">
{{ userIdentityDetail?.enterpriseName }}
{{ userIdentityDetail?.name }}
</se>
<se [col]="1" label="备注" required>
<textarea nz-input rows="3" style="width: 325px;margin-left: 14px;"
[(ngModel)]="approvalOpinion.remark"></textarea>
<textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" [(ngModel)]="approvalOpinion"></textarea>
</se>
<se [col]="1" label="可选理由">
<nz-tag *ngFor="let tag of reasonTags" nzColor="default" nzMode="checkable"
[nzChecked]="approvalOpinion?.reason===tag" (nzCheckedChange)="approvalOpinion.reason=tag">
(nzCheckedChange)="approvalOpinion=approvalOpinion+'、'+tag">
{{ tag }}
</nz-tag>
</se>

View File

@ -25,10 +25,7 @@ export class FreightComponentsUserDetailComponent implements OnInit {
{ title: '角色', index: 'totalPrice', width: 300, className: 'text-center' }
];
approvalOpinion = {
reason: '',
remark: ''
};
approvalOpinion = '';
reasonTags = ['身份证照片太丑', '姓名与身份证号不匹配'];
constructor(private nzModalService: NzModalService, public service: UsermanageService, private route: ActivatedRoute) {}
@ -83,27 +80,44 @@ export class FreightComponentsUserDetailComponent implements OnInit {
auditPass() {
this.nzModalService.confirm({
nzTitle: '审核通过',
nzContent: `是否确认通过(姓名:黄大仙)审核`,
nzOnOk: () => {}
nzContent: `是否确认通过(姓名:${this.userIdentityDetail?.name})审核`,
nzOnOk: () => {
this.auditEnterprise(0);
}
});
}
auditNo() {
this.approvalOpinion = {
reason: '',
remark: ''
};
this.approvalOpinion = '';
this.nzModalService.create({
nzTitle: '审核驳回',
nzContent: this.redectModal,
nzOnOk: () => {
if (!this.approvalOpinion?.remark) {
if (!this.approvalOpinion) {
return false;
}
this.auditEnterprise(1);
return;
}
});
}
private auditEnterprise(auditStatus: number) {
this.service
.request(this.service.$api_approve_identity, {
auditStatus: auditStatus,
identityId: this.userIdentityDetail.id,
auditType: 0,
certificationOpinions: this.approvalOpinion
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success(auditStatus === 0 ? '审核通过' : '驳回成功');
}
this.initData();
});
}
ratify() {}
goBack() {