apzl_leasing/WebContent/Tenwa/Lease/ChannelManage/selectQuotaSeparateInfo.jsp
2018-06-03 22:26:41 +08:00

103 lines
4.0 KiB
Plaintext

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2017-10-20
Content: 示例详情页面
History Log:
*/
String partnelid = CurPage.getParameter("partnelid");
String id = CurPage.getParameter("Id");
String ChannelId = CurPage.getParameter("ChannelId");
String PRODUCTID=CurPage.getParameter("PRODUCTID");
String sTempletNo = "ChannelQuotaSeparateInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setDefaultValue("CHANNELID", ChannelId);
doTemp.setDefaultValue("partnelid", partnelid);
//doTemp.setColTips("", "测试");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
CurPage.getCurComp().setAttribute("RightType", "ReadOnly");
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(id);
String sButtons[][] = {
{"true","","Button","返回","返回列表","returnList()","","","","btn_icon_back"}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
setItemValue(0,0,"TYPENAME","<%=PRODUCTID%>");
})
function returnList(){
var partnelid = "<%=partnelid%>";
var ChannelId = "<%=ChannelId%>";
var sPrevUrl = "/Tenwa/Lease/ChannelManage/selectQuotaSeparateList.jsp";
<!-- AsControl.OpenView("partnelid="+partnelid+"&ChannelId="+ChannelId,"","_self","");-->
AsDialog.ClosePage();
}
function selectBusinessType(){
AsDialog.OpenSelector("SelectBusinessType","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"PRODUCTID",sReturn[0]);
setItemValue(0,0,"TYPENAME",sReturn[1]);
},"请选择业务品种",'');
}
function selectOrgList(){
AsDialog.PopView("/Tenwa/Core/ChannelCRMManager/SelectOrg/ThreeOrgTree.jsp","OrgID=8&ShowType=ThreeTree",
"dialogWidth=500px;dialogHeight=600px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sReturnInfo){
if(!sReturnInfo=="_CANCEL_"||sReturnInfo==""||sReturnInfo=="_NONE_"){
return;
}
sReturn = sReturnInfo.split("@");
sReturnNo = sReturn[0].split(",");
setItemValue(0,0,"ORGID",sReturnNo[3]);
sReturnName = sReturn[1].split(",");
setItemValue(0,0,"ORGNAME",sReturnName[3]);
},"渠道机构");
}
//查询是否超过总额度
function selectAllQuoat(){
var sPara = "<%=ChannelId%>";
var productId = getItemValue(0,getRow(0),'PRODUCTID');
var orgID = getItemValue(0,getRow(0),'ORGID');
var Product_Quota = getItemValue(0,getRow(0),'Product_Quota');//渠道分项额度
if(orgID == "" || productId == ""){
AsDebug.showMessage('提示:','请选择产品名称与分支机构名称',400,100,true);
return;
}
alert(sPara);
var result = AsControl.RunJavaMethodTrans("com.tenwa.channelmanage.ChannelManageAction","selectQuota","ChannelId="+sPara+",Product_Quota="+Product_Quota);
if(result == "false"){
AsDebug.showMessage('提示:','分支机构总额度超过总额度,请重新设置',400,100,true);
return;
}
}
//查询该渠道下是否设置该额度 已经设置不允许保存
function saveRegtion(){
var channelId = "<%=ChannelId%>";
var productId = getItemValue(0,getRow(0),'PRODUCTID');
var orgID = getItemValue(0,getRow(0),'ORGID');
var Product_Quota = getItemValue(0,getRow(0),'Product_Quota');//渠道分项额度
if(orgID == "" || productId == ""){
AsDebug.showMessage('提示:','请选择产品名称与分支机构名称',400,100,true);
}/* else{
var result = AsControl.RunJavaMethodTrans("com.tenwa.channelmanage.ChannelManageAction","selectChannelId","productId="+productId+",orgID="+orgID);
if(result == "success"){
}else{
AsDebug.showMessage('提示:','该渠道下该产品已经设置额度,请勿重复设置',400,100,true);
}
} */
selectAllQuoat();
as_save(0);
AsDialog.ClosePage();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>