审批按钮优化

This commit is contained in:
‘huanghaiixia’
2025-12-30 15:28:43 +08:00
parent 67b2cf67cf
commit 5d85f99804
14 changed files with 103 additions and 101 deletions

View File

@ -172,7 +172,6 @@
formName: formName,
formId:currentRoute.value.meta.formId,
id: record.id,
status
}
});
} else {
@ -333,7 +332,7 @@
onClick: btnEvent[button.code].bind(null, record),
});
}
if (['edit', 'delete','update'].includes(button.code)) {
if (['edit', 'delete'].includes(button.code)) {
editAndDelBtn.push({
icon: button?.icon,
tooltip: button?.name,
@ -342,11 +341,17 @@
});
}
if (button.code === 'flowRecord') hasFlowRecord = true;
if (record.approCode == 'YSP' && button.code== 'update') {
let idx = actionsList.findIndex(v =>v.tooltip == '变更')
idx<0 && actionsList.push({icon: button?.icon,
tooltip: button?.name,
onClick: btnEvent[button.code].bind(null, record),})
}
});
if (record.workflowData?.enabled) {
//与工作流有关联的表单
if (record.workflowData.status) {
actionsList.unshift(setIndexFlowStatus(record.workflowData))
// actionsList.unshift(setIndexFlowStatus(record.workflowData))
} else {
actionsList = actionsList.concat(editAndDelBtn);
}
@ -356,10 +361,6 @@
actionsList = actionsList.concat(editAndDelBtn);
}
}
if (record.approCode !== 'YSP') {
let idx = actionsList.findIndex(v =>v.tooltip == '变更')
idx>-1 && actionsList.splice(idx, 1)
}
return actionsList;
}
function handleStartwork(record: Recordable) {