From 78caa769e452f63288743b8997f7b4c21bb06ce5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 06 十一月 2026 19:00:38 +0800
Subject: [PATCH] feat(crm,mes): 扩展客户字段与重构批次号生成逻辑

---
 src/api/mes/wm/productsales/index.ts |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/api/mes/wm/productsales/index.ts b/src/api/mes/wm/productsales/index.ts
index a5296ef..f055fc3 100644
--- a/src/api/mes/wm/productsales/index.ts
+++ b/src/api/mes/wm/productsales/index.ts
@@ -23,6 +23,8 @@
     shippingNumber?: string; // 杩愯緭鍗曞彿
     status?: number; // 鍗曟嵁鐘舵��
     remark?: string; // 澶囨敞
+    closeReason?: string;
+    partiallyShipped?: boolean;
     stockState?: number; // 搴撳瓨鐘舵��
     createTime?: Date; // 鍒涘缓鏃堕棿
   }
@@ -33,6 +35,19 @@
     quantity?: number;
     scanType?: 'BAG' | 'PALLET' | 'BATCH';
     bagIds?: number[];
+    lineId?: number;
+    materialStockId?: number;
+    manual?: boolean;
+  }
+
+  export interface Shipment {
+    id: number;
+    salesId: number;
+    status: number;
+    carrier?: string;
+    shippingNumber?: string;
+    outboundTime?: string;
+    createTime?: string;
   }
 
   export interface PickingBag {
@@ -40,6 +55,7 @@
     code: string;
     businessCode?: string;
     palletId?: number;
+    materialStockId?: number;
     selectable: boolean;
     unavailableReason?: string;
   }
@@ -84,6 +100,10 @@
   return requestClient.get<MesWmProductSalesApi.ProductSales>(
     `/mes/wm/product-sales/get?id=${id}`,
   );
+}
+
+export function getProductSalesShipments(id: number) {
+  return requestClient.get<MesWmProductSalesApi.Shipment[]>('/mes/wm/product-sales/shipments', { params: { id } });
 }
 
 /** 鏂板閿�鍞嚭搴撳崟 */
@@ -140,6 +160,14 @@
   return requestClient.put(`/mes/wm/product-sales/cancel?id=${id}`);
 }
 
+export function closeProductSalesRemaining(id: number, reason: string) {
+  return requestClient.put('/mes/wm/product-sales/close-remaining', undefined, { params: { id, reason } });
+}
+
+export function cancelProductSalesShipment(id: number) {
+  return requestClient.put(`/mes/wm/product-sales/cancel-shipment?id=${id}`);
+}
+
 /** 鏍¢獙閿�鍞嚭搴撳崟鎷h揣鏁伴噺鏄惁涓庡嚭搴撴暟閲忎竴鑷� */
 export function checkProductSalesQuantity(id: number) {
   return requestClient.get<boolean>(

--
Gitblit v1.9.3