2021-04-09 16:38:12 +08:00

69 lines
2.8 KiB
Plaintext

<%@page import="com.itextpdf.text.log.SysoCounter"%>
<%@ page contentType="text/html; charset=GBK"%><%@
include
file="/Frame/resources/include/include_begin_info.jspf"%>
<%
String sTempletNo = "SplittingRatioInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.ReadOnly = "0";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
String sButtons[][] = {
{"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""},
{"true","All","Button","根据产品ID补录分润计划","根据产品ID补录分润计划","split()","","","","btn_icon_delete",""},
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
/*经销商自动代偿配置经销商便函选择对话框*/
function selectno(){
AsDialog.OpenSelector("selectno", "", "dialogWidth=" + parseInt(window.screen.width * 0.3) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
//alert(getHtmlMessage('1'));
return;
}
sReturn = sReturn.split("@");
setItemValue(0, getRow(), "distributor_id",sReturn[0]);
setItemValue(0, getRow(), "distributor_name",sReturn[1]);
}, "请选择经销商")
}
function selectProduct(){
AsDialog.OpenSelector("selectProductList", "", "dialogWidth=" + parseInt(window.screen.width * 0.3) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0, getRow(), "product_id",sReturn[0]);
setItemValue(0, getRow(), "product_name",sReturn[1]);
}, "请选择产品")
}
function goBack(){
parent.AsDialog.ClosePage();
}
function saveRecord(sPostEvents) {
var distributor_id = getItemValue(0, 0, "distributor_id");
var product_id = getItemValue(0, 0, "product_id");
var sReturn = AsControl.RunJsp("/Tenwa/Lease/Flow/Project/BusinessApplication/CheckSplittingRatio.jsp","product_id="+product_id+"&distributor_id="+distributor_id);
if(sReturn=="true"){
alert("当前渠道商的产品已配置分润利率,请勿重复配置!");
return;
}
as_save("myiframe0", "goBack()");
}
function split(){
var distributorId = getItemValue(0,0,'distributor_id');
var productId = getItemValue(0,0,'product_id');
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","getSplitByProductId","productId="+productId+",distributorId="+distributorId);
if(message=="success"){
alert("操作成功");
}else{
alert(message);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>