超市入库审批结构调整

This commit is contained in:
weiwei committed 2025-05-30 10:16:38 +08:00
1 parent 0e835b93ea
commit 490d1ae51d
8 files changed
+115 -41

No files matched your search

+6 -27
View File
@@ -1,24 +1,15 @@
import { Ref } from "vue"
import { useMessage } from "./message"
type tableRow = { id: string | undefined; checkStatus: number | string | undefined; processInstanceId: string | undefined | null }
export 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
type IClose = () => void
// 采购流程(补货申请、采购订单、采购入库、采购退货、零售出库、零售退货) 表格操作列行为hook
export function useSmProcessTableAction(
processFormState: { formId: string | undefined; formDisabled: boolean; showForm: boolean },
processDrawerRef: Ref<any>,
fetchList: () => void,
): {
export function useSmProcessTableAction(processFormState: { formId: string | undefined; formDisabled: boolean; showForm: boolean }): {
create: ICreate
edit: IEdit
formClose: IFormClose
deal: IDeal
taskSubmitEvent: ITaskSubmitEvent
close: IClose
} {
// 点击新增
const create: ICreate = () => {
@@ -32,27 +23,15 @@ export function useSmProcessTableAction(
processFormState.showForm = true
}
// 表单关闭
const formClose: IFormClose = () => {
const close: IClose = () => {
processFormState.showForm = false
processFormState.formId = undefined
processFormState.formDisabled = true
fetchList()
}
// 点击开始处理
const deal = (row: tableRow) => {
if (!row.processInstanceId) return useMessage().warning("流程id不存在")
processDrawerRef.value.openProcessDrawer(row)
}
// 审批提交事件
const taskSubmitEvent = () => {
fetchList()
}
return {
create,
edit,
formClose,
deal,
taskSubmitEvent,
close,
}
}