From cdf7a13c47458e9e7acc71c844bb20654f2c9c8c Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 06 七月 2023 11:12:50 +0800
Subject: [PATCH] 分配画面

---
 force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js   |   22 ++++++++++++++++------
 force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html |    2 +-
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html
index 7063605..d2c3546 100644
--- a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html
+++ b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html
@@ -2,7 +2,7 @@
   <div class="holder" if:true={IsLoading}>
       <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
   </div>
-  <div if:false={IsLoading} class="toast">
+  <div if:true={IsShow} class="toast">
     <span style="padding: 10px;">{msg}</span>
     <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
                 <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js
index 3c2f3ba..6127b72 100644
--- a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js
+++ b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js
@@ -6,6 +6,9 @@
 export default class lexRentalFixtureSetAssign extends LightningElement {
 	@api recordId
 	msg;
+	IsLoading = true;
+	IsShow = false;
+
 	@wire(CurrentPageReference)
 	getStateParameters(currentPageReference){
 		console.log("杩涘叆椤甸潰");
@@ -22,19 +25,20 @@
 		init({
 			recordId:this.recordId
 		}).then(result =>{
-			console.log(this.recordId);
-			console.log(result);
+			this.IsLoading = false;
 			let res = result.ra;
 			console.log("res==="+JSON.stringify(res));
 			if(res.Campaign__c != '' || res.Campaign__c != undefined){
 				if(res.CampaignStatus == '鍙栨秷'){
+					this.IsShow = true;
 					this.msg = '瀛︿細鍙栨秷锛屼笉鍙垎閰�';
 					return;
 				}
 			}
-
 			if(res.Repair__c != '' || res.Repair__c != undefined){
-				if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
+				if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' || 
+					(res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
+					this.IsShow = true;
 					this.msg = '淇悊鏈夋渶缁堟娴嬫棩鎴栦慨鐞嗗搧杩旈�佹棩锛屼笉鍙垎閰�';
 					return;
 				}
@@ -46,16 +50,22 @@
 				if(res.Status__c == '鍙栨秷' && res.Rental_Apply_Equipment_Set_Cnt__c != 0){
 					window.open("/apex/RentalFixtureSetAssign?pt_recid=" + this.recordId); 
 					this.closeAction();
-				}else if((res.demo_purpose2__c == '瀛︿細灞曚細' || res.demo_purpose2__c == '璇鹃鐮旂┒' || res.demo_purpose2__c == '鍩硅涓績')&& res.Status__c == '鑽夋涓�'){
+				}else if((res.demo_purpose2__c == '瀛︿細灞曚細' || res.demo_purpose2__c == '璇鹃鐮旂┒' || res.demo_purpose2__c == '鍩硅涓績')
+					&& res.Status__c == '鑽夋涓�'){
+					this.IsShow = true;
 					this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
 					return
-				}else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙' || res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣') && res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
+				}else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙' 
+					|| res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣') 
+					&& res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
+					this.IsShow = true;
 					this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
 					return;
 				}else if(resultMsg == 'Fin'){
 					window.open("/apex/RentalFixtureSetAssign?pt_recid=" + this.recordId); 
 					this.closeAction();
 				}else{
+					this.IsShow = true;
 					this.msg = resultMsg;
 					return;
 				}

--
Gitblit v1.9.1