From 3712799f3e0904f28e4268deaa5c5ee291323c38 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 08 一月 2026 09:27:53 +0800
Subject: [PATCH] 军泰伟业 1.迁移仓库

---
 src/views/inventoryManagement/stockManagement/index.vue |  338 +++++++++++++++++++++++---------------------------------
 1 files changed, 140 insertions(+), 198 deletions(-)

diff --git a/src/views/inventoryManagement/stockManagement/index.vue b/src/views/inventoryManagement/stockManagement/index.vue
index 95247bc..00c037c 100644
--- a/src/views/inventoryManagement/stockManagement/index.vue
+++ b/src/views/inventoryManagement/stockManagement/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-tabs v-model="activeTab" @tab-change="handleTabChange">
-      <!-- <el-tab-pane label="閲囪喘搴撳瓨" name="production">
+      <el-tab-pane label="鎴愬搧搴撳瓨" name="production">
         <div class="search_form">
           <div>
             <span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
@@ -14,7 +14,7 @@
               clearable
               @change="handleQuery"
             />
-							<span class="search_title ml10">浜у搧鍚嶇О锛�</span>
+							<span class="search_title ml10">浜у搧澶х被锛�</span>
 							<el-input
 								v-model="searchForm.productCategory"
 								style="width: 240px"
@@ -25,6 +25,7 @@
           </div>
           <div>
             <el-button @click="handleOut">瀵煎嚭</el-button>
+<!--            <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
           </div>
         </div>
         <div class="table_list">
@@ -35,10 +36,10 @@
             <el-table-column align="center" type="selection" width="55" />
             <el-table-column align="center" label="搴忓彿" type="index" width="60" />
             <el-table-column label="鍏ュ簱鏃ユ湡" prop="createTime" width="100" show-overflow-tooltip />
-            <el-table-column label="浜у搧鍚嶇О" prop="productCategory" show-overflow-tooltip />
+						<el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" width="180" show-overflow-tooltip />
+            <el-table-column label="浜у搧澶х被" prop="productCategory" show-overflow-tooltip />
             <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
             <el-table-column label="鍗曚綅" prop="unit" width="80" show-overflow-tooltip />
-            <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="100" show-overflow-tooltip />
             <el-table-column label="宸插嚭搴撴暟閲�" prop="totalInboundNum" width="100" show-overflow-tooltip />
             <el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" width="100" show-overflow-tooltip />
 							<el-table-column label="鍗曚环(鍏�)" prop="unitPrice" width="150"></el-table-column>
@@ -47,155 +48,145 @@
               <template #default="scope">
                 <el-button link type="primary" size="small" @click="openForm('edit', scope.row);">缂栬緫</el-button>
               </template>
-</el-table-column>
-</el-table>
-<pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper" :page="page.current"
-  :limit="page.size" @pagination="paginationChange" />
-</div>
-</el-tab-pane> -->
-
-      <el-tab-pane label="閲囪喘搴撳瓨" name="purchase">
-        <div class="search_form">
-          <div>
-            <span class="search_title ml10">浜у搧鍚嶇О锛�</span>
-            <el-input v-model="searchForm.productCategory" style="width: 240px" placeholder="璇疯緭鍏�" clearable />
-            <el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
-          </div>
-          <div>
-            <el-button @click="handleOut">瀵煎嚭</el-button>
-          </div>
-        </div>
-        <div class="table_list">
-          <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
-            :expand-row-keys="expandedRowKeys" :row-key="row => row.id" show-summary style="width: 100%"
-            :row-class-name="tableRowClassName" :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)">
-            <el-table-column align="center" type="selection" width="55" />
-            <el-table-column align="center" label="搴忓彿" type="index" width="60" />
-            <el-table-column label="浜у搧鍚嶇О" prop="productCategory" show-overflow-tooltip />
-            <el-table-column label="浜у搧楂樺害" prop="specificationModel" width="100" show-overflow-tooltip>
-              <template #default="scope">
-                <div>{{ scope.row.specificationModel }}{{ scope.row.unit }}</div>
-              </template>
             </el-table-column>
