From 256238c571db0d3b33fbd87d9a94febfe0774260 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 28 Mar 2025 15:29:07 +0800 Subject: [PATCH 1/3] 1 --- src/hooks/smProcessTableAction.ts | 25 ++++++++++++++++++++++--- src/views/wallet/mch-manage/form.vue | 1 - 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/hooks/smProcessTableAction.ts b/src/hooks/smProcessTableAction.ts index 1ba8b60..4f3fe9f 100644 --- a/src/hooks/smProcessTableAction.ts +++ b/src/hooks/smProcessTableAction.ts @@ -1,15 +1,24 @@ +import { Ref } from "vue" import { useMessage } from "./message" -type tableRow = { id: string | undefined; checkStatus: number | string | undefined } +type tableRow = { id: string | undefined; checkStatus: number | string | undefined; processInstanceId: string | undefined | null } type ICreate = () => void type IEdit = (row: tableRow) => void type IFormClose = () => void +type IDeal = (row: tableRow) => void +type ITaskSubmitEvent = () => void // 采购流程(补货申请、采购订单、采购入库、采购退货、零售出库、零售退货) 表格操作列行为hook -export function useSmProcessTableAction(processFormState: { formId: string | undefined; formDisabled: boolean; showForm: boolean }): { +export function useSmProcessTableAction( + processFormState: { formId: string | undefined; formDisabled: boolean; showForm: boolean }, + processDrawerRef: Ref, + fetchList: () => void, +): { create: ICreate edit: IEdit formClose: IFormClose + deal: IDeal + taskSubmitEvent: ITaskSubmitEvent } { // 点击新增 const create: ICreate = () => { @@ -22,17 +31,27 @@ export function useSmProcessTableAction(processFormState: { formId: string | und row.checkStatus == 2 ? (processFormState.formDisabled = true) : (processFormState.formDisabled = false) processFormState.showForm = true } - // 表单关闭 const formClose: IFormClose = () => { processFormState.showForm = false processFormState.formId = undefined processFormState.formDisabled = true } + // 点击开始处理 + const deal = (row: tableRow) => { + if (!row.processInstanceId) return useMessage().warning("流程id不存在") + processDrawerRef.value.openProcessDrawer(row) + } + // 审批提交事件 + const taskSubmitEvent = () => { + fetchList() + } return { create, edit, formClose, + deal, + taskSubmitEvent, } } diff --git a/src/views/wallet/mch-manage/form.vue b/src/views/wallet/mch-manage/form.vue index aa303cd..effc6a6 100644 --- a/src/views/wallet/mch-manage/form.vue +++ b/src/views/wallet/mch-manage/form.vue @@ -118,7 +118,6 @@ import { useDict } from "/@/hooks/dict" import { useMessage } from "/@/hooks/message" import { getObj, addObj, putObj } from "/@/api/wallet/mch-manage" const emit = defineEmits(["refresh"]) -import { useUserInfo } from "/@/stores/userInfo" // 定义变量内容 const dataFormRef = ref() From c478f6067bf08a9504aef66eb696c907b4130f99 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 28 Mar 2025 19:29:06 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=A0=91=E5=BD=A2?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=8F=AF=E4=BB=A5=E7=AD=9B=E9=80=89=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Select/SelectDept.vue | 96 +++++-------- src/views/admin/system/user/form.vue | 1 + src/views/canteen/merchantInfo/form.vue | 176 ----------------------- src/views/canteen/merchantInfo/index.vue | 162 --------------------- 4 files changed, 35 insertions(+), 400 deletions(-) delete mode 100644 src/views/canteen/merchantInfo/form.vue delete mode 100644 src/views/canteen/merchantInfo/index.vue diff --git a/src/components/Select/SelectDept.vue b/src/components/Select/SelectDept.vue index 1609d75..9cfb397 100644 --- a/src/components/Select/SelectDept.vue +++ b/src/components/Select/SelectDept.vue @@ -1,84 +1,56 @@ - diff --git a/src/views/admin/system/user/form.vue b/src/views/admin/system/user/form.vue index e8231be..c60f6de 100644 --- a/src/views/admin/system/user/form.vue +++ b/src/views/admin/system/user/form.vue @@ -47,6 +47,7 @@ - - - - - - - - - - - - - - - - - - - {{ item.label }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/canteen/merchantInfo/index.vue b/src/views/canteen/merchantInfo/index.vue deleted file mode 100644 index 782e253..0000000 --- a/src/views/canteen/merchantInfo/index.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - From 4d637a6b2b78adf414a4552ee4f23b459aaa190e Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 28 Mar 2025 19:53:31 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=95=86=E6=88=B7=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wallet/mch-manage/form.vue | 73 ++++++++++++++++++++++++++- src/views/wallet/mch-manage/index.vue | 2 +- 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/src/views/wallet/mch-manage/form.vue b/src/views/wallet/mch-manage/form.vue index effc6a6..8097e77 100644 --- a/src/views/wallet/mch-manage/form.vue +++ b/src/views/wallet/mch-manage/form.vue @@ -31,6 +31,42 @@ + + + + 总店 + 分店 + + + + + + + + + + + + + + + + + + + + + + @@ -116,13 +152,15 @@