From ccb00a17b9119200b8c8d29a177bcc129dd4c982 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 19 三月 2026 17:43:13 +0800
Subject: [PATCH] Merge branch 'dev_KTHG' of http://114.132.189.42:9002/r/product-inventory-management into dev_KTHG

---
 src/views/inventoryManagement/receiptManagement/Record.vue |   83 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 69 insertions(+), 14 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index 3000a8e..9de4963 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -22,8 +22,8 @@
                   clearable>
           <el-option v-for="item in stockRecordTypeOptions"
                      :key="item.value"
-                     :label="item.value"
-                     :value="item.key"/>
+                     :label="item.label"
+                     :value="item.value"/>
         </el-select>
         <el-button type="primary"
                    @click="handleQuery"
@@ -54,6 +54,10 @@
                          label="搴忓彿"
                          type="index"
                          width="60"/>
+        <el-table-column label="浜у搧绫诲瀷"
+                         prop="productType"
+                         width="100"
+                         show-overflow-tooltip/>
         <el-table-column label="鍏ュ簱鎵规"
                          prop="inboundBatches"
                          width="280"
@@ -73,6 +77,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/>
@@ -83,13 +103,33 @@
             {{ 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 v-if="scope.row.recordType === '0'"
+                       type="primary"
+                       size="mini"
+                       @click="handlePreview(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="pageProductChange"/>
+      <div style="margin-top: 12px; display: flex; justify-content: flex-end;">
+        <pagination v-show="total > 0"
+                    :total="total"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :page="page.current"
+                    :limit="page.size"
+                    @pagination="pageProductChange"/>
+      </div>
     </div>
   </div>
 </template>
@@ -108,7 +148,9 @@
   getStockInRecordListPage,
   batchDeleteStockInRecords,
 } from "@/api/inventoryManagement/stockInRecord.js";
-import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
+import {
+  findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
+} from "@/api/basicData/enum.js";
 
 const {proxy} = getCurrentInstance();
 
@@ -127,7 +169,7 @@
 const stockRecordTypeOptions = ref([]);
 const page = reactive({
   current: 1,
-  size: 100,
+  size: 10,
 });
 const total = ref(0);
 
@@ -147,7 +189,7 @@
 };
 
 const getRecordType = (recordType) => {
-  return stockRecordTypeOptions.value.find(item => item.key === recordType)?.value || ''
+  return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
 }
 
 const pageProductChange = obj => {
@@ -161,9 +203,11 @@
   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;
+        total.value = res.data.total ?? 0;
       }).finally(() => {
     tableLoading.value = false;
   })
@@ -171,7 +215,14 @@
 
 // 鑾峰彇鏉ユ簮绫诲瀷閫夐」
 const fetchStockRecordTypeOptions = () => {
-  findAllStockRecordTypeOptions()
+  if (props.type === '0') {
+    findAllQualifiedStockInRecordTypeOptions()
+        .then(res => {
+          stockRecordTypeOptions.value = res.data;
+        })
+    return
+  }
+  findAllUnQualifiedStockInRecordTypeOptions()
       .then(res => {
         stockRecordTypeOptions.value = res.data;
       })
@@ -184,6 +235,11 @@
 
 const expandedRowKeys = ref([]);
 
+// 瀵煎嚭杩囩鍗�
+const handlePreview = (row) => {
+  proxy.$download.name(row.weighbridgeDocPath);
+}
+
 // 瀵煎嚭
 const handleOut = () => {
   ElMessageBox.confirm("鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
@@ -193,8 +249,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