From cb56866debd8cc490d8f3abd4f330d015a318927 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 16 Feb 2026 17:46:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor(mes):=20=E9=87=8D=E6=9E=84=E4=BA=A7?= =?UTF-8?q?=E5=93=81=20BOM/SIP/SOP=20=E8=A1=A8=E5=8D=95=EF=BC=8C=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=BB=A3=E7=A0=81=E9=A3=8E=E6=A0=BC=E5=B9=B6=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20TODO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 统一表单方法风格,对齐 WorkstationWorkerPanel 的写法: - 弹窗变量统一命名为 dialogVisible/dialogTitle - dialogTitle 使用 t('action.' + type) 国际化 - submitForm 添加 formRef 校验守卫,使用 t() 国际化提示 - create/update 判断顺序统一为先 create 后 update 2. SIP/SOP 的 orderNumber 字段全局重命名为 sort 3. BOM 物料选择简化为无论选择几条都直接批量创建 4. 修复 formData 展开赋值的 TS 类型错误,改为逐字段赋值 5. 清理所有 TODO @AI 注释 --- src/api/mes/md/item/productSip/index.ts | 2 +- src/api/mes/md/item/productSop/index.ts | 2 +- .../mes/md/components/ItemProductSelect.vue | 197 ++++++++++++++ src/views/mes/md/item/MdProductBomForm.vue | 246 +++++++++--------- src/views/mes/md/item/MdProductSipForm.vue | 123 +++++---- src/views/mes/md/item/MdProductSopForm.vue | 119 +++++---- 6 files changed, 465 insertions(+), 224 deletions(-) create mode 100644 src/views/mes/md/components/ItemProductSelect.vue diff --git a/src/api/mes/md/item/productSip/index.ts b/src/api/mes/md/item/productSip/index.ts index 7cd2a08d3..f3e0999c9 100644 --- a/src/api/mes/md/item/productSip/index.ts +++ b/src/api/mes/md/item/productSip/index.ts @@ -4,7 +4,7 @@ import request from '@/config/axios' export interface MdProductSipVO { id?: number // SIP 编号 itemId: number // 物料产品 ID - orderNumber: number // 排列顺序 + sort: number // 排列顺序 processId?: number // 工序 ID title: string // 标题 description?: string // 详细描述 diff --git a/src/api/mes/md/item/productSop/index.ts b/src/api/mes/md/item/productSop/index.ts index f5b83b58e..a1e290747 100644 --- a/src/api/mes/md/item/productSop/index.ts +++ b/src/api/mes/md/item/productSop/index.ts @@ -4,7 +4,7 @@ import request from '@/config/axios' export interface MdProductSopVO { id?: number // SOP 编号 itemId: number // 物料产品 ID - orderNumber: number // 排列顺序 + sort: number // 排列顺序 processId?: number // 工序 ID title: string // 标题 description?: string // 详细描述 diff --git a/src/views/mes/md/components/ItemProductSelect.vue b/src/views/mes/md/components/ItemProductSelect.vue new file mode 100644 index 000000000..76a29a762 --- /dev/null +++ b/src/views/mes/md/components/ItemProductSelect.vue @@ -0,0 +1,197 @@ + + + + diff --git a/src/views/mes/md/item/MdProductBomForm.vue b/src/views/mes/md/item/MdProductBomForm.vue index bed207833..32416f78d 100644 --- a/src/views/mes/md/item/MdProductBomForm.vue +++ b/src/views/mes/md/item/MdProductBomForm.vue @@ -1,7 +1,7 @@