From ddb0231ef7c5cf2bad9d3f1afc2f733674ad38a5 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 24 八月 2023 14:50:51 +0800
Subject: [PATCH] 再修理按钮

---
 force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js b/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
index 74a1baf..3392f9f 100644
--- a/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
+++ b/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
@@ -6,7 +6,7 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexBidAnnouncementRejectButton extends LightningElement {
-    @api recordId;
+    @api recordId;//OwnerId
     IsLoading = true;
     BidCancel = null;
 
@@ -36,7 +36,8 @@
                     recordId: this.recordId
                 }).then(requst=>{
                     if(requst == '1'){
-                        this.showToast("椹冲洖璇锋眰鎴愬姛","success");
+                        this.updateRecordView();
+                        this.dispatchEvent(new CloseActionScreenEvent());
                     }
                     if(requst != "1"){
                         var messageage = "";
@@ -47,19 +48,15 @@
             }
         })
     }
+    updateRecordView() {
+        updateRecord({fields: { Id: this.recordId }});
+    }
     showToast(msg,type) {
         const event = new ShowToastEvent({
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        if(type == 'success'){
-            this.updateRecordView();
-        }
         this.dispatchEvent(new CloseActionScreenEvent());
     }
-    updateRecordView() {
-        updateRecord({fields: { Id: this.recordId }});
-    }
-
 }
\ No newline at end of file

--
Gitblit v1.9.1