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

diff --git a/force-app/main/default/pages/SubmitForApprovalPage.page b/force-app/main/default/pages/SubmitForApprovalPage.page
index 49c78fc..0503209 100644
--- a/force-app/main/default/pages/SubmitForApprovalPage.page
+++ b/force-app/main/default/pages/SubmitForApprovalPage.page
@@ -8,7 +8,6 @@
     </apex:includescript>
     <script type="text/javascript">
     window.onload = function() {
-
         toWhere();
 
         specificReasons();
@@ -23,6 +22,10 @@
         grey();
     }
     
+    function disToWhere(){
+        j$(escapeVfId('allPage:sada:To_Where')).attr("disabled", true);
+    }
+
     function specificReasons() {
 
         var specificReasonsVal = j$(escapeVfId("allPage:sada:Specific_Reasons")).val();
@@ -39,13 +42,38 @@
 
             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";
         }
     }
 
@@ -166,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">
@@ -211,7 +241,7 @@
             </tr>
             <tr>
                 <td style="padding-left:50px ;">
-                    <div id = "MC_Code__c" class="requiredInput" style="display:none"><div class="requiredBlock"></div><apex:inputField value="{!lostData.MC_Code__c}" style="width:75px;"/></div>
+                    <div id = "MC_Code__c"  style="width:90%;display:none"><apex:inputField value="{!lostData.MC_Code__c}" style="width:90%;"/></div>
                 </td>
             </tr>
             <tr>
@@ -221,10 +251,17 @@
                     </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();" style="width:90%;outline-color:#1A94E6;display:block;" value="{!lostData.To_Where__c}">
+                    </apex:inputfield></div>
                 </td>
             </tr>
             <tr>
@@ -275,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