-            <el-table-column label="姣忎欢鏁伴噺/鏀�" prop="boxNum" width="100" show-overflow-tooltip />
-            <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="100" show-overflow-tooltip />
-            <el-table-column label="鍗曚环(鍏�)/浠�" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
-            <el-table-column label="宸插嚭搴撴暟閲�" prop="totalInboundNum" width="100" show-overflow-tooltip />
-            <el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" width="100" show-overflow-tooltip />
-            <el-table-column label="绾哥瑙勬牸" prop="cartonSpecifications" width="150"></el-table-column>
           </el-table>
           <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
             :page="page.current" :limit="page.size" @pagination="paginationChange" />
         </div>
       </el-tab-pane>
 
-      <el-tab-pane label="鎴愬搧搴撳瓨" name="manual">
+     <el-tab-pane label="鍘熸枡搴撳瓨" name="purchase">
+       <div class="search_form">
+         <div>
+           <span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
+           <el-date-picker
+             v-model="searchForm.timeStr"
+             type="date"
+             placeholder="璇烽�夋嫨鏃ユ湡"
+             value-format="YYYY-MM-DD"
+             format="YYYY-MM-DD"
+             clearable
+             @change="handleQuery"
+           />
+							<span class="search_title ml10">浜у搧澶х被锛�</span>
+							<el-input
+								v-model="searchForm.productCategory"
+								style="width: 240px"
+								placeholder="璇疯緭鍏�"
+								clearable
+							/>
+           <el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
+         </div>
+         <div>
+           <el-button @click="handleOut">瀵煎嚭</el-button>
+<!--           <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
+         </div>
+       </div>
+       <div class="table_list">
+         <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
+           :expand-row-keys="expandedRowKeys" :row-key="row => row.id" show-summary style="width: 100%"
+           :row-class-name="tableRowClassName"
+           :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)">
+           <el-table-column align="center" type="selection" width="55" />
+           <el-table-column align="center" label="搴忓彿" type="index" width="60" />
+           <el-table-column label="鍏ュ簱鏃ユ湡" prop="createTime" width="100" show-overflow-tooltip />
+					 <el-table-column label="閲囪喘鍚堝悓鍙�" prop="purchaseContractNumber" width="180" show-overflow-tooltip />
+           <el-table-column label="浜у搧澶х被" prop="productCategory" show-overflow-tooltip />
+           <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
+           <el-table-column label="鍗曚綅" prop="unit" width="80" show-overflow-tooltip />
+							<el-table-column label="宸插嚭搴撴暟閲�" prop="totalInboundNum" show-overflow-tooltip />
+							<el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" show-overflow-tooltip />
+						 <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
+						 <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" width="150"></el-table-column>
+         </el-table>
+         <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
+           :page="page.current" :limit="page.size" @pagination="paginationChange" />
+       </div>
+     </el-tab-pane>
+
+      <el-tab-pane label="鏉愭枡搴撳瓨" name="manual">
         <div class="search_form">
           <div>
-            <!--            <span class="search_title">渚涘簲鍟嗗悕绉帮細</span>-->
-            <!--            <el-input v-model="searchForm.supplierName" style="width: 240px" placeholder="璇疯緭鍏�" @change="handleQuery"-->
-            <!--              clearable prefix-icon="Search" />-->
-            <span class="search_title ml10">浜у搧鍚嶇О锛�</span>
-            <el-input v-model="searchForm.productCategory" style="width: 240px" placeholder="璇疯緭鍏�" clearable />
+            <span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
+            <el-date-picker
+              v-model="searchForm.timeStr"
+              type="date"
+              placeholder="璇烽�夋嫨鏃ユ湡"
+              value-format="YYYY-MM-DD"
+              format="YYYY-MM-DD"
+              clearable
+              @change="handleQuery"
+            />
+							<span class="search_title ml10">浜у搧澶х被锛�</span>
+							<el-input
+								v-model="searchForm.productCategory"
+								style="width: 240px"
+								placeholder="璇疯緭鍏�"
+								clearable
+							/>
             <el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
           </div>
           <div>
             <el-button @click="handleOut">瀵煎嚭</el-button>
