From e6068da47c1bef5517c9e5fdc8c726766867ad4e Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 15:10:02 +0800
Subject: [PATCH] Merge branch 'master' into LEXUpgrade2023-Deloitte

---
 force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page |  294 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 147 insertions(+), 147 deletions(-)

diff --git a/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page b/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
index eff5cc4..a260cd0 100644
--- a/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
+++ b/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
@@ -1,136 +1,136 @@
-<apex:page id="Page" standardController="Agency_Opportunity__c" sidebar="false">
-    <apex:includeScript value="/soap/ajax/40.0/connection.js"/>
-    <apex:includeScript value="/soap/ajax/40.0/apex.js"/>
+<apex:page id="Page" standardController="Agency_Opportunity__c" sidebar="false" lightningStylesheets="true">
+    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
 
     <script type="text/javascript">
-    	sforce.connection.sessionId = "{!$Api.Session_ID}";
-    	<!-- 鍒ゆ柇鏄繘鍏I璇环鎴栬�呮甯歌浠� -->
-		function SICheck() {
-			var SI_Flg = document.getElementById('Page:mainForm:idDayEdit:SI_Flg').checked;            
-			var doubleFlg = false;
-			if (!doubleFlg) {
-				doubleFlg = true;
-				var newflag = true;
-				if ('{!Agency_Opportunity__c.Change_To_Opportunity__c}' != '') {
-					newflag = false;
-					alert("宸茬粡杞垚杩囥�怬CSM璇环銆戙��");
-					Ext.select('*[name=newopp]').set({
-						disabled: 'disabled',
-						class: 'btnDisabled'
-					}, true);
-				}
-				if (newflag) {
-					var query = "Select QualifiedApiName, EntityDefinition.KeyPrefix, DurableId From FieldDefinition WHERE EntityDefinition.QualifiedApiName = 'Opportunity'";
-					records = sforce.connection.query(query).getArray('records');
-					var prefix,
-					fId_Opportunity_Category__c,
-					fId_Close_Forecasted_Date__c,
-					fId_Opportunity_stage__c,
-					fId_Hospital__c,
-					fId_SAP_Province__c,
-					fId_Agency_Opportunity__c,
-					fId_Sales_Root__c,
-					fId_Trade__c,
-					fId_Promise_Class__c,
-					fId_Bid_Planned_Date__c,
+        sforce.connection.sessionId = "{!$Api.Session_ID}";
+        <!-- 鍒ゆ柇鏄繘鍏I璇环鎴栬�呮甯歌浠� -->
+        function SICheck() {
+            var SI_Flg = document.getElementById('Page:mainForm:idDayEdit:SI_Flg').checked;            
+            var doubleFlg = false;
+            if (!doubleFlg) {
+                doubleFlg = true;
+                var newflag = true;
+                if ('{!Agency_Opportunity__c.Change_To_Opportunity__c}' != '') {
+                    newflag = false;
+                    alert("宸茬粡杞垚杩囥�怬CSM璇环銆戙��");
+                    Ext.select('*[name=newopp]').set({
+                        disabled: 'disabled',
+                        class: 'btnDisabled'
+                    }, true);
+                }
+                if (newflag) {
+                    var query = "Select QualifiedApiName, EntityDefinition.KeyPrefix, DurableId From FieldDefinition WHERE EntityDefinition.QualifiedApiName = 'Opportunity'";
+                    records = sforce.connection.query(query).getArray('records');
+                    var prefix,
+                    fId_Opportunity_Category__c,
+                    fId_Close_Forecasted_Date__c,
+                    fId_Opportunity_stage__c,
+                    fId_Hospital__c,
+                    fId_SAP_Province__c,
+                    fId_Agency_Opportunity__c,
+                    fId_Sales_Root__c,
+                    fId_Trade__c,
+                    fId_Promise_Class__c,
+                    fId_Bid_Planned_Date__c,
                     fId_Opportunity_sub_owner__c;
 
-					for (var i = 0; i < records.length; i++) {
-						var record = records[i];
-						prefix = record.EntityDefinition.KeyPrefix.toString();
-						if (record.QualifiedApiName == 'Opportunity_Category__c')
-							fId_Opportunity_Category__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Close_Forecasted_Date__c')
-							fId_Close_Forecasted_Date__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Opportunity_stage__c')
-							fId_Opportunity_stage__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Hospital__c')
-							fId_Hospital__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'SAP_Province__c')
-							fId_SAP_Province__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Agency_Opportunity__c')
-							fId_Agency_Opportunity__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Sales_Root__c')
-							fId_Sales_Root__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Trade__c')
-							fId_Trade__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Promise_Class__c')
-							fId_Promise_Class__c = record.DurableId.toString().split('.')[1];
-						if (record.QualifiedApiName == 'Bid_Planned_Date__c')
-							fId_Bid_Planned_Date__c = record.DurableId.toString().split('.')[1];
+                    for (var i = 0; i < records.length; i++) {
+                        var record = records[i];
+                        prefix = record.EntityDefinition.KeyPrefix.toString();
+                        if (record.QualifiedApiName == 'Opportunity_Category__c')
+                            fId_Opportunity_Category__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Close_Forecasted_Date__c')
+                            fId_Close_Forecasted_Date__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Opportunity_stage__c')
+                            fId_Opportunity_stage__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Hospital__c')
+                            fId_Hospital__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'SAP_Province__c')
+                            fId_SAP_Province__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Agency_Opportunity__c')
+                            fId_Agency_Opportunity__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Sales_Root__c')
+                            fId_Sales_Root__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Trade__c')
+                            fId_Trade__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Promise_Class__c')
+                            fId_Promise_Class__c = record.DurableId.toString().split('.')[1];
+                        if (record.QualifiedApiName == 'Bid_Planned_Date__c')
+                            fId_Bid_Planned_Date__c = record.DurableId.toString().split('.')[1];
                         if (record.QualifiedApiName == 'Opportunity_sub_owner__c')
-							fId_Opportunity_sub_owner__c = record.DurableId.toString().split('.')[1];
-					}
-					// 鏍煎紡鍖栨椂闂�
-					if("{!Agency_Opportunity__c.Bid_Planned_Date__c}" != null &&
-						"{!Agency_Opportunity__c.Bid_Planned_Date__c}" != ''){
-						var Bid_Planned_Date = new Date("{!Agency_Opportunity__c.Bid_Planned_Date__c}").toLocaleDateString();
-					}else{
-						var Bid_Planned_Date = '';
-					}
+                            fId_Opportunity_sub_owner__c = record.DurableId.toString().split('.')[1];
+                    }
+                    // 鏍煎紡鍖栨椂闂�
+                    if("{!Agency_Opportunity__c.Bid_Planned_Date__c}" != null &&
+                        "{!Agency_Opportunity__c.Bid_Planned_Date__c}" != ''){
+                        var Bid_Planned_Date = new Date("{!Agency_Opportunity__c.Bid_Planned_Date__c}").toLocaleDateString();
+                    }else{
+                        var Bid_Planned_Date = '';
+                    }
 
-					if("{!Agency_Opportunity__c.Close_Forecasted_Date__c}" != null &&
-						"{!Agency_Opportunity__c.Close_Forecasted_Date__c}" != ''){
-						var Close_Forecasted_Date = new Date("{!Agency_Opportunity__c.Close_Forecasted_Date__c}").toLocaleDateString();
-					}else{
-						var Close_Forecasted_Date = '';
-					}
-					if (SI_Flg) {
+                    if("{!Agency_Opportunity__c.Close_Forecasted_Date__c}" != null &&
+                        "{!Agency_Opportunity__c.Close_Forecasted_Date__c}" != ''){
+                        var Close_Forecasted_Date = new Date("{!Agency_Opportunity__c.Close_Forecasted_Date__c}").toLocaleDateString();
+                    }else{
+                        var Close_Forecasted_Date = '';
+                    }
+                    if (SI_Flg) {
                         if('' == document.getElementById('Page:mainForm:idDayEdit:SI_OppoLeadSec').value){
                             document.getElementById('ErrorMessage').style.display = '';
                             return;
                             }
-						window.open("/006/e?retURL=%2F{!URLENCODE(Agency_Opportunity__c.Id)}" +
-							"&RecordType=012100000006KMe" + "&ent=Opportunity&opp11=寮曞悎" +
-							"&" +
-							fId_Opportunity_Category__c + "={!URLENCODE(Agency_Opportunity__c.Department_Cateogy__c)}" +
-							"&opp3={!Agency_Opportunity__c.Name}" +
-							"&" + fId_Close_Forecasted_Date__c + "=" + Close_Forecasted_Date +
-							"&" + fId_Bid_Planned_Date__c + "=" + Bid_Planned_Date +
-							"&" + fId_Opportunity_stage__c + "={!URLENCODE(Agency_Opportunity__c.StageName__c)}" +
-							"&CF" + fId_Hospital__c + "={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}" +
-							"&CF" + fId_Hospital__c + "_lkid={!URLENCODE(Agency_Opportunity__c.hosId_opp__c)}" +
-							"&" + fId_SAP_Province__c + "={!URLENCODE($User.Province_Text__c)}" +
-							"&CF" + fId_Agency_Opportunity__c + "_lkid={!URLENCODE(Agency_Opportunity__c.Id)}" +
-							"&CF" + fId_Agency_Opportunity__c + "={!URLENCODE(Agency_Opportunity__c.Name)}" +
-							"&CF" + fId_Opportunity_sub_owner__c +"_lkid=" +
-                            document.getElementById('Page:mainForm:idDayEdit:SI_OppoLeadSec_lkid').value +
-							"&CF" + fId_Opportunity_sub_owner__c + "=" +
-                            document.getElementById('Page:mainForm:idDayEdit:SI_OppoLeadSec').value +        
-							"&opp6=缁忛攢鍟�" +
-							"&" + fId_Sales_Root__c + "=璨╁2搴�" +
-							"&" + fId_Trade__c + "=鍐呰部" +
-							"&" + fId_Promise_Class__c + "=鍐呰部" +
-							"&opp4={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}"
-							,'_self');
-					} else {
-						window.open("/006/e?retURL=%2F{!URLENCODE(Agency_Opportunity__c.Id)}" +
-							"&RecordType=01210000000QekK" +
-							"&ent=Opportunity&opp11=寮曞悎" +
-							"&" + fId_Opportunity_Category__c + "={!URLENCODE(Agency_Opportunity__c.Department_Cateogy__c)}" +
-							"&opp3={!Agency_Opportunity__c.Name}" +
-							"&" + fId_Close_Forecasted_Date__c + "=" + Close_Forecasted_Date +
-							"&" + fId_Bid_Planned_Date__c + "=" + Bid_Planned_Date +
-							"&" + fId_Opportunity_stage__c + "={!URLENCODE(Agency_Opportunity__c.StageName__c)}" +
-							"&CF" + fId_Hospital__c + "={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}" +
-							"&CF" + fId_Hospital__c + "_lkid={!URLENCODE(Agency_Opportunity__c.hosId_opp__c)}" +
-							"&" + fId_SAP_Province__c + "={!URLENCODE($User.Province_Text__c)}" +
-							"&CF" + fId_Agency_Opportunity__c + "_lkid={!URLENCODE(Agency_Opportunity__c.Id)}" +
-							"&CF" + fId_Agency_Opportunity__c + "={!URLENCODE(Agency_Opportunity__c.Name)}" +
+                        window.open("/006/e?retURL=%2F{!URLENCODE(Agency_Opportunity__c.Id)}" +
+                            "&RecordType=012100000006KMe" + "&ent=Opportunity&opp11=寮曞悎" +
+                            "&" +
+                            fId_Opportunity_Category__c + "={!URLENCODE(Agency_Opportunity__c.Department_Cateogy__c)}" +
+                            "&opp3={!Agency_Opportunity__c.Name}" +
+                            "&" + fId_Close_Forecasted_Date__c + "=" + Close_Forecasted_Date +
+                            "&" + fId_Bid_Planned_Date__c + "=" + Bid_Planned_Date +
+                            "&" + fId_Opportunity_stage__c + "={!URLENCODE(Agency_Opportunity__c.StageName__c)}" +
+                            "&CF" + fId_Hospital__c + "={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}" +
+                            "&CF" + fId_Hospital__c + "_lkid={!URLENCODE(Agency_Opportunity__c.hosId_opp__c)}" +
+                            "&" + fId_SAP_Province__c + "={!URLENCODE($User.Province_Text__c)}" +
+                            "&CF" + fId_Agency_Opportunity__c + "_lkid={!URLENCODE(Agency_Opportunity__c.Id)}" +
+                            "&CF" + fId_Agency_Opportunity__c + "={!URLENCODE(Agency_Opportunity__c.Name)}" +
                             "&CF" + fId_Opportunity_sub_owner__c +"_lkid=" +
                             document.getElementById('Page:mainForm:idDayEdit:SI_OppoLeadSec_lkid').value +
-							"&CF" + fId_Opportunity_sub_owner__c + "=" +
+                            "&CF" + fId_Opportunity_sub_owner__c + "=" +
                             document.getElementById('Page:mainForm:idDayEdit:SI_OppoLeadSec').value +        
-							"&opp6=缁忛攢鍟�" +
-							"&" + fId_Sales_Root__c + "=璨╁2搴�" +
-							"&" + fId_Trade__c + "=鍐呰部" +
-							"&" + fId_Promise_Class__c + "=鍐呰部" +
-							"&opp4={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}",'_self');
-					}
+                            "&opp6=缁忛攢鍟�" +
+                            "&" + fId_Sales_Root__c + "=璨╁2搴�" +
+                            "&" + fId_Trade__c + "=鍐呰部" +
+                            "&" + fId_Promise_Class__c + "=鍐呰部" +
+                            "&opp4={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}"
+                            ,'_self');
+                    } else {
+                        window.open("/006/e?retURL=%2F{!URLENCODE(Agency_Opportunity__c.Id)}" +
+                            "&RecordType=01210000000QekK" +
+                            "&ent=Opportunity&opp11=寮曞悎" +
+                            "&" + fId_Opportunity_Category__c + "={!URLENCODE(Agency_Opportunity__c.Department_Cateogy__c)}" +
+                            "&opp3={!Agency_Opportunity__c.Name}" +
+                            "&" + fId_Close_Forecasted_Date__c + "=" + Close_Forecasted_Date +
+                            "&" + fId_Bid_Planned_Date__c + "=" + Bid_Planned_Date +
+                            "&" + fId_Opportunity_stage__c + "={!URLENCODE(Agency_Opportunity__c.StageName__c)}" +
+                            "&CF" + fId_Hospital__c + "={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}" +
+                            "&CF" + fId_Hospital__c + "_lkid={!URLENCODE(Agency_Opportunity__c.hosId_opp__c)}" +
+                            "&" + fId_SAP_Province__c + "={!URLENCODE($User.Province_Text__c)}" +
+                            "&CF" + fId_Agency_Opportunity__c + "_lkid={!URLENCODE(Agency_Opportunity__c.Id)}" +
+                            "&CF" + fId_Agency_Opportunity__c + "={!URLENCODE(Agency_Opportunity__c.Name)}" +
+                            "&CF" + fId_Opportunity_sub_owner__c +"_lkid=" +
+                            document.getElementById('Page:mainForm:idDayEdit:SI_OppoLeadSec_lkid').value +
+                            "&CF" + fId_Opportunity_sub_owner__c + "=" +
+                            document.getElementById('Page:mainForm:idDayEdit:SI_OppoLeadSec').value +        
+                            "&opp6=缁忛攢鍟�" +
+                            "&" + fId_Sales_Root__c + "=璨╁2搴�" +
+                            "&" + fId_Trade__c + "=鍐呰部" +
+                            "&" + fId_Promise_Class__c + "=鍐呰部" +
+                            "&opp4={!URLENCODE(Agency_Opportunity__c.hosName_opp__c)}",'_self');
+                    }
 
-				}
-			}
-		}
+                }
+            }
+        }
     function reload() {
         window.open("/{!URLENCODE(Agency_Opportunity__c.Id)}",'_self');
     }
