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