黄千龙
2023-04-27 78955160373ad7c3252b4d13621264a2b9371dae
PAE判定记录页面改造
2个文件已修改
150 ■■■■■ 已修改文件
force-app/main/default/classes/PAEDecisionRecordController.cls 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/PAEDecisionRecord.page 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/PAEDecisionRecordController.cls
@@ -15,6 +15,7 @@
        get;
        set;
    }
    public Integer pageLimit{get;set;}
    public String ASac_ASrc;
    public String RepairId {
        get;
@@ -128,6 +129,7 @@
        RecordTypeName = ApexPages.currentPage().getParameters().get('RecordTypeIds');
        productIdx = '';
        updateIsPaeMap = false;
        pageLimit = Integer.valueOf(System.Label.mpddetPageLimitsize);//系统标签
    }
    public void init() {
        editAble = true;
force-app/main/default/pages/PAEDecisionRecord.page
@@ -1,4 +1,4 @@
<apex:page action="{!init}" extensions="PAEDecisionRecordController" id="allPage" showheader="false" sidebar="false" standardcontroller="PAE_DecisionRecord__c" title="PAE判定记录">
<apex:page action="{!init}" extensions="PAEDecisionRecordController" id="allPage" showheader="false" sidebar="false" standardcontroller="PAE_DecisionRecord__c" title="PAE判定记录" lightningStylesheets="true">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}">
    </apex:stylesheet>
    <apex:includescript value="{!URLFOR($Resource.jquery183minjs)}">
@@ -70,6 +70,23 @@
            blockme();
            InsertRow();
            
        }
        var selectedSize = 0;
        var pageLimit = {!pageLimit};
        function CheckSize(j){
            var a = j.id;
            var productCount = j$(escapeVfId(a)).attr('checked');
            if (productCount == 'checked') {
                if(selectedSize >= pageLimit){
                    window.alert("页面所选数据不能超过500条");
                    j$(escapeVfId(a)).attr('checked',false);
                    return;
                }
                selectedSize ++;
            } else {
                selectedSize --;
            }
            //alert(selectedSize);
        }
        // 保存并关闭
        function SaveAndCloses(onlySave) {
@@ -172,12 +189,12 @@
        td.columuslowercolour {
            background-color: red;
            text-align: right;
            text-align: left;
        }
        td.columuscuperolour {
            background-color: yellow;
            text-align: right;
            text-align: left;
        }
    </style>
    <apex:form id="allForm">
@@ -210,35 +227,22 @@
        <apex:outputpanel id="allPanel">
            <apex:pageblock id="allBlock">
                <apex:pageblock id="unEditable" rendered="{!editAble}" title="{!IF(RecordTypeName = 'ASRCDecision' , 'Intake universal code 编辑画面', 'Final universal code 编辑画面')}">
                    <table cellspacing="10">
                    <table cellspacing="8">
                        <colgroup>
                            <col width="7%">
                            </col>
                            <col width="10%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                            <col width="7%">
                            </col>
                           <col width="15%"/>
                            <col width="10%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            <col width="10%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
                                <col width="15%">
                                </col>
                                <col width="10%">
                                </col>
                               <col width="15%"/>
                            <col width="15%"/>
                            </apex:outputpanel>
                        </colgroup>
                        <tr>
@@ -257,12 +261,12 @@
                            <!-- 2020/07/28 taoqz end -->
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' , true, false)}">
                                <!-- <th>AS-RC</th> -->
                                <td align="right">
                                <td align="left">
                                    {!$ObjectType.Repair__c.fields.Repair_ConfirmationDate__c.label}:
                                </td>
                            </apex:outputpanel>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
                                <td align="right">
                                <td align="left">
                                    {!$ObjectType.Repair__c.fields.OCSM_RC_CordingDate__c.label}:
                                </td>
                            </apex:outputpanel>
@@ -272,13 +276,13 @@
                            </td>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' , true, false)}">
                                <!-- <th>AS-RC</th> -->
                                <td align="right">
                                <td align="left">
                                    {!$ObjectType.Repair__c.fields.Repair_Authenticator__c.label}:
                                </td>
                            </apex:outputpanel>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
                                <!-- <th>AS-AC</th> -->
                                <td align="right">
                                <td align="left">
                                    {!$ObjectType.Repair__c.fields.OCSM_RC_CordingUser__c.label}:
                                </td>
                            </apex:outputpanel>
@@ -288,7 +292,7 @@
                            </td>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null, true, false)}">
                                <!-- <th>AS-RC</th> -->
                                <td align="right">
                                <td align="left">
                                    {!$ObjectType.Repair__c.fields.SAP_Transfer_time__c.label}:
                                </td>
                                <td align="left">
