From 08bb5d242135e2c1f0fc17d2b5f7ae548275a3a2 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 28 八月 2026 17:15:33 +0800
Subject: [PATCH] feat(mes): 实现临时码预生成和补录功能
---
src/api/mes/pro/batch/index.ts | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/api/mes/pro/batch/index.ts b/src/api/mes/pro/batch/index.ts
index 01e4424..86544c8 100644
--- a/src/api/mes/pro/batch/index.ts
+++ b/src/api/mes/pro/batch/index.ts
@@ -18,7 +18,8 @@
/** 鐢熶骇鎵规 */
export interface Batch {
id?: number; // 缂栧彿
- code?: string; // 鎵规鍙凤紙鑷姩鐢熸垚锛�
+ code?: string; // 鎵规鍙凤紙琛ュ綍姝e紡淇℃伅鍚庤嚜鍔ㄧ敓鎴愶級
+ tempCode?: string; // 涓存椂鎵规鐮侊紙棰勭敓鎴愪簩缁寸爜闃舵浣跨敤锛屾壂鐮佽拷婧吋瀹癸級
itemId?: number; // 鍝佺锛堜骇鍝佺墿鏂欙級缂栧彿
itemCode?: string; // 鍝佺缂栫爜锛堝悗绔嫾鎺ワ級
itemName?: string; // 鍝佺鍚嶇О锛堝悗绔嫾鎺ワ級
@@ -41,7 +42,8 @@
/** 鐢熶骇鎵规鎵爜杩芥函 */
export interface BatchTrace {
id?: number; // 鐢熶骇鎵规缂栧彿
- code?: string; // 鎵规鍙凤紙浜岀淮鐮佸唴瀹癸級
+ code?: string; // 鎵规鍙凤紙琛ュ綍鍚庣殑姝e紡鎵规鍙凤級
+ tempCode?: string; // 涓存椂鎵规鐮侊紙浜岀淮鐮佸唴瀹癸紱鏈ˉ褰曚俊鎭椂灞曠ず锛�
status?: number; // 鎵规鐘舵�侊紙瀛楀吀 mes_pro_batch_status锛�
produceDate?: string; // 鐢熶骇鏃ユ湡
lineCode?: string; // 浜х嚎缂栫爜
@@ -65,6 +67,7 @@
/** 鐢熶骇鎵规鍒嗛〉鏌ヨ鍙傛暟 */
export interface PageParams extends PageParam {
code?: string;
+ tempCode?: string;
itemId?: number;
lineId?: number;
lineCode?: string;
@@ -73,6 +76,12 @@
status?: number;
produceDate?: string[];
createTime?: string[];
+ }
+
+ /** 棰勭敓鎴愭壒娆′簩缁寸爜杩斿洖椤� */
+ export interface PreGenerateResult {
+ id: number; // 鐢熶骇鎵规缂栧彿
+ tempCode: string; // 涓存椂鎵规鐮侊紙浜岀淮鐮佸唴瀹癸級
}
}
@@ -91,6 +100,22 @@
);
}
+/** 棰勭敓鎴愭壒娆′复鏃朵簩缁寸爜锛堜粎鐢熸垚涓存椂鎵规鐮侊紝涓嶅綍鍏ヤ笟鍔′俊鎭級 */
+export function preGenerateBatch(data: {
+ count: number;
+ remark?: string;
+}) {
+ return requestClient.post<MesProBatchApi.PreGenerateResult[]>(
+ '/mes/pro/batch/pre-generate',
+ data,
+ );
+}
+
+/** 琛ュ綍鎵规姝e紡淇℃伅锛堢敓鎴愭寮忔壒娆″彿锛� */
+export function fillBatchInfo(data: MesProBatchApi.Batch) {
+ return requestClient.put('/mes/pro/batch/fill-info', data);
+}
+
/** 鏂板鐢熶骇鎵规锛堣嚜鍔ㄧ敓鎴愭壒娆″彿锛� */
export function createBatch(data: MesProBatchApi.Batch) {
return requestClient.post<number>('/mes/pro/batch/create', data);
--
Gitblit v1.9.3