From 1411d87dcb794763f5e422351141dcec2f0d7225 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期四, 17 九月 2026 13:43:10 +0800
Subject: [PATCH] fix(mes): 生产排产页放开写死的自行生产工单类型过滤

---
 src/api/mes/cal/scheduleDetail/index.ts |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/src/api/mes/cal/scheduleDetail/index.ts b/src/api/mes/cal/scheduleDetail/index.ts
new file mode 100644
index 0000000..0fb68e1
--- /dev/null
+++ b/src/api/mes/cal/scheduleDetail/index.ts
@@ -0,0 +1,86 @@
+import type { PageParam, PageResult } from '@vben/request';
+
+import { requestClient } from '#/api/request';
+
+export namespace MesCalScheduleDetailApi {
+  /** MES 鍛樺伐鎺掔彮鏄庣粏 */
+  export interface Detail {
+    id?: number; // 鏄庣粏缂栧彿
+    planId?: number; // 鎺掔彮璁″垝缂栧彿
+    teamId?: number; // 鐝粍缂栧彿
+    userId?: number; // 鐝粍鎴愬憳鐢ㄦ埛缂栧彿
+    day?: Date; // 鏃ユ湡
+    shiftId?: number; // 鐝缂栧彿
+    shiftName?: string; // 鐝鍚嶇О
+    startTime?: string; // 寮�濮嬫椂闂达紙HH:mm锛�
+    endTime?: string; // 缁撴潫鏃堕棿锛圚H:mm锛�
+    source?: number; // 鏉ユ簮锛�1-鑷姩鐢熸垚 2-浜哄伐璋冩暣
+    remark?: string; // 澶囨敞
+  }
+
+  /** 鍛樺伐鎺掔彮鏄庣粏鏌ヨ鍙傛暟 */
+  export interface DetailPageParam extends PageParam {
+    planId?: number; // 鎺掔彮璁″垝缂栧彿
+    teamId?: number; // 鐝粍缂栧彿
+    userId?: number; // 鐝粍鎴愬憳鐢ㄦ埛缂栧彿
+    startDay?: string; // 寮�濮嬫棩鏈�
+    endDay?: string; // 缁撴潫鏃ユ湡
+  }
+
+  /** 鍚堣鏍¢獙缁撴灉椤� */
+  export interface CheckItem {
+    day?: string; // 鏃ユ湡
+    shiftName?: string; // 鐝鍚嶇О
+    startTime?: string; // 寮�濮嬫椂闂达紙HH:mm锛�
+    endTime?: string; // 缁撴潫鏃堕棿锛圚H:mm锛�
+    issueType?: number; // 杩濊绫诲瀷锛�1-鍗曟棩鐤戜技杩炵画宸ユ椂瓒呴暱 2-鐩搁偦鐝闂翠紤鎭笉瓒�
+    issue?: string; // 闂鎻忚堪锛屼负绌鸿〃绀鸿鐝鍚堣
+  }
+
+  /** 鍚堣鏍¢獙鍙傛暟 */
+  export interface CheckParam {
+    userId: number; // 鐝粍鎴愬憳鐢ㄦ埛缂栧彿
+    startDay?: string; // 璧峰鏃ユ湡
+    endDay?: string; // 缁撴潫鏃ユ湡
+  }
+}
+
+/** 鏌ヨ鍛樺伐鎺掔彮鏄庣粏鍒嗛〉 */
+export function getDetailPage(params: MesCalScheduleDetailApi.DetailPageParam) {
+  return requestClient.get<PageResult<MesCalScheduleDetailApi.Detail>>(
+    '/mes/cal/schedule-detail/page',
+    { params },
+  );
+}
+
+/** 鏌ヨ鍛樺伐鎺掔彮鏄庣粏鍒楄〃 */
+export function getDetailList(
+  params: MesCalScheduleDetailApi.DetailPageParam,
+): Promise<MesCalScheduleDetailApi.Detail[]> {
+  return requestClient.get<MesCalScheduleDetailApi.Detail[]>(
+    '/mes/cal/schedule-detail/list',
+    { params },
+  );
+}
+
+/** 鎸夌彮缁勬帓鐝敓鎴愬憳宸ョ骇鎺掔彮鏄庣粏 */
+export function generateDetails(planId: number) {
+  return requestClient.post(
+    `/mes/cal/schedule-detail/generate?planId=${planId}`,
+  );
+}
+
+/** 鏇存柊鍛樺伐鎺掔彮鏄庣粏锛堜汉宸ュ井璋冿級 */
+export function updateDetail(data: MesCalScheduleDetailApi.Detail) {
+  return requestClient.put('/mes/cal/schedule-detail/update', data);
+}
+
+/** 鍛樺伐鎺掔彮鍚堣鏍¢獙 */
+export function checkCompliance(
+  params: MesCalScheduleDetailApi.CheckParam,
+): Promise<MesCalScheduleDetailApi.CheckItem[]> {
+  return requestClient.get<MesCalScheduleDetailApi.CheckItem[]>(
+    '/mes/cal/schedule-detail/check',
+    { params },
+  );
+}

--
Gitblit v1.9.3