diff --git a/apps/web-antd/src/api/mes/qc/pendinginspect/index.ts b/apps/web-antd/src/api/mes/qc/pendinginspect/index.ts new file mode 100644 index 000000000..dceda8213 --- /dev/null +++ b/apps/web-antd/src/api/mes/qc/pendinginspect/index.ts @@ -0,0 +1,41 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace MesQcPendingInspectApi { + /** MES 待检任务 */ + export interface PendingInspect { + sourceDocType?: number; // 来源单据类型(MesBizTypeConstants) + sourceDocId?: number; // 来源单据 ID + sourceLineId?: number; // 来源单据行 ID + sourceDocCode?: string; // 来源单据编号 + qcType?: number; // 检验类型(MesQcTypeEnum) + itemId?: number; // 物料 ID + itemCode?: string; // 物料编码 + itemName?: string; // 物料名称 + specification?: string; // 规格型号 + unitName?: string; // 单位名称 + quantity?: number; // 待检数量 + // 供应商(IQC 场景) + vendorId?: number; // 供应商 ID + vendorName?: string; // 供应商名称 + // 工单/工作站/任务(IPQC/RQC 场景) + workOrderId?: number; // 生产工单 ID + workstationId?: number; // 工作站 ID + workstationName?: string; // 工作站名称 + taskId?: number; // 生产任务 ID + taskCode?: string; // 生产任务编码 + // 客户(OQC/RQC 场景) + clientId?: number; // 客户 ID + clientName?: string; // 客户名称 + recordTime?: number; // 记录时间(epoch ms) + } +} + +/** 查询待检任务分页 */ +export function getPendingInspectPage(params: PageParam) { + return requestClient.get>( + '/mes/qc/pending-inspect/page', + { params }, + ); +} diff --git a/apps/web-antd/src/views/mes/qc/pendinginspect/data.ts b/apps/web-antd/src/views/mes/qc/pendinginspect/data.ts new file mode 100644 index 000000000..f303b65a5 --- /dev/null +++ b/apps/web-antd/src/views/mes/qc/pendinginspect/data.ts @@ -0,0 +1,103 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { MesQcPendingInspectApi } from '#/api/mes/qc/pendinginspect'; + +import { markRaw } from 'vue'; + +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; + +import MdItemSelect from '#/views/mes/md/item/components/md-item-select.vue'; + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'sourceDocCode', + label: '来源单据编号', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入来源单据编号', + }, + }, + { + fieldName: 'itemId', + label: '产品物料', + component: markRaw(MdItemSelect), + componentProps: { + placeholder: '请选择产品物料', + }, + }, + { + fieldName: 'qcType', + label: '检验类型', + component: 'Select', + componentProps: { + allowClear: true, + options: getDictOptions(DICT_TYPE.MES_QC_TYPE, 'number'), + placeholder: '请选择检验类型', + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + field: 'sourceDocType', + title: '来源单据类型', + width: 130, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.MES_QC_SOURCE_DOC_TYPE }, + }, + }, + { + field: 'sourceDocCode', + title: '来源单据编号', + width: 160, + }, + { + field: 'qcType', + title: '检验类型', + minWidth: 150, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.MES_QC_TYPE }, + }, + }, + { + field: 'itemCode', + title: '物料编码', + minWidth: 130, + }, + { + field: 'itemName', + title: '物料名称', + minWidth: 150, + }, + { + field: 'specification', + title: '规格型号', + width: 130, + }, + { + field: 'quantity', + title: '待检数量', + width: 100, + }, + { + field: 'unitName', + title: '单位', + width: 80, + }, + { + title: '操作', + width: 130, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/apps/web-antd/src/views/mes/qc/pendinginspect/index.vue b/apps/web-antd/src/views/mes/qc/pendinginspect/index.vue new file mode 100644 index 000000000..bbcfc727d --- /dev/null +++ b/apps/web-antd/src/views/mes/qc/pendinginspect/index.vue @@ -0,0 +1,193 @@ + + + diff --git a/apps/web-ele/src/api/mes/qc/pendinginspect/index.ts b/apps/web-ele/src/api/mes/qc/pendinginspect/index.ts new file mode 100644 index 000000000..dceda8213 --- /dev/null +++ b/apps/web-ele/src/api/mes/qc/pendinginspect/index.ts @@ -0,0 +1,41 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace MesQcPendingInspectApi { + /** MES 待检任务 */ + export interface PendingInspect { + sourceDocType?: number; // 来源单据类型(MesBizTypeConstants) + sourceDocId?: number; // 来源单据 ID + sourceLineId?: number; // 来源单据行 ID + sourceDocCode?: string; // 来源单据编号 + qcType?: number; // 检验类型(MesQcTypeEnum) + itemId?: number; // 物料 ID + itemCode?: string; // 物料编码 + itemName?: string; // 物料名称 + specification?: string; // 规格型号 + unitName?: string; // 单位名称 + quantity?: number; // 待检数量 + // 供应商(IQC 场景) + vendorId?: number; // 供应商 ID + vendorName?: string; // 供应商名称 + // 工单/工作站/任务(IPQC/RQC 场景) + workOrderId?: number; // 生产工单 ID + workstationId?: number; // 工作站 ID + workstationName?: string; // 工作站名称 + taskId?: number; // 生产任务 ID + taskCode?: string; // 生产任务编码 + // 客户(OQC/RQC 场景) + clientId?: number; // 客户 ID + clientName?: string; // 客户名称 + recordTime?: number; // 记录时间(epoch ms) + } +} + +/** 查询待检任务分页 */ +export function getPendingInspectPage(params: PageParam) { + return requestClient.get>( + '/mes/qc/pending-inspect/page', + { params }, + ); +} diff --git a/apps/web-ele/src/views/mes/qc/pendinginspect/data.ts b/apps/web-ele/src/views/mes/qc/pendinginspect/data.ts new file mode 100644 index 000000000..758f1a23f --- /dev/null +++ b/apps/web-ele/src/views/mes/qc/pendinginspect/data.ts @@ -0,0 +1,103 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { MesQcPendingInspectApi } from '#/api/mes/qc/pendinginspect'; + +import { markRaw } from 'vue'; + +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; + +import MdItemSelect from '#/views/mes/md/item/components/md-item-select.vue'; + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'sourceDocCode', + label: '来源单据编号', + component: 'Input', + componentProps: { + clearable: true, + placeholder: '请输入来源单据编号', + }, + }, + { + fieldName: 'itemId', + label: '产品物料', + component: markRaw(MdItemSelect), + componentProps: { + placeholder: '请选择产品物料', + }, + }, + { + fieldName: 'qcType', + label: '检验类型', + component: 'Select', + componentProps: { + clearable: true, + options: getDictOptions(DICT_TYPE.MES_QC_TYPE, 'number'), + placeholder: '请选择检验类型', + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + field: 'sourceDocType', + title: '来源单据类型', + width: 130, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.MES_QC_SOURCE_DOC_TYPE }, + }, + }, + { + field: 'sourceDocCode', + title: '来源单据编号', + width: 160, + }, + { + field: 'qcType', + title: '检验类型', + minWidth: 150, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.MES_QC_TYPE }, + }, + }, + { + field: 'itemCode', + title: '物料编码', + minWidth: 130, + }, + { + field: 'itemName', + title: '物料名称', + minWidth: 150, + }, + { + field: 'specification', + title: '规格型号', + width: 130, + }, + { + field: 'quantity', + title: '待检数量', + width: 100, + }, + { + field: 'unitName', + title: '单位', + width: 80, + }, + { + title: '操作', + width: 130, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/apps/web-ele/src/views/mes/qc/pendinginspect/index.vue b/apps/web-ele/src/views/mes/qc/pendinginspect/index.vue new file mode 100644 index 000000000..8363fd201 --- /dev/null +++ b/apps/web-ele/src/views/mes/qc/pendinginspect/index.vue @@ -0,0 +1,197 @@ + + +