From f08a81f01bc4a4104dd9ef04e071bb0bd0eb8afe Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 23 七月 2026 10:50:19 +0800
Subject: [PATCH] Merge branch 'dev_pro2.0' of http://114.132.189.42:9002/r/mom-pro2-before into dev_pro2.0

---
 src/views/wls/materialstock/index.vue |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/src/views/wls/materialstock/index.vue b/src/views/wls/materialstock/index.vue
index 3ae7731..17e3625 100644
--- a/src/views/wls/materialstock/index.vue
+++ b/src/views/wls/materialstock/index.vue
@@ -19,7 +19,7 @@
 import { MdItemTypeTree } from '#/views/mes/md/item/type/components';
 import { WmBatchDetail } from '#/views/wls/batch/components';
 import AreaForm from '#/views/wls/warehouse/area/modules/form.vue';
-import { WmStockAdjustModal } from './components';
+import { WmStockAdjustModal, WmStockMoveModal } from './components';
 
 import { useGridColumns, useGridFormSchema } from './data';
 
@@ -30,6 +30,11 @@
 
 const [StockAdjustModal, stockAdjustModalApi] = useVbenModal({
   connectedComponent: WmStockAdjustModal,
+  destroyOnClose: true,
+});
+
+const [StockMoveModal, stockMoveModalApi] = useVbenModal({
+  connectedComponent: WmStockMoveModal,
   destroyOnClose: true,
 });
 
@@ -74,6 +79,16 @@
   gridApi.query();
 }
 
+/** 鎵撳紑绉诲簱寮圭獥 */
+function handleOpenStockMove(row: MesWmMaterialStockApi.MaterialStock) {
+  stockMoveModalApi.setData(row).open();
+}
+
+/** 绉诲簱鎴愬姛鍥炶皟 */
+function handleStockMoveSuccess() {
+  gridApi.query();
+}
+
 /** 鎵撳紑鎵规璇︽儏寮圭獥 */
 function handleOpenBatchDetail(row: MesWmMaterialStockApi.MaterialStock) {
   if (!row.batchId) {
@@ -108,7 +123,7 @@
     schema: useGridFormSchema(),
   },
   gridOptions: {
-    columns: useGridColumns(handleFrozenChange),
+    columns: useGridColumns(handleFrozenChange, handleOpenStockMove),
     height: 'auto',
     keepSource: true,
     proxyConfig: {
@@ -139,6 +154,7 @@
   <Page auto-content-height><AreaModal />
     <WmBatchDetail ref="batchDetailRef" />
     <StockAdjustModal @success="handleStockAdjustSuccess" />
+    <StockMoveModal @success="handleStockMoveSuccess" />
 
     <div class="flex h-full w-full">
       <!-- 宸︿晶鐗╂枡鍒嗙被鏍� -->
@@ -192,6 +208,19 @@
             </Button>
             <span v-else>-</span>
           </template>
+          <template #actions="{ row }">
+            <TableAction
+              :actions="[
+                {
+                  label: '绉诲簱',
+                  type: 'link',
+                  auth: ['mes:wm-material-stock:move'],
+                  ifShow: !row.frozen,
+                  onClick: handleOpenStockMove.bind(null, row),
+                },
+              ]"
+            />
+          </template>
         </Grid>
       </div>
     </div>

--
Gitblit v1.9.3