@@ -297,7 +301,7 @@
                                </td>
                            </apex:outputpanel>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
                                <td align="right">
                                <td align="left">
                                    再现结果确认:
                                </td>
                                <td align="left" style="{!IF(rdRecord.PAE_reappear_confirm__c = '未确认' , 'color: red;font-weight: 800;', '')}">
@@ -321,14 +325,14 @@
                                </td>
                            </apex:outputpanel>
                            <!-- <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' , true, false)}">
                                <td align="right" > 进行修理的判定结果:</td>
                                <td align="left" > 进行修理的判定结果:</td>
                                <td align="left" >  
                                    <apex:InputField value="{!repa.Repair_Determine_result__c}"/>
                                </td>
                            </apex:outputPanel> -->
                            <!-- update by rentongxiao 2020-09-21 start -->
                            <!-- <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision', true, false)}">
                                <td align="right" > {!$ObjectType.Repair__c.fields.if_Repair_Allowed__c.label}:</td>
                                <td align="left" > {!$ObjectType.Repair__c.fields.if_Repair_Allowed__c.label}:</td>
                                <td align="left" >  
                                    <apex:InputField id="repairDetermineResult"  value="{!repa.if_Repair_Allowed__c}" rendered="{!isOSH}"/>
                                    <apex:outputField id="repairDetermineResultout"  value="{!repa.if_Repair_Allowed__c}" rendered="{!!isOSH}"/>
@@ -337,7 +341,7 @@
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision', true, false)}">
                                <td align="right" > {!$ObjectType.Repair__c.fields.NotAllowedReason__c.label}:</td>
                                <td align="left" > {!$ObjectType.Repair__c.fields.NotAllowedReason__c.label}:</td>
                                <td align="left" colspan="3">  
                                    <apex:InputField id="NotAllowedReason"  value="{!repa.NotAllowedReason__c}" rendered="{!isOSH}"/>
                                    <apex:outputField id="NotAllowedReasontout"  value="{!repa.NotAllowedReason__c}" rendered="{!!isOSH}"/>
@@ -345,7 +349,7 @@
                                
                            </apex:outputPanel> -->
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null, true, false)}">
                                <td align="right">
                                <td align="left">
                                    {!$ObjectType.Repair__c.fields.if_Repair_Allowed__c.label}:
                                </td>
                                <td align="left">
@@ -356,7 +360,7 @@
                                </td>
                            </apex:outputpanel>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null, true, false)}">
                                <td align="right">
                                <td align="left">
                                    {!$ObjectType.Repair__c.fields.NotAllowedReason__c.label}:
                                </td>
                                <td align="left" colspan="3">
@@ -369,8 +373,6 @@
                            <!-- update by rentongxiao 2020-09-21 end                           -->
                        </tr>
                        <tr>
                            <td colspan="4">
                            </td>
                            <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null , true, false)}">
                                <!-- <th>AS-RC</th> -->
                                <td align="left">
