This commit is contained in:
Taric Xin
2022-02-16 17:32:07 +08:00
parent c0801a94d6
commit 9e58dddf07
2 changed files with 56 additions and 49 deletions

View File

@ -19,6 +19,7 @@ export class AuditAdminComponent implements OnInit {
grid: { span: 20 } grid: { span: 20 }
} }
}; };
isReadOnly = false;
constructor(public msgSrv: NzMessageService, public service: UsermanageService) {} constructor(public msgSrv: NzMessageService, public service: UsermanageService) {}
ngOnInit(): void { ngOnInit(): void {
@ -38,6 +39,7 @@ export class AuditAdminComponent implements OnInit {
this.schema = { this.schema = {
properties: { properties: {
expand: { type: 'boolean', ui: { hidden: true } },
oldAdminName: { oldAdminName: {
title: '当前管理员', title: '当前管理员',
type: 'string', type: 'string',
@ -87,7 +89,10 @@ export class AuditAdminComponent implements OnInit {
ui: { ui: {
placeholder: '审核不通过需要说明原因', placeholder: '审核不通过需要说明原因',
widget: 'textarea', widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 } autosize: { minRows: 3, maxRows: 6 },
visibleIf: {
expand: (value: boolean) => !this.isReadOnly
}
} }
} }
} }

View File

@ -67,11 +67,13 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
/** /**
* 查看详情 * 查看详情
*/ */
ViewAdimin(record: any) { ViewAdimin(record: any, isReadOnly = false) {
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: AuditAdminComponent, nzContent: AuditAdminComponent,
nzComponentParams: { i: { ...record } }, nzComponentParams: { i: { ...record }, isReadOnly },
nzFooter: [ nzFooter: isReadOnly
? []
: [
{ {
label: '驳回', label: '驳回',
type: 'primary', type: 'primary',
@ -175,12 +177,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
fixed: 'right', fixed: 'right',
width: '180px', width: '180px',
className: 'text-center', className: 'text-center',
buttons: [ buttons: [{ text: '查看', click: _record => this.View(_record), acl: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-view'] } }]
{ text: '查看',
click: _record => this.View(_record),
acl: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-view'] },
}
]
} }
]; ];
} }
@ -209,12 +206,17 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
fixed: 'right', fixed: 'right',
width: '180px', width: '180px',
className: 'text-center', className: 'text-center',
buttons: [{ buttons: [
{
text: '审核', text: '审核',
click: _record => this.ViewAdimin(_record), click: _record => this.ViewAdimin(_record),
iif: (item: any) => item.approvalStatus === 10, iif: (item: any) => item.approvalStatus === 10
acl: { ability: ['USERCENTER-FREIGHT-LIST-audit'] }, },
}] {
text: '查看',
click: _record => this.ViewAdimin(_record, true)
}
]
} }
]; ];
} }