|
|
@ -139,7 +139,7 @@ |
|
|
|
</a-card> |
|
|
|
</a-card> |
|
|
|
</ALayoutContent> |
|
|
|
</ALayoutContent> |
|
|
|
<footer class="workflow-form__footer" :style="getWrapFormFooterStyle"> |
|
|
|
<footer class="workflow-form__footer" :style="getWrapFormFooterStyle"> |
|
|
|
<a-button size="large" type="primary" @click="test">审批</a-button> |
|
|
|
<a-button size="large" type="primary" @click="commit">审批</a-button> |
|
|
|
<a-button size="large" type="primary" danger>驳回</a-button> |
|
|
|
<a-button size="large" type="primary" danger>驳回</a-button> |
|
|
|
</footer> |
|
|
|
</footer> |
|
|
|
<UserPicker :title="state.userPickerProps.title" |
|
|
|
<UserPicker :title="state.userPickerProps.title" |
|
|
@ -182,6 +182,7 @@ |
|
|
|
import UserPicker from './popups/UserPicker/index.vue'; |
|
|
|
import UserPicker from './popups/UserPicker/index.vue'; |
|
|
|
import { ApiSelect } from '/@/components/Form'; |
|
|
|
import { ApiSelect } from '/@/components/Form'; |
|
|
|
import { listUser } from '/@/api/platform/system/controller/user'; |
|
|
|
import { listUser } from '/@/api/platform/system/controller/user'; |
|
|
|
|
|
|
|
import { ActivityCommentInfo } from '/@/api/platform/workflow/entity/activityCommentInfo'; |
|
|
|
|
|
|
|
|
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
interface WindowState { |
|
|
|
interface WindowState { |
|
|
@ -225,15 +226,12 @@ |
|
|
|
// 是否指定代理人 |
|
|
|
// 是否指定代理人 |
|
|
|
isAssign: boolean; |
|
|
|
isAssign: boolean; |
|
|
|
// 审批表单信息 |
|
|
|
// 审批表单信息 |
|
|
|
auditForm: { |
|
|
|
auditForm: ActivityCommentInfo & { |
|
|
|
message: string; |
|
|
|
|
|
|
|
mesCode: string; |
|
|
|
|
|
|
|
mesName: string; |
|
|
|
|
|
|
|
// 抄送用户ID |
|
|
|
// 抄送用户ID |
|
|
|
userIds: string[]; |
|
|
|
userIds: string[]; |
|
|
|
// 任务代理人ID |
|
|
|
// 任务代理人ID |
|
|
|
assignee: string; |
|
|
|
assignee: string; |
|
|
|
}, |
|
|
|
}; |
|
|
|
rulesRef: Recordable; |
|
|
|
rulesRef: Recordable; |
|
|
|
userPickerProps: { |
|
|
|
userPickerProps: { |
|
|
|
title: string; |
|
|
|
title: string; |
|
|
@ -281,6 +279,7 @@ |
|
|
|
message: '', |
|
|
|
message: '', |
|
|
|
mesCode: '', |
|
|
|
mesCode: '', |
|
|
|
mesName: '', |
|
|
|
mesName: '', |
|
|
|
|
|
|
|
mesLevel: '', |
|
|
|
userIds: [], |
|
|
|
userIds: [], |
|
|
|
assignee: '' |
|
|
|
assignee: '' |
|
|
|
}, |
|
|
|
}, |
|
|
@ -366,19 +365,16 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 流程抄送 */ |
|
|
|
/** 流程抄送 */ |
|
|
|
function cc(data: Recordable) { |
|
|
|
async function cc(data: Recordable) { |
|
|
|
if (state.isCC && state.auditForm.userIds) { |
|
|
|
if (state.isCC && state.auditForm.userIds) { |
|
|
|
//this.$refs['auditForm'].validate((valid) => { |
|
|
|
await auditForm.value.validate(); |
|
|
|
//if (valid) { |
|
|
|
await saveWorkflowCopy(state.auditForm.userIds.join(','), { |
|
|
|
saveWorkflowCopy(state.auditForm.userIds.join(','), { |
|
|
|
processDefId: state.processDefId, |
|
|
|
processDefId: state.processDefId, |
|
|
|
processInsId: data.processInsId, |
|
|
|
processInsId: data.processInsId, |
|
|
|
processDefName: '', |
|
|
|
processDefName: '', |
|
|
|
processInsName: state.formTitle, |
|
|
|
processInsName: state.formTitle, |
|
|
|
taskName: '' |
|
|
|
taskName: '' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
//}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -396,7 +392,7 @@ |
|
|
|
if (state.formType === '2') { |
|
|
|
if (state.formType === '2') { |
|
|
|
formPreview.value.startProcessDefinition(async (businessTable: string, businessId: string) => { |
|
|
|
formPreview.value.startProcessDefinition(async (businessTable: string, businessId: string) => { |
|
|
|
const processInsId = await startProcessDefinition({ |
|
|
|
const processInsId = await startProcessDefinition({ |
|
|
|
processDefKey: this.processDefKey, |
|
|
|
processDefKey: state.processDefKey, |
|
|
|
businessTable: businessTable, |
|
|
|
businessTable: businessTable, |
|
|
|
businessId: businessId, |
|
|
|
businessId: businessId, |
|
|
|
...vars |
|
|
|
...vars |
|
|
@ -407,7 +403,7 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 动态表单 |
|
|
|
// 动态表单 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
formPreview.value.startFormProcessDefinition({ processDefId: this.processDefId, ...vars }, (processInsId: string) => { |
|
|
|
formPreview.value.startFormProcessDefinition({ processDefId: state.processDefId, ...vars }, (processInsId: string) => { |
|
|
|
close(); |
|
|
|
close(); |
|
|
|
push({ path: '/workflow/task/index' }); |
|
|
|
push({ path: '/workflow/task/index' }); |
|
|
|
cc({ processInsId }); |
|
|
|
cc({ processInsId }); |
|
|
@ -483,7 +479,7 @@ |
|
|
|
title: '警告', |
|
|
|
title: '警告', |
|
|
|
content: '确定终止流程吗?', |
|
|
|
content: '确定终止流程吗?', |
|
|
|
onOk: async () => { |
|
|
|
onOk: async () => { |
|
|
|
await stopProcessInstance(this.processInsId, this.auditForm.message); |
|
|
|
await stopProcessInstance(state.processInsId, state.auditForm.message); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({path: '/workflow/task/index'}); |
|
|
|
await push({path: '/workflow/task/index'}); |
|
|
|
cc({processInsId: state.processInsId}); |
|
|
|
cc({processInsId: state.processInsId}); |
|
|
@ -498,7 +494,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
/** 驳回到任意节点 */ |
|
|
|
/** 驳回到任意节点 */ |
|
|
|
function rollBack() { |
|
|
|
function rollBack() { |
|
|
|
openRollBackTask(true,{ taskId: this.taskId }); |
|
|
|
openRollBackTask(true,{ taskId: state.taskId }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 加签 */ |
|
|
|
/** 加签 */ |
|
|
@ -524,12 +520,12 @@ |
|
|
|
if (state.formType === '2') { |
|
|
|
if (state.formType === '2') { |
|
|
|
formPreview.value.auditTask(async () => { |
|
|
|
formPreview.value.auditTask(async () => { |
|
|
|
await auditTask({ |
|
|
|
await auditTask({ |
|
|
|
taskId: this.taskId, |
|
|
|
taskId: state.taskId, |
|
|
|
taskDefKey: this.taskDefKey, |
|
|
|
taskDefKey: state.taskDefKey, |
|
|
|
processInsId: this.processInsId, |
|
|
|
processInsId: state.processInsId, |
|
|
|
processDefId: this.processDefId, |
|
|
|
processDefId: state.processDefId, |
|
|
|
activityCommentInfo: this.auditForm, |
|
|
|
activityCommentInfo: state.auditForm, |
|
|
|
assignee: this.auditForm.assignee, |
|
|
|
assignee: state.auditForm.assignee, |
|
|
|
vars, |
|
|
|
vars, |
|
|
|
}); |
|
|
|
}); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
@ -539,11 +535,12 @@ |
|
|
|
// 动态表单审批 |
|
|
|
// 动态表单审批 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
formPreview.value.auditFormTask({ |
|
|
|
formPreview.value.auditFormTask({ |
|
|
|
taskId: this.taskId, |
|
|
|
formType: '', |
|
|
|
processInsId: this.processInsId, |
|
|
|
taskId: state.taskId, |
|
|
|
activityCommentInfo: this.auditForm, |
|
|
|
processInsId: state.processInsId, |
|
|
|
assignee: this.auditForm.assignee, |
|
|
|
activityCommentInfo: state.auditForm, |
|
|
|
vars, |
|
|
|
assignee: state.auditForm.assignee, |
|
|
|
|
|
|
|
vars |
|
|
|
}, () => { |
|
|
|
}, () => { |
|
|
|
close(); |
|
|
|
close(); |
|
|
|
push({ path: '/workflow/task/index' }); |
|
|
|
push({ path: '/workflow/task/index' }); |
|
|
@ -555,9 +552,9 @@ |
|
|
|
/** 处理回退到任意节点 */ |
|
|
|
/** 处理回退到任意节点 */ |
|
|
|
async function handleRollBackTask(backTaskDefKey: string) { |
|
|
|
async function handleRollBackTask(backTaskDefKey: string) { |
|
|
|
await rejectTask({ |
|
|
|
await rejectTask({ |
|
|
|
currentTaskId: this.taskId, |
|
|
|
currentTaskId: state.taskId, |
|
|
|
rollBackTaskDefKey: backTaskDefKey, |
|
|
|
rollBackTaskDefKey: backTaskDefKey, |
|
|
|
comment: this.auditForm |
|
|
|
comment: state.auditForm |
|
|
|
}); |
|
|
|
}); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
@ -566,7 +563,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
/** 处理转派任务 */ |
|
|
|
/** 处理转派任务 */ |
|
|
|
async function handleTransferTask(userList: KiccUser[]) { |
|
|
|
async function handleTransferTask(userList: KiccUser[]) { |
|
|
|
await transferTask( this.taskId, userList[0].id); |
|
|
|
await transferTask( state.taskId, userList[0].id); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
@ -574,7 +571,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
/** 处理任务委派 */ |
|
|
|
/** 处理任务委派 */ |
|
|
|
async function handleDelegateTask(userList: KiccUser[]) { |
|
|
|
async function handleDelegateTask(userList: KiccUser[]) { |
|
|
|
await delegateTask(this.taskId, userList[0].id); |
|
|
|
await delegateTask(state.taskId, userList[0].id); |
|
|
|
await close(); |
|
|
|
await close(); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
await push({ path: '/workflow/task/index' }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
|
cc({ processInsId: state.processInsId }); |
|
|
@ -658,10 +655,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function test() { |
|
|
|
|
|
|
|
auditForm.value.validate(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
|
@prefix-cls: ~'@{namespace}-task-form'; |
|
|
|
@prefix-cls: ~'@{namespace}-task-form'; |
|
|
|