From 1c1af9b0fc10778ae5ac13cc68fd4030affbcfe1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 09 九月 2026 10:59:53 +0800
Subject: [PATCH] feat(wm): 新增SN码管理和设备入库功能

---
 src/views/wls/barcode/index.vue |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/src/views/wls/barcode/index.vue b/src/views/wls/barcode/index.vue
index 6dfe978..82b53c2 100644
--- a/src/views/wls/barcode/index.vue
+++ b/src/views/wls/barcode/index.vue
@@ -5,8 +5,8 @@
 import { ref } from 'vue';
 import { useRouter } from 'vue-router';
 
-import { Page, useVbenModal } from '../../../packages/effects/common-ui/src';
-import { downloadFileFromBlobPart } from '../../../packages/utils/src';
+import { Page, useVbenModal } from '@vben/common-ui';
+import { downloadFileFromBlobPart } from '@vben/utils';
 
 import { message } from 'ant-design-vue';
 
@@ -18,7 +18,7 @@
 } from '#/api/mes/wm/barcode';
 import { $t } from '#/locales';
 
-import { Barcode, BarcodeDetail } from './components';
+import { Barcode, BarcodeDetail, ScanModal } from './components';
 import { useGridColumns, useGridFormSchema } from './data';
 import Form from './modules/form.vue';
 
@@ -30,6 +30,12 @@
 });
 
 const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>();
+const scanModalRef = ref<InstanceType<typeof ScanModal>>();
+
+/** 鎵爜瑙f瀽 / 鎴愬浘棰勮 */
+function handleScan() {
+  scanModalRef.value?.open();
+}
 
 const checkedIds = ref<number[]>([]);
 function handleRowCheckboxChange({
@@ -97,7 +103,7 @@
 
 /** 璺宠浆鏉$爜閰嶇疆 */
 function handleConfig() {
-  router.push({ name: 'WlsBarcodeConfig' });
+  router.push({ path: '/wls/barcode/config' });
 }
 
 /** 瀵煎嚭琛ㄦ牸 */
@@ -145,11 +151,19 @@
 <template>
   <Page auto-content-height><FormModal @success="handleRefresh" />
     <BarcodeDetail ref="barcodeDetailRef" />
+    <ScanModal ref="scanModalRef" />
 
     <Grid table-title="鏉$爜鍒楄〃">
       <template #toolbar-tools>
         <TableAction
           :actions="[
+            {
+              label: '鎵爜瑙f瀽',
+              type: 'primary',
+              icon: ACTION_ICON.SCAN,
+              auth: ['mes:wm-barcode:query'],
+              onClick: handleScan,
+            },
             {
               label: $t('ui.actionTitle.create', ['鏉$爜']),
               type: 'primary',
@@ -193,7 +207,7 @@
             :content="row.content"
             :format="row.format"
             :height="60"
-            :width="140"
+            :width="60"
           />
         </div>
       </template>

--
Gitblit v1.9.3