From fe777549d4475410f10eee72e93ca6dedf826343 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Mon, 17 Nov 2025 17:34:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp):=20=E6=96=B0=E5=A2=9E=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=AA=8C=E6=94=B6=E5=92=8C=E6=94=B6=E8=B4=A7=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增项目验收确认编辑页面,包含表单录入、编号生成、项目选择等功能 - 新增项目收货确认编辑页面,支持表单验证、编号生成及流程启动 - 新增项目验收确认相关API接口,支持列表查询、获取详情、新增、修改、删除及提交流程 - 新增项目收货确认相关API接口,实现列表获取、详情查询、新增、更新、删除及流程发起 - 新增项目选择对话框组件,支持多条件筛选和单多选模式 - 实现前端权限控制,仅允许项目经理或超级管理员提交或暂存确认单据 - 实现审批状态映射,支持草稿、审批中、驳回、撤销等状态展示与操作 - 优化页面初始化逻辑,支持path和query参数兼容获取ID和任务ID - 实现附件上传功能,限制最多上传5个文件 - 统一表单校验规则,确保必填字段完整性 - 新增流水号生成逻辑,调用统一编码规则服务实现编号自动生成 - 支持流程审批记录查看及流程提交验证弹窗显示 - 支持页面类型区分编辑、查看、审批,禁用相应操作以保证业务流程正确 --- src/api/oa/erp/projectAcceptance/index.ts | 99 +++++ src/api/oa/erp/projectAcceptance/types.ts | 229 ++++++++++++ src/api/oa/erp/projectReceiving/index.ts | 99 +++++ src/api/oa/erp/projectReceiving/types.ts | 224 +++++++++++ src/components/ProjectSelectDialog/index.vue | 368 +++++++++++++++++++ src/views/oa/erp/projectAcceptance/edit.vue | 315 ++++++++++++++++ src/views/oa/erp/projectAcceptance/index.vue | 325 ++++++++++++++++ src/views/oa/erp/projectReceiving/edit.vue | 314 ++++++++++++++++ src/views/oa/erp/projectReceiving/index.vue | 319 ++++++++++++++++ 9 files changed, 2292 insertions(+) create mode 100644 src/api/oa/erp/projectAcceptance/index.ts create mode 100644 src/api/oa/erp/projectAcceptance/types.ts create mode 100644 src/api/oa/erp/projectReceiving/index.ts create mode 100644 src/api/oa/erp/projectReceiving/types.ts create mode 100644 src/components/ProjectSelectDialog/index.vue create mode 100644 src/views/oa/erp/projectAcceptance/edit.vue create mode 100644 src/views/oa/erp/projectAcceptance/index.vue create mode 100644 src/views/oa/erp/projectReceiving/edit.vue create mode 100644 src/views/oa/erp/projectReceiving/index.vue diff --git a/src/api/oa/erp/projectAcceptance/index.ts b/src/api/oa/erp/projectAcceptance/index.ts new file mode 100644 index 0000000..c4c5d70 --- /dev/null +++ b/src/api/oa/erp/projectAcceptance/index.ts @@ -0,0 +1,99 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProjectAcceptanceVO, ProjectAcceptanceForm, ProjectAcceptanceQuery } from '@/api/oa/erp/projectAcceptance/types'; + +/** + * 查询项目验收确认列表 + * @param query + * @returns {*} + */ + +export const listProjectAcceptance = (query?: ProjectAcceptanceQuery): AxiosPromise => { + return request({ + url: '/oa/erp/projectAcceptance/list', + method: 'get', + params: query + }); +}; + +/** + * 查询项目验收确认详细 + * @param acceptanceId + */ +export const getProjectAcceptance = (acceptanceId: string | number): AxiosPromise => { + return request({ + url: '/oa/erp/projectAcceptance/' + acceptanceId, + method: 'get' + }); +}; + +/** + * 新增项目验收确认 + * @param data + */ +export const addProjectAcceptance = (data: ProjectAcceptanceForm) => { + return request({ + url: '/oa/erp/projectAcceptance', + method: 'post', + data: data + }); +}; + +/** + * 修改项目验收确认 + * @param data + */ +export const updateProjectAcceptance = (data: ProjectAcceptanceForm) => { + return request({ + url: '/oa/erp/projectAcceptance', + method: 'put', + data: data + }); +}; + +/** + * 删除项目验收确认 + * @param acceptanceId + */ +export const delProjectAcceptance = (acceptanceId: string | number | Array) => { + return request({ + url: '/oa/erp/projectAcceptance/' + acceptanceId, + method: 'delete' + }); +}; + +/** + * 根据项目ID准备验收信息 + * @param projectId + */ +export const prepareProjectAcceptanceByProjectId = (projectId: string | number): AxiosPromise => { + return request({ + url: '/oa/erp/projectAcceptance/prepareByProjectId/' + projectId, + method: 'get' + }); +}; + +/** + * 提交项目验收确认并发起流程 + * @param data + */ +export const submitProjectAcceptanceAndFlowStart = (data: ProjectAcceptanceForm): AxiosPromise => { + return request({ + url: '/oa/erp/projectAcceptance/submitAndFlowStart', + method: 'post', + data: data + }); +}; + +/** + * 下拉框查询项目验收确认列表 + * @param query + * @returns {*} + */ +export function getErpProjectAcceptanceList (query) { + return request({ + url: '/oa/erp/projectAcceptance/getErpProjectAcceptanceList', + method: 'get', + params: query + }); +}; diff --git a/src/api/oa/erp/projectAcceptance/types.ts b/src/api/oa/erp/projectAcceptance/types.ts new file mode 100644 index 0000000..7be8f74 --- /dev/null +++ b/src/api/oa/erp/projectAcceptance/types.ts @@ -0,0 +1,229 @@ +export interface ProjectAcceptanceVO { + /** + * 验收确认ID + */ + acceptanceId: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 项目号 + */ + projectCode: string; + + /** + * 项目名称 + */ + projectName: string; + + /** + * 项目经理 + */ + managerId: string | number; + + /** + * 项目经理姓名 + */ + projectManagerName?: string; + + + /** + * 验收日期 + */ + acceptanceDate: string; + + /** + * 验收单附件 + */ + ossId: string | number; + + /** + * 验收确认编号 + */ + acceptanceCode?: string; + + /** + * 部门负责人 + */ + chargeId: string | number; + + /** + * 部门负责人姓名 + */ + chargeName?: string; + + /** + * 分管副总 + */ + deputyId: string | number; + + /** + * 分管副总姓名 + */ + deputyName?: string; + + /** + * 备注 + */ + remark: string; + + /** + * 流程状态 + */ + flowStatus?: string; + /** + * 项目状态(1暂存 2审批中 3可用) + */ + acceptanceStatus?: string; +} + +export interface ProjectAcceptanceForm extends BaseEntity { + /** + * 验收确认ID + */ + acceptanceId?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 项目号 + */ + projectCode?: string; + + /** + * 项目名称 + */ + projectName?: string; + + /** + * 项目经理 + */ + managerId?: string | number; + + /** + * 项目经理姓名 + */ + projectManagerName?: string; + + + /** + * 验收日期 + */ + acceptanceDate?: string; + + /** + * 验收单附件 + */ + ossId?: string | number; + + /** + * 验收确认编号 + */ + acceptanceCode?: string; + + /** + * 部门负责人 + */ + chargeId?: string | number; + /** + * 部门负责人姓名 + */ + chargeName?: string; + + /** + * 分管副总 + */ + deputyId?: string | number; + /** + * 分管副总姓名 + */ + deputyName?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 流程状态 + */ + flowStatus?: string; + + /** + * 项目状态(1暂存 2审批中 3可用) + */ + acceptanceStatus?: string; + + /** + * 流程编码 + */ + flowCode?: string; + + /** + * 流程变量 + */ + variables?: any; + + /** + * 业务扩展字段 + */ + bizExt?: any; + +} + +export interface ProjectAcceptanceQuery extends PageQuery { + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 项目号 + */ + projectCode?: string; + + /** + * 项目名称 + */ + projectName?: string; + + /** + * 项目经理 + */ + managerId?: string | number; + + /** + * 验收日期 + */ + acceptanceDate?: string; + + /** + * 验收单附件 + */ + ossId?: string | number; + + /** + * 部门负责人 + */ + chargeId?: string | number; + + /** + * 分管副总 + */ + deputyId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/oa/erp/projectReceiving/index.ts b/src/api/oa/erp/projectReceiving/index.ts new file mode 100644 index 0000000..cdf7994 --- /dev/null +++ b/src/api/oa/erp/projectReceiving/index.ts @@ -0,0 +1,99 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProjectReceivingVO, ProjectReceivingForm, ProjectReceivingQuery } from '@/api/oa/erp/projectReceiving/types'; + +/** + * 查询项目收货确认列表 + * @param query + * @returns {*} + */ + +export const listProjectReceiving = (query?: ProjectReceivingQuery): AxiosPromise => { + return request({ + url: '/oa/erp/projectReceiving/list', + method: 'get', + params: query + }); +}; + +/** + * 下拉框查询项目收货确认列表 + * @param query + * @returns {*} + */ +export const getErpProjectReceivingList = (query?: ProjectReceivingQuery): AxiosPromise => { + return request({ + url: '/oa/erp/projectReceiving/getErpProjectReceivingList', + method: 'get', + params: query + }); +}; + +/** + * 提交项目收货确认并发起流程 + * @param data + */ +export const submitProjectReceivingAndFlowStart = (data: ProjectReceivingForm): AxiosPromise => { + return request({ + url: '/oa/erp/projectReceiving/submitAndFlowStart', + method: 'post', + data: data + }); +}; + +/** + * 根据项目ID准备收货信息 + * @param projectId + */ +export const prepareProjectReceivingByProjectId = (projectId: string | number): AxiosPromise => { + return request({ + url: '/oa/erp/projectReceiving/prepareByProjectId/' + projectId, + method: 'get' + }); +}; + +/** + * 查询项目收货确认详细 + * @param receivingId + */ +export const getProjectReceiving = (receivingId: string | number): AxiosPromise => { + return request({ + url: '/oa/erp/projectReceiving/' + receivingId, + method: 'get' + }); +}; + +/** + * 新增项目收货确认 + * @param data + */ +export const addProjectReceiving = (data: ProjectReceivingForm) => { + return request({ + url: '/oa/erp/projectReceiving', + method: 'post', + data: data + }); +}; + +/** + * 修改项目收货确认 + * @param data + */ +export const updateProjectReceiving = (data: ProjectReceivingForm) => { + return request({ + url: '/oa/erp/projectReceiving', + method: 'put', + data: data + }); +}; + +/** + * 删除项目收货确认 + * @param receivingId + */ +export const delProjectReceiving = (receivingId: string | number | Array) => { + return request({ + url: '/oa/erp/projectReceiving/' + receivingId, + method: 'delete' + }); +}; diff --git a/src/api/oa/erp/projectReceiving/types.ts b/src/api/oa/erp/projectReceiving/types.ts new file mode 100644 index 0000000..c8a6de8 --- /dev/null +++ b/src/api/oa/erp/projectReceiving/types.ts @@ -0,0 +1,224 @@ +export interface ProjectReceivingVO { + /** + * 收货确认ID + */ + receivingId: string | number; + /** + * 项目号 + */ + projectCode: string; + + /** + * 项目名称 + */ + projectName: string; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 项目经理 + */ + managerId: string | number; + + /** + * 项目经理姓名 + */ + projectManagerName?: string; + + + /** + * 到货日期 + */ + arrivalDate: string; + + /** + * 收货单附件 + */ + ossId: string | number; + + /** + * 收货确认编号 + */ + receivingCode?: string; + + /** + * 部门负责人 + */ + chargeId: string | number; + + /** + * 部门负责人姓名 + */ + chargeName?: string; + + /** + * 分管副总 + */ + deputyId: string | number; + + /** + * 分管副总姓名 + */ + deputyName?: string; + + /** + * 备注 + */ + remark: string; + + /** + * 流程状态 + */ + flowStatus?: string; + + /** + * 项目状态(1暂存 2审批中 3可用) + */ + receivingStatus?: string; +} + +export interface ProjectReceivingForm extends BaseEntity { + /** + * 收货确认ID + */ + receivingId?: string | number; + + /** + * 项目号 + */ + projectCode?: string; + + /** + * 项目名称 + */ + projectName?: string; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 项目经理 + */ + managerId?: string | number; + + /** + * 项目经理姓名 + */ + projectManagerName?: string; + + + /** + * 到货日期 + */ + arrivalDate?: string; + + /** + * 收货单附件 + */ + ossId?: string | number; + + /** + * 收货确认编号 + */ + receivingCode?: string; + + /** + * 部门负责人 + */ + chargeId?: string | number; + /** + * 部门负责人姓名 + */ + chargeName?: string; + + /** + * 分管副总 + */ + deputyId?: string | number; + /** + * 分管副总姓名 + */ + deputyName?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 流程状态 + */ + flowStatus?: string; + + /** + * 项目状态(1暂存 2审批中 3可用) + */ + receivingStatus?: string; + + /** + * 流程编码 + */ + flowCode?: string; + + /** + * 流程变量 + */ + variables?: any; + + /** + * 业务扩展字段 + */ + bizExt?: any; + +} + +export interface ProjectReceivingQuery extends PageQuery { + + /** + * 项目号 + */ + projectCode?: string; + + /** + * 项目名称 + */ + projectName?: string; + + /** + * 项目经理 + */ + managerId?: string | number; + + /** + * 到货日期 + */ + arrivalDate?: string; + + /** + * 收货单附件 + */ + ossId?: string | number; + + /** + * 部门负责人 + */ + chargeId?: string | number; + + /** + * 分管副总 + */ + deputyId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/components/ProjectSelectDialog/index.vue b/src/components/ProjectSelectDialog/index.vue new file mode 100644 index 0000000..c9b3fda --- /dev/null +++ b/src/components/ProjectSelectDialog/index.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/src/views/oa/erp/projectAcceptance/edit.vue b/src/views/oa/erp/projectAcceptance/edit.vue new file mode 100644 index 0000000..5b02998 --- /dev/null +++ b/src/views/oa/erp/projectAcceptance/edit.vue @@ -0,0 +1,315 @@ + + + diff --git a/src/views/oa/erp/projectAcceptance/index.vue b/src/views/oa/erp/projectAcceptance/index.vue new file mode 100644 index 0000000..dfc9d21 --- /dev/null +++ b/src/views/oa/erp/projectAcceptance/index.vue @@ -0,0 +1,325 @@ + + + diff --git a/src/views/oa/erp/projectReceiving/edit.vue b/src/views/oa/erp/projectReceiving/edit.vue new file mode 100644 index 0000000..38b2fc4 --- /dev/null +++ b/src/views/oa/erp/projectReceiving/edit.vue @@ -0,0 +1,314 @@ + + + diff --git a/src/views/oa/erp/projectReceiving/index.vue b/src/views/oa/erp/projectReceiving/index.vue new file mode 100644 index 0000000..000b36c --- /dev/null +++ b/src/views/oa/erp/projectReceiving/index.vue @@ -0,0 +1,319 @@ + + +