From f9adfa16fdf2012e915908ea1fed19f75d5107a4 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 30 五月 2026 17:14:02 +0800
Subject: [PATCH] 新疆马铃薯 1.报价提交问题

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

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
index 3f0e99c..f61e038 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
@@ -86,6 +86,11 @@
   const approveOpinion = ref("");
   const approveSubmitting = ref(false);
 
+  /** 鎶ヤ环/閲囪喘/鍙戣揣璇︽儏鍔犺浇鐘舵�� */
+  const quotationLoading = ref(false);
+  const purchaseLoading = ref(false);
+  const deliveryLoading = ref(false);
+
   /** 宸梾/璐圭敤鎶ラ攢涓撶敤璇︽儏銆佸鎵瑰脊绐� */
   const reimburseDialog = reactive({
     visible: false,
@@ -294,31 +299,53 @@
     }
     
     detailRow.value = { ...row };
+    const bizType = Number(row.businessType);
     // 鎶ヤ环瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"鎶ヤ环鍗曞彿"鍘绘煡鎶ヤ环鍒楄〃
-    if (row.businessType === 6) {
+    if (bizType === 6) {
       const quotationNo = row?.quotationNo;
       if (quotationNo) {
-        const res = await getQuotationList({ quotationNo });
-        const records = res?.data?.records || [];
-        detailData.value = records[0] || {};
+        quotationLoading.value = true;
+        try {
+          const res = await getQuotationList({ quotationNo });
+          const records = res?.data?.records || [];
+          detailData.value = records[0] || {};
+        } finally {
+          quotationLoading.value = false;
+        }
+      } else {
+        detailData.value = {};
       }
     }
     
     // 閲囪喘瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"閲囪喘鍚堝悓鍙�"鍘绘煡閲囪喘璇︽儏
-    else if (row.businessType === 5) {
+    else if (bizType === 5) {
       const purchaseContractNumber = row?.purchaseContractNumber;
       if (purchaseContractNumber) {
-        const res = await getPurchaseByCode({ purchaseContractNumber });
-        detailData.value = res || {};
+        purchaseLoading.value = true;
+        try {
+          const res = await getPurchaseByCode({ purchaseContractNumber });
+          detailData.value = res || {};
+        } finally {
+          purchaseLoading.value = false;
+        }
+      } else {
+        detailData.value = {};
       }
     }
     
     // 鍙戣揣瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"鍙戣揣鍗曞彿"鍘绘煡鍙戣揣璇︽儏
-    else if (row.businessType === 7) {
+    else if (bizType === 7) {
       const shippingNo = row?.shippingNo;
       if (shippingNo) {
-        const res = await getDeliveryDetailByShippingNo({ shippingNo });
-        detailData.value = res?.data || res || {};
+        deliveryLoading.value = true;
+        try {
+          const res = await getDeliveryDetailByShippingNo({ shippingNo });
+          detailData.value = res?.data || res || {};
+        } finally {
+          deliveryLoading.value = false;
+        }
+      } else {
+        detailData.value = {};
       }
     }
     
@@ -339,31 +366,53 @@
     }
     approveDialog.row = { ...row };
     approveOpinion.value = "";
+    const bizType = Number(row.businessType);
     // 鎶ヤ环瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"鎶ヤ环鍗曞彿"鍘绘煡鎶ヤ环鍒楄〃
-    if (row.businessType === 6) {
+    if (bizType === 6) {
       const quotationNo = row?.quotationNo;
       if (quotationNo) {
-        const res = await getQuotationList({ quotationNo });
-        const records = res?.data?.records || [];
-        detailData.value = records[0] || {};
+        quotationLoading.value = true;
+        try {
+          const res = await getQuotationList({ quotationNo });
+          const records = res?.data?.records || [];
+          detailData.value = records[0] || {};
+        } finally {
+          quotationLoading.value = false;
+        }
+      } else {
+        detailData.value = {};
       }
     }
 
     // 閲囪喘瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"閲囪喘鍚堝悓鍙�"鍘绘煡閲囪喘璇︽儏
-    else if (row.businessType === 5) {
+    else if (bizType === 5) {
       const purchaseContractNumber = row?.purchaseContractNumber;
       if (purchaseContractNumber) {
-        const res = await getPurchaseByCode({ purchaseContractNumber });
-        detailData.value = res || {};
+        purchaseLoading.value = true;
+        try {
+          const res = await getPurchaseByCode({ purchaseContractNumber });
+          detailData.value = res || {};
+        } finally {
+          purchaseLoading.value = false;
+        }
+      } else {
+        detailData.value = {};
       }
     }
 
     // 鍙戣揣瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"鍙戣揣鍗曞彿"鍘绘煡鍙戣揣璇︽儏
-    else if (row.businessType === 7) {
+    else if (bizType === 7) {
       const shippingNo = row?.shippingNo;
       if (shippingNo) {
-        const res = await getDeliveryDetailByShippingNo({ shippingNo });
-        detailData.value = res?.data || res || {};
+        deliveryLoading.value = true;
+        try {
+          const res = await getDeliveryDetailByShippingNo({ shippingNo });
+          detailData.value = res?.data || res || {};
+        } finally {
+          deliveryLoading.value = false;
+        }
+      } else {
+        detailData.value = {};
       }
     }
 
@@ -658,6 +707,9 @@
     detailDialog,
     detailRow,
     detailData,
+    quotationLoading,
+    purchaseLoading,
+    deliveryLoading,
     reimburseDialog,
     approveDialog,
     approveOpinion,

--
Gitblit v1.9.3