@@ -394,43 +396,63 @@
                        </tr>
                    </table>
                    <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '未确认',false , true)}">
                        <table style="width:100%; {!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '未确认', 'display: none;', '')}">
                        <table style="width:100%; {!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '未确认', 'display: none;', '')}" cellspacing="8">
                            <colgroup>
                          <col width="1%"/>
                            <col width="1%"/>
                            <col width="1%"/>
                            <col width="1%"/>
                            <col width="1%"/>
                            <col width="1%"/>
                            <col width="25%"/>
                            <col width="25%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            <col width="15%"/>
                            </colgroup>
                            <tr>
                                <td>
                                    <!-- <apex:commandButton onclick="SaveAndCloses(false);"   value="1保存并关闭" style="margin-left:30px;width:80px;float:right" rerender="unEditable,message" oncomplete="unblockUI();"/>  -->
                                    <apex:commandbutton onclick="ReturnRepairInterface();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:right" value="关闭">
                                    <!-- <apex:commandButton onclick="SaveAndCloses(false);"   value="1保存并关闭" style="margin-left:30px;width:80px;float:left" rerender="unEditable,message" oncomplete="unblockUI();"/>  -->
                                    <apex:commandbutton onclick="ReturnRepairInterface();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="关闭">
                                    </apex:commandbutton>
                                    <apex:commandbutton disabled="{!IF(((repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake') || editFlag) && savebuton == false && !(RecordTypeName='ASRCDecision'&&OCSM_QARA='1'),true,false)}" onclick="SaveAndCloses(1);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:right" value="保存">
                                </td>
                                <td>
                                    <apex:commandbutton disabled="{!IF(((repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake') || editFlag) && savebuton == false && !(RecordTypeName='ASRCDecision'&&OCSM_QARA='1'),true,false)}" onclick="SaveAndCloses(1);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="保存">
                                    </apex:commandbutton>
                                    <!-- <apex:commandButton value="保存并关闭" disabled="{!editFlag}"  rendered="{!IF((!isOSH && OCSM_QARA != '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASACDecision') || (RecordTypeName = 'ASACDecision' && QISReportId != null),true,false)}" style="margin-left:30px;width:80px;float:right"  onclick="SaveAndCloses(2);return false;"  rerender="unEditable,message" oncomplete="unblockUI();" /> -->
                                </td>
                                    <!-- <apex:commandButton value="保存并关闭" disabled="{!editFlag}"  rendered="{!IF((!isOSH && OCSM_QARA != '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASACDecision') || (RecordTypeName = 'ASACDecision' && QISReportId != null),true,false)}" style="margin-left:30px;width:80px;float:left"  onclick="SaveAndCloses(2);return false;"  rerender="unEditable,message" oncomplete="unblockUI();" /> -->
                                    <!-- 20200810 Gzw 修改保存并关闭按钮,Final时显示
                                <apex:commandButton value="保存并关闭" disabled="{!editFlag}"  rendered="{!IF(((repa != null && !((repa.Repair_Determine__c = '要' && isOSH)||repa.Repair_Determine__c != '要')) || (RecordTypeName = 'ASACDecision')),true,false)}" style="margin-left:30px;width:80px;float:right"  onclick="SaveAndCloses(2);return false;"  rerender="unEditable,message" oncomplete="unblockUI();" /> -->
                                    <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF(repa != null && RecordTypeName = 'ASACDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:80px;float:right" value="保存并关闭">
                                <apex:commandButton value="保存并关闭" disabled="{!editFlag}"  rendered="{!IF(((repa != null && !((repa.Repair_Determine__c = '要' && isOSH)||repa.Repair_Determine__c != '要')) || (RecordTypeName = 'ASACDecision')),true,false)}" style="margin-left:30px;width:80px;float:left"  onclick="SaveAndCloses(2);return false;"  rerender="unEditable,message" oncomplete="unblockUI();" /> -->
                                <td>
                                    <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF(repa != null && RecordTypeName = 'ASACDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="保存并关闭">
                                    </apex:commandbutton>
                                </td>
                                    <!-- When 要不要进行修理的判定=要 -->
                                    <!-- OSH screen:[确定并SAP申请]  -->
                                    <!-- OCSM QARA screen  [确定并关闭] -->
                                    <!-- update by rentx 2020-10-26 start -->
                                    <!-- <apex:commandButton rendered="{!IF(((repa.Repair_Determine__c = '要' && isOSH)||repa.Repair_Determine__c != '要') && repa != null && RecordTypeName='ASRCDecision',true,false)}" value="确定并SAP申请"  style="margin-left:30px;width:100px;float:right"  onclick="sendToSAPJS(2);return false;"  rerender="unEditable,message" oncomplete="unblockUI();" disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" /> -->
                                    <!-- <apex:commandButton rendered="{!IF(((repa.Repair_Determine__c = '要' && isOSH)||repa.Repair_Determine__c != '要') && repa != null && RecordTypeName='ASRCDecision',true,false)}" value="确定并SAP申请"  style="margin-left:30px;width:100px;float:left"  onclick="sendToSAPJS(2);return false;"  rerender="unEditable,message" oncomplete="unblockUI();" disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" /> -->
                                    
                                    
                                    <apex:commandbutton disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" onclick="sendToSAPJS(2);return false;" oncomplete="unblockUI();" rendered="{!IF(((repa.Repair_Determine__c = '要' && isOSH)||repa.Repair_Determine__c != '要') && repa != null && RecordTypeName='ASRCDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:100px;float:right" value="确定并SAP申请">
                                <td>
                                    <apex:commandbutton disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" onclick="sendToSAPJS(2);return false;" oncomplete="unblockUI();" rendered="{!IF(((repa.Repair_Determine__c = '要' && isOSH)||repa.Repair_Determine__c != '要') && repa != null && RecordTypeName='ASRCDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:120px;float:left" value="确定并SAP申请">
                                    </apex:commandbutton>
                                    <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF((repa.Repair_Determine__c = '要' && OCSM_QARA == '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASRCDecision' && QISReportId != null),true,false)}" rerender="unEditable,message" style="margin-left:30px;width:100px;float:right" value="确定并关闭">
                                </td>
                                <td>
                                    <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF((repa.Repair_Determine__c = '要' && OCSM_QARA == '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASRCDecision' && QISReportId != null),true,false)}" rerender="unEditable,message" style="margin-left:30px;width:100px;float:left" value="确定并关闭">
                                    </apex:commandbutton>
                                </td>
                                    <!-- OCSM_QARA : {!OCSM_QARA}
                            OSH : {!isOSH} -->
                                    <!-- update by rentx 2020-10-26 start -->
                                    <!-- <apex:commandButton value="插入行" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:right" onclick="InsertRows();return false;" rerender="unEditable,message" oncomplete="unblockUI();"/>
                            <apex:commandButton value="取消行" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:right" onclick="SaveAndCloses(3);return false;"  rerender="unEditable,message" oncomplete="unblockUI();"/> -->
                                    <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="InsertRows();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:60px;float:right" value="插入行">
                                    <!-- <apex:commandButton value="插入行" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:left" onclick="InsertRows();return false;" rerender="unEditable,message" oncomplete="unblockUI();"/>
                            <apex:commandButton value="取消行" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:left" onclick="SaveAndCloses(3);return false;"  rerender="unEditable,message" oncomplete="unblockUI();"/> -->
                                <td>
                                    <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="InsertRows();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="插入行">
                                    </apex:commandbutton>
                                    <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="SaveAndCloses(3);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:60px;float:right" value="取消行">
                                </td>
                                <td>
                                    <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="SaveAndCloses(3);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="取消行">
                                    </apex:commandbutton>
                                    <!-- update by rentx 2020-10-26 end -->
                                </td>
@@ -438,7 +460,7 @@
                        </table>
                    </apex:outputpanel>
                    <apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '未确认',true , false)}">
                        <p style="text-align: right;padding-bottom: 10px;width:100%;font-weight: 800;">
                        <p style="text-align: left;padding-bottom: 10px;width:100%;font-weight: 800;">
                            再现结果未确认,请点击Intake universal code 编辑 按钮前去确认
                        </p>
                    </apex:outputpanel>