feat: 审批接口

pull/11/head
lizijiee 1 year ago
parent 55533ff3f9
commit de6e957668

@ -312,12 +312,7 @@ function approvalHandler(items?: any) {
processItems = selectItems.value
}
else if (overTask.value) {
// => => /
cloneItem = clone(overTask.value)
//
// if (!cloneItem.taskId) {
// cloneItem.taskId = "taskIdtaskIdtaskIdtaskIdtaskId"
// }
processItems = [cloneItem]
}
// => => /
@ -331,31 +326,37 @@ function approvalHandler(items?: any) {
return
}
const list: any = []
processItems.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
})
})
const param = {
result: true,
comment: '',
disposeType: '',
disposeTypeId: '',
failCauseId: '',
failCauseName: '',
flowTaskInfoList: list,
}
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
approval()
doAudit(param)
},
onNegativeClick: () => { },
})
}
function approval() {
const formIds: string[] = processItems.map(item => item.id)
const taskIds: string[] = processItems.map(item => item.taskId)
const tasknames: string[] = processItems.map(item => item.taskname)
const param: ApprovalParam = {
formid: formIds,
taskId: taskIds,
approvd: true,
taskComment: 'approval',
taskname: tasknames,
}
doAudit(param)
}
function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res

Loading…
Cancel
Save