From e1e0d48eb7ab2b305e6062f23610f8be9db3bed6 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期六, 29 八月 2026 13:46:26 +0800
Subject: [PATCH] feat(wms): 新增库存汇总统计与预警功能

---
 src/views/mes/pro/batch/modules/form.vue |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/views/mes/pro/batch/modules/form.vue b/src/views/mes/pro/batch/modules/form.vue
index 2e45243..6242291 100644
--- a/src/views/mes/pro/batch/modules/form.vue
+++ b/src/views/mes/pro/batch/modules/form.vue
@@ -15,7 +15,12 @@
 
   import { useVbenForm } from "#/adapter/form";
   import { TableAction, useVbenVxeGrid } from "#/adapter/vxe-table";
-  import { createBatch, getBatch, updateBatch } from "#/api/mes/pro/batch";
+  import {
+    createBatch,
+    fillBatchInfo,
+    getBatch,
+    updateBatch,
+  } from "#/api/mes/pro/batch";
   import { $t } from "#/locales";
   import { UserSelect } from "#/views/system/user/components";
 
@@ -33,7 +38,7 @@
   const formData = ref<MesProBatchApi.Batch>();
 
   const isEditable = computed(() =>
-    ["create", "update"].includes(formType.value)
+    ["create", "update", "fill"].includes(formType.value)
   );
 
   const getTitle = computed(() => {
@@ -43,6 +48,9 @@
       }
       case "update": {
         return $t("ui.actionTitle.edit", ["鐢熶骇鎵规"]);
+      }
+      case "fill": {
+        return "琛ュ綍鎵规淇℃伅";
       }
       default: {
         return $t("ui.actionTitle.create", ["鐢熶骇鎵规"]);
@@ -177,7 +185,9 @@
       modalApi.lock();
       try {
         const data = (await formApi.getValues()) as MesProBatchApi.Batch;
-        if (formData.value?.id) {
+        if (formType.value === "fill") {
+          await fillBatchInfo({ ...data, id: formData.value!.id, workers });
+        } else if (formData.value?.id) {
           await updateBatch({ ...data, id: formData.value.id, workers });
         } else {
           await createBatch({ ...data, workers });

--
Gitblit v1.9.3