-            <!--            <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
+<!--            <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
           </div>
         </div>
         <div class="table_list">
           <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
             :expand-row-keys="expandedRowKeys" :row-key="row => row.id" show-summary style="width: 100%"
-            :row-class-name="tableRowClassName" :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)">
+            :row-class-name="tableRowClassName"
+            :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)">
             <el-table-column align="center" type="selection" width="55" />
             <el-table-column align="center" label="搴忓彿" type="index" width="60" />
-            <el-table-column label="浜у搧鍥剧墖" width="100" align="center">
-              <template #default="scope">
-                <img class="barcode-img" :src="javaApiUrl + scope.row.url"></img>
-              </template>
-            </el-table-column>
-            <el-table-column label="浜у搧鍚嶇О" prop="productCategory" show-overflow-tooltip />
-            <el-table-column label="浜у搧楂樺害" prop="specificationModel" width="100" show-overflow-tooltip>
-              <template #default="scope">
-                <div>{{ scope.row.specificationModel }}{{ scope.row.unit }}</div>
-              </template>
-            </el-table-column>
-            <el-table-column label="鍗曚环(缇庡厓)/浠�" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
-            <el-table-column label="姣忎欢鏁伴噺/鏀�" prop="boxNum" width="100" show-overflow-tooltip />
-            <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="100" show-overflow-tooltip />
-            <el-table-column label="宸插嚭搴撴暟閲�" prop="totalInboundNum" width="100" show-overflow-tooltip />
-            <el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" width="100" show-overflow-tooltip />
-            <el-table-column label="绾哥瑙勬牸" prop="cartonSpecifications" width="150"></el-table-column>
-            <!-- <el-table-column fixed="right" label="鎿嶄綔" width="100" align="center">
+            <el-table-column label="鍏ュ簱鏃ユ湡" prop="inboundDate" width="100" show-overflow-tooltip />
+						<el-table-column label="鎵规鍙�" prop="code" width="130" show-overflow-tooltip />
+            <el-table-column label="浜у搧澶х被" prop="productCategory" show-overflow-tooltip />
+            <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
+            <el-table-column label="鍗曚綅" prop="unit" width="80" show-overflow-tooltip />
+            <el-table-column label="鐗╁搧绫诲瀷" prop="itemType" width="120" show-overflow-tooltip />
+							<el-table-column label="宸插嚭搴撴暟閲�" prop="totalInboundNum" width="100" show-overflow-tooltip />
+							<el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" width="100" show-overflow-tooltip />
+							<el-table-column label="鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
+							<el-table-column label="鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" width="150"></el-table-column>
+            <el-table-column fixed="right" label="鎿嶄綔" width="100" align="center">
               <template #default="scope">
                 <el-button link type="primary" size="small" @click="openForm('edit', scope.row);">缂栬緫</el-button>
               </template>
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
           <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
             :page="page.current" :limit="page.size" @pagination="paginationChange" />
         </div>
       </el-tab-pane>
     </el-tabs>
-
+    
     <!-- 鎴愬搧搴撳瓨寮规 -->
-    <FormDiaProduction v-model:dialogFormVisible="productionDialogVisible" :operationType="operationType"
-      :formData="form" @submit="submitForm" @close="closeDia" />
-
+    <FormDiaProduction 
+      v-model:dialogFormVisible="productionDialogVisible"
+      :operationType="operationType"
+      :formData="form"
+      @submit="submitForm"
+      @close="closeDia"
+    />
+    
     <!-- 鍘熸枡搴撳瓨寮规 -->
-    <FormDiaPurchase v-model:dialogFormVisible="purchaseDialogVisible" :operationType="operationType" :formData="form"
-      @submit="submitForm" @close="closeDia" />
-
+    <FormDiaPurchase 
+      v-model:dialogFormVisible="purchaseDialogVisible"
+      :operationType="operationType"
+      :formData="form"
+      @submit="submitForm"
+      @close="closeDia"
+    />
+    
     <!-- 鏉愭枡搴撳瓨寮规 -->
