From 28efa940c280a4f84f0f24b8e4fc92a173af29e2 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 16 三月 2026 13:47:15 +0800
Subject: [PATCH] fix: 修正前端报错
---
src/views/procurementManagement/procurementLedger/index.vue | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index a1fcdfb..b333e8d 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -233,7 +233,7 @@
<el-option v-for="item in supplierList"
:key="item.id"
:label="item.supplierName"
- :value="item.id" />
+ :value="item.id" >{{item.supplierName + '---' + item.supplierType}}</el-option>
</el-select>
</el-form-item>
</el-col>
@@ -1532,10 +1532,26 @@
};
const getProductOptions = () => {
return productTreeList().then(res => {
- productOptions.value = convertIdToValue(res);
+ const tree = convertIdToValue(res);
+ productOptions.value = filterOutSemiFinished(tree);
return res;
});
};
+
+ const filterOutSemiFinished = (nodes = []) => {
+ return (nodes || [])
+ .filter(node => {
+ const label = String(node?.label ?? "");
+ return !label.includes("鍗婃垚鍝�");
+ })
+ .map(node => {
+ const next = { ...node };
+ if (next.children && next.children.length > 0) {
+ next.children = filterOutSemiFinished(next.children);
+ }
+ return next;
+ });
+ };
const getModels = value => {
if (value) {
productForm.value.productCategory =
--
Gitblit v1.9.3