撤回审批

This commit is contained in:
ChenXinXin committed 2024-05-09 16:03:13 +08:00
1 parent fbbf5a88d4
commit e31835cc13
1 file changed
+40 -2
+40 -2
View File
@@ -61,10 +61,16 @@
</template>
<!--表格行操作按钮-->
<template v-slot:item.action="{ item }">
<div class="d-flex">
<span role="button" class="success--text jh-font-size-3" @click="doUiAction('startUpdateItem', item)">
<v-icon size="16" class="success--text">mdi-text-box-outline</v-icon>
查看
</span>
<span v-if="item.taskStatus !== '已结束'" role="button" class="error--text jh-font-size-3 ml-2" @click="doUiAction('revokeTask', item)">
<v-icon size="16" class="error--text">mdi-text-box-outline</v-icon>
撤回
</span>
</div>
</template>
<!--没有数据-->
<template v-slot:loading>
@@ -108,7 +114,7 @@
<v-divider class="jh-divider"></v-divider>
<!-- 审核申请信息 -->
<v-row class="mt-4">
<v-row class="mt-4" v-if="isViewDrawerShown" >
<v-col cols="12" sm="12" md="12">
<div class="text-subtitle-2 mb-2 mx-4 font-weight-bold">历史审核记录</div>
<task-history :task-id="viewItem.taskId"></task-history>
@@ -182,7 +188,7 @@
{ text: "申请状态", value: "taskStatus" },
{ text: "申请时间", value: "taskCreateAt", width: 300 },
{ text: "结束时间", value: "taskFinishAt", width: 300 },
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 80, class: 'fixed', cellClass: 'fixed' },
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 150, class: 'fixed', cellClass: 'fixed' },
],
isViewDrawerShown: false,
@@ -210,6 +216,11 @@
await this.prepareViewItemData(uiActionData);
await this.openViewDrawer();
break;
case 'revokeTask':
await this.confirmRevokeItemDialog();
await this.doRevokeTask(uiActionData);
await this.getTableData();
break;
default:
console.error("[doUiAction] uiActionId not find", { uiActionId });
break;
@@ -253,6 +264,33 @@
this.isViewDrawerShown = true;
},
// ---------- 查看 uiAction >>>>>>>>>>>> --------
// ---------- 撤回 uiAction >>>>>>>>>>>> --------
async confirmRevokeItemDialog() {
if (await window.confirmDialog({title: "撤回", content: "确定撤回吗?"}) === false) {
throw new Error("[confirmDeleteItemDialog] 否");
}
},
async doRevokeTask({ taskId }) {
await window.vtoast.loading("修改数据");
await window.jianghuAxios({
data: {
appData: {
pageId: 'taskManagement',
actionId: 'updateItem',
actionData: {
taskStatus: 'end',
taskLineType: null,
taskEditUserList: null,
taskEditedUserList: null,
taskFinishAt: dayjs().format('YYYY-MM-DD HH:mm:ss')
},
where: { taskId: taskId }
}
}
})
await window.vtoast.success("修改数据成功");
},
// ---------- 撤回 uiAction >>>>>>>>>>>> --------
}
})
</script>