binxie
2023-07-11 be102ae06e8f986bd9d1a544cd2752e5fa94231a
force-app/main/default/pages/NewPaymentPlanLoad.page
@@ -1,14 +1,19 @@
<apex:page Controller="NewPaymentPlanLoadController"  showHeader="false" sidebar="false" action="{!init}" id="allPage" title="维修合同文本信息录入页面" pageStyle="PageStyleCss">
<apex:page Controller="NewPaymentPlanLoadController"  showHeader="false" sidebar="false" action="{!init}" id="allPage" title="维修合同文本信息录入页面" pageStyle="PageStyleCss" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<style type="text/css">
   .BlockSytle{
      width: 970px;
      width: 1000px;
   }
   .PageStyleCss{
      width: 980px;
      height: 340px;
   }
   .align-save-button {
      vertical-align: top;
      margin-top: 0.0rem;
       margin-bottom: 0.125rem;
   }
    input{
       disabled: false;
@@ -16,8 +21,8 @@
</style>   
<script type="text/javascript">
   j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Contract_Limit_Times__c')).attr('disabled',true);
   function init() {
   window.onload = function init() {
      console.log('执行了init');
      Convert_All_Amount();
      // 新增点检总次数(只在页面中显示)fxk 2021/9/2 Star
      AllChecktime();
@@ -38,6 +43,7 @@
   }
   function Initdisabled() {
       var Status = '{!PageMCEElement.Status__c}';
      if(Status != '引合中'){
        j$(escapeVfId('allPage:allForm:allBlock:Is_Standard_Contract')).attr("disabled", true);
@@ -61,28 +67,30 @@
        j$(escapeVfId('allPage:allForm:allBlock:paymentPlan:Payment_Plan_Sum_6')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Small_Repair_Time__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Live_Technical_Support_Time__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Tour_Check__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Engineer_Name__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Phone_Number__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Inspection_Time__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Small_Repair_Time__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Big_Repair_Time__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Live_Technical_Support_Time__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Tour_Check__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Engineer_Name__c')).attr("disabled", true);
        console.log('disabled');
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Phone_Number__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Inspection_Time__c')).attr("disabled", true);
        // 新增点检总次数(只在页面中显示)fxk 2021/9/2 Star
        j$(escapeVfId('allPage:allForm:allBlock:Contract_Limit_Times__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Contract_Limit_Times__c')).attr("disabled", true);
        // 新增点检总次数(只在页面中显示)fxk 2021/9/2 End
        j$(escapeVfId('allPage:allForm:allBlock:Dedust__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:First_Party_Contract_Number__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Second_Party_Contract_Number__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:Negotiate_Mean__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Dedust__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:First_Party_Contract_Number__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Second_Party_Contract_Number__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Negotiate_Mean__c')).attr("disabled", true);
      }
      //XLIU-CEP8WW LY 20220905 start
      var saveBT = '{!PageMCEElement.old_Is_RecognitionModel__c}';
      var payment = j$(escapeVfId('allPage:allForm:allBlock:paymentPlan:Term_Of_Payment__c')).val();
      if (saveBT =='true' && payment=='多次付款'){
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("disabled", true);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", true);
         // j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", 'btnDisabled');
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("disabled", true);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", true);
         // j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", 'btnDisabled');
      }
      //XLIU-CEP8WW LY 20220905 end
        
@@ -205,7 +213,7 @@
      // var saveErrorflag = j$(escapeVfId('saveErrorflag')).value();
      if(Rs == 'Fin'){
      // fxk 2021/8/31 点检次数必须填 end
         window.opener.top.location.href = '/{!PageMCEElement.id}';
         // window.opener.top.location.href = '/{!PageMCEElement.id}';
   //         top.window.close();
         window.close();
         unblockUI();
@@ -221,15 +229,15 @@
      var payment = j$(escapeVfId('allPage:allForm:allBlock:paymentPlan:Term_Of_Payment__c')).val();
      if (saveBT =='true' && payment=='多次付款'){
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("disabled", true);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", true);
         // j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", true);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("disabled", true);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", true);
         // j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", true);
      }
      if (saveBT =='true' && payment=='一次性付款') {
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("disabled", false);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", false);
         // j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", false);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("disabled", false);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", false);
         // j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", false);
      }
      //XLIU-CEP8WW LY 20220905 end
      ChangeTermofPaymentPlan();
@@ -615,7 +623,7 @@
    </apex:pageBlockSection>
      <apex:pageBlockButtons id="allButtons">
      <apex:outputPanel rendered="{!IF(PageMCEElement.Status__c != '引合中', 'true', 'false')}">
         <apex:commandButton disabled="true" id="SaveButton1" value="保存"  action="{!save}" onclick="blockme();" reRender="hiddenInput,Messages"  oncomplete="CloseJs();"/>
         <apex:commandButton styleClass="align-save-button" disabled="true" id="SaveButton1" value="保存"  action="{!save}" onclick="blockme();" reRender="hiddenInput,Messages"  oncomplete="CloseJs();"/>
         <apex:commandButton disabled="true" id="CancelButton1" value="取消" onclick="CloseJs(); return false;"/>
         <apex:commandButton disabled="true" id="PrintButton1" value="打印" action="{!print}" onclick="blockme();" rerender="hiddenInput,Messages,pdfPrint"  oncomplete="PrintJs();" />         
      </apex:outputPanel>