<!-- <apex:page action="{!init}" controller="SubmitForApprovalController" id="allPage" showheader="false" sidebar="true" title="提交申请"> standardcontroller="Maintenance_Contract__c" -->
|
<apex:page standardcontroller="Lost_Report__c" extensions="SubmitForApprovalController" id="allPage" action="{!init}" showHeader="false" sidebar="false" title="提交申请">
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}">
|
</apex:stylesheet>
|
<apex:includescript value="{!URLFOR($Resource.jquery183minjs)}">
|
</apex:includescript>
|
<apex:includescript value="{!URLFOR($Resource.PleaseWaitDialog)}">
|
</apex:includescript>
|
<script type="text/javascript">
|
window.onload = function() {
|
|
toWhere();
|
|
specificReasons();
|
|
grey();
|
|
}
|
|
function initkin() {
|
toWhere();
|
specificReasons();
|
grey();
|
}
|
|
function specificReasons() {
|
|
var specificReasonsVal = j$(escapeVfId("allPage:sada:Specific_Reasons")).val();
|
|
if (specificReasonsVal == '其他(手写)') {
|
|
document.getElementById("font2").style.display = "block";;
|
|
document.getElementById("allPage:sada:Other_Reasons").style.display = "block";
|
|
} else {
|
|
document.getElementById("font2").style.display = "none";
|
|
document.getElementById("allPage:sada:Other_Reasons").style.display = "none";
|
}
|
}
|
|
function toWhere() {
|
|
var toWhereVal = j$(escapeVfId("allPage:sada:To_Where")).val();
|
|
if (toWhereVal == '其他(手写)') {
|
|
document.getElementById("font4").style.display = "block";
|
|
document.getElementById("allPage:sada:Other").style.display = "block";
|
|
} else {
|
|
document.getElementById("font4").style.display = "none";
|
|
document.getElementById("allPage:sada:Other").style.display = "none";
|
}
|
|
|
if (toWhereVal == '医院选择第三方') {
|
|
document.getElementById("font5").style.display = "block";
|
|
document.getElementById("allPage:sada:Third_Party_Company").style.display = "block";
|
|
document.getElementById("font6").style.display = "block";
|
|
document.getElementById("allPage:sada:Third_Party_Contract_Price").style.display = "block";
|
|
} else {
|
|
document.getElementById("font5").style.display = "none";
|
|
document.getElementById("allPage:sada:Third_Party_Company").style.display = "none";
|
|
document.getElementById("font6").style.display = "none";
|
|
document.getElementById("allPage:sada:Third_Party_Contract_Price").style.display = "none";
|
|
}
|
}
|
|
function grey() {
|
|
var status = j$(escapeVfId("allPage:sada:Status")).val();
|
|
if (status == '批准' || status == '审批中') {
|
|
j$(escapeVfId('allPage:sada:Specific_Reasons')).attr("disabled", true);
|
|
j$(escapeVfId('allPage:sada:Other_Reasons')).attr("disabled", true);
|
|
j$(escapeVfId('allPage:sada:To_Where')).attr("disabled", true);
|
|
j$(escapeVfId('allPage:sada:Other')).attr("disabled", true);
|
|
j$(escapeVfId('allPage:sada:Third_Party_Company')).attr("disabled", true);
|
|
j$(escapeVfId('allPage:sada:Third_Party_Contract_Price')).attr("disabled", true);
|
|
} else {
|
|
j$(escapeVfId('allPage:sada:Specific_Reasons')).attr("disabled", false);
|
|
j$(escapeVfId('allPage:sada:Other_Reasons')).attr("disabled", false);
|
|
j$(escapeVfId('allPage:sada:To_Where')).attr("disabled", false);
|
|
j$(escapeVfId('allPage:sada:Other')).attr("disabled", false);
|
|
j$(escapeVfId('allPage:sada:Third_Party_Company')).attr("disabled", false);
|
|
j$(escapeVfId('allPage:sada:Third_Party_Contract_Price')).attr("disabled", false);
|
|
}
|
}
|
|
function reload() {
|
var disableInput = j$(escapeVfId('flag')).value();
|
console.log(disableInput);
|
if (disableInput == "true") {
|
window.opener.location.href = "/" + "{!mcId}";
|
// DealerInquiryModifyState
|
window.close();
|
|
}
|
|
}
|
|
function saveBatch() {
|
blockme();
|
save();
|
}
|
|
function submitBatch() {
|
blockme();
|
submit();
|
}
|
|
function setChangeFlgRight() {
|
var tpcp = j$(escapeVfId('allPage:sada:Third_Party_Contract_Price')).value();
|
if (isNaN(tpcp) == true) {
|
alert('请输入数字!');
|
return false;
|
}
|
}
|
</script>
|
<style type="text/css">
|
#bluebuttoncss input {
|
width: 100px;
|
height: 30px;
|
font-family: "tahoma", "宋体";
|
}
|
</style>
|
<apex:form id="sada">
|
<apex:actionfunction action="{!init}" name="init" oncomplete="unblockUI();" rerender="oppBlock1,message">
|
</apex:actionfunction>
|
<apex:actionfunction action="{!save}" name="save" oncomplete="unblockUI();reload();initkin();" rerender="oppBlock1,sada,message">
|
</apex:actionfunction>
|
<apex:actionfunction action="{!submit}" name="submit" oncomplete="unblockUI();reload();initkin();" rerender="oppBlock1,message,sada,ApprovalHistory">
|
</apex:actionfunction>
|
<!-- <apex:outputpanel id="message">
|
<apex:PageMessages />
|
</apex:outputpanel> -->
|
<input type="hidden" id="flag" value="{!flag}" />
|
<input type="hidden" id="sa" value="{!mcId}"/>
|
<table id="oppBlock1" style="width:100%;height:200%;">
|
<tr>
|
<td style="padding-left:50px;padding-top:10px; ">
|
<font id="font1" style="font-size:small">
|
具体原因:
|
</font>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<apex:inputfield id="Specific_Reasons" onchange="specificReasons();return false;" style="width:90%;outline-color:#1A94E6;" value="{!lostData.Specific_Reasons__c}">
|
</apex:inputfield>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<font id="font2" style="font-size:small;display:none;">
|
其他原因(手写):
|
</font>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<apex:inputfield id="Other_Reasons" style="width:88.5%;display:none;" value="{!lostData.Other_Reasons__c}">
|
</apex:inputfield>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<font id="font3" style="font-size:small">
|
去向:
|
</font>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<apex:inputfield id="To_Where" onchange="toWhere();" style="width:90%;outline-color:#1A94E6;" value="{!lostData.To_Where__c}">
|
</apex:inputfield>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<font id="font4" style="font-size:small;display:none;">
|
其他(手写):
|
</font>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<apex:inputfield id="Other" style="width:88.5%;display:none;outline-color:#1A94E6;" value="{!lostData.Other__c}">
|
</apex:inputfield>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<font id="font5" style="font-size:small;display:none;">
|
第三方公司:
|
</font>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<apex:inputfield id="Third_Party_Company" style="width:88.5%;display:none;outline-color:#1A94E6;" value="{!lostData.Third_Party_Company__c}">
|
</apex:inputfield>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<!--;padding-top:50px-->
|
<font id="font6" style="font-size:small;display:none;">
|
第三成约价格:
|
</font>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<apex:inputfield id="Third_Party_Contract_Price" style="width:88.5%;outline-color:#1A94E6;display:none;" value="{!lostData.Third_Party_Contract_Price__c}">
|
</apex:inputfield>
|
</td>
|
</tr>
|
<tr>
|
<td style="padding-left:50px">
|
<apex:inputfield id="Status" style="width:90%;border-radius: 3px 3px 3px 3px; height:110%;display:none;" value="{!lostData.Status__c}">
|
</apex:inputfield>
|
</td>
|
</tr>
|
<td style="padding-left:50px" id="bluebuttoncss">
|
<center>
|
<apex:commandButton onclick="saveBatch();return false;" disabled="{!IF(lostData.Status__c='审批中'||lostData.Status__c='批准',true,false)}" rendered="true" rerender="oppBlock1,message" value="保存">
|
</apex:commandButton>
|
|
<apex:commandbutton onclick="submitBatch();return false;" disabled="{!IF(lostData.Status__c='审批中'||lostData.Status__c='批准',true,false)}" rerender="oppBlock1,message" rendered="true" value="提交审核">
|
</apex:commandbutton>
|
</center>
|
</td>
|
</table>
|
</apex:form>
|
<!-- 显示审批过程用 -->
|
<apex:outputPanel id="ApprovalHistory" rendered="{!canseePage}">
|
<apex:relatedList list="ProcessSteps"/>
|
</apex:outputPanel>
|
</apex:page>
|