From 77bb414c194741197a5c3718b71d7e5dffb4e6a7 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 09 一月 2026 17:22:38 +0800
Subject: [PATCH] 添加不合格现象,检验记录不可编辑生产报工信息,生产报工记录加上生产时间字段

---
 src/views/inventoryManagement/stockManagement/index.vue |  349 +++++++++++++++++-----------------------------------------
 1 files changed, 102 insertions(+), 247 deletions(-)

diff --git a/src/views/inventoryManagement/stockManagement/index.vue b/src/views/inventoryManagement/stockManagement/index.vue
index 95247bc..88d1292 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,81 @@
               <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">
-        <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 />
-            <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="浜у搧鍥剧墖" 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">
-              <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 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-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" />
-
-    <!-- 鏉愭枡搴撳瓨寮规 -->
-    <FormDiaManual v-model:dialogFormVisible="manualDialogVisible" :operationType="operationType" :formData="form"
-      @submit="submitForm" @close="closeDia" />
+    <FormDiaPurchase 
+      v-model:dialogFormVisible="purchaseDialogVisible"
+      :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,22 +131,19 @@
 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,
-  getStockManagePageByCustom,
   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'
 import FormDiaPurchase from './components/FormDiaPurchase.vue'
-import FormDiaManual from './components/FormDiaManual.vue'
 
 const userStore = useUserStore()
 const { proxy } = getCurrentInstance()
@@ -240,18 +164,18 @@
 const loading = ref(false);
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const operationType = ref('')
-const activeTab = ref('purchase')
+const activeTab = ref('production')
 
-// 涓変釜鐙珛鐨勫脊妗嗘樉绀虹姸鎬�
+// 寮规鏄剧ず鐘舵��
 const productionDialogVisible = ref(false)
 const purchaseDialogVisible = ref(false)
-const manualDialogVisible = ref(false)
 
 const data = reactive({
   searchForm: {
     // supplierName: '',
-    productCategory: '',
+    productCategory:'',
     customerName: '',
+    timeStr: '',
   },
   form: {
     supplierId: null,
@@ -273,7 +197,7 @@
     inboundBatch: '',
     stockQuantity: '',
     boundTime: '',
-    warnNum: '', // 鏂板鏈�浣庡簱瀛樺瓧娈�
+		warnNum: '', // 鏂板鏈�浣庡簱瀛樺瓧娈�
     salesLedgerProductId: null,
   },
   rules: {
@@ -290,7 +214,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 +233,7 @@
 const buildQueryParams = () => {
   const params = {
     ...page,
+    timeStr: searchForm.value.timeStr,
   }
   params.productCategory = searchForm.value.productCategory
   if (activeTab.value === 'production') {
@@ -322,25 +247,20 @@
 const getList = () => {
   tableLoading.value = true
   const params = buildQueryParams()
-  let apiCall
-  if (activeTab.value === 'production') {
-    apiCall = getStockManagePageByProduction(params)
-  } else if (activeTab.value === 'manual') {
-    apiCall = getStockManagePageByCustom(params)
-  } else {
-    apiCall = getStockManagePage(params)
-  }
+  const apiCall = activeTab.value === 'production'
+    ? getStockManagePageByProduction(params)
+    : getStockManagePage(params)
   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') {
         // 鎴愬搧搴撳瓨锛氭�讳环 = 鍗曚环 脳 鍓╀綑搴撳瓨
@@ -350,15 +270,11 @@
         // 鍘熸枡搴撳瓨锛氬惈绋庢�讳环 = 鍚◣鍗曚环 脳 鍓╀綑搴撳瓨
         const taxInclusiveUnitPrice = parseFloat(item.taxInclusiveUnitPrice) || 0
         item.taxInclusiveTotalPrice = (taxInclusiveUnitPrice * remainingStock).toFixed(2)
-      } else if (activeTab.value === 'manual') {
-        // 鏉愭枡搴撳瓨锛氬惈绋庢�讳环 = 鍚◣鍗曚环 脳 鍓╀綑搴撳瓨
-        const taxInclusiveUnitPrice = parseFloat(item.taxInclusiveUnitPrice) || 0
-        item.taxInclusiveTotalPrice = (taxInclusiveUnitPrice * remainingStock).toFixed(2)
       }
-
+      
       return item
     })
-
+    
     total.value = res.data.total
     // 鏁版嵁鍔犺浇瀹屾垚鍚庢鏌ュ簱瀛�
     // checkStockAndCreatePurchase();
@@ -372,6 +288,7 @@
   page.current = 1
   // searchForm.value.supplierName = ''
   searchForm.value.customerName = ''
+  searchForm.value.timeStr = ''
   selectedRows.value = []
   searchForm.value.productCategory = ''
   getList()
@@ -410,9 +327,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,24 +339,22 @@
     })
   }
   form.value.entryDate = getCurrentDate() // 璁剧疆榛樿褰曞叆鏃ユ湡涓哄綋鍓嶆棩鏈�
