From d476be7eda60a04e0cbbc28c5aa048dfceffd789 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 03 七月 2026 15:39:23 +0800
Subject: [PATCH] 新增采购退货后,如果对应的采购退货审批也通过,采购退货记录不能删除,删除按钮置灰

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

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
index 3f0e99c..737e2de 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
@@ -140,7 +140,7 @@
 
   const tableColumn = ref([
     // { label: "鐢宠浜虹紪鍙�", prop: "applicantNo", width: 110 },
-    { label: "鐢宠浜哄悕绉�", prop: "applicantName", minWidth: 100 },
+    { label: "鍙戣捣浜�", prop: "applicantName", minWidth: 100 },
     { label: "妯℃澘绫诲瀷", prop: "businessName", minWidth: 120 },
     {
       label: "瀹℃壒绫诲瀷",
@@ -154,7 +154,9 @@
       prop: "unread",
       width: 90,
       align: "center",
+      dataType: "tag",
       formatData: (v) => (v ? "鏄�" : "鍚�"),
+      formatType: (v) => (v ? "success" : "danger"),
     },
     {
       label: "瀹℃壒鐘舵��",
@@ -190,11 +192,11 @@
           disabled: (row) => row.approvalStatus !== "pending" || !row.isApprove,
           clickFun: (row) => openApprove(row),
         },
-        {
-          name: "鍒犻櫎",
-          type: "danger",
-          clickFun: (row) => removeInstance(row),
-        },
+        // {
+        //   name: "鍒犻櫎",
+        //   type: "danger",
+        //   clickFun: (row) => removeInstance(row),
+        // },
       ],
     },
   ]);
@@ -308,7 +310,10 @@
     else if (row.businessType === 5) {
       const purchaseContractNumber = row?.purchaseContractNumber;
       if (purchaseContractNumber) {
-        const res = await getPurchaseByCode({ purchaseContractNumber });
+        const res = await getPurchaseByCode({
+          purchaseContractNumber,
+          approvalInstanceId: row?.id,
+        });
         detailData.value = res || {};
       }
     }
@@ -353,7 +358,10 @@
     else if (row.businessType === 5) {
       const purchaseContractNumber = row?.purchaseContractNumber;
       if (purchaseContractNumber) {
-        const res = await getPurchaseByCode({ purchaseContractNumber });
+        const res = await getPurchaseByCode({
+          purchaseContractNumber,
+          approvalInstanceId: row?.id,
+        });
         detailData.value = res || {};
       }
     }
@@ -697,4 +705,4 @@
     openApprove,
     fetchApprovalList,
   };
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3