From c7aebff7f6184b2d8da2669d2db5656e2bc09ec4 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 21 四月 2026 15:49:45 +0800
Subject: [PATCH] 湟水峡 1.反馈登记删减字段 2.售后服务字段匹配错误问题

---
 src/views/inventoryManagement/dispatchLog/Record.vue |   42 ++++++++++++++++++++++++++----------------
 1 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 48f5c10..30f4670 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -19,8 +19,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" style="margin-left: 10px"
 				>鎼滅储</el-button
@@ -111,7 +111,9 @@
 	getStockOutPage,
 	delStockOut,
 } from "@/api/inventoryManagement/stockOut.js";
-import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
+import {
+  findAllQualifiedStockOutRecordTypeOptions, findAllUnQualifiedStockOutRecordTypeOptions,
+} from "@/api/basicData/enum.js";
 
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
@@ -127,10 +129,9 @@
 const total = ref(0);
 
 const props = defineProps({
-  type: {
-    type: String,
-    required: true,
-    default: '0'
+  productId: {
+    type: [String, Number],
+    default: ''
   }
 })
 
@@ -161,7 +162,7 @@
 };
 const getList = () => {
 	tableLoading.value = true;
-	getStockOutPage({ ...searchForm.value, ...page, type: props.type })
+	getStockOutPage({ ...searchForm.value, ...page, topParentProductId: props.productId })
 		.then((res) => {
 			tableLoading.value = false;
 			tableData.value = res.data.records;
@@ -176,15 +177,25 @@
 };
 
 const getRecordType = (recordType) => {
-  return stockRecordTypeOptions.value.find(item => item.key === recordType)?.value || ''
+  return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
 }
 
 // 鑾峰彇鏉ユ簮绫诲瀷閫夐」
 const fetchStockRecordTypeOptions = () => {
-  findAllStockRecordTypeOptions()
-      .then(res => {
-        stockRecordTypeOptions.value = res.data;
-      })
+  // 鍚屾椂鑾峰彇鍚堟牸鍜屼笉鍚堟牸鐨勬潵婧愮被鍨嬮�夐」
+  Promise.all([
+    findAllQualifiedStockOutRecordTypeOptions(),
+    findAllUnQualifiedStockOutRecordTypeOptions()
+  ]).then(([qualifiedRes, unQualifiedRes]) => {
+    const qualified = qualifiedRes.data || [];
+    const unQualified = unQualifiedRes.data || [];
+    // 鍚堝苟骞跺幓閲�
+    const allOptions = [...qualified, ...unQualified];
+    const uniqueOptions = allOptions.filter((item, index, self) =>
+      index === self.findIndex((t) => t.value === item.value)
+    );
+    stockRecordTypeOptions.value = uniqueOptions;
+  });
 }
 
 // 琛ㄦ牸閫夋嫨鏁版嵁
@@ -203,7 +214,7 @@
 		type: "warning",
 	})
 		.then(() => {
-			proxy.download("/stockmanagement/export", {}, "鍑哄簱鍙拌处.xlsx");
+			proxy.download("/stockOutRecord/exportStockOutRecord", { topParentProductId: props.productId }, "鍑哄簱鍙拌处.xlsx");
 		})
 		.catch(() => {
 			proxy.$modal.msg("宸插彇娑�");
@@ -396,7 +407,6 @@
       <div class="print-page">
         <div class="delivery-note">
           <div class="header">
-            <div class="company-name">榧庤瘹鐟炲疄涓氭湁闄愯矗浠诲叕鍙�</div>
             <div class="document-title">闆跺敭鍙戣揣鍗�</div>
           </div>
           
@@ -408,7 +418,7 @@
               </div>
               <div>
                 <span class="label">瀹㈡埛鍚嶇О锛�</span>
-                <span class="value">${item.supplierName || '寮犵埍鏈�'}</span>
+                <span class="value">${item.supplierName}</span>
               </div>
             </div>
             <div class="info-row">

--
Gitblit v1.9.3