From 928399eceec50e3d37ea08669a12789a9410a9d2 Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 22 十一月 2022 16:51:16 +0800
Subject: [PATCH] 111

---
 force-app/main/default/objects/Rental_Apply__c/webLinks/submit_approval_process.webLink-meta.xml |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/objects/Rental_Apply__c/webLinks/submit_approval_process.webLink-meta.xml b/force-app/main/default/objects/Rental_Apply__c/webLinks/submit_approval_process.webLink-meta.xml
index 8beaf02..ebca9f3 100644
--- a/force-app/main/default/objects/Rental_Apply__c/webLinks/submit_approval_process.webLink-meta.xml
+++ b/force-app/main/default/objects/Rental_Apply__c/webLinks/submit_approval_process.webLink-meta.xml
@@ -339,6 +339,10 @@
 	} 
     //2022-2-23 yjk 鎻愪氦鏃跺皢缁忕悊鐨凬ame瀛楁璧嬬粰澶囧搧鎻愪氦鏃剁粡鐞嗭紙鏂囨湰锛夊瓧娈� end
 	*/
+	// 20220930 ljh SWAG-CJR8S7 start
+	var racs = sforce.connection.query(&quot;select id,OPDPlan__c,OPDPlan__r.SalesManager_Txt__c,OPDPlan__r.BuchangApprovalManagerSales_Txt__c from Rental_Apply__c where id = &apos;{!Rental_Apply__c.Id}&apos;&quot;);
+    var racNew = racs.getArray(&quot;records&quot;)[0];
+	// 20220930 ljh SWAG-CJR8S7 end
 	var rac = new sforce.SObject(&quot;Rental_Apply__c&quot;);
 	rac.Id = &quot;{!Rental_Apply__c.Id}&quot;;
 	rac.Status__c = &quot;濉啓瀹屾瘯&quot;;
@@ -346,9 +350,19 @@
 	var manageUsers = sforce.connection.query(&quot;select id ,JingliEquipmentManager__c,JingliEquipmentManager__r.Name,Buzhang_Equipment_Manager__c,Buzhang_Equipment_Manager__r.Name from User where id = &apos;&quot;+userId+&quot;&apos;&quot;);
 	if(manageUsers.getArray(&quot;records&quot;)[0].JingliEquipmentManager__c != null){
 		rac.SalesManagerSubmit__c = manageUsers.getArray(&quot;records&quot;)[0].JingliEquipmentManager__r.Name;
-           if(manageUsers.getArray(&quot;records&quot;)[0].Buzhang_Equipment_Manager__c != null){
-                   rac.BuchangApprovalManagerSalesSubmit__c = manageUsers.getArray(&quot;records&quot;)[0].Buzhang_Equipment_Manager__r.Name;  //2022-07-22   zyh
-           }
+	    // 20220930 ljh SWAG-CJR8S7 start
+	    if(racNew.OPDPlan__c != null){
+			rac.OPDManagerApprover__c =  rac.SalesManagerSubmit__c == racNew.OPDPlan__r.SalesManager_Txt__c?rac.SalesManagerSubmit__c:&apos; &apos;;
+	    } 
+		// 20220930 ljh SWAG-CJR8S7 end
+	}
+	if(manageUsers.getArray(&quot;records&quot;)[0].Buzhang_Equipment_Manager__c != null){
+		rac.BuchangApprovalManagerSalesSubmit__c = manageUsers.getArray(&quot;records&quot;)[0].Buzhang_Equipment_Manager__r.Name;  //2022-07-22   zyh
+		// 20220930 ljh SWAG-CJR8S7 start
+	    if(racNew.OPDPlan__c != null){
+			rac.OPDBuchangApprover__c = rac.BuchangApprovalManagerSalesSubmit__c == racNew.OPDPlan__r.BuchangApprovalManagerSales_Txt__c?rac.BuchangApprovalManagerSalesSubmit__c:&apos; &apos;; // 20220930 ljh SWAG-CJR8S7
+		}
+		// 20220930 ljh SWAG-CJR8S7 end
 	}
 	// 20220704 ljh update  SFDC-CFWBBU end
     var result = sforce.connection.update([rac]);

--
Gitblit v1.9.1