From 20dee1da736834bc54facbce51ac818c7cde6717 Mon Sep 17 00:00:00 2001 From: hwj Date: Fri, 17 Apr 2026 17:48:39 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B7=BB=E5=8A=A0=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E6=8A=A5=E8=A1=A8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/bom/index.ts | 4 + src/api/mes/plan/index.ts | 38 ++ src/api/mes/zjtask/index.ts | 4 + .../components/ProductInfoDialog.vue | 54 +++ .../components/ProductionPlanCard.vue | 247 +++++++++++++ .../components/ProductionPlanTimeline.vue | 326 ++++++++++++++++++ .../ProductionReportBaogongInfo.vue | 99 ++++++ .../components/ProductionReportBasicInfo.vue | 100 ++++++ .../ProductionReportQualityInfo.vue | 112 ++++++ .../ProductionReportRelatedPlan.vue | 118 +++++++ src/views/mes/productionReport/index.vue | 285 +++++++++++++++ 11 files changed, 1387 insertions(+) create mode 100644 src/views/mes/productionReport/components/ProductInfoDialog.vue create mode 100644 src/views/mes/productionReport/components/ProductionPlanCard.vue create mode 100644 src/views/mes/productionReport/components/ProductionPlanTimeline.vue create mode 100644 src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue create mode 100644 src/views/mes/productionReport/components/ProductionReportBasicInfo.vue create mode 100644 src/views/mes/productionReport/components/ProductionReportQualityInfo.vue create mode 100644 src/views/mes/productionReport/components/ProductionReportRelatedPlan.vue create mode 100644 src/views/mes/productionReport/index.vue diff --git a/src/api/mes/bom/index.ts b/src/api/mes/bom/index.ts index 12687d0a..103baca1 100644 --- a/src/api/mes/bom/index.ts +++ b/src/api/mes/bom/index.ts @@ -49,5 +49,9 @@ export const BomApi = { // 获得产品BOM明细列表 getBomDetailListByBomId: async (bomId) => { return await request.get({ url: `/mes/bom/bom-detail/list-by-bom-id?bomId=` + bomId }) + }, + + getBomByProductId: async (productId: number) => { + return await request.get({ url: `/mes/bom/getByProductId`, params: { productId } }) } } \ No newline at end of file diff --git a/src/api/mes/plan/index.ts b/src/api/mes/plan/index.ts index 9ac2b2b3..37d6a0dc 100644 --- a/src/api/mes/plan/index.ts +++ b/src/api/mes/plan/index.ts @@ -1,6 +1,36 @@ import request from '@/config/axios' import {ItemRequisitionVO} from "@/api/mes/itemrequisition"; +// 计划记录状态枚举 +export enum OperateStatusEnum { + SCHEDULED = '1', // 已排产 + PAUSED = '3', // 暂停 + PENDING_WAREHOUSE = '4', // 待入库 + WAREHOUSED = '5', // 已入库 + STARTED = '8' // 已开工 +} + +// 计划记录状态映射 +export const OPERATE_STATUS_MAP: Record = { + '1': '已排产', + '3': '暂停', + '4': '待入库', + '5': '已入库', + '8': '已开工' +} + +// 计划记录 VO +export interface PlanRecordVO { + id: number // ID + taskId: number // 任务ID + planId: number // 计划ID + operateStatus: string // 操作状态 ('1' | '3' | '4' | '5' | '8') + operateTime: number // 操作时间戳(毫秒) + remark: string // 备注 + isEnable: boolean // 是否启用 + createTime: number // 创建时间戳 +} + // 生产计划 VO export interface PlanVO { id: number // ID @@ -26,6 +56,10 @@ export interface PlanVO { feedingPipelineName: string wangongNumber: number passRate: number + passNumber?: number // 合格数量 + noPassNumber?: number // 不合格数量 + deviceName?: string // 设备名称 + planRecordList?: PlanRecordVO[] // 计划记录列表 } export interface DevicePlanGanttPlanVO { @@ -139,5 +173,9 @@ export const PlanApi = { }, getGanttByDevice: async (params: { startTime: string; endTime: string }) => { return await request.get({ url: `/mes/plan/gantt-by-device`, params }) + }, + + getPlanPageByTask: async (params: any) => { + return await request.get({ url: `/mes/plan/page-by-task`, params }) } } diff --git a/src/api/mes/zjtask/index.ts b/src/api/mes/zjtask/index.ts index 1949b9c7..c91f1718 100644 --- a/src/api/mes/zjtask/index.ts +++ b/src/api/mes/zjtask/index.ts @@ -44,6 +44,10 @@ export const ZjTaskApi = { return await request.get({ url: `/mes/zj-task/list`, params }) }, + getZjTaskPageByTicket: async (params: any) => { + return await request.get({ url: `/mes/zj-task/page-by-ticket`, params }) + }, + createZjTask: async (data: ZjTaskVO) => { return await request.post({ url: `/mes/zj-task/create`, data }) }, diff --git a/src/views/mes/productionReport/components/ProductInfoDialog.vue b/src/views/mes/productionReport/components/ProductInfoDialog.vue new file mode 100644 index 00000000..5713912b --- /dev/null +++ b/src/views/mes/productionReport/components/ProductInfoDialog.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/views/mes/productionReport/components/ProductionPlanCard.vue b/src/views/mes/productionReport/components/ProductionPlanCard.vue new file mode 100644 index 00000000..a191d981 --- /dev/null +++ b/src/views/mes/productionReport/components/ProductionPlanCard.vue @@ -0,0 +1,247 @@ + + + + + + + diff --git a/src/views/mes/productionReport/components/ProductionPlanTimeline.vue b/src/views/mes/productionReport/components/ProductionPlanTimeline.vue new file mode 100644 index 00000000..7ff570bc --- /dev/null +++ b/src/views/mes/productionReport/components/ProductionPlanTimeline.vue @@ -0,0 +1,326 @@ + + + + + + + diff --git a/src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue b/src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue new file mode 100644 index 00000000..edbe5b6e --- /dev/null +++ b/src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue b/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue new file mode 100644 index 00000000..0e937ce1 --- /dev/null +++ b/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/views/mes/productionReport/components/ProductionReportQualityInfo.vue b/src/views/mes/productionReport/components/ProductionReportQualityInfo.vue new file mode 100644 index 00000000..1ba61c40 --- /dev/null +++ b/src/views/mes/productionReport/components/ProductionReportQualityInfo.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/src/views/mes/productionReport/components/ProductionReportRelatedPlan.vue b/src/views/mes/productionReport/components/ProductionReportRelatedPlan.vue new file mode 100644 index 00000000..0c734fb5 --- /dev/null +++ b/src/views/mes/productionReport/components/ProductionReportRelatedPlan.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/src/views/mes/productionReport/index.vue b/src/views/mes/productionReport/index.vue new file mode 100644 index 00000000..98a460b7 --- /dev/null +++ b/src/views/mes/productionReport/index.vue @@ -0,0 +1,285 @@ + + + + +