From 626f3c3bb25e204568019e8d568e2d7547d1037a Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 09 八月 2023 10:54:08 +0800
Subject: [PATCH] 20230809修改伟意按钮同步
---
force-app/main/default/pages/NewPaymentPlanLoad.page | 78 +++++++++++++++++++++++----------------
1 files changed, 46 insertions(+), 32 deletions(-)
diff --git a/force-app/main/default/pages/NewPaymentPlanLoad.page b/force-app/main/default/pages/NewPaymentPlanLoad.page
index 44e540e..026c5a5 100644
--- a/force-app/main/default/pages/NewPaymentPlanLoad.page
+++ b/force-app/main/default/pages/NewPaymentPlanLoad.page
@@ -4,7 +4,7 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<style type="text/css">
.BlockSytle{
- width: 1000px;
+ width: 1300px;
}
.PageStyleCss{
width: 980px;
@@ -21,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('鎵ц浜唅nit');
Convert_All_Amount();
// 鏂板鐐规鎬绘鏁帮紙鍙湪椤甸潰涓樉绀猴級fxk 2021/9/2 Star
AllChecktime();
@@ -30,6 +30,11 @@
Initdisabled();
}
+ window.addEventListener('DOMContentLoaded', function() {
+ var pageBlock = document.getElementById('{!$Component.allBlock}');
+ pageBlock.style.border = 'none';
+ pageBlock.style.boxShadow = 'none';
+ });
function Convert_All_Amount() {
var Total_Contract_Amount = j$(escapeVfId('allPage:allForm:Contract_Amount_Hidden')).val();
var Total_Contract_Amount_In_Words = j$(escapeVfId('allPage:allForm:Total_Contract_Amount_In_Words_Hidden')).val();
@@ -43,6 +48,7 @@
}
function Initdisabled() {
+
var Status = '{!PageMCEElement.Status__c}';
if(Status != '寮曞悎涓�'){
j$(escapeVfId('allPage:allForm:allBlock:Is_Standard_Contract')).attr("disabled", true);
@@ -66,28 +72,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
@@ -212,7 +220,11 @@
// fxk 2021/8/31 鐐规娆℃暟蹇呴』濉� end
// window.opener.top.location.href = '/{!PageMCEElement.id}';
// top.window.close();
- window.close();
+ setTimeout(function(){
+ window.location.href = '/{!PageMCEElement.id}';
+ }, 1500 );
+
+ // window.close();
unblockUI();
}else{
unblockUI();
@@ -226,15 +238,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();
@@ -308,16 +320,17 @@
<apex:inputHidden value="{!PageMCEElement.Payment_Plan_Sum_Sixth_in_Word__c}" id="Payment_Plan_Sum_6_in_Word_Hidden"/>
</apex:outputPanel>
- <apex:pageBlock id="allBlock" >
+ <apex:pageBlock id="allBlock">
<apex:outputPanel id="Messages" style="color:red">
- <apex:messages />
+ <!-- <apex:messages /> -->
+ <apex:pageMessages />
</apex:outputPanel>
<table border="0" >
<colgroup>
<col width="25%"/>
+ <col width="45%"/>
<col width="25%"/>
- <col width="25%"/>
- <col width="25%"/>
+ <col width="5%"/>
</colgroup>
<tr>
<td style ="text-align: right;">
@@ -326,7 +339,7 @@
<td style ="text-align: left;">
<div class="requiredInput"><div class="requiredBlock"></div>
<apex:inputField id="Is_Standard_Contract" value="{!PageMCEElement.Is_Standard_Contract__c}" onchange="RerenderallpageBlockJS(); "/>
- (蹇呭~椤癸紝鎵�鏈夊悎鍚屽潎蹇呴』鍕鹃��)
+ (蹇呭~椤癸紝鎵�鏈夊悎鍚屽潎蹇呴』鍕鹃��)
</div>
</td>
<td/>
@@ -620,12 +633,12 @@
</apex:pageBlockSection>
<apex:pageBlockButtons id="allButtons">
<apex:outputPanel rendered="{!IF(PageMCEElement.Status__c != '寮曞悎涓�', 'true', 'false')}">
- <apex:commandButton styleClass="align-save-button" 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" style="margin-top:-2px" 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 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="SaveButton" value="淇濆瓨" action="{!save}" onclick="blockme();" reRender="hiddenInput,Messages" oncomplete="CloseJs();" style="margin-top:-2px"/>
<apex:commandButton id="CancelButton" value="鍙栨秷" onclick="CloseJs(); return false;"/>
<apex:commandButton id="PrintButton" value="鎵撳嵃" action="{!print}" onclick="blockme();" rerender="hiddenInput,Messages,pdfPrint" oncomplete="PrintJs();" />
</apex:outputPanel>
@@ -640,28 +653,29 @@
function PrintJs() {
var Rs = j$(escapeVfId('allPage:allForm:statusSave')).value();
if(Rs == 'Fin'){
+ // CloseJs();
unblockUI();
if ('{!printContract}' == 'true') {
//HWAG-BHT7XX 2019/11/26 START
if('{!agreeUpperLimit}' == 'true'){
// 鎵撳嵃鍖婚櫌闄愭鍚堝悓閰嶇疆
window.open('/apex/NewMCHPDFLimit?id={!PageMCEElement.id}', 'MCHLimitPDF');
- window.close();
+ // window.close();
}else{
// 鎵撳嵃鍖婚櫌鍚堝悓閰嶇疆
window.open('/apex/NewMCHPDF?id={!PageMCEElement.id}', 'MCHPDF');
- window.close();
+ // window.close();
}
//HWAG-BHT7XX 2019/11/26 END
}else if ('{!printAgent}' == 'true') {
if('{!agreeUpperLimit}' == 'true'){
//鎵撳嵃缁忛攢鍟嗛檺娆″悎鍚�
window.open('/apex/NewMCAgentPDFLimit?id={!PageMCEElement.id}', 'MCAgentLimitPDF');
- window.close()
+ // window.close()
}else{
//鎵撳嵃缁忛攢鍟嗗悎鍚�
window.open('/apex/NewMCAgentPDF?id={!PageMCEElement.id}', 'MCHPDF');
- window.close();
+ // window.close();
}
}else {
alert('1');
--
Gitblit v1.9.1