提交审批流程隐藏取消等
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-modal :mask-closable="false" :title="dialogTitle" :visible="isOpen" :width="500" centered class="geg" @cancel="onClickCancel">
|
||||
<a-modal :mask-closable="false" :title="dialogTitle" :visible="isOpen" :width="500" centered class="geg" @cancel="onClickCancel" :closable="actionType!='submit'">
|
||||
<template #footer>
|
||||
<a-button :disabled="loading" @click="onClickCancel">取消</a-button>
|
||||
<a-button :disabled="loading" @click="onClickCancel" v-if="actionType!=='submit'">取消</a-button>
|
||||
<a-button :loading="loading" type="primary" @click="onClickOK">确定</a-button>
|
||||
</template>
|
||||
<div class="dialog-wrap">
|
||||
@ -51,7 +51,7 @@
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
<a-form-item label="审批意见" :required="_action == 'reject'" name="opinion">
|
||||
<a-form-item label="审批意见" :required="_action == 'reject'" name="opinion" v-if="actionType!=='submit'">
|
||||
<a-textarea v-model:value="formState.opinion" :disabled="loading" :maxlength="200" :rows="3" placeholder="请输入审批意见,不超过200字" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
@ -72,6 +72,7 @@
|
||||
const isEnd = ref(false);
|
||||
|
||||
let _action = ref('agree');
|
||||
const actionType= ref('')
|
||||
let _processId = '';
|
||||
let _taskId = '';
|
||||
let flowNextNodes = ref([]);
|
||||
@ -95,14 +96,15 @@
|
||||
return flowNextNodes.value.length > 1 ? '多个节点,请确认流向节点' : flowNextNodes?.value[0]?.activityName;
|
||||
}
|
||||
|
||||
function toggleDialog({ isClose, action, callback, rejectCancel, processId, taskId, nextNodes } = {}) {
|
||||
if (isClose) {
|
||||
isOpen.value = false;
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
isOpen.value = true;
|
||||
_action.value = action;
|
||||
function toggleDialog({ isClose, action, callback, rejectCancel, processId, taskId, nextNodes,actionFlowType } = {}) {
|
||||
if (isClose) {
|
||||
isOpen.value = false;
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
isOpen.value = true;
|
||||
_action.value = action;
|
||||
actionType.value = actionFlowType
|
||||
_callback = callback;
|
||||
_onCancel = rejectCancel;
|
||||
_processId = processId;
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</slot>
|
||||
关闭
|
||||
</a-button>
|
||||
<a-button v-if="!disabled" :disabled="data.submitLoading" type="primary" @click="saveLaunchSubmit">
|
||||
<a-button v-if="!disabled" :disabled="data.submitLoading" type="primary" @click="saveLaunch">
|
||||
<slot name="icon">
|
||||
<send-outlined />
|
||||
</slot>
|
||||
@ -271,24 +271,20 @@
|
||||
data.submitLoading = false;
|
||||
return;
|
||||
}
|
||||
const nextTaskUser = {};
|
||||
let arr = (nextNodes[0]?.userList||[]).map(v =>v.F_UserId)
|
||||
nextTaskUser[nextNodes[0]?.activityId] = arr.join(',')
|
||||
approvalData.nextTaskUser = nextTaskUser
|
||||
onFinish({})
|
||||
// opinionDlg.value.toggleDialog({
|
||||
// action: 'agree',
|
||||
// nextNodes,
|
||||
// rejectCancel: () => {
|
||||
// loading.value = false;
|
||||
// data.submitLoading = false;
|
||||
// },
|
||||
// callback: (args) => {
|
||||
// approvalData.approvedContent = args.opinion;
|
||||
// approvalData.nextTaskUser = args.nextTaskUser;
|
||||
// onFinish({});
|
||||
// }
|
||||
// });
|
||||
opinionDlg.value.toggleDialog({
|
||||
action: 'agree',
|
||||
actionFlowType: 'submit',
|
||||
nextNodes,
|
||||
rejectCancel: () => {
|
||||
loading.value = false;
|
||||
data.submitLoading = false;
|
||||
},
|
||||
callback: (args) => {
|
||||
approvalData.approvedContent = args.opinion;
|
||||
approvalData.nextTaskUser = args.nextTaskUser;
|
||||
onFinish({});
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
data.submitLoading = false;
|
||||
@ -372,20 +368,6 @@
|
||||
disableSubmit.value = false
|
||||
}
|
||||
}
|
||||
async function saveLaunchSubmit () {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '请确认是否提交流程,提交后流程不能删除',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
saveLaunch()
|
||||
},
|
||||
onCancel: () => {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
async function saveLaunchNew() {
|
||||
if (!taskId.value && rDraftsId.value != '0') {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user