<apex:page controller="StatusPageController" showHeader="false" id="allPage" sidebar="false" action="{!init}" docType="html-5.0" lightningStylesheets="true">
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
|
|
<head>
|
<title>不需要的理由</title>
|
</head>
|
<script type="text/javascript">
|
function save(){
|
var chance = j$(escapeVfId('allPage:allForm:pageBlock:pageBlockSection:chance')).value();
|
var name1 = j$(escapeVfId('allPage:allForm:pageBlock:pageBlockSection:name1')).value();
|
if (((chance.trim() == '' || chance.trim() == null) && (name1.trim() == null || name1.trim() == '')) || chance == null) {
|
alert('不需要理由不能为空');
|
return;
|
}
|
if (chance.trim() == '' || chance.trim() == null) {
|
alert('不需要理由不能为空');
|
return;
|
}
|
if ((chance == '已经有询价') && (name1.trim() == null || name1.trim() == "")) {
|
alert('已有询价名称不能为空');
|
return;
|
}else{
|
blockme();
|
allSave();
|
}
|
}
|
function check(){
|
window.opener.location.href = "/{!Inquiryform.id}";
|
window.close();
|
}
|
</script>
|
<apex:form id="allForm">
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<apex:actionfunction action="{!save}" name="allSave" onComplete="check();unblockUI();"></apex:actionfunction>
|
<apex:pageBlock id="pageBlock">
|
<apex:pageBlockSection id="pageBlockSection" >
|
<apex:inputField id="chance" value="{!Inquiryform.Reasons_options__c}" style="width: 155px"/>
|
<br />
|
<apex:inputField id="name1" value="{!Inquiryform.Opp_Name_Search__c}" style="width: 150px"/>
|
</apex:pageBlockSection>
|
<apex:pageblockbuttons location="bottom">
|
<apex:commandbutton onclick="save();return false;" value="保存"></apex:commandbutton>
|
</apex:pageblockbuttons>
|
</apex:pageBlock>
|
</apex:form>
|
<script>
|
let SelectFieldParamList=[
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId : 'allPage:allForm:pageBlock:pageBlockSection:name1',
|
//查找字段所在对象
|
ObjectType : 'Inquiry_form__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Opp_Name_Search__c',
|
//查找字段的查找对象
|
SelectObj : 'Opportunity',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
}
|
]
|
resetOpenPage(SelectFieldParamList);
|
function unblockUI(){
|
j$("#sbArea").fadeOut(500, function(){
|
j$("#sbArea").remove();
|
});
|
resetOpenPage(SelectFieldParamList);
|
}
|
</script>
|
</apex:page>
|