From d29f75b84fccd06917fb8e2c2ee70e9d76f868cd Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 11 四月 2024 20:15:54 +0800
Subject: [PATCH] 123

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

diff --git a/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js b/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
index 74a1baf..98f7446 100644
--- a/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
+++ b/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
@@ -6,8 +6,11 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexBidAnnouncementRejectButton extends LightningElement {
-    @api recordId;
+    @api recordId;//OwnerId
+    ownerId;//鎵�鏈変汉id
+    id;//杩斿洖鍊肩殑id
     IsLoading = true;
+    arrMessage = [];
     BidCancel = null;
 
     @wire(CurrentPageReference)
@@ -21,13 +24,15 @@
          }
      }
     
+
     connectedCallback(){
         this.IsLoading = false;
         this.Reject();
     }
-    //涓爣閫氱煡涔� 椹冲洖
+
     Reject(){
         UserInfo_Owner().then(res=>{
+            console.log(res);
             this.BidCancel = res.BidCancel;
             if(this.BidCancel == false){
                 this.showToast('娌℃湁椹冲洖鐨勬潈闄�',"error");
@@ -47,6 +52,12 @@
             }
         })
     }
+
+
+    updateRecordView() {
+        updateRecord({fields: { Id: this.recordId }});
+    }
+
     showToast(msg,type) {
         const event = new ShowToastEvent({
             message: msg,
@@ -58,8 +69,25 @@
         }
         this.dispatchEvent(new CloseActionScreenEvent());
     }
-    updateRecordView() {
-        updateRecord({fields: { Id: this.recordId }});
-    }
+}
 
-}
\ No newline at end of file
+// if ('{!$User.BidCancel__c}' == 'false') {
+//     alert("娌℃湁椹冲洖鐨勬潈闄�");
+//     } else {
+//     var Bid_Announcement = new sforce.SObject("Bid_Announcement__c");
+//     Bid_Announcement.Id = "{!Bid_Announcement__c.Id}";
+//     Bid_Announcement.Status__c = "鑽夋涓�";
+//     Bid_Announcement.Complete__c = "false";
+//     Bid_Announcement.Agree_user__c = null;
+//     Bid_Announcement.Complete_date__c = null;
+//     Bid_Announcement.Request_flag__c = "false";
+//     Bid_Announcement.Request_user__c = null;
+//     Bid_Announcement.Request_date__c = null;
+    
+//     var result = sforce.connection.update([Bid_Announcement]);
+//     var messages = getConnectDMLErrorMessages(result);
+//     if (messages.length > 0) {
+//     alert(messages.join("\n"));
+//     }
+//     location.reload();
+//     }
\ No newline at end of file

--
Gitblit v1.9.1