From 35910c355f74e736e2068a0ffb7f39ae9615d8e1 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 24 五月 2024 16:29:00 +0800
Subject: [PATCH] 1
---
force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js b/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
index 24650e9..90dbf6a 100644
--- a/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
+++ b/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
@@ -1,6 +1,7 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
import updateOpportunityInformation from '@salesforce/apex/UpdateTenderInformationBatch.updateOpportunityInformation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
@@ -32,7 +33,11 @@
this.EnquiryButton();
this.dispatchEvent(new CloseActionScreenEvent());
}
- })
+ }).catch(error => {
+ console.log("error"+error);
+ }).finally(() => {
+
+ });
}
//鎷涙爣椤圭洰 鍙嶅簲璇环鐘舵��
EnquiryButton(){
@@ -43,20 +48,45 @@
var listss = [];
listss.push(this.id);
updateOpportunityInformation({TenderIdList : listss}).then(result=>{
+ console.log(result,'璧板紑浜嗗悧锛�')
if(result != 'OK'){
this.showToast(result,'error');
}else {
+ console.log('鐑�')
+ // alert('鍙嶆槧瀹屼簡');
this.showToast('鍙嶆槧瀹屼簡','success');
}
})
}
showToast(msg,type) {
+ console.log(msg,type);
const event = new ShowToastEvent({
message: msg,
variant: type
});
+ console.log('鎻愮ず妗嗕笉鑳界敤浜嗗悧锛�');
this.dispatchEvent(event);
this.dispatchEvent(new CloseActionScreenEvent());
}
-}
\ No newline at end of file
+}
+
+// var foo = function(){
+// if('{!Tender_information__c.IsRelateProject__c}'== "鍚�"){
+// alert('鎷涙姇鏍囬」鐩笉鐩稿叧鍚庝笉鑳藉弽搴旇浠风姸鎬�!');
+// return;
+// }
+// var listss = [];
+// listss.push('{!Tender_information__c.Id}');
+// var rtn = sforce.apex.execute("UpdateTenderInformationBatch", "updateOpportunityInformation", {TenderIdList : listss } );
+
+// if(rtn != 'OK'){
+// alert(rtn);
+// }else {
+// alert('鍙嶆槧瀹屼簡');
+// }
+// //閲嶆柊鍔犺浇椤甸潰
+// window.location.reload();
+// }
+
+// foo();
\ No newline at end of file
--
Gitblit v1.9.1