-    <FormDiaManual v-model:dialogFormVisible="manualDialogVisible" :operationType="operationType" :formData="form"
-      @submit="submitForm" @close="closeDia" />
+    <FormDiaManual 
+      v-model:dialogFormVisible="manualDialogVisible"
+      :operationType="operationType"
+      :formData="form"
+      @submit="submitForm"
+      @close="closeDia"
+    />
   </div>
-  <el-dialog v-model="barcodeDia" title="浜у搧淇℃伅" width="70%" @close="closeBarcodeDia">
-    <div>
-      <el-row :gutter="30">
-        <el-col :span="12">
-          <div class="barcode-item">
-            <div class="barcode-label">鍚嶇О</div>
-            <div class="barcode-value">{{ barcodeDetail.barcode }}</div>
-          </div>
-        </el-col>
-        <el-col :span="12">
-          <div class="barcode-item">
-            <div class="barcode-label">鍗曚环</div>
-            <div class="barcode-value">xxx鍏�</div>
-          </div>
-        </el-col>
-      </el-row>
-      <el-row :gutter="30">
-        <el-col :span="12">
-          <div class="barcode-item">
-            <div class="barcode-label">浜у搧楂樺害</div>
-            <div class="barcode-value">222cm</div>
-          </div>
-        </el-col>
-        <el-col :span="12">
-          <div class="barcode-item">
-            <div class="barcode-label">鏁伴噺/浠�</div>
-            <div class="barcode-value">120</div>
-          </div>
-        </el-col>
-      </el-row>
-      <el-row :gutter="30">
-        <el-col :span="12">
-          <div class="barcode-item">
-            <div class="barcode-label">瑙勬牸</div>
-            <div class="barcode-value">12*20*30</div>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
-    <template #footer>
-      <div class="dialog-footer">
-        <el-button @click="closeBarcodeDia">鍏抽棴</el-button>
-      </div>
-    </template>
-  </el-dialog>
 </template>
 
 <script setup>
@@ -204,7 +195,7 @@
 import { ElMessageBox } from "element-plus";
 import useUserStore from '@/store/modules/user'
 import { userListNoPageByTenantId } from "@/api/system/user.js";
-import { productTreeList, modelList } from "@/api/basicData/product.js"
+import { productTreeList,modelList } from "@/api/basicData/product.js"
 import {
   getStockManagePage,
   getStockManagePageByProduction,
@@ -212,9 +203,8 @@
   delStockManage,
 } from "@/api/inventoryManagement/stockManage.js";
 import {
-  updateManagement, updateManagementByCustom, updateStockIn
+	updateManagement, updateManagementByCustom, updateStockIn
 } from "@/api/inventoryManagement/stockIn.js";
-const javaApiUrl = __BASE_API__;
 
 // 瀵煎叆涓変釜鐙珛鐨勫脊妗嗙粍浠�
 import FormDiaProduction from './components/FormDiaProduction.vue'
@@ -240,7 +230,7 @@
 const loading = ref(false);
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const operationType = ref('')
-const activeTab = ref('purchase')
+const activeTab = ref('production')
 
 // 涓変釜鐙珛鐨勫脊妗嗘樉绀虹姸鎬�
 const productionDialogVisible = ref(false)
@@ -250,8 +240,9 @@
 const data = reactive({
   searchForm: {
     // supplierName: '',
-    productCategory: '',
+    productCategory:'',
     customerName: '',
+    timeStr: getCurrentDate(),
   },
   form: {
     supplierId: null,
@@ -273,7 +264,7 @@
     inboundBatch: '',
     stockQuantity: '',
     boundTime: '',
-    warnNum: '', // 鏂板鏈�浣庡簱瀛樺瓧娈�
+		warnNum: '', // 鏂板鏈�浣庡簱瀛樺瓧娈�
     salesLedgerProductId: null,
   },
   rules: {
@@ -290,7 +281,7 @@
     boundTime: [{ required: true, message: '璇烽�夋嫨搴撳瓨鏃堕棿', trigger: 'change' }],
     inboundTime: [{ required: true, message: '璇烽�夋嫨鍏ュ簱鏃堕棿', trigger: 'change' }],
     inboundPerson: [{ required: true, message: '璇烽�夋嫨鍑哄簱浜�', trigger: 'change' }],
-    warnNum: [{ required: true, message: '璇疯緭鍏ユ渶浣庡簱瀛�', trigger: 'blur' }],
+		warnNum: [{ required: true, message: '璇疯緭鍏ユ渶浣庡簱瀛�', trigger: 'blur' }], 
   }
 })
 const { searchForm, form, rules } = toRefs(data)
