f08a81f01bc4a4104dd9ef04e071bb0bd0eb8afe..5367b3b4d92588c4e76728e6bd4ad6aae0cbb967
昨天
Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
5367b3 对比 | 目录
昨天
feat(workorder): 添加工序投料BOM明细展开功能
bbce6d 对比 | 目录
已修改4个文件
43 ■■■■■ 文件已修改
src/api/mes/pro/route/process/index.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mes/pro/workorder/process/index.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/pro/workorder/data.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/pro/workorder/modules/process-list.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mes/pro/route/process/index.ts
@@ -1,6 +1,15 @@
import { requestClient } from '#/api/request';
export namespace MesProRouteProcessApi {
  /** 工序投料BOM明细 */
  export interface ProcessBomItem {
    itemId?: number;
    itemCode?: string;
    itemName?: string;
    quantity?: number;
    remark?: string;
  }
  /** MES 工艺路线工序 */
  export interface RouteProcess {
    id?: number;
@@ -22,6 +31,7 @@
    outputItemCode?: string;
    outputItemName?: string;
    remark?: string;
    bomItems?: ProcessBomItem[];
    createTime?: Date;
  }
}
src/api/mes/pro/workorder/process/index.ts
@@ -3,6 +3,15 @@
import { requestClient } from '#/api/request';
export namespace MesProWorkOrderProcessApi {
  /** 工序投料BOM明细 */
  export interface ProcessBomItem {
    itemId?: number;
    itemCode?: string;
    itemName?: string;
    quantity?: number;
    remark?: string;
  }
  /** MES 生产工单工序 */
  export interface WorkOrderProcess {
    id?: number; // 编号
@@ -23,6 +32,7 @@
    outputItemId?: number; // 产出产品物料编号
    outputItemCode?: string; // 产出产品物料编码
    outputItemName?: string; // 产出产品物料名称
    bomItems?: ProcessBomItem[]; // 工序投料BOM明细
    remark?: string; // 备注
  }
}
src/views/mes/pro/workorder/data.ts
@@ -753,6 +753,10 @@
        ]
      : []),
    {
      type: 'expand',
      width: 50,
    } as const,
    {
      field: 'sort',
      title: '序号',
      width: 80,
src/views/mes/pro/workorder/modules/process-list.vue
@@ -143,6 +143,7 @@
          outputItemCode: item.outputItemCode,
          outputItemName: item.outputItemName,
          remark: item.remark,
          bomItems: item.bomItems,
        }));
      }
    } else {
@@ -299,6 +300,24 @@
          ]"
        />
      </template>
      <template #expand="{ row }">
        <div
          v-if="row.bomItems && row.bomItems.length > 0"
          class="bg-gray-50 px-8 py-3"
        >
          <div class="text-xs text-gray-500 mb-2 font-medium">投料明细</div>
          <div class="flex flex-wrap gap-2">
            <Tag
              v-for="(bom, idx) in row.bomItems"
              :key="idx"
              color="blue"
            >
              {{ bom.itemName || bom.itemCode }}
              <span class="text-gray-400 ml-1">×{{ bom.quantity }}</span>
            </Tag>
          </div>
        </div>
      </template>
    </Grid>
  </div>
</template>