diff --git a/src/api/finance/purchasingrequisition.ts b/src/api/finance/purchasingrequisition.ts index 4d75a2b..d9f9cb3 100644 --- a/src/api/finance/purchasingrequisition.ts +++ b/src/api/finance/purchasingrequisition.ts @@ -124,3 +124,53 @@ export function getContracts(params?: any) { }); } +/** + * 实施采购:上传采购文件并关联到申请单(可同时保存采购代表人方式与人员) + * @param id 采购申请ID + * @param fileIds 已上传的采购文件ID列表(fileType=130) + * @param implementType 实施采购方式 1:自行组织采购 2:委托代理采购 + * @param representorTeacherNo 需求部门初审-指定采购代表人(单人) + * @param representors 需求部门初审-部门多人逗号分隔 + */ +export function implementApply( + id: number, + fileIds: string[], + implementType?: string, + representorTeacherNo?: string, + representors?: string +) { + return request({ + url: '/purchase/purchasingapply/implement', + method: 'get', + params: { id, fileIds, implementType, representorTeacherNo, representors } + }); +} + +/** + * 发起采购文件审批流程(需已实施采购并上传采购文件) + * @param id 采购申请ID + * @param representorTeacherNo 需求部门初审-指定采购代表人(单人,用户ID或工号) + * @param representors 需求部门初审-部门多人由系统抽取(多人,用户ID或工号逗号分隔) + */ +export function startFileFlow( + id: number, + representorTeacherNo?: string, + representors?: string +) { + return request({ + url: '/purchase/purchasingapply/startFileFlow', + method: 'post', + data: { id, representorTeacherNo, representors } + }); +} + +/** + * 获取部门下人员(用于选采购代表人) + */ +export function getDeptMembers() { + return request({ + url: '/purchase/purchasingapply/getDeptMembers', + method: 'get' + }); +} + diff --git a/src/flow/components/index.ts b/src/flow/components/index.ts index bf2c7d4..7ef0e05 100644 --- a/src/flow/components/index.ts +++ b/src/flow/components/index.ts @@ -17,7 +17,8 @@ import SignInput from "./sign/index.vue"; // vite glob导入 const modules: Record Promise> = import.meta.glob( ['../../views/jsonflow/*/*.vue', '../../views/order/*/*.vue', - '../../views/purchase/*/*.vue','../../views/finance/purchasingrequisition/add.vue'] + '../../views/purchase/*/*.vue', '../../views/finance/purchasingrequisition/add.vue', + '../../views/finance/purchasingrequisition/implement.vue'] ) /** diff --git a/src/router/route.ts b/src/router/route.ts index a19506f..8f0b396 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -107,6 +107,14 @@ export const staticRoutes: Array = [ isAuth: false, // 不需要认证,纯页面展示 }, }, + { + path: '/finance/purchasingrequisition/implement', + name: 'purchasingrequisition.implement', + component: () => import('/@/views/finance/purchasingrequisition/implement.vue'), + meta: { + isAuth: false, // 供流程 iframe 嵌入 + }, + }, ...staticRoutesFlow ]; diff --git a/src/views/finance/purchasingrequisition/implement.vue b/src/views/finance/purchasingrequisition/implement.vue new file mode 100644 index 0000000..adbe723 --- /dev/null +++ b/src/views/finance/purchasingrequisition/implement.vue @@ -0,0 +1,313 @@ + + + + + diff --git a/src/views/finance/purchasingrequisition/implementForm.vue b/src/views/finance/purchasingrequisition/implementForm.vue new file mode 100644 index 0000000..3d15045 --- /dev/null +++ b/src/views/finance/purchasingrequisition/implementForm.vue @@ -0,0 +1,95 @@ +