From 6749fc51f07d9824640c4c2508ff242b8850a323 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 21 四月 2026 10:44:01 +0800
Subject: [PATCH] 湟水峡 1.bug修改
---
src/views/inventoryManagement/dispatchLog/Record.vue | 39 ++++++++++++++++++++-------------------
1 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 1637226..30f4670 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -129,10 +129,9 @@
const total = ref(0);
const props = defineProps({
- type: {
- type: String,
- required: true,
- default: '0'
+ productId: {
+ type: [String, Number],
+ default: ''
}
})
@@ -163,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;
@@ -183,17 +182,20 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
- if (props.type === '0') {
- findAllQualifiedStockOutRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
- return
- }
- findAllUnQualifiedStockOutRecordTypeOptions()
- .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;
+ });
}
// 琛ㄦ牸閫夋嫨鏁版嵁
@@ -212,7 +214,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/stockOutRecord/exportStockOutRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍑哄簱鍙拌处.xlsx" : "涓嶅悎鏍煎嚭搴撳彴璐�.xlsx");
+ proxy.download("/stockOutRecord/exportStockOutRecord", { topParentProductId: props.productId }, "鍑哄簱鍙拌处.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -405,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>
@@ -417,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