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/SubmitForApprovalPage.page |   73 +++++++++++++++++++++++++++++++++---
 1 files changed, 66 insertions(+), 7 deletions(-)

diff --git a/force-app/main/default/pages/SubmitForApprovalPage.page b/force-app/main/default/pages/SubmitForApprovalPage.page
index 80a6ff3..19eee42 100644
--- a/force-app/main/default/pages/SubmitForApprovalPage.page
+++ b/force-app/main/default/pages/SubmitForApprovalPage.page
@@ -1,5 +1,5 @@
 <!-- <apex:page action="{!init}" controller="SubmitForApprovalController" id="allPage" showheader="false" sidebar="true" title="鎻愪氦鐢宠"> standardcontroller="Maintenance_Contract__c"  -->
-    <apex:page standardcontroller="Lost_Report__c"  extensions="SubmitForApprovalController" id="allPage" action="{!init}" showHeader="false" sidebar="false" title="鎻愪氦鐢宠">
+    <apex:page standardcontroller="Lost_Report__c"  extensions="SubmitForApprovalController" id="allPage" action="{!init}" showHeader="false" sidebar="false" title="鎻愪氦鐢宠" lightningStylesheets="true">
     <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}">
     </apex:stylesheet>
     <apex:includescript value="{!URLFOR($Resource.jquery183minjs)}">
@@ -8,7 +8,6 @@
     </apex:includescript>
     <script type="text/javascript">
     window.onload = function() {
-
         toWhere();
 
         specificReasons();
@@ -21,6 +20,10 @@
         toWhere();
         specificReasons();
         grey();
+    }
+    
+    function disToWhere(){
+        j$(escapeVfId('allPage:sada:To_Where')).attr("disabled", true);
     }
 
     function specificReasons() {
@@ -38,6 +41,39 @@
             document.getElementById("font2").style.display = "none";
 
             document.getElementById("allPage:sada:Other_Reasons").style.display = "none";
+        }
+        if (specificReasonsVal == '杞涓夋柟鎴栫淮淇墭绠�') {
+            
+            tochange();
+            document.getElementById("font5").style.display = "block";
+
+            document.getElementById("allPage:sada:Third_Party_Company").style.display = "block";
+
+            document.getElementById("font6").style.display = "block";
+
+            document.getElementById("allPage:sada:Third_Party_Contract_Price").style.display = "block";
+
+        } else {
+            j$(escapeVfId('allPage:sada:To_Where')).attr("disabled", false);
+             document.getElementById("font5").style.display = "none";
+
+            document.getElementById("allPage:sada:Third_Party_Company").style.display = "none";
+
+            document.getElementById("font6").style.display = "none";
+
+            document.getElementById("allPage:sada:Third_Party_Contract_Price").style.display = "none";
+        }
+        if (specificReasonsVal == '閲嶅鎶ヤ环') {
+            document.getElementById("font7").style.display = "block";
+            document.getElementById("MC_Code__c").style.display = "block";
+            document.getElementById("font3").style.display = "none";
+            document.getElementById("To_Where__c").style.display = "none";
+        } else {
+            
+            document.getElementById("font7").style.display = "none";
+            document.getElementById("MC_Code__c").style.display = "none";
+            document.getElementById("font3").style.display = "block";
+            document.getElementById("To_Where__c").style.display = "block";
         }
     }
 
@@ -134,6 +170,7 @@
         save();
     }
 
+    
     function submitBatch() {
         blockme();
         submit();
@@ -157,6 +194,8 @@
     <apex:form id="sada">
         <apex:actionfunction action="{!init}" name="init" oncomplete="unblockUI();" rerender="oppBlock1,message">
         </apex:actionfunction>
+        <apex:actionfunction action="{!tochange}" name="tochange" oncomplete="unblockUI();disToWhere();" rerender="To_Where">
+        </apex:actionfunction>
         <apex:actionfunction action="{!save}" name="save" oncomplete="unblockUI();reload();initkin();" rerender="oppBlock1,sada,message">
         </apex:actionfunction>
         <apex:actionfunction action="{!submit}" name="submit" oncomplete="unblockUI();reload();initkin();" rerender="oppBlock1,message,sada,ApprovalHistory">
@@ -176,7 +215,7 @@
             </tr>
             <tr>
                 <td style="padding-left:50px">
-                    <apex:inputfield id="Specific_Reasons" onchange="specificReasons();return false;" style="width:90%;outline-color:#1A94E6;" value="{!lostData.Specific_Reasons__c}">
+                    <apex:inputfield id="Specific_Reasons" onchange="specificReasons();return false;" style="width:90%;outline-color:#1A94E6;" value="{!lostData.Specific_Reasons__c}" required="true">
                     </apex:inputfield>
                 </td>
             </tr>
@@ -195,15 +234,34 @@
             </tr>
             <tr>
                 <td style="padding-left:50px">
+                    <font id="font7" style="font-size:small;display:none;">
+                        鎵嬪姩鍏宠仈鎶ヤ环缂栫爜:
+                    </font>
+                </td>    
+            </tr>
+            <tr>
+                <td style="padding-left:50px ;">
+                    <div id = "MC_Code__c"  style="width:90%;display:none"><apex:inputField value="{!lostData.MC_Code__c}" style="width:90%;"/></div>
+                </td>
+            </tr>
+            <tr>
+                <td style="padding-left:50px">
                     <font id="font3" style="font-size:small">
                         鍘诲悜:
                     </font>
                 </td>
             </tr>
+             <!--  <tr>
+                <td style="padding-left:50px">
+                    <div id = "To_Three"  style="width:90%;display:none">
+                        <input id = "To_Three1" style="width:90%;outline:none" value="鍖婚櫌閫夋嫨绗笁鏂�" readonly="readonly" />
+                    </div>
+                </td>
+            </tr> -->
             <tr>
                 <td style="padding-left:50px">
-                    <apex:inputfield id="To_Where" onchange="toWhere();" style="width:90%;outline-color:#1A94E6;" value="{!lostData.To_Where__c}">
-                    </apex:inputfield>
+                    <div id = "To_Where__c"  style="width:90%;display:block;"><apex:inputfield id="To_Where" onchange="toWhere();" required="true" style="width:90%;outline-color:#1A94E6;display:block;" value="{!lostData.To_Where__c}">
+                    </apex:inputfield></div>
                 </td>
             </tr>
             <tr>
@@ -254,8 +312,9 @@
             </tr>
             <td style="padding-left:50px" id="bluebuttoncss">
                 <center>
-                    <apex:commandButton onclick="saveBatch();return false;" disabled="{!IF(lostData.Status__c='瀹℃壒涓�'||lostData.Status__c='鎵瑰噯',true,false)}" rendered="true" rerender="oppBlock1,message" value="淇濆瓨">
-                    </apex:commandButton>
+                   <!--  <apex:commandButton onclick="saveBatch();return false;" disabled="{!IF(lostData.Status__c='瀹℃壒涓�'||lostData.Status__c='鎵瑰噯',true,false)}" rendered="true" rerender="oppBlock1,message" value="淇濆瓨">
+                    </apex:commandButton> -->
+                  
                     &nbsp;&nbsp;&nbsp;&nbsp;
                     <apex:commandbutton onclick="submitBatch();return false;" disabled="{!IF(lostData.Status__c='瀹℃壒涓�'||lostData.Status__c='鎵瑰噯',true,false)}" rerender="oppBlock1,message" rendered="true" value="鎻愪氦瀹℃牳">
                     </apex:commandbutton>

--
Gitblit v1.9.1