From 14395f28e3cf84802a6b76a8ab8a5c9b082dfd35 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 28 一月 2026 09:35:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New

---
 src/views/inventoryManagement/receiptManagement/Record.vue |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index 3000a8e..b74ffc4 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"
@@ -108,7 +108,10 @@
   getStockInRecordListPage,
   batchDeleteStockInRecords,
 } from "@/api/inventoryManagement/stockInRecord.js";
-import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
+import {
+  findAllQualifiedStockRecordTypeOptions,
+  findAllUnqualifiedStockRecordTypeOptions
+} from "@/api/basicData/enum.js";
 
 const {proxy} = getCurrentInstance();
 
@@ -147,7 +150,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,6 +164,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;
@@ -171,7 +175,14 @@
 
 // 鑾峰彇鏉ユ簮绫诲瀷閫夐」
 const fetchStockRecordTypeOptions = () => {
-  findAllStockRecordTypeOptions()
+  if (props.type === '0') {
+    findAllQualifiedStockRecordTypeOptions()
+        .then(res => {
+          stockRecordTypeOptions.value = res.data;
+        })
+    return
+  }
+  findAllUnqualifiedStockRecordTypeOptions()
       .then(res => {
         stockRecordTypeOptions.value = res.data;
       })
@@ -193,8 +204,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