| New file |
| | |
| | | <apex:page Controller="EquipmentRentalCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="取消一览" lightningStylesheets="true"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | |
| | | <script type="text/javascript"> |
| | | function savejs() { |
| | | if (confirm('是否操作取消?')) { |
| | | blockme(); |
| | | saveBtn(); |
| | | } |
| | | } |
| | | function returnjs() { |
| | | var rentalApplyId = j$(escapeVfId('allPage:allForm:allBlock:rentalApplyId')).text(); |
| | | var url = "/" + rentalApplyId; |
| | | window.location.href = url; |
| | | } |
| | | function refresh() { |
| | | var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text(); |
| | | if (hasError == 'false') { |
| | | returnjs(); |
| | | } |
| | | } |
| | | /** 20210708 SFDC-C448KZ you start**/ |
| | | var cnt = {!EquipmentSetCnt}; |
| | | function changeCancleReasonJs(){ |
| | | |
| | | for (var i = 0; i < cnt; i++) { |
| | | var Cancel_Reason = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Cancel_Reason')).value(); |
| | | // && j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':rowCheck')).attr('checked') == 'checked' |
| | | if(Cancel_Reason != '被动取消'){ |
| | | j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).val(''); |
| | | j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).attr('disabled',true); |
| | | } |
| | | } |
| | | |
| | | } |
| | | function changeReasonJs(){ |
| | | for (var i = 0; i < cnt; i++) { |
| | | var reason = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_reason')).value(); |
| | | if(reason != null && reason == '其他'){ |
| | | j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).attr('disabled',false); |
| | | }else{ |
| | | j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).val(''); |
| | | j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).attr('disabled',true); |
| | | } |
| | | } |
| | | } |
| | | /** 20210708 SFDC-C448KZ you end**/ |
| | | </script> |
| | | |
| | | <apex:form id="allForm"> |
| | | <apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="allBlock,message" onComplete="unblockUI();refresh();changeReasonJs();"> |
| | | </apex:actionFunction> |
| | | <apex:outputPanel id="allPanel"> |
| | | <apex:pageBlock title="取消一览" id="allBlock"> |
| | | <apex:pageBlockButtons > |
| | | <apex:commandButton onclick="savejs(); return false;" value="保存" disabled="{!saveBtn}" rerender="dummy"/> |
| | | <apex:commandButton onclick="returnjs(); return false;" value="返回" rerender="dummy"/> |
| | | </apex:pageBlockButtons> |
| | | |
| | | <apex:outputPanel id="message"> |
| | | <apex:pageMessages /> |
| | | </apex:outputPanel> |
| | | |
| | | <apex:outputText id="hasError" value="{!hasError}" style="display:none"/> |
| | | <apex:outputText id="rentalApplyId" value="{!rentalApplyId}" style="display:none"/> |
| | | <apex:inputHidden id="EquipmentSetCnt" value="{!EquipmentSetCnt}"/><!--20210708 SFDC-C448KZ you --> |
| | | |
| | | <table class="linetable" border="1" style="border-collapse: collapse;"> |
| | | <colgroup> |
| | | <col width="25"/> |
| | | <col width="110"/> |
| | | <col width="110"/> |
| | | <col width="110"/> |
| | | <col width="110"/> |
| | | <col width="110"/> |
| | | <col width="175"/> |
| | | </colgroup> |
| | | <tr style="background-color:#DCDCDC;"> |
| | | <th style="text-align:center"> </th> |
| | | <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Name.label}</th> |
| | | <th style="text-align:center">{!$ObjectType.Fixture_Set__c.fields.Name.label}</th> |
| | | <th style="text-align:center">{!$ObjectType.Fixture_Set__c.fields.Loaner_name__c.label}</th> |
| | | <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.RAES_Status__c.label}</th> |
| | | <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Rental_Start_Date__c.label}</th> |
| | | <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Final_reply_day__c.label}</th> |
| | | <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}</th> |
| | | <!--20210708 SFDC-C448KZ you --> |
| | | <th style="text-align:center;width:80px"> |
| | | {!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}</th> |
| | | <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}</th> |
| | | </tr> |
| | | <apex:repeat value="{!lineInfoList}" var="info" id="records"> |
| | | <tr> |
| | | <!--<td align="center"><apex:inputCheckbox value="{!info.isSelect}" id="rowCheck" disabled="{!IF(info.status=='cantCancel', true, false)}"/></td>--> |
| | | <td align="center"><apex:inputCheckbox value="{!info.isSelect}" id="rowCheck"/></td> |
| | | <td align="left"><apex:outputText value="{!info.raes.Name}"></apex:outputText></td> |
| | | <td align="left"><apex:outputText value="{!info.esName}"></apex:outputText></td> |
| | | <td align="left"><apex:outputText value="{!info.loanerCode}"></apex:outputText></td> |
| | | <td align="left"><apex:outputText value="{!info.raes.RAES_Status__c}"></apex:outputText></td> |
| | | <td align="center"><apex:outputField value="{!info.raes.Rental_Start_Date__c}"></apex:outputField></td> |
| | | <td align="center"><apex:outputField value="{!info.raes.Final_reply_day__c}"></apex:outputField></td> |
| | | <td align="right"> |
| | | <!--<apex:inputField id="reason" value="{!info.raes.Cancel_Reason__c}" rendered="{!IF(info.status=='canCancel', true, false)}"/> |
| | | <apex:outputField value="{!info.raes.Cancel_Reason__c}" rendered="{!IF(info.status=='canCancel', false, true)}"/>--> |
| | | <apex:inputField id="Cancel_Reason" value="{!info.raes.Cancel_Reason__c}" onchange="changeCancleReasonJs();"/> |
| | | <!-- <apex:outputField value="{!info.raes.Cancel_Reason__c}"/> --> |
| | | </td> |
| | | <!--20210708 SFDC-C448KZ you --> |
| | | <td align="right"> |
| | | <apex:inputField value="{!info.raes.Loaner_cancel_reason__c}" id="Loaner_cancel_reason" onchange="changeReasonJs();"/> |
| | | </td> |
| | | <td align="center"><apex:inputField value="{!info.raes.Loaner_cancel_Remarks__c}" id="Loaner_cancel_request" html-disabled="true"></apex:inputField></td> |
| | | </tr> |
| | | </apex:repeat> |
| | | </table> |
| | | </apex:pageBlock> |
| | | </apex:outputPanel> |
| | | </apex:form> |
| | | </apex:page> |