@@ -139,35 +139,35 @@
     </style>
     <!-- 銉兗銉� 鍙栧紩銇枊濮� -->
     <apex:sectionHeader title="{!$ObjectType.Agency_Opportunity__c.Label}" subtitle="{!$Label.StartTrading_Subtitle}"/>
-	    <apex:form id="mainForm">
+        <apex:form id="mainForm">
             <div id = 'ErrorMessage' style="display: none;">
-            	<apex:pageMessage summary="杞琒I璇环闇�瑕佸~鍐欒浠峰壇鎷呭綋" title="閿欒" severity="error" strength="2" />
+                <apex:pageMessage summary="杞琒I璇环闇�瑕佸~鍐欒浠峰壇鎷呭綋" title="閿欒" severity="error" strength="2" />
             </div>
-	        <apex:pageBlock id="idDayEdit" title="" mode="edit" >
-		        <apex:pageBlockButtons >
-		        	<!-- 杩涜璇环 -->
-		        	<input type="button" class="btn" value="{!$Label.StartTrading_Subtitle}" onclick="SICheck();"/>
-		            <!-- 鍏虫帀褰撳墠绐楀彛 -->
-		        	<input type="button" class="btn" value="{!$Label.StartTrading_Cancel}" onclick="reload();"/>
-		        </apex:pageBlockButtons>
+            <apex:pageBlock id="idDayEdit" title="" mode="edit" >
+                <apex:pageBlockButtons >
+                    <!-- 杩涜璇环 -->
+                    <input type="button" class="btn" value="{!$Label.StartTrading_Subtitle}" onclick="SICheck();"/>
+                    <!-- 鍏虫帀褰撳墠绐楀彛 -->
+                    <input type="button" class="btn" value="{!$Label.StartTrading_Cancel}" onclick="reload();"/>
+                </apex:pageBlockButtons>
                 <table>
