From d5d810af942c23a1009857477a545a9a2dc134b5 Mon Sep 17 00:00:00 2001
From: KKbes <1620284052@qq.com>
Date: 星期三, 28 六月 2023 10:17:19 +0800
Subject: [PATCH] button selfReview
---
force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js | 54 ++++++++++++++++++++++++++++--------------------------
1 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js b/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js
index 21c94ae..5333b66 100644
--- a/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js
+++ b/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js
@@ -18,8 +18,7 @@
@api recordId;
-
-
+ IsLoading=true;
OPDPlan__c;
currentUserProfileId;
error;
@@ -53,39 +52,42 @@
async connectedCallback(){
- await init({
+ await init({
recordId: this.recordId
}).then(result=>{
this.OPDPlan__c=result;
- this.NoReportApplication();
+ this.NoReportApplication().then(result=>{
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ });
}).catch(error=>{
- console.log("error");
- console.log(error);
+ const eventError = new ShowToastEvent({
+ title: '椤甸潰鍒濆鍖栭敊璇�',
+ message:
+ error.message,
+ });
+ this.dispatchEvent(eventError);
});
}
async NoReportApplication() {
-
-
- //OPD璁″垝鐘舵��
- var status = this.OPDPlan__c.Status__c;
- this.NotSupportProfileId= await getProfileIdByName({Name : "绯荤粺绠$悊鍛�"});
- //褰撳墠鐢ㄦ埛绠�妗d
- var ProfileId = this.currentUserProfileId;
- //璺宠繃绯荤粺绠$悊鍛�
- if(status !='寰呮彁浜ゆ姤鍛�'&& ProfileId != this.NotSupportProfileId){
- this.dispatchEvent(new CloseActionScreenEvent());
- this.dispatchEvent(event);
- return;
- }
- else{
- this.dispatchEvent(new CloseActionScreenEvent());
- window.open ('/apex/OPDNoReportApplication?id='+this.OPDPlan__c.Id+'&name='+this.OPDPlan__c.Name, '鏃犳姤鍛婄敵璇�',
- 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
-
- }
- }
+ //OPD璁″垝鐘舵��
+ var status = this.OPDPlan__c.Status__c;
+ this.NotSupportProfileId= await getProfileIdByName({Name : "绯荤粺绠$悊鍛�"});
+ //褰撳墠鐢ㄦ埛绠�妗d
+ var ProfileId = this.currentUserProfileId;
+ //璺宠繃绯荤粺绠$悊鍛�
+ if(status !='寰呮彁浜ゆ姤鍛�'&& ProfileId != this.NotSupportProfileId){
+ this.dispatchEvent(event);
+ return;
+ }
+ else{
+ window.open ('/apex/OPDNoReportApplication?id='+this.OPDPlan__c.Id+'&name='+this.OPDPlan__c.Name, '鏃犳姤鍛婄敵璇�',
+ 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
+
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1