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/lexFinLibrary3/lexFinLibrary3.js                               |   24 +----
 force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.html           |    4 
 /dev/null                                                                                 |   11 --
 force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.html             |    4 
 force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.html |    4 
 force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.js   |    2 
 force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.js                                 |    4 
 force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js                                 |   29 ++-----
 force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.js             |   22 ++---
 force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.js                               |   27 +-----
 force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js               |   54 +++++++------
 force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.html                               |    4 
 12 files changed, 75 insertions(+), 114 deletions(-)

diff --git a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
index 576fe17..968318a 100644
--- a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
+++ b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
@@ -6,21 +6,18 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexFinLibrary extends LightningElement {
 
-		@api recordId;
-		IsLoading;
-		Bulletin_Board__c;
+	@api recordId;
+	IsLoading=true;
+	Bulletin_Board__c;
 
 
-		@wire(CurrentPageReference)
+	@wire(CurrentPageReference)
     getStateParameters(currentPageReference){
     	if(currentPageReference){
-    		console.log(currentPageReference);
-    		console.log("杩涘叆鑾峰彇page鍙傛暟")
     		const IdValue=currentPageReference.state.recordId;
     		if(IdValue){
     			let str=`${IdValue}`;
     			this.recordId=str;
-    			console.log("recordId="+str);
     		}
     	}
     }
@@ -29,20 +26,13 @@
     connectedCallback(){
         getBulletinBoard({recordId:this.recordId}).then(res=>{
         	if(res!=null){
-        	this.IsLoading=false;
-        	console.log("res");
-        	console.log(res);
-        	console.log("杩涘叆鍒濆鍖栧璞″叾浠栧睘鎬�");
-        	this.Bulletin_Board__c=res;
-        	console.log(this.Bulletin_Board__c);
-            this.FinLibrary();
-    	}
-    	else{
-    		 var a="娌¤繘鏂规硶";
- 			console.log(a);
+            	this.Bulletin_Board__c=res;
+                this.FinLibrary().then(result=>{
+                    this.IsLoading=false;
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                });
     	}
     }).catch(error =>{
-    	console.log("error");
     	console.log(error.message);
     }).finally(()=>{
 
@@ -50,7 +40,6 @@
     }
 
     async FinLibrary(){
-        this.dispatchEvent(new CloseActionScreenEvent());
     	window.open(this.Bulletin_Board__c.iPad_Finlibrary__c, 'FinLibrary', '_top');	
     }
 
diff --git a/force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.js b/force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.js
index 3db3717..4735a64 100644
--- a/force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.js
+++ b/force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.js
@@ -6,20 +6,17 @@
 
 
 	@api recordId;
-	IsLoading;
+	IsLoading=true;
 	Bulletin_Board__c;
 
 
 	@wire(CurrentPageReference)
     getStateParameters(currentPageReference){
     	if(currentPageReference){
-    		console.log(currentPageReference);
-    		console.log("杩涘叆鑾峰彇page鍙傛暟")
     		const IdValue=currentPageReference.state.recordId;
     		if(IdValue){
     			let str=`${IdValue}`;
     			this.recordId=str;
-    			console.log("recordId="+str);
     		}
     	}
     }
@@ -30,20 +27,14 @@
     connectedCallback(){
     getBulletinBoard({recordId:this.recordId}).then(res=>{
     	if(res!=null){
-    	this.IsLoading=false;
-    	console.log("res");
-    	console.log(res);
-    	console.log("杩涘叆鍒濆鍖栧璞″叾浠栧睘鎬�");
-    	this.Bulletin_Board__c=res;
-    	console.log(this.Bulletin_Board__c);
-        this.FinLibrary2();
-    	}
-    	else{
-    		 var a="娌¤繘鏂规硶";
- 			console.log(a);
+        	this.Bulletin_Board__c=res;
+        	console.log(this.Bulletin_Board__c);
+            this.FinLibrary2().then(result=>{
+                this.IsLoading=false;
+                this.dispatchEvent(new CloseActionScreenEvent());
+            });
     	}
     }).catch(error =>{
-    	console.log("error");
     	console.log(error.message);
     }).finally(()=>{
 
@@ -52,11 +43,7 @@
 
 
     FinLibrary2(){
-
-
     	window.open(this.Bulletin_Board__c.iPad_Finlibrary_2__c, 'FinLibrary', '_top');
-    	this.dispatchEvent(new CloseActionScreenEvent());
-
     }
 
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.js b/force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.js
index 21eca75..e255062 100644
--- a/force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.js
+++ b/force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.js
@@ -5,19 +5,16 @@
 export default class lexFinLibrary3 extends LightningElement {
 
 	@api recordId;
-	IsLoading;
+	IsLoading=true;
 	Bulletin_Board__c;
 
 	@wire(CurrentPageReference)
     getStateParameters(currentPageReference){
     	if(currentPageReference){
-    		console.log(currentPageReference);
-    		console.log("杩涘叆鑾峰彇page鍙傛暟")
     		const IdValue=currentPageReference.state.recordId;
     		if(IdValue){
     			let str=`${IdValue}`;
     			this.recordId=str;
-    			console.log("recordId="+str);
     		}
     	}
     }
@@ -28,20 +25,14 @@
     connectedCallback(){
     getBulletinBoard({recordId:this.recordId}).then(res=>{
     	if(res!=null){
-    	this.IsLoading=false;
-    	console.log("res");
-    	console.log(res);
-    	console.log("杩涘叆鍒濆鍖栧璞″叾浠栧睘鎬�");
-    	this.Bulletin_Board__c=res;
-    	console.log(this.Bulletin_Board__c);
-        this.FinLibrary3();
-    	}
-    	else{
-    		 var a="娌¤繘鏂规硶";
- 			console.log(a);
+        	this.Bulletin_Board__c=res;
+        	console.log(this.Bulletin_Board__c);
+            this.FinLibrary3().then(result=>{
+                this.IsLoading=false;
+                this.dispatchEvent(new CloseActionScreenEvent());
+            });
     	}
     }).catch(error =>{
-    	console.log("error");
     	console.log(error.message);
     }).finally(()=>{
 
@@ -51,7 +42,6 @@
 
     FinLibrary3(){
     	window.open(this.Bulletin_Board__c.iPad_Finlibrary_3__c, 'FinLibrary', '_top');
-    	this.dispatchEvent(new CloseActionScreenEvent());
     }
 
 
diff --git a/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.html b/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.html
index af9fa97..c444cc3 100644
--- a/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.html
+++ b/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.html
@@ -1,3 +1,5 @@
 <template>
-
+    <div class="Attachment" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.js b/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.js
index 3b61b29..3daaf6e 100644
--- a/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.js
+++ b/force-app/main/default/lwc/lexLeadQuotationRequest/lexLeadQuotationRequest.js
@@ -19,6 +19,7 @@
 
 	@api recordId;
 	Lead;
+    IsLoading=true;
 
 
 
@@ -30,8 +31,6 @@
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
-            console.log("str");
-            console.log(str);
             this.recordId = str;
           }
         }
@@ -40,16 +39,15 @@
 
 
     connectedCallback(){
-        console.log(this.recordId);
         init({
             recordId: this.recordId
         }).then(result => {
-            console.log(result);
             if (result != null) {
                 this.Lead = result;
-                console.log(this.Lead);
-                console.log(this.Lead.Status == '鏈窡杩�');
-                this.QuotationRequest();
+                this.QuotationRequest().then(result=>{
+                    this.IsLoading=false;
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                });
             }
         }).catch(error => {
             console.log("error");
@@ -60,13 +58,11 @@
 
 
     async QuotationRequest(){
-		if( this.Lead.Status == '鏈窡杩�'){
-		this.dispatchEvent(new CloseActionScreenEvent());
-		window.open("/apex/NewQuoteIrai?leadid="+ this.Lead.Id +"&tenderid="+ this.Lead.Tender_information__c);
+		if( this.Lead.Status == '鏈窡杩�'){	
+		    window.open("/apex/NewQuoteIrai?leadid="+ this.Lead.Id +"&tenderid="+ this.Lead.Tender_information__c);
 		}else{
-		this.dispatchEvent(new CloseActionScreenEvent());
-		this.dispatchEvent(event);
-		}    	
+		    this.dispatchEvent(event);
+		}   	
     }
 
 
diff --git a/force-app/main/default/lwc/lexNewIntention/lexNewIntention.html b/force-app/main/default/lwc/lexNewIntention/lexNewIntention.html
deleted file mode 100644
index af9fa97..0000000
--- a/force-app/main/default/lwc/lexNewIntention/lexNewIntention.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<template>
-
-</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewIntention/lexNewIntention.js b/force-app/main/default/lwc/lexNewIntention/lexNewIntention.js
deleted file mode 100644
index 7f95bc9..0000000
--- a/force-app/main/default/lwc/lexNewIntention/lexNewIntention.js
+++ /dev/null
@@ -1,103 +0,0 @@
-import { LightningElement, api , track, wire } from 'lwc';
-import { CurrentPageReference } from "lightning/navigation";
-import { CloseActionScreenEvent } from 'lightning/actions';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-
-import init  from '@salesforce/apex/LexNewIntentionController.init';
-import getAccountByLongName  from '@salesforce/apex/LexNewIntentionController.getAccountByLongName';
-import getAccountByShortName  from '@salesforce/apex/LexNewIntentionController.getAccountByShortName';
-
-
-
-
-  const event1 = new ShowToastEvent({
-            title: '鎻愮ず',
-            message:
-                '璇蜂粠璇环鐢婚潰鏂板缓鎶ヤ环濮旀墭',
-        });
-export default class lexNewIntention extends LightningElement {
-
-	@api recordId;
-	AgencyOpportunity;
-
-
-
-
-	@wire(CurrentPageReference)
-    getStateParameters(currentPageReference) {
-        if (currentPageReference) {
-          const urlValue = currentPageReference.state.recordId;
-          if (urlValue) {
-            let str = `${urlValue}`;
-            console.log(str);
-            this.recordId = str;
-          }
-        }
-    }
-
-
-
-    connectedCallback(){
-        console.log(this.recordId);
-        init({
-            recordId: this.recordId
-        }).then(result => {
-            console.log(result);
-            if (result != null) {
-                this.AgencyOpportunity = result;
-                this.newIntention();
-            }
-        }).catch(error => {
-            console.log("error");
-            console.log(error);
-        });
-
-    }
-
-
-
-    async newIntention(){
-		if(this.AgencyOpportunity.Is_Transformed__c == true){
-			this.dispatchEvent(new CloseActionScreenEvent());
-			this.dispatchEvent(event1);
-			return;
-		}
-	var accountName = this.AgencyOpportunity.Department_Class_Opp_Name__c + ' ' 
-	+ this.AgencyOpportunity.Department_Name_Text__c;
-	var accountrecords = await getAccountByLongName({Name: accountName});
-	var accountID = '';
-		if(accountrecords.length > 0){
-			accountID = accountrecords[0].Id;
-			console.log('闀縩ame杩斿洖闀垮害澶т簬0')
-		}
-		if (accountID == '') {
-			accountName = this.AgencyOpportunity.Department_Class_Opp_Name__c;
-			accountrecords =  await getAccountByShortName({Name : accountName});
-				if(accountrecords.length > 0){
-					accountID = accountrecords[0].Id;
-					console.log('shortName return size 銆� 0')
-				}
-		}
-	this.dispatchEvent(new CloseActionScreenEvent());
-	var url = '/apex/NewAndEditLead?' + '00N10000009HKSP=' + this.AgencyOpportunity.Id
-	+ '&LeadSource=缁忛攢鍟�' + '&00N10000006qOFb=' + this.AgencyOpportunity.StageName__c 
-	+ '&00N10000006qOF0=' + this.AgencyOpportunity.Close_Forecasted_Date__c 
-	+ '&00N10000002EjE1=' + this.AgencyOpportunity.Name 
-	+ '&00N10000008rqHf=' + this.AgencyOpportunity.Purchase_Reason__c 
-	+ '&00N10000008rqHd=' + this.AgencyOpportunity.Fund_Basis__c 
-	+ '&00N10000008rqHg=' + this.AgencyOpportunity.Purchase_Type__c 
-	+'&00N10000008rqHj=' + this.AgencyOpportunity.Sales_Method__c
-	+ '&00N10000008rqHi=' + this.AgencyOpportunity.Request__c
-	+ '&00N10000008rqHh=' + this.AgencyOpportunity.Request_Detail__c
-	+ '&CF00N10000002CvC5=' + accountName
-	+ '&CF00N10000002CvC5_lkid=' + accountID
-	+ '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + this.AgencyOpportunity.Id;
-
-	window.open(url);
-	
-
-
-    }
-
-
-}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewIntention/lexNewIntention.js-meta.xml b/force-app/main/default/lwc/lexNewIntention/lexNewIntention.js-meta.xml
deleted file mode 100644
index 5ae835c..0000000
--- a/force-app/main/default/lwc/lexNewIntention/lexNewIntention.js-meta.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexNewIntention">
-    <apiVersion>51.0</apiVersion>
-    <isExposed>true</isExposed>
-    <targets>
-        <target>lightning__RecordPage</target>
-        <target>lightning__AppPage</target>
-        <target>lightning__HomePage</target>
-        <target>lightning__RecordAction</target>
-    </targets>
-</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.html b/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.html
index af9fa97..c444cc3 100644
--- a/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.html
+++ b/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.html
@@ -1,3 +1,5 @@
 <template>
-
+    <div class="Attachment" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
 </template>
\ No newline at end of file
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
diff --git a/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.html b/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.html
index af9fa97..c444cc3 100644
--- a/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.html
+++ b/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.html
@@ -1,3 +1,5 @@
 <template>
-
+    <div class="Attachment" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.js b/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.js
index e603e3f..d5e0934 100644
--- a/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.js
+++ b/force-app/main/default/lwc/lexPreviewPDF/lexPreviewPDF.js
@@ -4,18 +4,17 @@
 export default class lexPreviewPDF extends LightningElement {
 
 	@api recordId;
+    IsLoading=true;
 
 
 
 	@wire(CurrentPageReference)
     getStateParameters(currentPageReference){
     	if(currentPageReference){
-    		console.log(currentPageReference);
     		const IdValue=currentPageReference.state.recordId;
     		if(IdValue){
     			let str=`${IdValue}`;
     			this.recordId=str;
-    			console.log("recordId="+str);
     		}
     	}
     }
@@ -23,6 +22,7 @@
 
     connectedCallback(){
         this.PreviewPDF().then(res=>{
+            this.IsLoading=false;
         	this.dispatchEvent(new CloseActionScreenEvent());
         });
     }
diff --git a/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.html b/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.html
index af9fa97..c444cc3 100644
--- a/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.html
+++ b/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.html
@@ -1,3 +1,5 @@
 <template>
-
+    <div class="Attachment" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.js b/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.js
index 658051d..e00356f 100644
--- a/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.js
+++ b/force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.js
@@ -7,7 +7,7 @@
 export default class lexProductRepairQuoteProduct extends LightningElement {
 
 	@api recordId;
-	IsLoading;
+	IsLoading=true;
 
 	@wire(CurrentPageReference)
     getStateParameters(currentPageReference) {

--
Gitblit v1.9.1