-
+  
   // 鏍规嵁褰撳墠鏍囩椤垫樉绀哄搴旂殑寮规
   if (activeTab.value === 'production') {
     productionDialogVisible.value = true
   } else if (activeTab.value === 'purchase') {
     purchaseDialogVisible.value = true
-  } else if (activeTab.value === 'manual') {
-    manualDialogVisible.value = true
   }
 }
 
 // 鎻愪氦琛ㄥ崟
 const submitForm = (submittedData) => {
   console.log('瀛愮粍浠舵彁浜ょ殑鏁版嵁:', submittedData)
-
+  
   // 浣跨敤瀛愮粍浠舵彁浜ょ殑鏁版嵁锛岃�屼笉鏄埗缁勪欢鐨刦orm瀵硅薄
   const submitData = { ...submittedData }
-
+  
   // 鏍规嵁褰撳墠鏍囩椤电Щ闄ゅ搴旂殑鎬讳环瀛楁
   if (activeTab.value === 'production') {
     // 鎴愬搧搴撳瓨锛氱Щ闄ゆ�讳环瀛楁
@@ -447,29 +362,23 @@
   } else if (activeTab.value === 'purchase') {
     // 鍘熸枡搴撳瓨锛氱Щ闄ゅ惈绋庢�讳环瀛楁
     delete submitData.taxInclusiveTotalPrice
-  } else if (activeTab.value === 'manual') {
-    // 鏉愭枡搴撳瓨锛氱Щ闄ゅ惈绋庢�讳环瀛楁
-    delete submitData.taxInclusiveTotalPrice
   }
-
+  
   // 绉婚櫎鍏朵粬鍙兘鐨勬�讳环瀛楁
   delete submitData.taxExclusiveTotalPrice
-
+  
   console.log('鎻愪氦缁欏悗绔殑鏁版嵁锛堝凡绉婚櫎鎬讳环瀛楁锛�:', submitData)
-  submitData.inboundNum = parseFloat(submitData.inboundNum) || 0
+  
   // 鏍规嵁褰撳墠鏍囩椤佃皟鐢ㄤ笉鍚岀殑鎻愪氦鎺ュ彛
   let apiCall
   if (activeTab.value === 'production') {
     // 鎴愬搧搴撳瓨浣跨敤 updateManagement 鎺ュ彛
     apiCall = updateManagement(submitData)
-  } else if (activeTab.value === 'manual') {
-    // 鏉愭枡搴撳瓨浣跨敤 updateManagementByCustom 鎺ュ彛
-    apiCall = updateManagementByCustom(submitData)
   } else {
     // 鍘熸枡搴撳瓨浣跨敤 updateManagementByCustom 鎺ュ彛
     apiCall = updateManagementByCustom(submitData)
   }
-
+  
   apiCall.then(res => {
     proxy.$modal.msgSuccess("鎻愪氦鎴愬姛")
     closeDia()
@@ -508,7 +417,6 @@
   proxy.resetForm("formRef")
   productionDialogVisible.value = false
   purchaseDialogVisible.value = false
-  manualDialogVisible.value = false
 }
 
 // 瀵煎嚭
@@ -526,8 +434,6 @@
     let exportUrl = "/stockin/exportCopy"
     if (activeTab.value === 'production') {
       exportUrl = "/stockin/exportCopyOne"
-    } else if (activeTab.value === 'manual') {
-      exportUrl = "/stockin/exportCopyTwo"
     }
     proxy.download(exportUrl, exportParams, '搴撳瓨淇℃伅.xlsx')
   }).catch(() => {
@@ -551,7 +457,7 @@
     type: 'warning',
   }
   ).then(() => {
-    delStockManage({ ids: ids }).then(res => {
+    delStockManage({ids:ids}).then(res => {
       proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛")
       getList()
     })
@@ -567,54 +473,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 +494,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