From e65bfa1d46d255f307eaa057665f01c8bde0e122 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 16 六月 2026 11:14:36 +0800
Subject: [PATCH] 君歌 1.端口修改

---
 src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js |   35 ++++++++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
index 9442a5a..31a34f8 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
@@ -13,6 +13,7 @@
 import { getQuotationList } from "@/api/salesManagement/salesQuotation.js";
 import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger.js";
 import { getDeliveryDetailByShippingNo } from "@/api/salesManagement/deliveryLedger.js";
+import { ledgerListPage, getSalesLedgerWithProducts } from "@/api/salesManagement/salesLedger.js";
 import useUserStore from "@/store/modules/user";
 import { Search } from "@element-plus/icons-vue";
 import { ElMessage, ElMessageBox } from "element-plus";
@@ -226,7 +227,7 @@
         fetchBusinessTypeOptions(),
         listApprovalTemplate(TEMPLATE_TYPE_CUSTOM),
       ]);
-      submitBusinessTypeOptions.value = typeOptions.filter((x) => ![5, 6, 7].includes(x.value));
+      submitBusinessTypeOptions.value = typeOptions.filter((x) => ![5, 6, 7, 19].includes(x.value));
       allSubmitTemplates.value = unwrapTemplateList(customRes)
         .filter((row) => mapEnabledFromApi(row.enabled))
         .map(mapSubmitTemplateCard);
@@ -324,6 +325,22 @@
       }
     }
     
+    // 閿�鍞鎵癸細鐢� quotationNo锛堥攢鍞悎鍚屽彿锛夊幓鏌ラ攢鍞彴璐﹁鎯�
+    else if (row.businessType === 19) {
+      const salesContractNo = row?.quotationNo;
+      if (salesContractNo) {
+        const listRes = await ledgerListPage({ salesContractNo });
+        const records = listRes?.records || listRes?.data || [];
+        const ledger = Array.isArray(records) ? records[0] : null;
+        if (ledger?.id) {
+          const detail = await getSalesLedgerWithProducts({ id: ledger.id, type: 1 });
+          detailData.value = detail || ledger;
+        } else {
+          detailData.value = ledger || {};
+        }
+      }
+    }
+
     // 鍏朵粬瀹℃壒绫诲瀷
     else {
       detailData.value = {};
@@ -369,6 +386,22 @@
       }
     }
 
+    // 閿�鍞鎵癸細鐢� quotationNo锛堥攢鍞悎鍚屽彿锛夊幓鏌ラ攢鍞彴璐﹁鎯�
+    else if (row.businessType === 19) {
+      const salesContractNo = row?.quotationNo;
+      if (salesContractNo) {
+        const listRes = await ledgerListPage({ salesContractNo });
+        const records = listRes?.records || listRes?.data || [];
+        const ledger = Array.isArray(records) ? records[0] : null;
+        if (ledger?.id) {
+          const detail = await getSalesLedgerWithProducts({ id: ledger.id, type: 1 });
+          detailData.value = detail || ledger;
+        } else {
+          detailData.value = ledger || {};
+        }
+      }
+    }
+
     // 鍏朵粬瀹℃壒绫诲瀷
     else {
       detailData.value = {};

--
Gitblit v1.9.3