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

83 lines
3.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2017-10-20
Content: 示例详情页面
History Log:
*/
String sPrevUrl = CurPage.getParameter("PARTNER_NUM");
if(sPrevUrl == null) sPrevUrl = "";
String RightType = CurPage.getParameter("RightType");
String sTempletNo = "ChannelQuotaTotalInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
doTemp.setDefaultValue("orgid", CurPage.getParameter("OrgId"));
doTemp.setDefaultValue("PARTNER_NAME", CurPage.getParameter("OrgName"));
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("OrgId"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","saveRecord()","","","",""},
{"true","","Button","返回","返回列表","returnList()","","","","btn_icon_back"}
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
$("#div_my0").append("<p style='color:red;'>* 说明:1.‘当天额度’相当于暂存额度,不影响已使用和未使用额度。<p>");
$("#div_my0").append("<p style='color:red;'>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.已使用未使用历史额度在每晚12:00根据当天额度重新计算。计算后当天额度清0。<p>");
$("#div_my0").append("<p style='color:red;'>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.修改总额度将影响未使用额度值<p>");
$("#div_my0").append("<p style='color:red;'>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.额度失效日若小于当前系统时间将导致当前额度不可用<p>");
$("#div_my0").append("<p style='color:red;'>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.如果当天额度不足以返还占用额度值的时候,将使用已使用额度<p>");
})
function returnList(){
//AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
AsDialog.ClosePage();
}
function saveRecord(){
var valueDate=getItemValue(0,0,'VALUE_DATE');
var expiryDate=getItemValue(0,0,'EXPIRY_DATE');
if((new Date(valueDate))>(new Date(expiryDate))){
AsDebug.showMessage("提示","额度生效日期应该小于失效日期!","","","");
return;
}
var ChannelQuotaTotal=getItemValue(0,0,'ALL_QUOT');
var ChannelId=getItemValue(0,0,'ID');
var nouser=getItemValue(0,0,'QUOTA_NOUSED');
if(nouser<0){
AsDebug.showMessage("提示","额度设置不能小于已用额度!","","","");
return;
}
var checkQuotaToa = AsControl.RunJavaMethodTrans("com.tenwa.channelmanage.ChannelManageAction","checkChannelQuotaTotal","ChannelQuotaTotal="+ChannelQuotaTotal+",ChannelId="+ChannelId);
if(checkQuotaToa.length!=0){
AsDebug.showMessage('提示:',checkQuotaToa,400,100,true);
return;
}
//as_save(0);
as_save("myiframe0","");
}
function setUsedQuota(){
debugger;
var id = getItemValue(0,0,'id');
var nouser = getItemValue(0,0,'ALL_QUOT')
if(typeof(id)=="undefined" || id.length==0 ){
setItemValue(0, 0, "QUOTA_NOUSED", nouser);
setItemValue(0, 0, "QUOTA_HIS", "0");
setItemValue(0, 0, "QUOTA_NOW", "0");
setItemValue(0, 0, "QUOTA_USED", "0");
}else{
var all_quota = getItemValue(0,0,'all_quot');
var quota_used = getItemValue(0,0,'QUOTA_USED');
var quota_his = getItemValue(0,0,'QUOTA_HIS');
var quota_now = getItemValue(0,0,'QUOTA_NOW');
var noused = all_quota-quota_used;
setItemValue(0, 0, "QUOTA_NOUSED",noused);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>