From 62eacaff7ea3489c265959d1ec29348a83fe79e8 Mon Sep 17 00:00:00 2001 From: zch Date: Thu, 24 Jul 2025 17:27:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor(qms):=20=E9=87=8D=E6=9E=84=E8=B4=A8?= =?UTF-8?q?=E6=A3=80=E4=BB=BB=E5=8A=A1=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/QcInspectionMain/index.ts | 29 +- src/api/qms/QcInspectionMain/types.ts | 88 +-- src/api/qms/qcInspectionResult/index.ts | 17 - src/api/qms/qcInspectionResult/types.ts | 210 +++++++ src/views/qms/QcInspectionMain/index.vue | 669 ++++++++++++++------- src/views/qms/qcInspectionResult/index.vue | 247 +++++++- 6 files changed, 930 insertions(+), 330 deletions(-) diff --git a/src/api/qms/QcInspectionMain/index.ts b/src/api/qms/QcInspectionMain/index.ts index 17c46b8..d43871c 100644 --- a/src/api/qms/QcInspectionMain/index.ts +++ b/src/api/qms/QcInspectionMain/index.ts @@ -3,7 +3,7 @@ import { AxiosPromise } from 'axios'; import { QcInspectionMainVO, QcInspectionMainForm, QcInspectionMainQuery } from '@/api/qms/QcInspectionMain/types'; /** - * 查询质检主表列表 + * 查询质检任务列表 * @param query * @returns {*} */ @@ -17,7 +17,7 @@ export const listQcInspectionMain = (query?: QcInspectionMainQuery): AxiosPromis }; /** - * 查询质检主表详细 + * 查询质检任务详细 * @param inspectionId */ export const getQcInspectionMain = (inspectionId: string | number): AxiosPromise => { @@ -28,7 +28,7 @@ export const getQcInspectionMain = (inspectionId: string | number): AxiosPromise }; /** - * 新增质检主表 + * 新增质检任务 * @param data */ export const addQcInspectionMain = (data: QcInspectionMainForm) => { @@ -40,7 +40,7 @@ export const addQcInspectionMain = (data: QcInspectionMainForm) => { }; /** - * 修改质检主表 + * 修改质检任务 * @param data */ export const updateQcInspectionMain = (data: QcInspectionMainForm) => { @@ -52,7 +52,7 @@ export const updateQcInspectionMain = (data: QcInspectionMainForm) => { }; /** - * 删除质检主表 + * 删除质检任务 * @param inspectionId */ export const delQcInspectionMain = (inspectionId: string | number | Array) => { @@ -64,7 +64,7 @@ export const delQcInspectionMain = (inspectionId: string | number | Array { - const formData = new FormData(); - formData.append('file', file); - formData.append('updateSupport', updateSupport.toString()); - return request({ - url: '/qms/QcInspectionMain/importData', - method: 'post', - data: formData - }); -}; \ No newline at end of file diff --git a/src/api/qms/QcInspectionMain/types.ts b/src/api/qms/QcInspectionMain/types.ts index 2165483..5c881b1 100644 --- a/src/api/qms/QcInspectionMain/types.ts +++ b/src/api/qms/QcInspectionMain/types.ts @@ -9,6 +9,11 @@ export interface QcInspectionMainVO { */ inspectionNo: string; + /** + * 关联模板主表ID + */ + templateId: string | number; + /** * 物料编码 */ @@ -60,9 +65,9 @@ export interface QcInspectionMainVO { workshop: string; /** - * 检测类型主键 + * 检验类别(首检/过程检等等) */ - typeId: string | number; + inspectionType: number; /** * 单据状态(0未处理/1完成) @@ -114,22 +119,11 @@ export interface QcInspectionMainVO { */ remark: string; - - /** - * 关联检测类型表 + /** + * 模板名称 */ - qcInspectionType: string; + templateName: string;//join - /** - * 关联检测类型表名称 - */ - typeName: string; - - /** - * 关联检测类型表编码 - */ - typeCode: string; - } @@ -144,6 +138,11 @@ export interface QcInspectionMainForm extends BaseEntity { */ inspectionNo?: string; + /** + * 关联模板主表ID + */ + templateId?: string | number; + /** * 物料编码 */ @@ -195,9 +194,9 @@ export interface QcInspectionMainForm extends BaseEntity { workshop?: string; /** - * 检测类型主键 + * 检验类别(首检/过程检等等) */ - typeId?: string | number; + inspectionType?: number; /** * 单据状态(0未处理/1完成) @@ -249,25 +248,10 @@ export interface QcInspectionMainForm extends BaseEntity { */ remark?: string; - - - - /** - * 关联检测类型表 + /** + * 模板名称 */ - qcInspectionType?: string; - - /** - * 关联检测类型表名称 - */ - typeName?: string; - - /** - * 关联检测类型表编码 - */ - typeCode?: string; - - + templateName?: string;//join } @@ -283,6 +267,11 @@ export interface QcInspectionMainQuery extends PageQuery { */ inspectionNo?: string; + /** + * 关联模板主表ID + */ + templateId?: string | number; + /** * 物料编码 */ @@ -334,9 +323,9 @@ export interface QcInspectionMainQuery extends PageQuery { workshop?: string; /** - * 检测类型主键 + * 检验类别(首检/过程检等等) */ - typeId?: string | number; + inspectionType?: number; /** * 单据状态(0未处理/1完成) @@ -383,25 +372,12 @@ export interface QcInspectionMainQuery extends PageQuery { */ supplierName?: string; - - - - /** - * 关联检测类型表 - */ - qcInspectionType?: string; - - /** - * 关联检测类型表名称 - */ - typeName?: string; - - /** - * 关联检测类型表编码 - */ - typeCode?: string; - + /** + * 模板名称 + */ + templateName?: string;//join + /** * 日期范围参数 diff --git a/src/api/qms/qcInspectionResult/index.ts b/src/api/qms/qcInspectionResult/index.ts index 8a31f4c..8109a8f 100644 --- a/src/api/qms/qcInspectionResult/index.ts +++ b/src/api/qms/qcInspectionResult/index.ts @@ -75,20 +75,3 @@ export function getQcInspectionResultList (query) { params: query }); }; - -/** - * 导入数据 - * - * @param file 导入文件 - * @param updateSupport 是否更新已存在数据 - */ -export const importData = (file: File, updateSupport: boolean) => { - const formData = new FormData(); - formData.append('file', file); - formData.append('updateSupport', updateSupport.toString()); - return request({ - url: '/qms/qcInspectionResult/importData', - method: 'post', - data: formData - }); -}; \ No newline at end of file diff --git a/src/api/qms/qcInspectionResult/types.ts b/src/api/qms/qcInspectionResult/types.ts index 3289b56..3f67b2c 100644 --- a/src/api/qms/qcInspectionResult/types.ts +++ b/src/api/qms/qcInspectionResult/types.ts @@ -34,6 +34,76 @@ export interface QcInspectionResultVO { */ problemDetail: string; + /** + * 检测项编码(快照) + */ + itemCode: string; + + /** + * 检测项名称(快照) + */ + itemName: string; + + /** + * 检测位置(快照) + */ + inspectionPosition: string; + + /** + * 检测项目类别(快照) + */ + categoryName: string; + + /** + * 关联检测类型表(快照) + */ + typeId: string | number; + + /** + * 检测方式(0定性,1定量)(快照) + */ + detectType: number; + + /** + * 控制类型(0手动,1自动)(快照) + */ + controlType: number; + + /** + * 标准值(快照) + */ + standardValue: number; + + /** + * 控制上限(快照) + */ + upperLimit: number; + + /** + * 控制下限(快照) + */ + lowerLimit: number; + + /** + * 规格名称(快照) + */ + specName: string; + + /** + * 规格上限(快照) + */ + specUpper: number; + + /** + * 规格下限(快照) + */ + specLower: number; + + /** + * 检测项说明(快照) + */ + description: string; + } export interface QcInspectionResultForm extends BaseEntity { @@ -72,6 +142,76 @@ export interface QcInspectionResultForm extends BaseEntity { */ problemDetail?: string; + /** + * 检测项编码(快照) + */ + itemCode?: string; + + /** + * 检测项名称(快照) + */ + itemName?: string; + + /** + * 检测位置(快照) + */ + inspectionPosition?: string; + + /** + * 检测项目类别(快照) + */ + categoryName?: string; + + /** + * 关联检测类型表(快照) + */ + typeId?: string | number; + + /** + * 检测方式(0定性,1定量)(快照) + */ + detectType?: number; + + /** + * 控制类型(0手动,1自动)(快照) + */ + controlType?: number; + + /** + * 标准值(快照) + */ + standardValue?: number; + + /** + * 控制上限(快照) + */ + upperLimit?: number; + + /** + * 控制下限(快照) + */ + lowerLimit?: number; + + /** + * 规格名称(快照) + */ + specName?: string; + + /** + * 规格上限(快照) + */ + specUpper?: number; + + /** + * 规格下限(快照) + */ + specLower?: number; + + /** + * 检测项说明(快照) + */ + description?: string; + } export interface QcInspectionResultQuery extends PageQuery { @@ -111,6 +251,76 @@ export interface QcInspectionResultQuery extends PageQuery { */ problemDetail?: string; + /** + * 检测项编码(快照) + */ + itemCode?: string; + + /** + * 检测项名称(快照) + */ + itemName?: string; + + /** + * 检测位置(快照) + */ + inspectionPosition?: string; + + /** + * 检测项目类别(快照) + */ + categoryName?: string; + + /** + * 关联检测类型表(快照) + */ + typeId?: string | number; + + /** + * 检测方式(0定性,1定量)(快照) + */ + detectType?: number; + + /** + * 控制类型(0手动,1自动)(快照) + */ + controlType?: number; + + /** + * 标准值(快照) + */ + standardValue?: number; + + /** + * 控制上限(快照) + */ + upperLimit?: number; + + /** + * 控制下限(快照) + */ + lowerLimit?: number; + + /** + * 规格名称(快照) + */ + specName?: string; + + /** + * 规格上限(快照) + */ + specUpper?: number; + + /** + * 规格下限(快照) + */ + specLower?: number; + + /** + * 检测项说明(快照) + */ + description?: string; + /** * 日期范围参数 */ diff --git a/src/views/qms/QcInspectionMain/index.vue b/src/views/qms/QcInspectionMain/index.vue index d7848b4..2db1bcd 100644 --- a/src/views/qms/QcInspectionMain/index.vue +++ b/src/views/qms/QcInspectionMain/index.vue @@ -3,27 +3,42 @@
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - 搜索 重置 @@ -48,12 +63,6 @@ 导出 - - 导出模板 - - - 导入 - @@ -66,41 +75,47 @@ highlight-current-row > - + + - - - - - - - - + + + + + + + + + - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -135,6 +150,11 @@ + + + + + 搜索 重置 @@ -145,8 +165,8 @@ - - + + diff --git a/src/views/qms/qcInspectionResult/index.vue b/src/views/qms/qcInspectionResult/index.vue index 430c848..aea80c8 100644 --- a/src/views/qms/qcInspectionResult/index.vue +++ b/src/views/qms/qcInspectionResult/index.vue @@ -3,7 +3,7 @@
- + - + + + + + + + + + + + + 搜索 @@ -57,9 +103,11 @@ - - - + + + + +