From c1bf5ebfe65ee67c64da6e9e4e6f7c7dbb3e992e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 17 三月 2026 14:28:26 +0800
Subject: [PATCH] fix: 新增不合格原料库存时,没有皮重、毛重、净重、过磅日期、车牌号、过磅员输入框(不会存在不合格入库,把按钮屏蔽掉)

---
 src/views/inventoryManagement/receiptManagement/Record.vue |   49 +++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 43 insertions(+), 6 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index a477547..9ba8c41 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -73,6 +73,22 @@
         <el-table-column label="鍏ュ簱鏁伴噺"
                          prop="stockInNum"
                          show-overflow-tooltip/>
+        <el-table-column label="杞︾墝鍙�"
+                         prop="licensePlateNo"
+                         v-if="type === '0'"
+                         show-overflow-tooltip/>
+        <el-table-column label="姣涢噸(鍚�)"
+                         prop="grossWeight"
+                         v-if="type === '0'"
+                         show-overflow-tooltip/>
+        <el-table-column label="鐨噸(鍚�)"
+                         prop="tareWeight"
+                         v-if="type === '0'"
+                         show-overflow-tooltip/>
+        <el-table-column label="鍑�閲�(鍚�)"
+                         prop="netWeight"
+                         v-if="type === '0'"
+                         show-overflow-tooltip/>
         <el-table-column label="鍏ュ簱浜�"
                          prop="createBy"
                          show-overflow-tooltip/>
@@ -81,6 +97,23 @@
                          show-overflow-tooltip>
           <template #default="scope">
             {{ getRecordType(scope.row.recordType) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="杩囩鏃ユ湡"
+                         prop="weighingDate"
+                         v-if="type === '0'"
+                         show-overflow-tooltip/>
+        <el-table-column label="杩囩鍛�"
+                         prop="weighingOperator"
+                         v-if="type === '0'"
+                         show-overflow-tooltip/>
+        <el-table-column label="鎿嶄綔"
+                         width="120"
+                         align="center">
+          <template #default="scope">
+            <el-button type="primary"
+                       size="mini"
+                       @click="handlePreview(scope.row)">瀵煎嚭杩囩鍗�</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -109,8 +142,7 @@
   batchDeleteStockInRecords,
 } from "@/api/inventoryManagement/stockInRecord.js";
 import {
-  findAllQualifiedStockRecordTypeOptions,
-  findAllUnqualifiedStockRecordTypeOptions
+  findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
 } from "@/api/basicData/enum.js";
 
 const {proxy} = getCurrentInstance();
@@ -164,6 +196,7 @@
   const params = {...page, type: props.type};
   params.timeStr = searchForm.value.timeStr;
   params.productName = searchForm.value.productName;
+  params.recordType = searchForm.value.recordType;
   getStockInRecordListPage(params)
       .then(res => {
         tableData.value = res.data.records;
@@ -175,13 +208,13 @@
 // 鑾峰彇鏉ユ簮绫诲瀷閫夐」
 const fetchStockRecordTypeOptions = () => {
   if (props.type === '0') {
-    findAllQualifiedStockRecordTypeOptions()
+    findAllQualifiedStockInRecordTypeOptions()
         .then(res => {
           stockRecordTypeOptions.value = res.data;
         })
     return
   }
-  findAllUnqualifiedStockRecordTypeOptions()
+  findAllUnQualifiedStockInRecordTypeOptions()
       .then(res => {
         stockRecordTypeOptions.value = res.data;
       })
@@ -194,6 +227,11 @@
 
 const expandedRowKeys = ref([]);
 
+// 瀵煎嚭杩囩鍗�
+const handlePreview = (row) => {
+  proxy.$download.name(row.weighbridgeDocPath);
+}
+
 // 瀵煎嚭
 const handleOut = () => {
   ElMessageBox.confirm("鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
@@ -203,8 +241,7 @@
   })
       .then(() => {
         // 鏍规嵁涓嶅悓鐨� tab 绫诲瀷璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
-        let exportUrl = "/stockin/export";
-        proxy.download(exportUrl, {}, "鍏ュ簱鍙拌处.xlsx");
+        proxy.download("/stockInRecord/exportStockInRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍏ュ簱.xlsx" : "涓嶅悎鏍煎叆搴�.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");

--
Gitblit v1.9.3