@@ -309,6 +300,7 @@
 const buildQueryParams = () => {
   const params = {
     ...page,
+    timeStr: searchForm.value.timeStr,
   }
   params.productCategory = searchForm.value.productCategory
   if (activeTab.value === 'production') {
@@ -333,14 +325,14 @@
   apiCall.then(res => {
     tableLoading.value = false
     tableData.value = res.data.records
-
+    
     // 涓鸿〃鏍兼暟鎹嚜鍔ㄨ绠楁�讳环
     tableData.value = tableData.value.map(item => {
       // 璁$畻鍓╀綑搴撳瓨
       const stockQuantity = parseFloat(item.inboundNum) || 0
       const outboundQuantity = parseFloat(item.totalInboundNum) || 0
       const remainingStock = Math.max(stockQuantity - outboundQuantity, 0)
-
+      
       // 鏍规嵁鏍囩椤电被鍨嬭绠楁�讳环
       if (activeTab.value === 'production') {
         // 鎴愬搧搴撳瓨锛氭�讳环 = 鍗曚环 脳 鍓╀綑搴撳瓨
@@ -355,10 +347,10 @@
         const taxInclusiveUnitPrice = parseFloat(item.taxInclusiveUnitPrice) || 0
         item.taxInclusiveTotalPrice = (taxInclusiveUnitPrice * remainingStock).toFixed(2)
       }
-
+      
       return item
     })
-
+    
     total.value = res.data.total
     // 鏁版嵁鍔犺浇瀹屾垚鍚庢鏌ュ簱瀛�
     // checkStockAndCreatePurchase();
@@ -372,6 +364,7 @@
   page.current = 1
   // searchForm.value.supplierName = ''
   searchForm.value.customerName = ''
+  searchForm.value.timeStr = ''
   selectedRows.value = []
   searchForm.value.productCategory = ''
   getList()
@@ -410,9 +403,9 @@
   userList.value = userLists.data
   if (type === 'edit') {
     form.value = { ...row }
-    productTreeList().then(res => {
+    productTreeList().then(res =>{
       productList.value = res
-      productList.value.forEach(i => {
+      productList.value.forEach(i =>{
         if (i.label === row.productCategory) {
           modelList({ id: i.id }).then((res) => {
             productModelList.value = res;
@@ -422,7 +415,7 @@
     })
   }
   form.value.entryDate = getCurrentDate() // 璁剧疆榛樿褰曞叆鏃ユ湡涓哄綋鍓嶆棩鏈�
-
+  
   // 鏍规嵁褰撳墠鏍囩椤垫樉绀哄搴旂殑寮规
   if (activeTab.value === 'production') {
     productionDialogVisible.value = true
@@ -436,10 +429,10 @@
 // 鎻愪氦琛ㄥ崟
 const submitForm = (submittedData) => {
   console.log('瀛愮粍浠舵彁浜ょ殑鏁版嵁:', submittedData)
-
+  
   // 浣跨敤瀛愮粍浠舵彁浜ょ殑鏁版嵁锛岃�屼笉鏄埗缁勪欢鐨刦orm瀵硅薄
   const submitData = { ...submittedData }
-
+  
   // 鏍规嵁褰撳墠鏍囩椤电Щ闄ゅ搴旂殑鎬讳环瀛楁
   if (activeTab.value === 'production') {
     // 鎴愬搧搴撳瓨锛氱Щ闄ゆ�讳环瀛楁
@@ -451,12 +444,12 @@
     // 鏉愭枡搴撳瓨锛氱Щ闄ゅ惈绋庢�讳环瀛楁
     delete submitData.taxInclusiveTotalPrice
   }
-
+  
   // 绉婚櫎鍏朵粬鍙兘鐨勬�讳环瀛楁
   delete submitData.taxExclusiveTotalPrice
-
+  
   console.log('鎻愪氦缁欏悗绔殑鏁版嵁锛堝凡绉婚櫎鎬讳环瀛楁锛�:', submitData)
-  submitData.inboundNum = parseFloat(submitData.inboundNum) || 0
+  
   // 鏍规嵁褰撳墠鏍囩椤佃皟鐢ㄤ笉鍚岀殑鎻愪氦鎺ュ彛
   let apiCall
   if (activeTab.value === 'production') {
@@ -469,7 +462,7 @@
     // 鍘熸枡搴撳瓨浣跨敤 updateManagementByCustom 鎺ュ彛
     apiCall = updateManagementByCustom(submitData)
   }
-
+  
   apiCall.then(res => {
     proxy.$modal.msgSuccess("鎻愪氦鎴愬姛")
     closeDia()
@@ -551,7 +544,7 @@
     type: 'warning',
   }
   ).then(() => {
-    delStockManage({ ids: ids }).then(res => {
+    delStockManage({ids:ids}).then(res => {
       proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛")
       getList()
     })
@@ -567,54 +560,16 @@
   const day = String(today.getDate()).padStart(2, '0');
   return `${year}-${month}-${day}`;
 }
-
-//鎵爜鐩稿叧鍙傛暟
-const barcodeDia = ref(false);
-const scanBarcodeInput = ref('');
-const barcodeDetail = ref({})
-// 鎵爜鍑芥暟
-const scanBarcode = (e) => {
-  if (!e || !e.target || !e.target.tagName) {
-    return;
-  }
-  if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
-    return
-  }
-  if (e.key === 'Enter') {
-    let _value = scanBarcodeInput.value
-    getDetail(_value)
-    scanBarcodeInput.value = ""
-  } else {
-    scanBarcodeInput.value += e.key
-  }
-}
-const getDetail = (barcode) => {
-  barcodeDetail.value = {
-    barcode: barcode
-  }
-  barcodeDia.value = true
-}
-
-const closeBarcodeDia = () => {
-  barcodeDia.value = false
-}
 onMounted(() => {
-  // 娣诲姞鎵爜鏋洃鍚簨浠�
-  // document.addEventListener('keypress', scanBarcode)
   getList()
   // checkStockAndCreatePurchase();
-  // 姣忓皬鏃舵鏌ヤ竴娆″簱瀛�
-  // const intervalId = setInterval(checkStockAndCreatePurchase, 60 * 60 * 1000);
+    // 姣忓皬鏃舵鏌ヤ竴娆″簱瀛�
+    // const intervalId = setInterval(checkStockAndCreatePurchase, 60 * 60 * 1000);
 
-  // onUnmounted(() => {
-  //   // 缁勪欢鍗歌浇鏃舵竻闄ゅ畾鏃跺櫒
-  //   clearInterval(intervalId);
-  // });
-})
-onUnmounted(() => {
-  // 绉婚櫎閿洏鐩戝惉浜嬩欢
-  document.removeEventListener('keypress', scanBarcode)
-  console.log('缁勪欢鍗歌浇')
+// onUnmounted(() => {
+//   // 缁勪欢鍗歌浇鏃舵竻闄ゅ畾鏃跺櫒
+//   clearInterval(intervalId);
+// });
 })
 </script>
 
@@ -626,18 +581,5 @@
 
 :deep(.row-low-stock:hover > td) {
   background-color: #fcd4d4;
-}
-
-.barcode-item {
-  display: flex;
-  justify-content: space-between;
-  padding: 5px 0;
-}
-
-.barcode-img {
-  width: 80px;
-  height: 80px;
-  border-radius: 5px;
-  background-color: #F5F5F5;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3