88 lines
4.3 KiB
Plaintext
88 lines
4.3 KiB
Plaintext
<%@page import="com.tenwa.reckon.product.ASObjectWindowCalc"%>
|
|
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
|
/*
|
|
Author: undefined 2017-08-02
|
|
Content: 示例详情页面
|
|
History Log:
|
|
*/
|
|
String option = CurPage.getParameter("option");
|
|
String id = CurPage.getParameter("id");
|
|
//新增和修改的查询逻辑不同,需要判断
|
|
String sql = "select BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE from LC_STANDARD_INTEREST ";
|
|
if("edit".equals(option)){
|
|
sql+="where start_date=(select max(start_date) from LC_STANDARD_INTEREST where start_date<(select start_date from LC_STANDARD_INTEREST where id='"+CurPage.getParameter("id")+"'))";
|
|
}else{
|
|
sql += "where start_date=(select max(start_date) from LC_STANDARD_INTEREST)";
|
|
}
|
|
ASResultSet rs = Sqlca.getASResultSet2(sql);
|
|
String BASE_RATE_HALF = "";
|
|
String BASE_RATE_ONE = "";
|
|
String BASE_RATE_THREE = "";
|
|
String BASE_RATE_FIVE = "";
|
|
String BASE_RATE_ABOVEFIVE = "";
|
|
if(rs.next()){
|
|
BASE_RATE_HALF = rs.getStringValue("BASE_RATE_HALF");
|
|
BASE_RATE_ONE = rs.getStringValue("BASE_RATE_ONE");
|
|
BASE_RATE_THREE = rs.getStringValue("BASE_RATE_THREE");
|
|
BASE_RATE_FIVE = rs.getStringValue("BASE_RATE_FIVE");
|
|
BASE_RATE_ABOVEFIVE = rs.getStringValue("BASE_RATE_ABOVEFIVE");
|
|
}
|
|
|
|
String sTempletNo = "LCStandardInterestInfo3";//--模板号--
|
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
|
doTemp.setColTips("BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE", "本次利率");
|
|
doTemp.setColTips("ADJUSTED1,ADJUSTED2,ADJUSTED3,ADJUSTED4,ADJUSTED5", "上一次利率");
|
|
doTemp.setHtmlEvent("BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE", "onchange", "getRateByBase");
|
|
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
|
|
dwTemp.Style = "2";//freeform
|
|
dwTemp.genHTMLObjectWindow(id);
|
|
String sButtons[][] = {
|
|
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
|
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
|
|
};
|
|
sButtonPosition = "south";
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
var id="<%=id%>";
|
|
setItemValue(0,0,"ID",id);
|
|
$('.info_data_tablecommon .info_group_table').remove();//移除分组
|
|
$('td .info_mid_line').attr('width','33%');//设置列宽比
|
|
$('td .info_td_left').attr('style','width:130px;');//设置标题宽
|
|
$('#SEIZEASEAT').parent().parent().remove();//移除占位字段,但不移除占位效果
|
|
$("#div_my0").append("<span style='color:red;'>* 说明:新增第一条初始利率后(由于系统不存在上次利率默认调整幅度为0.0%),第二次及以后新增则自动带出上次利率,填写调整后,计算调整幅度。<span>");
|
|
setItemValue(0,0,'ADJUSTED1','<%=BASE_RATE_HALF%>');
|
|
setItemValue(0,0,'ADJUSTED2','<%=BASE_RATE_ONE%>');
|
|
setItemValue(0,0,'ADJUSTED3','<%=BASE_RATE_THREE%>');
|
|
setItemValue(0,0,'ADJUSTED4','<%=BASE_RATE_FIVE%>');
|
|
setItemValue(0,0,'ADJUSTED5','<%=BASE_RATE_ABOVEFIVE%>');
|
|
|
|
})
|
|
function returnList(){
|
|
var pUrl="/Tenwa/Core/Standard/CentralLCStandardInterestList.jsp";
|
|
AsControl.OpenView(pUrl, "","_self","");
|
|
}
|
|
|
|
function getRateByBase(){
|
|
//本次基准利率
|
|
var BASE_RATE_HALF=getItemValue(0,0,'BASE_RATE_HALF');
|
|
var BASE_RATE_ONE=getItemValue(0,0,'BASE_RATE_ONE');
|
|
var BASE_RATE_THREE=getItemValue(0,0,'BASE_RATE_THREE');
|
|
var BASE_RATE_FIVE=getItemValue(0,0,'BASE_RATE_FIVE');
|
|
var BASE_RATE_ABOVEFIVE=getItemValue(0,0,'BASE_RATE_ABOVEFIVE');
|
|
//上一次央行基准利率
|
|
var sBASE_RATE_HALF = "<%=BASE_RATE_HALF%>";
|
|
var sBASE_RATE_ONE = "<%=BASE_RATE_ONE%>";
|
|
var sBASE_RATE_THREE = "<%=BASE_RATE_THREE%>";
|
|
var sBASE_RATE_FIVE = "<%=BASE_RATE_FIVE%>";
|
|
var sBASE_RATE_ABOVEFIVE = "<%=BASE_RATE_ABOVEFIVE%>";
|
|
//浮动利率
|
|
setItemValue(0,0,'RATE_HALF',(parseFloat(BASE_RATE_HALF)-parseFloat(sBASE_RATE_HALF))+'');
|
|
setItemValue(0,0,'RATE_ONE',(parseFloat(BASE_RATE_ONE)-parseFloat(sBASE_RATE_ONE))+'');
|
|
setItemValue(0,0,'RATE_THREE',(parseFloat(BASE_RATE_THREE)-parseFloat(sBASE_RATE_THREE))+'');
|
|
setItemValue(0,0,'RATE_FIVE',(parseFloat(BASE_RATE_FIVE)-parseFloat(sBASE_RATE_FIVE))+'');
|
|
setItemValue(0,0,'RATE_ABOVEFIVE',(parseFloat(BASE_RATE_ABOVEFIVE)-parseFloat(sBASE_RATE_ABOVEFIVE))+'');
|
|
}
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |