From 479f35ffb82225cce1dde5275c184d51bfdb3b30 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 22 Feb 2026 11:21:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(mes):=20add=20RQC=20(=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E5=8D=95)=20related=20classes=20and=20API=20?= =?UTF-8?q?for=20handling=20inspection=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/qc/rqc/index.ts | 67 ++++++ src/api/mes/qc/rqc/line/index.ts | 36 ++++ src/views/mes/qc/rqc/RqcForm.vue | 299 +++++++++++++++++++++++++++ src/views/mes/qc/rqc/RqcLineList.vue | 91 ++++++++ src/views/mes/qc/rqc/index.vue | 290 ++++++++++++++++++++++++++ 5 files changed, 783 insertions(+) create mode 100644 src/api/mes/qc/rqc/index.ts create mode 100644 src/api/mes/qc/rqc/line/index.ts create mode 100644 src/views/mes/qc/rqc/RqcForm.vue create mode 100644 src/views/mes/qc/rqc/RqcLineList.vue create mode 100644 src/views/mes/qc/rqc/index.vue diff --git a/src/api/mes/qc/rqc/index.ts b/src/api/mes/qc/rqc/index.ts new file mode 100644 index 000000000..9b0e43412 --- /dev/null +++ b/src/api/mes/qc/rqc/index.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +// MES 退货检验单 VO +export interface QcRqcVO { + id: number // 编号 + code: string // 检验单编号 + name: string // 检验单名称 + templateId: number // 检验模板 ID + sourceDocId: number // 来源单据 ID + sourceDocType: string // 来源单据类型 + sourceDocCode: string // 来源单据编号 + sourceLineId: number // 来源单据行 ID + rqcType: string // 退货检验类型 + itemId: number // 产品物料 ID + itemCode: string // 产品物料编码(关联查询) + itemName: string // 产品物料名称(关联查询) + itemSpecification: string // 规格型号(关联查询) + unitName: string // 单位名称(关联查询) + batchCode: string // 批次号 + checkQuantity: number // 检测数量 + qualifiedQuantity: number // 合格品数量 + unqualifiedQuantity: number // 不合格数量 + checkResult: number // 检测结果 + inspectDate: Date // 检测日期 + inspectorUserId: number // 检测人员用户 ID + inspectorNickname: string // 检测人员昵称(关联查询) + status: number // 状态 + remark: string // 备注 +} + +// MES 退货检验单 API +export const QcRqcApi = { + // 查询退货检验单分页 + getRqcPage: async (params: any) => { + return await request.get({ url: `/mes/qc/rqc/page`, params }) + }, + + // 查询退货检验单详情 + getRqc: async (id: number) => { + return await request.get({ url: `/mes/qc/rqc/get?id=` + id }) + }, + + // 新增退货检验单 + createRqc: async (data: QcRqcVO) => { + return await request.post({ url: `/mes/qc/rqc/create`, data }) + }, + + // 修改退货检验单 + updateRqc: async (data: QcRqcVO) => { + return await request.put({ url: `/mes/qc/rqc/update`, data }) + }, + + // 完成退货检验单 + completeRqc: async (id: number) => { + return await request.put({ url: `/mes/qc/rqc/complete?id=` + id }) + }, + + // 删除退货检验单 + deleteRqc: async (id: number) => { + return await request.delete({ url: `/mes/qc/rqc/delete?id=` + id }) + }, + + // 导出退货检验单 Excel + exportRqc: async (params: any) => { + return await request.download({ url: `/mes/qc/rqc/export-excel`, params }) + } +} diff --git a/src/api/mes/qc/rqc/line/index.ts b/src/api/mes/qc/rqc/line/index.ts new file mode 100644 index 000000000..6740200c0 --- /dev/null +++ b/src/api/mes/qc/rqc/line/index.ts @@ -0,0 +1,36 @@ +import request from '@/config/axios' + +// MES 退货检验单行 VO +export interface QcRqcLineVO { + id: number // 编号 + rqcId: number // 退货检验单 ID + indicatorId: number // 检测指标 ID + indicatorCode: string // 检测指标编码(关联查询) + indicatorName: string // 检测指标名称(关联查询) + indicatorType: string // 检测指标类型(关联查询) + toolId: number // 检测工具 ID + toolName: string // 检测工具名称(关联查询) + checkMethod: string // 检测方法 + standardValue: number // 标准值 + unitMeasureId: number // 计量单位 ID + unitMeasureName: string // 计量单位名称(关联查询) + maxThreshold: number // 误差上限 + minThreshold: number // 误差下限 + criticalQuantity: number // 致命缺陷数量 + majorQuantity: number // 严重缺陷数量 + minorQuantity: number // 轻微缺陷数量 + remark: string // 备注 +} + +// MES 退货检验单行 API +export const QcRqcLineApi = { + // 查询退货检验单行分页 + getRqcLinePage: async (params: any) => { + return await request.get({ url: `/mes/qc/rqc/line/page`, params }) + }, + + // 查询退货检验单行详情 + getRqcLine: async (id: number) => { + return await request.get({ url: `/mes/qc/rqc/line/get?id=` + id }) + } +} diff --git a/src/views/mes/qc/rqc/RqcForm.vue b/src/views/mes/qc/rqc/RqcForm.vue new file mode 100644 index 000000000..e6b24cd38 --- /dev/null +++ b/src/views/mes/qc/rqc/RqcForm.vue @@ -0,0 +1,299 @@ + + + + diff --git a/src/views/mes/qc/rqc/RqcLineList.vue b/src/views/mes/qc/rqc/RqcLineList.vue new file mode 100644 index 000000000..84ddb4505 --- /dev/null +++ b/src/views/mes/qc/rqc/RqcLineList.vue @@ -0,0 +1,91 @@ + + + + diff --git a/src/views/mes/qc/rqc/index.vue b/src/views/mes/qc/rqc/index.vue new file mode 100644 index 000000000..d1f98700e --- /dev/null +++ b/src/views/mes/qc/rqc/index.vue @@ -0,0 +1,290 @@ + + + +