<apex:page standardController="Opportunity" extensions="SI_Opportunity_ResponseController" showHeader="false" sidebar="false" action="{!init}" id="allPage" lightningStylesheets="true" >
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
|
<style type="text/css">
|
.hideDropdown select{
|
display:none
|
}
|
</style>
|
<script type="text/javascript">
|
function SendToSIJs() {
|
// body...
|
window.open('/apex/SI_Opportunity_Response?showFlg=false&mailType=SI&id={!Opportunity.id}','SI部门送信','height=400,width=700,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
|
}
|
function SendToApplyJs() {
|
// body...
|
window.open('/apex/SI_Opportunity_Response?showFlg=false&mailType=apply&id={!Opportunity.id}','申请者送信','height=400,width=700,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
|
}
|
function ConfirmJs() {
|
// body...
|
//blockme();
|
sendMail();
|
}
|
function CancelJs() {
|
// body...
|
window.close();
|
}
|
function AddCcjs() {
|
// body...
|
var oldStr = j$(escapeVfId('allPage:allForm:ResponseBlock:Cc')).val();
|
var AddElem = (oldStr==''?'':',') + j$(escapeVfId('allPage:allForm:ResponseBlock:Mail_Tar_Selector__c')).val();
|
|
var oldStrID = j$(escapeVfId('allPage:allForm:ResponseBlock:Ccid')).val();
|
var AddElemID = (oldStrID==''?'':',') + (j$(escapeVfId('allPage:allForm:ResponseBlock:Mail_Tar_Selector__c_lkid')).val()=={!$Label.Agency_ID_c}?'':j$(escapeVfId('allPage:allForm:ResponseBlock:Mail_Tar_Selector__c_lkid')).val());
|
oldStr = oldStr + (AddElem==','?'':AddElem);
|
oldStrID = oldStrID + (AddElemID==','?'':AddElemID);
|
j$(escapeVfId('allPage:allForm:ResponseBlock:Cc')).val(oldStr);
|
j$(escapeVfId('allPage:allForm:ResponseBlock:Ccid')).val(oldStrID);
|
j$(escapeVfId('allPage:allForm:ResponseBlock:Mail_Tar_Selector__c')).val(null);
|
// 以输入的信息置空
|
|
}
|
function reloadJs(){
|
initJs();
|
}
|
function refreshPage(){
|
|
var resStatus = j$(escapeVfId('allPage:allForm:ResponseBlock:mailStatus')).val();
|
if(resStatus =='Fin'){
|
setTimeout( alert('发送完成'),5000 );
|
top.window.opener.reloadJs();
|
top.window.close();
|
}
|
}
|
</script>
|
<apex:form id="allForm">
|
<apex:actionFunction action="{!sendMail}" name="sendMail"/>
|
<apex:actionFunction action="{!init}" name="initJs" />
|
<apex:pageBlock id="allBlock" rendered="{!IF(isShowFlg=='true',true,false)}">
|
|
<apex:pageBlockButtons location="top" style="display:flex">
|
<apex:commandButton title="SI部门" value="TO:SP-SI" onclick="SendToSIJs()" />
|
<apex:commandButton title="申请者" value="TO:营业本部" onclick="SendToApplyJs()" />
|
</apex:pageBlockButtons>
|
<apex:inputField id="response" value="{!oppEle.response__c}" style="width:100%; height:330px; resize:none;"/>
|
<script>
|
j$(escapeVfId('allPage:allForm:allBlock:response')).attr('readonly', true);
|
</script>
|
</apex:pageBlock>
|
<apex:pageBlock rendered="{!IF(isShowFlg=='true',false,true)}" id="ResponseBlock">
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<apex:inputHidden id="mailStatus" value="{!mailStatus}"/>
|
<apex:pageBlockButtons location="top" style="padding-left: 17px; display: flex;">
|
<div style="padding-right: 8px;">
|
<apex:commandButton onclick="ConfirmJs(); " value="发送" rerender="allForm,ResponseBlock,message,mailStatus" oncomplete="refreshPage();" />
|
</div>
|
<apex:commandButton onclick="CancelJs(); " value="取消" rerender="dummy" oncomplete="CancelJs();"/>
|
</apex:pageBlockButtons>
|
<apex:inputField value="{!oppEle.Mail_Tar_Selector__c}" id="Mail_Tar_Selector__c" style="padding-left: 17px;padding-bottom: 5px;" styleClass="hideDropdown"/>
|
<div style="width: 200px;padding-left:17px;">
|
<apex:commandButton onclick="AddCcjs(); return false;" value="追加Cc" style="width: 80px;" rerender="dummy"/>
|
</div>
|
<div style="width: 80%;padding-top: 5px;">
|
Cc:<apex:inputText value="{!Cc}" id="Cc" style="width: 80%;"/>
|
</div>
|
<apex:inputHidden value="{!Ccid}" id="Ccid" />
|
<apex:inputHidden value="{!MailTarget}" id="MailTarget" />
|
<div style="width:100%; height:120px; resize:none;padding-left: 17px;padding-top: 5px;">
|
<apex:inputTextarea id="response" value="{!MailDetail}" style="width:100%; height:120px; resize:none;padding-left: 8px;padding-top: 5px;"/>
|
</div>
|
</apex:pageBlock>
|
</apex:form>
|
|
<script>
|
//标准控件弹出页面修改 start
|
|
//查询参数列表
|
let SelectFieldParamList=[
|
//
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId : 'allPage:allForm:ResponseBlock:Mail_Tar_Selector__c',
|
//查找字段所在对象
|
ObjectType : 'Opportunity',
|
//查找字段的api名称
|
QueryFieldApiName : 'Mail_Tar_Selector__c',
|
//查找字段的查找对象
|
SelectObj : 'User',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
},
|
]
|
//初始化
|
resetOpenPage(SelectFieldParamList);
|
//标准控件弹出页面修改 end
|
|
</script>
|
</apex:page>
|