add 添加流程撤销
update 调整待审批,已审批等页面
This commit is contained in:
parent
2230644bc3
commit
811f79e3a6
@ -100,13 +100,14 @@ export const getPageByCurrent = (query: ProcessInstanceQuery): AxiosPromise<Proc
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 撤销流程
|
* 撤销流程
|
||||||
* @param businessKey 业务id
|
* @param data 参数
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const cancelProcessApply = (businessKey: string) => {
|
export const cancelProcessApply = (data: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/cancelProcessApply/${businessKey}`,
|
url: `/workflow/processInstance/cancelProcessApply`,
|
||||||
method: 'put'
|
method: 'put',
|
||||||
|
data: data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="flowStatus" label="状态" width="80" sortable align="center">
|
<el-table-column prop="flowStatus" label="状态" width="80" sortable align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
|
<dict-tag :options="wf_task_status" :value="scope.row.flowStatus"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="message" label="审批意见" :show-overflow-tooltip="true" sortable align="center"></el-table-column>
|
<el-table-column prop="message" label="审批意见" :show-overflow-tooltip="true" sortable align="center"></el-table-column>
|
||||||
@ -53,7 +53,7 @@ import processApi from '@/api/workflow/processInstance';
|
|||||||
import { propTypes } from '@/utils/propTypes';
|
import { propTypes } from '@/utils/propTypes';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
const { wf_task_status } = toRefs<any>(proxy?.useDict('wf_task_status'));
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
width: propTypes.string.def('80%'),
|
width: propTypes.string.def('80%'),
|
||||||
height: propTypes.string.def('100%')
|
height: propTypes.string.def('100%')
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<el-checkbox label="3" name="type">短信</el-checkbox>
|
<el-checkbox label="3" name="type">短信</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="task.flowStatus === 1" label="附件">
|
<el-form-item v-if="task.flowStatus === 'waiting'" label="附件">
|
||||||
<fileUpload v-model="form.fileId" :file-type="['doc', 'xls', 'ppt', 'txt', 'pdf', 'xlsx', 'docx', 'zip']" :file-size="'20'" />
|
<fileUpload v-model="form.fileId" :file-type="['doc', 'xls', 'ppt', 'txt', 'pdf', 'xlsx', 'docx', 'zip']" :file-size="'20'" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="抄送">
|
<el-form-item label="抄送">
|
||||||
@ -17,7 +17,7 @@
|
|||||||
{{ user.userName }}
|
{{ user.userName }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="task.flowStatus === 1" label="审批意见">
|
<el-form-item v-if="task.flowStatus === 'waiting'" label="审批意见">
|
||||||
<el-input v-model="form.message" type="textarea" resize="none" />
|
<el-input v-model="form.message" type="textarea" resize="none" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -233,7 +233,10 @@ const handleBackProcess = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
backLoading.value = true;
|
backLoading.value = true;
|
||||||
backButtonDisabled.value = true;
|
backButtonDisabled.value = true;
|
||||||
await backProcess(backForm.value).finally(() => (loading.value = false));
|
await backProcess(backForm.value).finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
buttonDisabled.value = false
|
||||||
|
});
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
backLoading.value = false;
|
backLoading.value = false;
|
||||||
backButtonDisabled.value = false;
|
backButtonDisabled.value = false;
|
||||||
@ -294,7 +297,10 @@ const handleTransferTask = async (data) => {
|
|||||||
await proxy?.$modal.confirm('是否确认提交?');
|
await proxy?.$modal.confirm('是否确认提交?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonDisabled.value = true;
|
buttonDisabled.value = true;
|
||||||
await transferTask(params).finally(() => (loading.value = false));
|
await transferTask(params).finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
buttonDisabled.value = false
|
||||||
|
});
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
@ -318,7 +324,10 @@ const handleDelegateTask = async (data) => {
|
|||||||
await proxy?.$modal.confirm('是否确认提交?');
|
await proxy?.$modal.confirm('是否确认提交?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonDisabled.value = true;
|
buttonDisabled.value = true;
|
||||||
await delegateTask(params).finally(() => (loading.value = false));
|
await delegateTask(params).finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
buttonDisabled.value = false
|
||||||
|
});
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
@ -335,7 +344,10 @@ const handleTerminationTask = async (data) => {
|
|||||||
await proxy?.$modal.confirm('是否确认终止?');
|
await proxy?.$modal.confirm('是否确认终止?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonDisabled.value = true;
|
buttonDisabled.value = true;
|
||||||
await terminationTask(params).finally(() => (loading.value = false));
|
await terminationTask(params).finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
buttonDisabled.value = false
|
||||||
|
});
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="leaveList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="leaveList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column v-if="false" label="主键" align="center" prop="id" />
|
<el-table-column v-if="false" label="主键" align="center" prop="id" />
|
||||||
<el-table-column label="请假类型" align="center">
|
<el-table-column label="请假类型" align="center">
|
||||||
@ -56,31 +56,36 @@
|
|||||||
<dict-tag :options="wf_business_status" :value="scope.row.status"></dict-tag>
|
<dict-tag :options="wf_business_status" :value="scope.row.status"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="162">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'"
|
|
||||||
v-hasPermi="['workflow:leave:edit']"
|
v-hasPermi="['workflow:leave:edit']"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="Edit"
|
icon="Edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>修改</el-button
|
>修改</el-button>
|
||||||
>
|
</el-col>
|
||||||
<el-button v-hasPermi="['workflow:leave:remove']" size="small" link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
|
||||||
>删除</el-button
|
<el-button v-hasPermi="['workflow:leave:remove']" size="small" type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
>
|
>删除</el-button>
|
||||||
<el-button link type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5" v-if="scope.row.status === 'waiting'">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.status === '1'"
|
|
||||||
link
|
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="Notification"
|
icon="Notification"
|
||||||
@click="handleCancelProcessApply(scope.row.id)"
|
@click="handleCancelProcessApply(scope.row.id)"
|
||||||
>撤销</el-button
|
>撤销</el-button>
|
||||||
>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -225,7 +230,11 @@ const handleExport = () => {
|
|||||||
const handleCancelProcessApply = async (id: string) => {
|
const handleCancelProcessApply = async (id: string) => {
|
||||||
await proxy?.$modal.confirm('是否确认撤销当前单据?');
|
await proxy?.$modal.confirm('是否确认撤销当前单据?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await cancelProcessApply(id).finally(() => (loading.value = false));
|
let data = {
|
||||||
|
businessId:id,
|
||||||
|
message:'撤销流程!'
|
||||||
|
}
|
||||||
|
await cancelProcessApply(data).finally(() => (loading.value = false));
|
||||||
await getList();
|
await getList();
|
||||||
proxy?.$modal.msgSuccess('撤销成功');
|
proxy?.$modal.msgSuccess('撤销成功');
|
||||||
};
|
};
|
||||||
|
@ -70,6 +70,11 @@
|
|||||||
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
|
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column v-if="tab === 'finish'" align="center" label="任务状态" prop="flowTaskStatus" min-width="70">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="wf_task_status" :value="scope.row.flowTaskStatus"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="createTime" label="创建时间" width="160"></el-table-column>
|
<el-table-column align="center" prop="createTime" label="创建时间" width="160"></el-table-column>
|
||||||
<el-table-column label="操作" align="center" :width="tab === 'finish' ? '80' : '151'">
|
<el-table-column label="操作" align="center" :width="tab === 'finish' ? '80' : '151'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -144,6 +149,7 @@ const userSelectRef = ref<InstanceType<typeof UserSelect>>();
|
|||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
||||||
|
const { wf_task_status } = toRefs<any>(proxy?.useDict('wf_task_status'));
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
@ -63,28 +63,24 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="createTime" label="启动时间" width="160"></el-table-column>
|
<el-table-column align="center" prop="createTime" label="启动时间" width="160"></el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="162">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip
|
<el-row :gutter="10" class="mb8">
|
||||||
v-if="scope.row.businessStatus === 'draft' || scope.row.businessStatus === 'cancel' || scope.row.businessStatus === 'back'"
|
<el-col :span="1.5" v-if="scope.row.flowStatus === 'draft' || scope.row.flowStatus === 'cancel' || scope.row.flowStatus === 'back'">
|
||||||
content="修改"
|
<el-button type="primary" size="small" icon="Edit" @click="handleOpen(scope.row, 'update')">编辑</el-button>
|
||||||
placement="top"
|
</el-col>
|
||||||
>
|
<el-col :span="1.5" v-if="scope.row.flowStatus === 'draft' || scope.row.flowStatus === 'cancel' || scope.row.flowStatus === 'back'">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleOpen(scope.row, 'update')"></el-button>
|
<el-button type="primary" size="small" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</el-tooltip>
|
</el-col>
|
||||||
<el-tooltip
|
</el-row>
|
||||||
v-if="scope.row.businessStatus === 'draft' || scope.row.businessStatus === 'cancel' || scope.row.businessStatus === 'back'"
|
<el-row :gutter="10" class="mb8">
|
||||||
content="删除"
|
<el-col :span="1.5">
|
||||||
placement="top"
|
<el-button type="primary" size="small" icon="View" @click="handleOpen(scope.row, 'view')">查看</el-button>
|
||||||
>
|
</el-col>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
<el-col :span="1.5" v-if="scope.row.flowStatus === 'waiting'">
|
||||||
</el-tooltip>
|
<el-button type="primary" size="small" icon="Notification" @click="handleCancelProcessApply(scope.row.businessId)">撤销</el-button>
|
||||||
<el-tooltip placement="top" content="查看">
|
</el-col>
|
||||||
<el-button link type="primary" icon="View" @click="handleOpen(scope.row, 'view')"></el-button>
|
</el-row>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip v-if="scope.row.businessStatus === 'waiting'" content="撤销" placement="top">
|
|
||||||
<el-button link type="primary" icon="Notification" @click="handleCancelProcessApply(scope.row.businessKey)"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -226,11 +222,15 @@ const handleDelete = async (row: ProcessInstanceVO) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** 撤销按钮操作 */
|
/** 撤销按钮操作 */
|
||||||
const handleCancelProcessApply = async (businessKey: string) => {
|
const handleCancelProcessApply = async (businessId: string) => {
|
||||||
await proxy?.$modal.confirm('是否确认撤销当前单据?');
|
await proxy?.$modal.confirm('是否确认撤销当前单据?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if ('running' === tab.value) {
|
if ('running' === tab.value) {
|
||||||
await cancelProcessApply(businessKey).finally(() => (loading.value = false));
|
let data = {
|
||||||
|
businessId:businessId,
|
||||||
|
message:'撤销流程!'
|
||||||
|
}
|
||||||
|
await cancelProcessApply(data).finally(() => (loading.value = false));
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('撤销成功');
|
proxy?.$modal.msgSuccess('撤销成功');
|
||||||
|
@ -45,6 +45,16 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="流程状态" prop="flowStatus" min-width="70">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="任务状态" prop="flowTaskStatus" min-width="70">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="wf_task_status" :value="scope.row.flowTaskStatus"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="createTime" label="创建时间" width="160"></el-table-column>
|
<el-table-column align="center" prop="createTime" label="创建时间" width="160"></el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="200">
|
<el-table-column label="操作" align="center" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -71,6 +81,8 @@ import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
|||||||
//审批记录组件
|
//审批记录组件
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
||||||
|
const { wf_task_status } = toRefs<any>(proxy?.useDict('wf_task_status'));
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
Loading…
x
Reference in New Issue
Block a user