From 91c82965b2d987452ca276e3a03b48c8dcda2ae9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 19 八月 2026 11:47:26 +0800
Subject: [PATCH] config(env): 更新生产环境配置和公司名称

---
 src/api/mes/pro/batch/index.ts |  136 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 136 insertions(+), 0 deletions(-)

diff --git a/src/api/mes/pro/batch/index.ts b/src/api/mes/pro/batch/index.ts
new file mode 100644
index 0000000..01e4424
--- /dev/null
+++ b/src/api/mes/pro/batch/index.ts
@@ -0,0 +1,136 @@
+import type { PageParam, PageResult } from '@vben/request';
+
+import { requestClient } from '#/api/request';
+import type { MesProBagCodeApi } from '#/api/mes/pro/bagCode';
+import type { MesProPalletApi } from '#/api/mes/pro/pallet';
+
+export namespace MesProBatchApi {
+  /** 鐢熶骇鎵规浜哄憳閰嶇疆 */
+  export interface BatchWorker {
+    id?: number; // 缂栧彿
+    batchId?: number; // 鎵规缂栧彿
+    userId?: number; // 鐢熶骇浜哄憳鐢ㄦ埛缂栧彿
+    userName?: string; // 鐢熶骇浜哄憳鏄电О
+    workerType?: number; // 宀椾綅绫诲瀷锛堝瓧鍏� mes_pro_batch_worker_type锛�
+    remark?: string; // 澶囨敞
+  }
+
+  /** 鐢熶骇鎵规 */
+  export interface Batch {
+    id?: number; // 缂栧彿
+    code?: string; // 鎵规鍙凤紙鑷姩鐢熸垚锛�
+    itemId?: number; // 鍝佺锛堜骇鍝佺墿鏂欙級缂栧彿
+    itemCode?: string; // 鍝佺缂栫爜锛堝悗绔嫾鎺ワ級
+    itemName?: string; // 鍝佺鍚嶇О锛堝悗绔嫾鎺ワ級
+    itemSpecification?: string; // 鍝佺瑙勬牸锛堝悗绔嫾鎺ワ級
+    lineId?: number; // 浜х嚎缂栧彿
+    lineCode?: string; // 浜х嚎缂栫爜锛堝悗绔洖濉級
+    lineName?: string; // 浜х嚎鍚嶇О锛堝悗绔洖濉級
+    produceDate?: string; // 鐢熶骇鏃ユ湡
+    planQuantity?: number; // 璁″垝鏁伴噺
+    ownerUserId?: number; // 璐d换浜虹敤鎴风紪鍙�
+    ownerUserName?: string; // 璐d换浜烘樀绉�
+    bagQuantity?: number; // 宸茬敓鎴愯鐮佹暟閲�
+    palletQuantity?: number; // 宸茬敓鎴愭墭鐩樼爜鏁伴噺
+    status?: number; // 鎵规鐘舵�侊紙瀛楀吀 mes_pro_batch_status锛�
+    remark?: string; // 澶囨敞
+    createTime?: string; // 鍒涘缓鏃堕棿
+    workers?: BatchWorker[]; // 鐢熶骇浜哄憳閰嶇疆鍒楄〃
+  }
+
+  /** 鐢熶骇鎵规鎵爜杩芥函 */
+  export interface BatchTrace {
+    id?: number; // 鐢熶骇鎵规缂栧彿
+    code?: string; // 鎵规鍙凤紙浜岀淮鐮佸唴瀹癸級
+    status?: number; // 鎵规鐘舵�侊紙瀛楀吀 mes_pro_batch_status锛�
+    produceDate?: string; // 鐢熶骇鏃ユ湡
+    lineCode?: string; // 浜х嚎缂栫爜
+    lineName?: string; // 浜х嚎鍚嶇О
+    ownerUserId?: number; // 璐d换浜虹敤鎴风紪鍙�
+    ownerUserName?: string; // 璐d换浜烘樀绉�
+    planQuantity?: number; // 璁″垝鏁伴噺
+    bagQuantity?: number; // 宸茬敓鎴愯鐮佹暟閲�
+    palletQuantity?: number; // 宸茬敓鎴愭墭鐩樼爜鏁伴噺
+    remark?: string; // 澶囨敞
+    itemId?: number; // 鍝佺锛堢墿鏂欙級缂栧彿
+    itemCode?: string; // 鍝佺缂栫爜
+    itemName?: string; // 鍝佺鍚嶇О
+    itemSpecification?: string; // 鍝佺瑙勬牸
+    workers?: BatchWorker[]; // 鐢熶骇浜哄憳閰嶇疆鍒楄〃
+    pallets?: MesProPalletApi.Pallet[]; // 鎵樼洏鐮佸垪琛�
+    bags?: MesProBagCodeApi.BagCode[]; // 琚嬬爜鍒楄〃锛堟渶澶氬墠 2000 鏉★紝鎸夎搴忓彿鍗囧簭锛�
+    bagTotal?: number; // 琚嬬爜鎬绘暟
+  }
+
+  /** 鐢熶骇鎵规鍒嗛〉鏌ヨ鍙傛暟 */
+  export interface PageParams extends PageParam {
+    code?: string;
+    itemId?: number;
+    lineId?: number;
+    lineCode?: string;
+    lineName?: string;
+    ownerUserId?: number;
+    status?: number;
+    produceDate?: string[];
+    createTime?: string[];
+  }
+}
+
+/** 鏌ヨ鐢熶骇鎵规鍒嗛〉 */
+export function getBatchPage(params: MesProBatchApi.PageParams) {
+  return requestClient.get<PageResult<MesProBatchApi.Batch>>(
+    '/mes/pro/batch/page',
+    { params },
+  );
+}
+
+/** 鏌ヨ鐢熶骇鎵规璇︽儏锛堝惈浜哄憳閰嶇疆锛� */
+export function getBatch(id: number) {
+  return requestClient.get<MesProBatchApi.Batch>(
+    `/mes/pro/batch/get?id=${id}`,
+  );
+}
+
+/** 鏂板鐢熶骇鎵规锛堣嚜鍔ㄧ敓鎴愭壒娆″彿锛� */
+export function createBatch(data: MesProBatchApi.Batch) {
+  return requestClient.post<number>('/mes/pro/batch/create', data);
+}
+
+/** 淇敼鐢熶骇鎵规 */
+export function updateBatch(data: MesProBatchApi.Batch) {
+  return requestClient.put('/mes/pro/batch/update', data);
+}
+
+/** 鍒犻櫎鐢熶骇鎵规 */
+export function deleteBatch(id: number) {
+  return requestClient.delete(`/mes/pro/batch/delete?id=${id}`);
+}
+
+/** 鏇存柊鐢熶骇鎵规鐘舵�� */
+export function updateBatchStatus(id: number, status: number) {
+  return requestClient.put(
+    `/mes/pro/batch/update-status?id=${id}&status=${status}`,
+  );
+}
+
+/** 鏌ヨ鐢熶骇鎵规绮剧畝鍒楄〃锛堜緵涓嬫媺閫夋嫨锛� */
+export function getBatchSimpleList() {
+  return requestClient.get<MesProBatchApi.Batch[]>('/mes/pro/batch/simple-list');
+}
+
+/** 瀵煎嚭鐢熶骇鎵规 Excel */
+export function exportBatchExcel(params: MesProBatchApi.PageParams) {
+  return requestClient.download('/mes/pro/batch/export-excel', { params });
+}
+
+/** 鎵爜杩芥函锛氭牴鎹壒娆″彿锛堜簩缁寸爜鍐呭锛夊弽鏌ユ壒娆°�佷汉鍛樸�佹墭鐩樸�佽鐮佷俊鎭� */
+export function getBatchByCode(code: string) {
+  return requestClient.get<MesProBatchApi.BatchTrace>(
+    `/mes/pro/batch/get-by-code?code=${encodeURIComponent(code)}`,
+  );
+}
+
+/** 鎵归噺瀵煎嚭鎵规浜岀淮鐮佸浘鐗� ZIP锛堟壒娆″浘 + 璇ユ壒娆″叏閮ㄦ墭鐩樺浘锛� */
+export function exportBatchQr(batchId: number) {
+  return requestClient.download(`/mes/pro/batch/export-qr?batchId=${batchId}`);
+}

--
Gitblit v1.9.3