高章伟
2023-03-02 e3c02c03dd2de442bbced87236f60a13a1cd154e
force-app/main/default/pages/NewPaymentPlanLoad.page
@@ -75,6 +75,16 @@
        j$(escapeVfId('allPage:allForm:allBlock:Second_Party_Contract_Number__c')).attr("disabled", true);
        j$(escapeVfId('allPage:allForm:allBlock: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:PrintButton')).attr("disabled", true);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", true);
      }
      //XLIU-CEP8WW LY 20220905 end
        
   }
   
@@ -206,6 +216,22 @@
    
   function ChangeTermofPaymentPlanJS(){
      //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:PrintButton')).attr("disabled", 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:PrintButton')).attr("disabled", false);
         j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", false);
      }
      //XLIU-CEP8WW LY 20220905 end
      ChangeTermofPaymentPlan();
   }
@@ -237,6 +263,7 @@
            Allchecks = parseInt((ContractAllMonth * checks)/12+1);
         }else{
            Allchecks = parseInt((ContractAllMonth * checks)/12);
            // alert(Allchecks);
         }
      }
      // alert(Allchecks);
@@ -466,7 +493,9 @@
            <apex:selectList style="margin-right:3px" size="1" id="Small_Repair_Time__c" value="{!PageMCEElement.Small_Repair_Time__c}">
                  <apex:selectOptions value="{!Small_Repair_Time}"/>
              </apex:selectList>
           小时
           <!-- XLIU-CEP8WW 【委托】合同文本更新/新增 LY 20220524 start-->
           工作日
           <!-- XLIU-CEP8WW 【委托】合同文本更新/新增 LY 20220524 end-->
         </td>
         <td style ="text-align: left;">
@@ -486,7 +515,10 @@
         </td>
         <td style ="text-align: left;">
            <apex:selectList style="margin-right:3px" size="1" id="Live_Technical_Support_Time__c" value="{!PageMCEElement.Live_Technical_Support_Time__c}">
                  <apex:selectOptions value="{!Small_Repair_Time}"/>
               <!-- XLIU-CEP8WW 【委托】合同文本更新/新增 LY 20220524 start-->
                  <!--<apex:selectOptions value="{!Small_Repair_Time}"/>-->
                  <apex:selectOptions value="{!Live_Technical_Support_Time}"/>
                  <!-- XLIU-CEP8WW 【委托】合同文本更新/新增 LY 20220524 end-->
              </apex:selectList>
           小时
         </td>
@@ -581,14 +613,13 @@
   </div>
   </apex:outputPanel>
    </apex:pageBlockSection>
      <apex:pageBlockButtons >
      <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 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>
      <apex:outputPanel rendered="{!IF(PageMCEElement.Status__c == '引合中', 'true', 'false')}">
      <apex:outputPanel id="bottom" rendered="{!IF(PageMCEElement.Status__c == '引合中', 'true', 'false')}">
         <apex:commandButton id="SaveButton" value="保存"  action="{!save}" onclick="blockme();" reRender="hiddenInput,Messages"  oncomplete="CloseJs();"/>
         <apex:commandButton id="CancelButton" value="取消" onclick="CloseJs(); return false;"/>
         <apex:commandButton id="PrintButton" value="打印" action="{!print}" onclick="blockme();" rerender="hiddenInput,Messages,pdfPrint"  oncomplete="PrintJs();" />
@@ -608,7 +639,7 @@
         if ('{!printContract}' == 'true') {
            //HWAG-BHT7XX 2019/11/26 START
            if('{!agreeUpperLimit}' == 'true'){
            // 打印医院合同配置
            // 打印医院限次合同配置
             window.open('/apex/NewMCHPDFLimit?id={!PageMCEElement.id}', 'MCHLimitPDF');
             window.close();
            }else{
@@ -618,9 +649,15 @@
            }
            //HWAG-BHT7XX 2019/11/26 END
          }else if ('{!printAgent}' == 'true') {
          //打印经销商合同
          window.open('/apex/NewMCAgentPDF?id={!PageMCEElement.id}', 'MCHPDF');
          window.close();
             if('{!agreeUpperLimit}' == 'true'){
            //打印经销商限次合同
             window.open('/apex/NewMCAgentPDFLimit?id={!PageMCEElement.id}', 'MCAgentLimitPDF');
             window.close()
            }else{
            //打印经销商合同
             window.open('/apex/NewMCAgentPDF?id={!PageMCEElement.id}', 'MCHPDF');
             window.close();
            }
         }else {
            alert('1');
         }