-	                <tr>
-	                	<td width="100px"></td>
-	                	<td>
-	                	{!$ObjectType.lead.fields.SI_OppoLeadSec__c.label}
-	                	</td>
-	                	<td>
-	                		<apex:inputField id="SI_OppoLeadSec" value="{!Agency_Opportunity__c.SI_OppoLeadSec__c}"/>
-	                	</td>
-	                </tr>
-	                 <tr>
-	                	<td width="100px"></td>
-	                	<!-- 鏄惁SI鏈儴鍏卞悓鎺ㄨ繘璇环 -->
-	                	<td>鏄惁SI鏈儴鍏卞悓鎺ㄨ繘璇环</td>
-	                	<td><apex:inputCheckbox id="SI_Flg" />
-				        </td>
-	                </tr>
-	            </table>
-	        </apex:pageBlock>
-	    </apex:form>
+                    <tr>
+                        <td width="100px"></td>
+                        <td>
+                        {!$ObjectType.lead.fields.SI_OppoLeadSec__c.label}
+                        </td>
+                        <td>
+                            <apex:inputField id="SI_OppoLeadSec" value="{!Agency_Opportunity__c.SI_OppoLeadSec__c}"/>
+                        </td>
+                    </tr>
+                     <tr>
+                        <td width="100px"></td>
+                        <!-- 鏄惁SI鏈儴鍏卞悓鎺ㄨ繘璇环 -->
+                        <td>鏄惁SI鏈儴鍏卞悓鎺ㄨ繘璇环</td>
+                        <td><apex:inputCheckbox id="SI_Flg" />
+                        </td>
+                    </tr>
+                </table>
+            </apex:pageBlock>
+        </apex:form>
 </apex:page>
\ No newline at end of file

--
Gitblit v1.9.1