edit
This commit is contained in:
@ -67,44 +67,46 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
||||
/**
|
||||
* 查看详情
|
||||
*/
|
||||
ViewAdimin(record: any) {
|
||||
ViewAdimin(record: any, isReadOnly = false) {
|
||||
const modal = this.modal.create({
|
||||
nzContent: AuditAdminComponent,
|
||||
nzComponentParams: { i: { ...record } },
|
||||
nzFooter: [
|
||||
{
|
||||
label: '驳回',
|
||||
type: 'primary',
|
||||
onClick: instance => {
|
||||
if (!instance?.sf.value.approvalOpinion) {
|
||||
this.service.msgSrv.warning('请填写备注');
|
||||
return false;
|
||||
nzComponentParams: { i: { ...record }, isReadOnly },
|
||||
nzFooter: isReadOnly
|
||||
? []
|
||||
: [
|
||||
{
|
||||
label: '驳回',
|
||||
type: 'primary',
|
||||
onClick: instance => {
|
||||
if (!instance?.sf.value.approvalOpinion) {
|
||||
this.service.msgSrv.warning('请填写备注');
|
||||
return false;
|
||||
}
|
||||
this.adminAuditUser(
|
||||
{
|
||||
id: record.id,
|
||||
approvalStatus: '30',
|
||||
approvalOpinion: instance?.sf.value.approvalOpinion
|
||||
},
|
||||
modal
|
||||
);
|
||||
return;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '通过',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
this.adminAuditUser(
|
||||
{
|
||||
id: record.id,
|
||||
approvalStatus: '20'
|
||||
},
|
||||
modal
|
||||
);
|
||||
}
|
||||
}
|
||||
this.adminAuditUser(
|
||||
{
|
||||
id: record.id,
|
||||
approvalStatus: '30',
|
||||
approvalOpinion: instance?.sf.value.approvalOpinion
|
||||
},
|
||||
modal
|
||||
);
|
||||
return;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '通过',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
this.adminAuditUser(
|
||||
{
|
||||
id: record.id,
|
||||
approvalStatus: '20'
|
||||
},
|
||||
modal
|
||||
);
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
// this.st.load(1);
|
||||
@ -175,12 +177,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
||||
fixed: 'right',
|
||||
width: '180px',
|
||||
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'] } }]
|
||||
}
|
||||
];
|
||||
}
|
||||
@ -209,12 +206,17 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
||||
fixed: 'right',
|
||||
width: '180px',
|
||||
className: 'text-center',
|
||||
buttons: [{
|
||||
text: '审核',
|
||||
click: _record => this.ViewAdimin(_record),
|
||||
iif: (item: any) => item.approvalStatus === 10,
|
||||
acl: { ability: ['USERCENTER-FREIGHT-LIST-audit'] },
|
||||
}]
|
||||
buttons: [
|
||||
{
|
||||
text: '审核',
|
||||
click: _record => this.ViewAdimin(_record),
|
||||
iif: (item: any) => item.approvalStatus === 10
|
||||
},
|
||||
{
|
||||
text: '查看',
|
||||
click: _record => this.ViewAdimin(_record, true)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user