From 559771a80cf779dc13a84ecd2f178e6ca5a8353a Mon Sep 17 00:00:00 2001
From: FUYU <fuyu@prec-tech.com>
Date: 星期五, 19 五月 2023 15:52:16 +0800
Subject: [PATCH] 备份省目标录入

---
 force-app/main/default/pages/SubmitForApprovalPage.page |   71 ++++++++++++++++++++++++++++++++---
 1 files changed, 65 insertions(+), 6 deletions(-)

diff --git a/force-app/main/default/pages/SubmitForApprovalPage.page b/force-app/main/default/pages/SubmitForApprovalPage.page
index 80a6ff3..ed7fd9c 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();
@@ -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