From 3e87b6c32c4b63edcacbdf80e7d26189d40db573 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 21 十一月 2025 15:20:01 +0800
Subject: [PATCH] 1.新疆-出库台账页面修改

---
 src/views/procurementManagement/procurementLedger/index.vue |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 5165df7..acbedab 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -53,7 +53,7 @@
         show-summary
         :summary-method="summarizeMainTable"
         @expand-change="expandChange"
-        height="calc(100vh - 18.5em)"
+        height="calc(100vh - 19em)"
       >
         <el-table-column align="center" type="selection" width="55" />
         <el-table-column type="expand">
@@ -155,7 +155,6 @@
               type="primary"
               size="small"
               @click="openForm('edit', scope.row)"
-							:disabled="scope.row.receiptPaymentAmount>0 || scope.row.recorderName !== userStore.nickName"
               >缂栬緫</el-button
             >
             <el-button
@@ -1152,10 +1151,15 @@
   });
 };
 const getModels = (value) => {
-  productForm.value.productCategory = findNodeById(productOptions.value, value);
-  modelList({ id: value }).then((res) => {
-    modelOptions.value = res;
-  });
+  if (value) {
+    productForm.value.productCategory = findNodeById(productOptions.value, value) || "";
+    modelList({ id: value }).then((res) => {
+      modelOptions.value = res;
+    });
+  } else {
+    productForm.value.productCategory = "";
+    modelOptions.value = [];
+  }
 };
 const getProductModel = (value) => {
   const index = modelOptions.value.findIndex((item) => item.id === value);
@@ -1170,12 +1174,12 @@
 const findNodeById = (nodes, productId) => {
   for (let i = 0; i < nodes.length; i++) {
     if (nodes[i].value === productId) {
-      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣鐨刲abel
     }
     if (nodes[i].children && nodes[i].children.length > 0) {
       const foundNode = findNodeById(nodes[i].children, productId);
       if (foundNode) {
-        return foundNode.label; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+        return foundNode; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝鐩存帴杩斿洖锛堝凡缁忔槸label瀛楃涓诧級
       }
     }
   }

--
Gitblit v1.9.3