From d7393addacb96c1e5eb114ede852aa777df45232 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 10 五月 2023 11:18:34 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js               |   16 +++++++++++++---
 force-app/main/default/lwc/lexCancelApply/lexCancelApply.js                                   |   11 +++++++----
 force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js |    1 -
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js b/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js
index 04cee1d..e973f99 100644
--- a/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js
+++ b/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js
@@ -37,8 +37,7 @@
 	        label: 'this is the aria-label value',
 	        
 	    }).then(cancel=>{
-	  //   	this.IsLoading=false;
-			// this.dispatchEvent(new CloseActionScreenEvent());
+	    	
 	    	if(cancel) {
 	    		cancelApply({
 					taId : this.recordId
@@ -55,6 +54,9 @@
 
 					
 				});
+	    	} else {
+	    		this.IsLoading=false;
+				this.dispatchEvent(new CloseActionScreenEvent());
 	    	}
 	    	
 	    });
@@ -65,8 +67,9 @@
 	async cancelSubmit(){
 		if(this.cancelResult == '1') {
 			await this.showToast("",'鍙栨秷鎴愬姛',"success"); 
-			window.location.href = window.location;
-					
+			setTimeout(function(){
+				window.location.href = window.location;
+			}, 1500 )
 		} else {
 			console.log("result:",this.cancelResult);
 			await this.showToast("",this.cancelResult,"warning"); 	
diff --git a/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js b/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js
index 53d6086..8fa57d9 100644
--- a/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js
+++ b/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js
@@ -34,7 +34,6 @@
 		}).then(result => {
 			this.refreshResult = result;
 			
-			
 			this.cancelSubmit().then(res=>{
 				this.IsLoading=false;
 				this.dispatchEvent(new CloseActionScreenEvent());
diff --git a/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js b/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js
index 2a9ab34..4a51737 100644
--- a/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js
+++ b/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js
@@ -43,8 +43,11 @@
 	}
 	
 	cancelSubmit(){
+		
 		if (this.transferApplyPermission == false) {
 			this.showToast('','娌℃湁鎻愪氦鐢宠鐨勬潈闄�','warning');
+			this.IsLoading=false;
+			this.dispatchEvent(new CloseActionScreenEvent());
 		} else{
 			LightningConfirm.open({
 	            message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
@@ -55,14 +58,21 @@
 	    			submitApply({taId:this.recordId}).then(submitRes=>{
 						if(submitRes == '1'){
 							this.showToast('','鎻愪氦鎴愬姛','success');
-							window.location.href = window.location;
+							setTimeout(function(){
+								window.location.href = window.location;
+							}, 1500 );
 						}else{
 							this.showToast("",submitRes,"warning");
 						}
-						this.IsLoading=false;
-						this.dispatchEvent(new CloseActionScreenEvent());
+						
 					});	
+					this.IsLoading=false;
+					this.dispatchEvent(new CloseActionScreenEvent());
+	        	} else{
+	        		this.IsLoading=false;
+					this.dispatchEvent(new CloseActionScreenEvent());
 	        	}
+	        	
 	        });
 			
 		}		

--
Gitblit v1.9.1