From 23f7d0e0cf31ea6a7cde81bf23ef07091bd4f3a7 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 03 十一月 2025 14:22:35 +0800
Subject: [PATCH] 添加人工触发调拨单

---
 新建文件夹/WMS/src/views/stock/Dt_Inventory_Batch.vue |  135 ++++++++++++++++----------------------------
 1 files changed, 49 insertions(+), 86 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
index 977958c..3671b21 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
@@ -1,7 +1,15 @@
 <template>
-  <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
-    :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
-    :table="table" :extend="extend">
+  <view-grid
+    ref="grid"
+    :columns="columns"
+    :detail="detail"
+    :editFormFields="editFormFields"
+    :editFormOptions="editFormOptions"
+    :searchFormFields="searchFormFields"
+    :searchFormOptions="searchFormOptions"
+    :table="table"
+    :extend="extend"
+  >
   </view-grid>
 </template>
 <script>
@@ -30,7 +38,7 @@
       productionDate: "",
       validityPeriod: "",
       remark: "",
-      AvailableQuantity: "",
+      availableQuantity: "",
     });
     const editFormOptions = ref([
       [
@@ -40,18 +48,14 @@
           field: "materielCode",
           type: "string",
         },
+      ],
+      [
         {
           title: "鐗╂枡鍚嶇О",
           required: true,
           field: "materielName",
           type: "string",
         },
-        {
-          title: "鐗╂枡瑙勬牸",
-          required: true,
-          field: "materielSpec",
-          type: "string",
-        }
       ],
       [
         {
@@ -60,67 +64,15 @@
           field: "batchNo",
           type: "string",
         },
+      ],
+      [
         {
-          title: "搴撳瓨鏁�",
-          required: true,
-          field: "stockQuantity",
-          type: "number",
-        },
-        {
-          title: "寰呭嚭搴撴暟閲�",
-          required: true,
-          field: "outboundQuantity",
-          type: "number",
-        },
-          {
-          title: "鍙敤搴撳瓨鏁�",
+          title: "璋冩嫧鏁伴噺",
           required: true,
           field: "availableQuantity",
           type: "number",
-        }
-      ],
-      [
-        {
-          title: "鐩樼偣鏁�",
-          required: true,
-          field: "supplyQuantity",
-          type: "number",
         },
-        {
-          title: "ERP瀹為檯搴撳瓨鏁�",
-          required: true,
-          field: "erpStockQuantity",
-          type: "number",
-        },
-        {
-          title: "搴撳瓨宸紓",
-          field: "status",
-          type: "select",
-          bind: { key: "stockDifference", data: [] }
-        }
       ],
-      [
-        // {
-        //   title: "鐢熶骇鏃ユ湡",
-        //   field: "productionDate",
-        //   type: "date",
-        //   span: 12
-        // },
-        {
-          title: "鏈夋晥鏈熻嚦",
-          field: "validityPeriod",
-          type: "date",
-          span: 12
-        }
-      ],
-      [
-        {
-          title: "澶囨敞",
-          field: "remark",
-          type: "string",
-          span: 24
-        }
-      ]
     ]);
     const searchFormFields = ref({
       materielCode: "",
@@ -129,9 +81,9 @@
     });
     const searchFormOptions = ref([
       [
-        { title: "鐗╂枡缂栧彿", field: "materielCode" },
-        { title: "鐗╂枡鍚嶇О", field: "materielName" },
-        { title: "鎵规鍙�", field: "batchNo" },
+        { title: "鐗╂枡缂栧彿", field: "materielCode", type: "like" },
+        { title: "鐗╂枡鍚嶇О", field: "materielName", type: "like" },
+        { title: "鎵规鍙�", field: "batchNo", type: "like" },
       ],
     ]);
     const columns = ref([
@@ -189,17 +141,28 @@
       },
       {
         field: "supplyQuantity",
-        title: "鐩樼偣鏁�",
+        title: "鐩樼偣宸紓鏁�",
         type: "number",
         width: 100,
         align: "left",
-      },
-         {
-          title: "鍙敤搴撳瓨鏁�",
-          required: true,
-          field: "availableQuantity",
-          type: "number",
+        cellStyle: (row) => {
+          const value = row.supplyQuantity;
+          if (value > 0) {
+            return { color: "#00ff00" }; // 缁胯壊
+          } else if (value < 0) {
+            return { color: "#ff0000" }; // 绾㈣壊
+          }
+          // else {
+          //   return { color: '#000000' }; // 榛戣壊
+          // }
         },
+      },
+      {
+        title: "鍙敤搴撳瓨鏁�",
+        required: true,
+        field: "availableQuantity",
+        type: "number",
+      },
       {
         field: "erpStockQuantity",
         title: "ERP瀹為檯搴撳瓨鏁�",
@@ -207,14 +170,14 @@
         width: 120,
         align: "left",
       },
-      {
-        field: "status",
-        title: "搴撳瓨宸紓",
-        type: "select",
-        width: 100,
-        align: "left",
-        bind: { key: "stockDifference", data: [] },
-      },
+      // {
+      //   field: "status",
+      //   title: "搴撳瓨宸紓",
+      //   type: "select",
+      //   width: 100,
+      //   align: "left",
+      //   bind: { key: "stockDifference", data: [] },
+      // },
       // {
       //   field: "productionDate",
       //   title: "鐢熶骇鏃ユ湡",
@@ -249,7 +212,7 @@
         type: "string",
         width: 100,
         align: "left",
-        hidden: true
+        hidden: true,
       },
       {
         field: "modifyDate",
@@ -257,7 +220,7 @@
         type: "datetime",
         width: 160,
         align: "left",
-        hidden: true
+        hidden: true,
       },
       {
         field: "remark",
@@ -265,7 +228,7 @@
         type: "string",
         width: 100,
         align: "left",
-        hidden: true
+        hidden: true,
       },
     ]);
     const detail = ref({

--
Gitblit v1.9.3