初始化项目
This commit is contained in:
commit
b2081b925f
32
.classpath
Normal file
32
.classpath
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="calc"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="src" path="src_acct"/>
|
||||||
|
<classpathentry kind="src" path="src_base"/>
|
||||||
|
<classpathentry kind="src" path="src_core"/>
|
||||||
|
<classpathentry kind="src" path="src_prd"/>
|
||||||
|
<classpathentry kind="src" path="src_sys"/>
|
||||||
|
<classpathentry kind="src" path="src_tenwa"/>
|
||||||
|
<classpathentry kind="src" path="config"/>
|
||||||
|
<classpathentry kind="src" path="src_app"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||||
|
<classpathentry kind="var" path="TOMCAT_HOME/lib/servlet-api.jar"/>
|
||||||
|
<classpathentry kind="var" path="TOMCAT_HOME/lib/jasper.jar"/>
|
||||||
|
<classpathentry kind="var" path="TOMCAT_HOME/lib/jsp-api.jar"/>
|
||||||
|
<classpathentry kind="var" path="TOMCAT_HOME/lib/el-api.jar"/>
|
||||||
|
<classpathentry kind="var" path="TOMCAT_HOME/lib/annotations-api.jar"/>
|
||||||
|
<classpathentry kind="src" path="src_jbo"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="owner.project.facets" value="jst.web"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="owner.project.facets" value="java"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
|
||||||
|
</classpath>
|
||||||
11
.tomcatplugin
Normal file
11
.tomcatplugin
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tomcatProjectProperties>
|
||||||
|
<rootDir>/WebContent</rootDir>
|
||||||
|
<exportSource>false</exportSource>
|
||||||
|
<reloadable>true</reloadable>
|
||||||
|
<redirectLogger>false</redirectLogger>
|
||||||
|
<updateXml>true</updateXml>
|
||||||
|
<warLocation></warLocation>
|
||||||
|
<extraInfo></extraInfo>
|
||||||
|
<webPath>/apzl</webPath>
|
||||||
|
</tomcatProjectProperties>
|
||||||
1
WebContent/.gitignore
vendored
Normal file
1
WebContent/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/META-INF/
|
||||||
29
WebContent/Accounting/AccountingRedirector.jsp
Normal file
29
WebContent/Accounting/AccountingRedirector.jsp
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBeginMD.jsp"%>
|
||||||
|
<%
|
||||||
|
//»ñµÃ×é¼þ²ÎÊý
|
||||||
|
String sObjectType = CurPage.getParameter("ObjectType");
|
||||||
|
String sObjectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
<%
|
||||||
|
if(sObjectType.equalsIgnoreCase("Transaction")){
|
||||||
|
%>
|
||||||
|
OpenPage("/Accounting/Transaction/TransactionInfo.jsp?ObjectType=<%=sObjectType%>&ObjectNo=<%=sObjectNo%>","_self","");
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else if(sObjectType.equalsIgnoreCase("Loan")){
|
||||||
|
%>
|
||||||
|
OpenPage("/Accounting/LoanDetail/AcctLoanView.jsp?ObjectNo=<%=sObjectNo%>","_self","");
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
%>
|
||||||
|
OpenPage("/CreditManage/CreditApply/CreditView.jsp?ObjectType=<%=sObjectType%>&ObjectNo=<%=sObjectNo%>","_self","");
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
186
WebContent/Accounting/Config/AccountCodeConfigInfo.jsp
Normal file
186
WebContent/Accounting/Config/AccountCodeConfigInfo.jsp
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "示例详情页面"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
|
||||||
|
//获得组件参数
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String sBookType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("BookType"));
|
||||||
|
String sItemNo = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ItemNo"));
|
||||||
|
if(sItemNo==null) sItemNo="";
|
||||||
|
if(sBookType==null) sBookType="";
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "AccountCodeConfigInfo";
|
||||||
|
String sTempletFilter = "1=1";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo,sTempletFilter);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(sItemNo);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存所有修改","saveRecord()",sResourcesPath},
|
||||||
|
{"true","","Button","返回","返回列表页面","goBack()",sResourcesPath}
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var bIsInsert = false; //标记DW是否处于“新增状态”
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
|
||||||
|
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(sPostEvents)
|
||||||
|
{
|
||||||
|
if(bIsInsert){
|
||||||
|
beforeInsert();
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeUpdate();
|
||||||
|
as_save("myiframe0",sPostEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=返回列表页面;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function goBack()
|
||||||
|
{
|
||||||
|
AsControl.OpenView("/Accounting/Config/AccountCodeConfigList.jsp","BookType=<%=sBookType%>", "_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*~[Describe=执行插入操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function beforeInsert()
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"InputUser","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"InputUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"InputOrg","<%=CurUser.getOrgID()%>");
|
||||||
|
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
|
||||||
|
bIsInsert = false;
|
||||||
|
}
|
||||||
|
/*~[Describe=执行更新操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function beforeUpdate()
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"UpdateUser","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"UpdateUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
|
||||||
|
setItemValue(0,0,"UpdateDate","<%=StringFunction.getTodayNow()%>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=弹出机构选择窗口,并置将返回的值设置到指定的域;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function selectOrg(sOrgID,sOrgName)
|
||||||
|
{
|
||||||
|
setObjectValue("SelectAllOrg","","@"+sOrgID+"@0@"+sOrgName+"@1",0,0,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function selectAllBookType(){
|
||||||
|
//setMultiObjectTreeValue("SelectOIKOrgID","","@ItemAttribute@0@ItemAttributeName@1",0,0,"");
|
||||||
|
setMultiObjectTreeValue("SelectAllBookType","","@BookType@0@BookTypeName@1",0,0,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=页面装载时,对DW进行初始化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initRow()
|
||||||
|
{
|
||||||
|
if (getRowCount(0)==0) //如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
{
|
||||||
|
bIsInsert = true;
|
||||||
|
setItemValue(0,0,"CodeNo","AccountCodeConfig");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMultiObjectTreeValue(sObjectType,sParaString,sValueString,iArgDW,iArgRow,sStyle)
|
||||||
|
{
|
||||||
|
if(typeof(sStyle)=="undefined" || sStyle=="") sStyle = "dialogWidth:700px;dialogHeight:540px;resizable:yes;scrollbars:no;status:no;help:no";
|
||||||
|
var iDW = iArgDW;
|
||||||
|
if(iDW == null) iDW=0;
|
||||||
|
var iRow = iArgRow;
|
||||||
|
if(iRow == null) iRow=0;
|
||||||
|
|
||||||
|
var sValues = sValueString.split("@");
|
||||||
|
|
||||||
|
var i=sValues.length;
|
||||||
|
i=i-1;
|
||||||
|
if (i%2!=0)
|
||||||
|
{
|
||||||
|
alert("setObjectValue()返回参数设定有误!\r\n格式为:@ID列名@ID在返回串中的位置...");
|
||||||
|
return;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
var treeValueList="";
|
||||||
|
var j=i/2,m,sColumn,iID;
|
||||||
|
for(m=1;m<=j;m++)
|
||||||
|
{
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
iID = parseInt(sValues[2*m],10);
|
||||||
|
|
||||||
|
if(sColumn!="")
|
||||||
|
treeValueList+=","+getItemValue(iDW,iRow,sColumn);
|
||||||
|
}
|
||||||
|
|
||||||
|
sObjectNoString = selectMultipleTree(sObjectType,sParaString,sStyle,treeValueList);
|
||||||
|
|
||||||
|
if(typeof(sObjectNoString)=="undefined" )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}else if(sObjectNoString=="_CANCEL_" )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}else if(sObjectNoString=="_CLEAR_")
|
||||||
|
{
|
||||||
|
for(m=1;m<=j;m++)
|
||||||
|
{
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
if(sColumn!="")
|
||||||
|
setItemValue(iDW,iRow,sColumn,"");
|
||||||
|
}
|
||||||
|
}else if(sObjectNoString!="_NONE_" && sObjectNoString!="undefined")
|
||||||
|
{
|
||||||
|
sObjectNos = sObjectNoString.split("@");
|
||||||
|
for(m=1;m<=j;m++)
|
||||||
|
{
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
iID = parseInt(sValues[2*m],10);
|
||||||
|
|
||||||
|
if(sColumn!="")
|
||||||
|
setItemValue(iDW,iRow,sColumn,sObjectNos[iID]);
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//alert("选取对象编号失败!对象类型:"+sObjectType);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return sObjectNoString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectMultipleTree(sObjectType,sParaString,sStyle,sValue)
|
||||||
|
{
|
||||||
|
if(typeof(sStyle)=="undefined" || sStyle=="") sStyle = "dialogWidth:680px;dialogHeight:540px;resizable:yes;scrollbars:no;status:no;help:no";
|
||||||
|
if(typeof(sValue)=="undefined" || sValue=="") sValue = "";
|
||||||
|
sObjectNoString = AsControl.PopView("/Accounting/Config/MultiSelectTreeViewDialog.jsp","SelectedValue="+sValue+"&SelName="+sObjectType+"&ParaString="+sParaString,sStyle);
|
||||||
|
return sObjectNoString;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
78
WebContent/Accounting/Config/AccountCodeConfigList.jsp
Normal file
78
WebContent/Accounting/Config/AccountCodeConfigList.jsp
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件类别列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
|
||||||
|
//获取组件参数
|
||||||
|
|
||||||
|
//获取页面参数
|
||||||
|
String sBookType = (String)CurPage.getParameter("BookType");
|
||||||
|
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "AccountCodeConfigList";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(200);
|
||||||
|
|
||||||
|
//定义后续事件
|
||||||
|
//dwTemp.setEvent("AfterDelete","!SystemManage.DeleteOrgBelong(#OrgID)");
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow("AccountCodeConfig,"+sBookType);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增一条记录","newRecord()","","","",""},
|
||||||
|
{"true","","Button","详情","查看/修改详情","viewAndEdit()","","","",""},
|
||||||
|
{"true","","Button","删除","删除所选中的记录","deleteRecord()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var sCurCodeNo=""; //记录当前所选择行的代码号
|
||||||
|
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord()
|
||||||
|
{
|
||||||
|
AsControl.OpenView("/Accounting/Config/AccountCodeConfigInfo.jsp","BookType=<%=sBookType%>","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=查看及修改详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewAndEdit()
|
||||||
|
{
|
||||||
|
var sItemNo = getItemValue(0,getRow(),"ItemNo"); //条款类别编号
|
||||||
|
if(typeof(sItemNo)=="undefined" || sItemNo.length==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
AsControl.OpenView("/Accounting/Config/AccountCodeConfigInfo.jsp","ItemNo="+sItemNo+"&BookType=<%=sBookType%>","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord()
|
||||||
|
{
|
||||||
|
var sItemNo = getItemValue(0,getRow(),"ItemNo"); //条款类别编号
|
||||||
|
if(typeof(sItemNo) == "undefined" || sItemNo.length == 0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))) //您真的想删除该信息吗?
|
||||||
|
{
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
58
WebContent/Accounting/Config/AccountCodeConfigMain.jsp
Normal file
58
WebContent/Accounting/Config/AccountCodeConfigMain.jsp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件主界面"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
String PG_CONTENT_TITLE = " 业务组件管理 "; //默认的内容区标题
|
||||||
|
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
|
||||||
|
String PG_LEFT_WIDTH = "200";//默认的treeview宽度
|
||||||
|
|
||||||
|
|
||||||
|
//定义Treeview
|
||||||
|
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage, "业务组件管理查询","right");
|
||||||
|
|
||||||
|
//定义树图结构,去掉跟踪的不良资产和催收函快速查询
|
||||||
|
String sSqlTreeView = " from O where CodeNo= 'AccountBookType' and IsInUse = '1' ";
|
||||||
|
tviTemp.init(JBOFactory.getBizObjectManager("jbo.sys.CODE_LIBRARY"), "SortNo","ItemName","ItemDescribe","","",sSqlTreeView,"Order By SortNo");
|
||||||
|
|
||||||
|
//参数从左至右依次为:
|
||||||
|
//ID字段(必须),Name字段(必须),Value字段,Script字段,Picture字段,From子句(必须),OrderBy子句,Sqlca
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_main.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
/*~[Describe=treeview单击选中事件;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function TreeViewOnClick(){
|
||||||
|
var sCurItemID = getCurTVItem().id;
|
||||||
|
var sCurItemName = getCurTVItem().name;
|
||||||
|
var sCurItemDescribe = getCurTVItem().value;
|
||||||
|
if(typeof(sCurItemDescribe) == "undefined" || sCurItemDescribe.length == 0)
|
||||||
|
return;
|
||||||
|
sCurItemDescribe = sCurItemDescribe.split("@");
|
||||||
|
sCurItemDescribe1=sCurItemDescribe[0]; //代码表描述字段中用@分隔的第1个串
|
||||||
|
sCurItemDescribe2=sCurItemDescribe[1]; //代码表描述字段中用@分隔的第2个串
|
||||||
|
sCurItemDescribe3=sCurItemDescribe[2]; //代码表描述字段中用@分隔的第3个串,根据情况,还可以很多。
|
||||||
|
if(sCurItemDescribe1 != "null" && sCurItemDescribe1 != "root"){
|
||||||
|
AsControl.OpenView(sCurItemDescribe1,sCurItemDescribe3,"right","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=生成treeview;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function startMenu(){
|
||||||
|
<%=tviTemp.generateHTMLTreeView()%>
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
startMenu();
|
||||||
|
expandNode('root');
|
||||||
|
selectItem('010');
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
118
WebContent/Accounting/Config/AccountingCatalogList.jsp
Normal file
118
WebContent/Accounting/Config/AccountingCatalogList.jsp
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "账务代码方案定义信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//CurPage.setAttribute("ShowDetailArea","true");
|
||||||
|
//CurPage.setAttribute("DetailAreaHeight","180");
|
||||||
|
|
||||||
|
//获取组件参数
|
||||||
|
|
||||||
|
//获取页面参数
|
||||||
|
String sBookType = (String)CurPage.getParameter("BookType");
|
||||||
|
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "AccountingCatalogList";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(200);
|
||||||
|
|
||||||
|
//定义后续事件
|
||||||
|
//dwTemp.setEvent("AfterDelete","!SystemManage.DeleteOrgBelong(#OrgID)");
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow("");
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增一条记录","newRecord()","","","",""},
|
||||||
|
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
|
||||||
|
{"true","","Button","删除","删除所选中的记录","deleteRecord()","","","",""},
|
||||||
|
{"true","","Button","配置方案条件","配置方案具体条件","edit()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var oldAccountingNo=""; //记录当前所选
|
||||||
|
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord()
|
||||||
|
{
|
||||||
|
initSerialNo();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(sPostEvents)
|
||||||
|
{
|
||||||
|
as_save("myiframe0",sPostEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord()
|
||||||
|
{
|
||||||
|
var accountingNo = getItemValue(0,getRow(),"AccountingNo"); //条款类别编号
|
||||||
|
if(typeof(accountingNo) == "undefined" || accountingNo.length == 0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))) //您真的想删除该信息吗?
|
||||||
|
{
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=配置变化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function edit()
|
||||||
|
{
|
||||||
|
var accountingNo = getItemValue(0,getRow(),"AccountingNo"); //条款类别编号
|
||||||
|
if(typeof(accountingNo) == "undefined" || accountingNo.length == 0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
AsControl.OpenView("/Accounting/Config/ConditionRuleDef.jsp","ObjectNo="+accountingNo+"&ObjectType=jbo.app.ACCOUNTING_CATALOG","_blank",OpenStyle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*~[Describe=初始化流水号字段;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initSerialNo()
|
||||||
|
{
|
||||||
|
var sTableName = "ACCOUNTING_CATALOG";//表名
|
||||||
|
var sColumnName = "AccountingNo";//字段名
|
||||||
|
var sPrefix = "";//前缀
|
||||||
|
|
||||||
|
//获取流水号
|
||||||
|
var sSerialNo = getSerialNo(sTableName,sColumnName,sPrefix);
|
||||||
|
//将流水号置入对应字段
|
||||||
|
setItemValue(0,getRow(),sColumnName,sSerialNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=选择变化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function mySelectRow()
|
||||||
|
{
|
||||||
|
var accountingNo = getItemValue(0,getRow(),"AccountingNo");
|
||||||
|
if(typeof(accountingNo)=="undefined" || accountingNo.length==0) {
|
||||||
|
OpenPage("/Blank.jsp?TextToShow=请选择一条记录","DetailFrame","");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(oldAccountingNo!=accountingNo)
|
||||||
|
{
|
||||||
|
OpenComp("AccountingLibraryList","/Accounting/Config/AccountingLibraryList.jsp","AccountingNo="+accountingNo,"DetailFrame","");
|
||||||
|
oldAccountingNo = accountingNo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
81
WebContent/Accounting/Config/AccountingLibraryList.jsp
Normal file
81
WebContent/Accounting/Config/AccountingLibraryList.jsp
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "账务代码方案定义明细"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
|
||||||
|
//获取组件参数
|
||||||
|
|
||||||
|
//获取页面参数
|
||||||
|
String accountingNo = DataConvert.toString(DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("AccountingNo")));
|
||||||
|
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "AccountingLibraryList";
|
||||||
|
String sTempletFilter = "1=1";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo,sTempletFilter);
|
||||||
|
|
||||||
|
//增加过滤器
|
||||||
|
doTemp.generateFilters(Sqlca);
|
||||||
|
doTemp.parseFilterData(request,iPostChange);
|
||||||
|
CurPage.setAttribute("FilterHTML",doTemp.getFilterHtml(Sqlca));
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(200);
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(accountingNo);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增一条记录","newRecord()",sResourcesPath},
|
||||||
|
{"true","","Button","保存","保存所有修改","saveRecord()",sResourcesPath},
|
||||||
|
{"true","","Button","删除","删除所选中的记录","deleteRecord()",sResourcesPath}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var sCurCodeNo=""; //记录当前所选择行的代码号
|
||||||
|
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord()
|
||||||
|
{
|
||||||
|
setItemValue(0,getRow(),"AccountingNo","<%=accountingNo%>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(sPostEvents)
|
||||||
|
{
|
||||||
|
as_save("myiframe0",sPostEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord()
|
||||||
|
{
|
||||||
|
var accountCodeNo = getItemValue(0,getRow(),"AccountCodeNo"); //条款类别编号
|
||||||
|
if(typeof(accountCodeNo) == "undefined" || accountCodeNo.length == 0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))) //您真的想删除该信息吗?
|
||||||
|
{
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=选择银行科目信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function selectSubjectInfo(){
|
||||||
|
setObjectValue("SelectSubjectInfo","CodeNo,AccountCodeConfig,BankNo,B","@SubjectNo@0@SubjectName@1",0,0,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
76
WebContent/Accounting/Config/ConditionRuleAction.jsp
Normal file
76
WebContent/Accounting/Config/ConditionRuleAction.jsp
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBeginMD.jsp"%>
|
||||||
|
<%
|
||||||
|
String type = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("Type"));//操作类型update ,getCode
|
||||||
|
String serialNo = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("SerialNo"));
|
||||||
|
if(serialNo==null)serialNo = "";
|
||||||
|
String compareType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("CompareType"));
|
||||||
|
if(compareType==null)compareType = "";
|
||||||
|
String colID = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ColID"));
|
||||||
|
if(colID==null)colID = "";
|
||||||
|
String colName = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ColName"));
|
||||||
|
if(colName==null)colName = "";
|
||||||
|
String colType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ColType"));
|
||||||
|
if(colType==null)colType = "";
|
||||||
|
String colSource = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ColSource"));
|
||||||
|
if(colSource==null)colSource = "";
|
||||||
|
String valueList = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ValueList"));
|
||||||
|
if(valueList==null)valueList = "";
|
||||||
|
String valusListName = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ValueListName"));
|
||||||
|
if(valusListName==null)valusListName = "";
|
||||||
|
|
||||||
|
if("update".equalsIgnoreCase(type))
|
||||||
|
{
|
||||||
|
String sql="update CONDITION_RULE set CompareType=:CompareType,ColID=:ColID,ColName=:ColName,ColType=:ColType,ColSource=:ColSource,ValueList=:ValueList,ValueListName=:ValueListName where SerialNo=:SerialNo ";
|
||||||
|
Sqlca.executeSQL(new SqlObject(sql).setParameter("CompareType",compareType)
|
||||||
|
.setParameter("ColID",colID)
|
||||||
|
.setParameter("ColName",colName)
|
||||||
|
.setParameter("ColType",colType)
|
||||||
|
.setParameter("SerialNo",serialNo)
|
||||||
|
.setParameter("ColSource",colSource)
|
||||||
|
.setParameter("ValueList",valueList)
|
||||||
|
.setParameter("ValueListName",valusListName));
|
||||||
|
%>
|
||||||
|
<script language=javascript>
|
||||||
|
self.returnValue = "保存成功!";
|
||||||
|
self.close();
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else if("getCode".equals(type))
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
if(colSource == null || "".equals(colSource))
|
||||||
|
sb.append("");
|
||||||
|
else if(colSource.toUpperCase().startsWith("CODE:"))
|
||||||
|
{
|
||||||
|
com.amarsoft.dict.als.object.Item[] items = com.amarsoft.dict.als.cache.CodeCache.getItems(colSource.substring(5));
|
||||||
|
for(com.amarsoft.dict.als.object.Item item:items)
|
||||||
|
{
|
||||||
|
sb.append(item.getItemNo()+","+item.getItemName()+"@");
|
||||||
|
}
|
||||||
|
sb.delete(sb.length()-1,sb.length());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ASResultSet rsTemp = Sqlca.getASResultSet(colSource.substring(4));
|
||||||
|
while(rsTemp.next())
|
||||||
|
{
|
||||||
|
sb.append(rsTemp.getString(1)+","+rsTemp.getString(2)+"@");
|
||||||
|
}
|
||||||
|
rsTemp.getStatement().close();
|
||||||
|
sb.delete(sb.length()-1,sb.length());
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
<script language=javascript>
|
||||||
|
self.returnValue = "<%=sb.toString()%>";
|
||||||
|
self.close();
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw new Exception("不支持的操纵类型!");
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
505
WebContent/Accounting/Config/ConditionRuleDef.jsp
Normal file
505
WebContent/Accounting/Config/ConditionRuleDef.jsp
Normal file
@ -0,0 +1,505 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBeginMD.jsp"%>
|
||||||
|
<%@page import="com.amarsoft.app.accounting.product.ProductManage"%>
|
||||||
|
<%@page import="com.amarsoft.app.accounting.config.loader.ProductConfig"%>
|
||||||
|
<%
|
||||||
|
//产品编号
|
||||||
|
String objectNo = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectNo"));
|
||||||
|
if(objectNo == null) objectNo = "";
|
||||||
|
String objectType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectType"));
|
||||||
|
if(objectType == null) objectType = "";
|
||||||
|
|
||||||
|
//取已配置的条件信息
|
||||||
|
ASValuePool as = new ASValuePool();
|
||||||
|
ASResultSet rs = Sqlca.getASResultSet(new SqlObject("select * from CONDITION_RULE where ObjectNo = :ObjectNo and ObjectType = :ObjectType order by RuleID asc,SerialNo asc").setParameter("ObjectNo",objectNo).setParameter("ObjectType",objectType));
|
||||||
|
while(rs.next()){
|
||||||
|
BusinessObject bo = new BusinessObject("jbo.app.CONDITION_RULE",rs.getRS());
|
||||||
|
List<BusinessObject> lsbo = (List<BusinessObject>)as.getAttribute(bo.getString("RuleID"));
|
||||||
|
if(lsbo == null)
|
||||||
|
{
|
||||||
|
lsbo = new ArrayList<BusinessObject>();
|
||||||
|
as.setAttribute(bo.getString("RuleID"),lsbo);
|
||||||
|
}
|
||||||
|
lsbo.add(bo);
|
||||||
|
}
|
||||||
|
rs.getStatement().close();
|
||||||
|
//数组表示 :字段ID,字段名,字段类型,字段值来源
|
||||||
|
StringBuffer fieldsArray = new StringBuffer();
|
||||||
|
fieldsArray.append("var term = new Array();");
|
||||||
|
int m =0;
|
||||||
|
ArrayList<com.amarsoft.dict.als.object.Item> itemList = new ArrayList<com.amarsoft.dict.als.object.Item>();
|
||||||
|
com.amarsoft.dict.als.object.Item[] items = com.amarsoft.dict.als.cache.CodeCache.getItems("TermAttribute");
|
||||||
|
for(com.amarsoft.dict.als.object.Item item:items)
|
||||||
|
{
|
||||||
|
if(item.getItemAttribute().indexOf("OH") >=0 && item.getItemDescribe().indexOf("BAS") >= 0)
|
||||||
|
{
|
||||||
|
fieldsArray.append(" term["+m+"]=new Array(\""+item.getItemNo()+"\",\""+item.getItemName()+"\",\""+DataConvert.toString(item.getBankNo())+"\",\""+DataConvert.toString(item.getRelativeCode())+"\");");
|
||||||
|
m++;
|
||||||
|
itemList.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body class=pagebackground leftmargin="0" topmargin="0" >
|
||||||
|
<div id="Layer1" style="position:absolute;width:99.9%; height:99.9%; z-index:1; overflow: auto">
|
||||||
|
<table align='center' width='98%' cellspacing="4" cellpadding="0">
|
||||||
|
<tr id = "CRTitle">
|
||||||
|
<td colspan="4" align='center'>
|
||||||
|
<font color='#000880'><h2>方案条件</h2></font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align='center'>
|
||||||
|
<font color='#000880'>(逻辑框内各个条件是且关系,框与框之间是或关系)</font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
int row = 0;
|
||||||
|
for(;row < as.getKeys().length+8;row++)
|
||||||
|
{
|
||||||
|
String key = "";
|
||||||
|
if(row < as.getKeys().length)
|
||||||
|
key = (String)as.getKeys()[row];
|
||||||
|
String tabDisplay = "",imgDisplay="";
|
||||||
|
if(row > as.getKeys().length)
|
||||||
|
{
|
||||||
|
tabDisplay = "display:none";
|
||||||
|
}
|
||||||
|
if(row >= as.getKeys().length)
|
||||||
|
{
|
||||||
|
imgDisplay = "display:none";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row!=0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr id="TRTR<%= row%>" style="<%=tabDisplay%>">
|
||||||
|
<td colspan="4">
|
||||||
|
<div id=CROR<%=row%>TITLE style='WIDTH: 100%;'>
|
||||||
|
<table border=0 cellspacing=0 cellpadding=0 bordercolordark="#FFFFFF" bordercolorlight="#666666" width='100%'>
|
||||||
|
<tr>
|
||||||
|
<td align='left'> <font color='#00659C' ><h4>或</h4></font> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr id="TRCR<%= row%>" style="<%=tabDisplay%>">
|
||||||
|
<%
|
||||||
|
if(row<as.getKeys().length)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td style=' text-align: center; WIDTH: 2%;'>
|
||||||
|
<img class="btn_icon_delete" border=0 id="IMGDR<%=row%>" onClick=deleteTab(<%=row%>) style='CURSOR: hand' width='15' height='15'/>
|
||||||
|
<img class="btn_icon_add" id="IMGAR<%=row%>" border=0 onClick=addTab(<%=row%>) style='CURSOR: hand; display:none;' width='15' height='15'/>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td style=' text-align: center; WIDTH: 2%;'>
|
||||||
|
<img class="btn_icon_delete" id="IMGDR<%=row%>" border=0 onClick=deleteTab(<%=row%>) style='CURSOR: hand;display:none;' width='15' height='15'/>
|
||||||
|
<img class="btn_icon_add" id="IMGAR<%=row%>" border=0 onClick=addTab(<%=row%>) style='CURSOR: hand;' width='15' height='15'/>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td>
|
||||||
|
<div id = "DIVR<%= row%>" style=' WIDTH: 100%; <%=imgDisplay%>'>
|
||||||
|
<table class='conditionmap' width='100%' align='left' border='1' cellspacing='0' cellpadding='4' bordercolordark="#FFFFFF" bordercolorlight="#666666">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<INPUT class=fftdinput type=hidden onblur=parent.trimField(this) value="<%=key %>" id="RuleIDR<%=row%>"/>
|
||||||
|
<table id="TB<%=row%>">
|
||||||
|
<%
|
||||||
|
List<BusinessObject> boList = (List<BusinessObject>)as.getAttribute(key);
|
||||||
|
if(boList == null) boList = new ArrayList<BusinessObject>();
|
||||||
|
for(int col=0;col<boList.size()+20;){
|
||||||
|
BusinessObject bo = null;
|
||||||
|
if(col<boList.size())
|
||||||
|
bo = boList.get(col);
|
||||||
|
else
|
||||||
|
bo = new BusinessObject("jbo.app.CONDITION_RULE");
|
||||||
|
String serialNo = bo.getString("SerialNo");
|
||||||
|
String ruleID = bo.getString("RuleID");
|
||||||
|
String colID = DataConvert.toString(bo.getString("ColID"));
|
||||||
|
String colName = DataConvert.toString(bo.getString("ColName"));
|
||||||
|
String colType = DataConvert.toString(bo.getString("ColType"));
|
||||||
|
String colSource = DataConvert.toString(bo.getString("ColSource"));
|
||||||
|
String compareType = DataConvert.toString(bo.getString("CompareType"));
|
||||||
|
String valueList = DataConvert.toString(bo.getString("ValueList"));
|
||||||
|
String valueListName = DataConvert.toString(bo.getString("ValueListName"));
|
||||||
|
|
||||||
|
StringBuffer compareOption = new StringBuffer();
|
||||||
|
items = com.amarsoft.dict.als.cache.CodeCache.getItems("CompareType");
|
||||||
|
compareOption.append("<option value=''></option>");
|
||||||
|
for(com.amarsoft.dict.als.object.Item item:items)
|
||||||
|
{
|
||||||
|
if(item.getItemNo().equals(compareType))
|
||||||
|
compareOption.append("<option value='"+item.getItemNo()+"' selected>"+item.getItemName()+"</option>");
|
||||||
|
else
|
||||||
|
compareOption.append("<option value='"+item.getItemNo()+"'>"+item.getItemName()+"</option>");
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuffer fieldsOption = new StringBuffer();
|
||||||
|
fieldsOption.append("<option value=''></option>");
|
||||||
|
for(com.amarsoft.dict.als.object.Item item:itemList)
|
||||||
|
{
|
||||||
|
if(item.getItemNo().equals(colID))
|
||||||
|
fieldsOption.append("<option value='"+item.getItemNo()+"' selected>"+item.getItemName()+"</option>");
|
||||||
|
else
|
||||||
|
fieldsOption.append("<option value='"+item.getItemNo()+"'>"+item.getItemName()+"</option>");
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断区域展示
|
||||||
|
String textareaStyle = "display:none" ;
|
||||||
|
String inputareaStyle = "";
|
||||||
|
if(compareType != null && (compareType.equalsIgnoreCase("Contain")||compareType.equalsIgnoreCase("NoContain")
|
||||||
|
||compareType.equalsIgnoreCase("in") || compareType.equalsIgnoreCase("notin")))
|
||||||
|
{
|
||||||
|
inputareaStyle = "style=' display:none '";
|
||||||
|
textareaStyle = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
String display="";
|
||||||
|
if(col>boList.size())
|
||||||
|
{
|
||||||
|
display="style=' display:none '";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr id="TRR<%=row%>C<%=col%>" <%=display %>>
|
||||||
|
<%
|
||||||
|
display="";
|
||||||
|
if(col<boList.size())
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td style=' text-align: center; '>
|
||||||
|
<img class="btn_icon_delete" border=0 id="IMGDR<%=row%>C<%=col%>" onClick=Delete(<%=row%>,<%=col%>) style='CURSOR: hand' width='15' height='15'/>
|
||||||
|
<img class="btn_icon_add" id="IMGAR<%=row%>C<%=col%>" border=0 onClick=add(<%=row%>,<%=col%>) style='CURSOR: hand; display:none;' width='15' height='15'/>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
display="style=' display:none '";
|
||||||
|
%>
|
||||||
|
<td style=' text-align: center; '>
|
||||||
|
<img class="btn_icon_delete" id="IMGDR<%=row%>C<%=col%>" border=0 onClick=Delete(<%=row%>,<%=col%>) style='CURSOR: hand;display:none;' width='15' height='15'/>
|
||||||
|
<img class="btn_icon_add" id="IMGAR<%=row%>C<%=col%>" border=0 onClick=add(<%=row%>,<%=col%>) style='CURSOR: hand;' width='15' height='15'/>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class=fftdhead noWrap colSpan=1 style="text-align: center; ">
|
||||||
|
<INPUT class=fftdinput type=hidden onblur=parent.trimField(this) <%=display %> value="<%=serialNo %>" id="SerialNoR<%=row%>C<%=col%>"/>
|
||||||
|
<INPUT class=fftdinput type=hidden onblur=parent.trimField(this) <%=display %> value="<%=colName %>" id="ColNameR<%=row%>C<%=col%>"/>
|
||||||
|
<INPUT class=fftdinput type=hidden onblur=parent.trimField(this) <%=display %> value="<%=colType %>" id="ColTypeR<%=row%>C<%=col%>"/>
|
||||||
|
<INPUT class=fftdinput type=hidden onblur=parent.trimField(this) <%=display %> value="<%=colSource %>" id="ColSourceR<%=row%>C<%=col%>"/>
|
||||||
|
<SELECT id="ColIDR<%=row%>C<%=col%>" class=fftdselect <%=display %> onchange=ChangeAttribute(<%=row%>,<%=col%>) value="">
|
||||||
|
<%= fieldsOption%>
|
||||||
|
</SELECT>
|
||||||
|
</td>
|
||||||
|
<td class=FFContentTD noWrap colSpan=1>
|
||||||
|
<SELECT id="CompareTypeR<%=row%>C<%=col%>" class=fftdselect <%=display %> onchange=ChangeCompare(<%=row%>,<%=col%>) value="">
|
||||||
|
<%= compareOption.toString()%>
|
||||||
|
</SELECT>
|
||||||
|
</td>
|
||||||
|
<td class=FFContentTD noWrap colSpan=1>
|
||||||
|
<%
|
||||||
|
if(colSource!=null && !colSource.equals(""))
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
sb.append("<option value=''></option>");
|
||||||
|
if(colSource.toUpperCase().startsWith("CODE:"))
|
||||||
|
{
|
||||||
|
items = com.amarsoft.dict.als.cache.CodeCache.getItems(colSource.substring(5));
|
||||||
|
for(com.amarsoft.dict.als.object.Item item:items)
|
||||||
|
{
|
||||||
|
if(item.getItemNo().equals(valueList))
|
||||||
|
sb.append("<option value='"+item.getItemNo()+"' selected>"+item.getItemName()+"</option>");
|
||||||
|
else
|
||||||
|
sb.append("<option value='"+item.getItemNo()+"'>"+item.getItemName()+"</option>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ASResultSet rsTemp = Sqlca.getASResultSet(colSource.substring(4));
|
||||||
|
while(rsTemp.next())
|
||||||
|
{
|
||||||
|
if(rsTemp.getString(1).equals(valueList))
|
||||||
|
sb.append("<option value='"+rsTemp.getString(1)+"' selected>"+rsTemp.getString(2)+"</option>");
|
||||||
|
else
|
||||||
|
sb.append("<option value='"+rsTemp.getString(1)+"'>"+rsTemp.getString(2)+"</option>");
|
||||||
|
}
|
||||||
|
rsTemp.close();
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<SELECT id="ValueListAR<%=row%>C<%=col%>" class=fftdselect <%=display %> <%=inputareaStyle%> onchange=ChangeValue(<%=row%>,<%=col%>) value="">
|
||||||
|
<%= sb.toString()%>
|
||||||
|
</SELECT>
|
||||||
|
<INPUT id="ValueListBR<%=row%>C<%=col%>" class=fftdinput type=text onblur=parent.trimField(this) <%=display %> value="<%=valueList %>" style="display:none" onchange=ChangeValue(<%=row%>,<%=col%>)>
|
||||||
|
<%
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<SELECT id="ValueListAR<%=row%>C<%=col%>" class=fftdselect <%=display %> style="display:none" onchange=ChangeValue(<%=row%>,<%=col%>) value="">
|
||||||
|
<option value='' selected></option>
|
||||||
|
</SELECT>
|
||||||
|
<INPUT class=fftdinput type=text onblur=parent.trimField(this) <%=display %> value="<%=valueList %>" <%=inputareaStyle%> id="ValueListBR<%=row%>C<%=col%>" onchange=ChangeValue(<%=row%>,<%=col%>)>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<INPUT class=fftdinput type=text onblur=parent.trimField(this) style="BACKGROUND: #efefef; COLOR: black; BORDER-TOP-STYLE: groove; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; BORDER-BOTTOM-STYLE: groove; WIDTH:600px;<%=textareaStyle%>" readOnly value="<%=valueListName %>" id="ValueListNameR<%=row%>C<%=col%>">
|
||||||
|
<INPUT class=inputdate id='ValueListSelectR<%=row%>C<%=col%>' onclick=selectDataSource(<%=row%>,<%=col%>) style="<%=textareaStyle%>" type=button value='...'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
col++;
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
<%out.print(fieldsArray.toString());%>
|
||||||
|
|
||||||
|
function ChangeAttribute(row,col)
|
||||||
|
{
|
||||||
|
var colIDValue = document.getElementById("ColIDR"+row+"C"+col).value;
|
||||||
|
if(typeof(colIDValue) == "undefined" || colIDValue.length == 0)
|
||||||
|
return;
|
||||||
|
for(var i = 0; i < term.length;i++)
|
||||||
|
{
|
||||||
|
if(term[i][0] == colIDValue)
|
||||||
|
{
|
||||||
|
document.getElementById("ColNameR"+row+"C"+col).value = term[i][1];
|
||||||
|
document.getElementById("ColTypeR"+row+"C"+col).value = term[i][2];
|
||||||
|
document.getElementById("ColSourceR"+row+"C"+col).value = term[i][3];
|
||||||
|
document.getElementById("ValueListAR"+row+"C"+col).value = "";
|
||||||
|
document.getElementById("ValueListBR"+row+"C"+col).value = "";
|
||||||
|
document.getElementById("ValueListNameR"+row+"C"+col).value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ChangeCompare(row,col);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ChangeCompare(row,col)
|
||||||
|
{
|
||||||
|
var compareType = document.getElementById("CompareType"+"R"+row+"C"+col).value;
|
||||||
|
if(compareType == "in" || compareType == "notin")
|
||||||
|
{
|
||||||
|
var valueList = document.all.item("ValueListB"+"R"+row+"C"+col);
|
||||||
|
valueList.style.display = "none";
|
||||||
|
var valueList = document.all.item("ValueListA"+"R"+row+"C"+col);
|
||||||
|
valueList.style.display = "none";
|
||||||
|
var valueListName = document.all.item("ValueListName"+"R"+row+"C"+col);
|
||||||
|
valueListName.style.display = "";
|
||||||
|
var valueListSelect = document.all.item("ValueListSelect"+"R"+row+"C"+col);
|
||||||
|
valueListSelect.style.display = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var colSource = document.getElementById("ColSource"+"R"+row+"C"+col).value;
|
||||||
|
if(typeof(colSource)=="undefined" || colSource.length == 0 || colSource == null)
|
||||||
|
{
|
||||||
|
var valueList = document.all.item("ValueListB"+"R"+row+"C"+col);
|
||||||
|
valueList.style.display = "";
|
||||||
|
var valueList = document.all.item("ValueListA"+"R"+row+"C"+col);
|
||||||
|
valueList.style.display = "none";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var valueList = document.all.item("ValueListB"+"R"+row+"C"+col);
|
||||||
|
valueList.style.display = "none";
|
||||||
|
var valueList = document.all.item("ValueListA"+"R"+row+"C"+col);
|
||||||
|
valueList.style.display = "";
|
||||||
|
var result=PopPage("/Accounting/Config/ConditionRuleAction.jsp?Type=getCode&ColSource="+colSource,"","dialogWidth=60;dialogheight=25;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no");
|
||||||
|
if(typeof(result) =="undefined" || result.length == 0)
|
||||||
|
return;
|
||||||
|
var obj = document.getElementById("ValueListA"+"R"+row+"C"+col);
|
||||||
|
var value = obj.value;
|
||||||
|
obj.options[0] = new Option("","");
|
||||||
|
obj.options.length = 1;
|
||||||
|
var items = result.split("@");
|
||||||
|
for(var i = 0; i < items.length; i ++)
|
||||||
|
{
|
||||||
|
var item = items[i].split(",");
|
||||||
|
obj.options[i+1] = new Option(item[1],item[0]);
|
||||||
|
}
|
||||||
|
obj.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
var valueListName = document.all.item("ValueListName"+"R"+row+"C"+col);
|
||||||
|
valueListName.style.display = "none";
|
||||||
|
var valueListSelect = document.all.item("ValueListSelect"+"R"+row+"C"+col);
|
||||||
|
valueListSelect.style.display = "none";
|
||||||
|
}
|
||||||
|
var colType = document.getElementById("ColType"+"R"+row+"C"+col).value;
|
||||||
|
if(colType == "2" || colType == "5")
|
||||||
|
{
|
||||||
|
var valueList = document.all.item("ValueListB"+"R"+row+"C"+col);
|
||||||
|
valueList.style.textAlign="right";
|
||||||
|
}
|
||||||
|
|
||||||
|
update(row,col);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDataSource(row,col)
|
||||||
|
{
|
||||||
|
var valueList = document.getElementById("ValueListB"+"R"+row+"C"+col).value;
|
||||||
|
var colSource = document.getElementById("ColSource"+"R"+row+"C"+col).value;
|
||||||
|
if(typeof(colSource)=="undefined" || colSource.length == 0)
|
||||||
|
return;
|
||||||
|
var sReturn = AsControl.PopView("/Accounting/Config/SelectDataSourceTree.jsp","ColSource="+colSource+"&ColValue="+valueList,"dialogWidth=400px;dialogHeight=500px;center:yes;resizable:yes;scrollbars:no;status:no;help:no");
|
||||||
|
if(typeof(sReturn) == "undefined" || sReturn.length == 0)
|
||||||
|
return;
|
||||||
|
if(sReturn == "_CLEAR_")
|
||||||
|
{
|
||||||
|
document.getElementById("ValueListB"+"R"+row+"C"+col).value = "";
|
||||||
|
document.getElementById("ValueListName"+"R"+row+"C"+col).value = "";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
document.getElementById("ValueListB"+"R"+row+"C"+col).value = sReturn.split("@")[0];
|
||||||
|
document.getElementById("ValueListName"+"R"+row+"C"+col).value = sReturn.split("@")[1];
|
||||||
|
}
|
||||||
|
update(row,col);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ChangeValue(row,col)
|
||||||
|
{
|
||||||
|
var valueListB = document.getElementById("ValueListB"+"R"+row+"C"+col).value;
|
||||||
|
var valueListA = document.getElementById("ValueListA"+"R"+row+"C"+col).value;
|
||||||
|
if(typeof(valueListA)!="undefined" && valueListA!=null && valueListA.length!=0)
|
||||||
|
valueListB = valueListA;
|
||||||
|
document.getElementById("ValueListB"+"R"+row+"C"+col).value = valueListB;
|
||||||
|
document.getElementById("ValueListName"+"R"+row+"C"+col).value=valueListB;
|
||||||
|
update(row,col);
|
||||||
|
}
|
||||||
|
|
||||||
|
function Delete(row,col)
|
||||||
|
{
|
||||||
|
if(!confirm("确定删除吗?"))return;
|
||||||
|
var serialno = document.getElementById("SerialNoR"+row+"C"+col).value;
|
||||||
|
if(typeof(serialno) == "undefined" || serialno.length == 0)
|
||||||
|
return;
|
||||||
|
var i = RunJavaMethodTrans("LoanAccount","DeleteConditionRule",serialno);
|
||||||
|
if(parseInt(i)==1)
|
||||||
|
{
|
||||||
|
var tr = document.all.item("TRR"+row+"C"+col);
|
||||||
|
tr.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function deleteTab(row)
|
||||||
|
{
|
||||||
|
if(!confirm("确定删除吗?"))return;
|
||||||
|
var ruleID = document.getElementById("RuleIDR"+row).value;
|
||||||
|
if(typeof(ruleID) == "undefined" || ruleID.length == 0)
|
||||||
|
return;
|
||||||
|
var i = RunMethod("LoanAccount","DeleteConditionRule1",ruleID);
|
||||||
|
var tr = document.all.item("TRTR"+parseInt(row+1));
|
||||||
|
tr.style.display = "none";
|
||||||
|
var tr = document.all.item("TRCR"+row);
|
||||||
|
tr.style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
function addTab(row)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var tr = document.all.item("TRTR"+parseInt(row+1));
|
||||||
|
tr.style.display = "";
|
||||||
|
var tr = document.all.item("TRCR"+parseInt(row+1));
|
||||||
|
tr.style.display = "";
|
||||||
|
}catch(e)
|
||||||
|
{
|
||||||
|
reLoad();
|
||||||
|
}
|
||||||
|
var tr = document.all.item("DIVR"+row);
|
||||||
|
tr.style.display = "";
|
||||||
|
|
||||||
|
var tr = document.all.item("IMGAR"+row);
|
||||||
|
tr.style.display = "none";
|
||||||
|
var tr = document.all.item("IMGDR"+row);
|
||||||
|
tr.style.display = "";
|
||||||
|
|
||||||
|
var ruleID = getSerialNo("CONDITION_RULE","RuleID","");
|
||||||
|
document.getElementById("RuleID"+"R"+row).value=ruleID;
|
||||||
|
}
|
||||||
|
|
||||||
|
function add(row,col)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var tr = document.all.item("TRR"+row+"C"+parseInt(col+1));
|
||||||
|
tr.style.display = "";
|
||||||
|
}catch(e)
|
||||||
|
{
|
||||||
|
reLoad();
|
||||||
|
}
|
||||||
|
var tr = document.all.item("ColIDR"+row+"C"+col);
|
||||||
|
tr.style.display = "";
|
||||||
|
var tr = document.all.item("CompareTypeR"+row+"C"+col);
|
||||||
|
tr.style.display = "";
|
||||||
|
var tr = document.all.item("ValueListBR"+row+"C"+col);
|
||||||
|
tr.style.display = "";
|
||||||
|
var tr = document.all.item("IMGAR"+row+"C"+col);
|
||||||
|
tr.style.display = "none";
|
||||||
|
var tr = document.all.item("IMGDR"+row+"C"+col);
|
||||||
|
tr.style.display = "";
|
||||||
|
|
||||||
|
var serialNo = getSerialNo("CONDITION_RULE","SerialNo","");
|
||||||
|
document.getElementById("SerialNo"+"R"+row+"C"+col).value=serialNo;
|
||||||
|
var ruleID = document.getElementById("RuleID"+"R"+row).value;
|
||||||
|
|
||||||
|
var cnt = RunMethod("LoanAccount","InsertConditionRule",serialNo+",<%=objectNo%>,<%=objectType%>,"+ruleID);
|
||||||
|
}
|
||||||
|
|
||||||
|
function update(row,col)
|
||||||
|
{
|
||||||
|
var colID = document.getElementById("ColID"+"R"+row+"C"+col).value;
|
||||||
|
var colType = document.getElementById("ColType"+"R"+row+"C"+col).value;
|
||||||
|
var colName = document.getElementById("ColName"+"R"+row+"C"+col).value;
|
||||||
|
var colSource = document.getElementById("ColSource"+"R"+row+"C"+col).value;
|
||||||
|
var compareType = document.getElementById("CompareType"+"R"+row+"C"+col).value;
|
||||||
|
var valueList = document.getElementById("ValueListB"+"R"+row+"C"+col).value;
|
||||||
|
var valueListName = document.getElementById("ValueListName"+"R"+row+"C"+col).value;
|
||||||
|
var serialno = document.getElementById("SerialNo"+"R"+row+"C"+col).value;
|
||||||
|
|
||||||
|
if(typeof(colID)=="undefined" || colID.length == 0)
|
||||||
|
return;
|
||||||
|
if(typeof(compareType) == "undefined" || compareType.length == 0)
|
||||||
|
return;
|
||||||
|
if(typeof(valueList) == "undefined" || valueList.length == 0)
|
||||||
|
return;
|
||||||
|
if(typeof(valueListName) == "undefined" || valueListName.length == 0)
|
||||||
|
return;
|
||||||
|
var result=PopPage("/Accounting/Config/ConditionRuleAction.jsp?Type=update&ValueListName="+valueListName+"&ValueList="+valueList+"&ColSource="+colSource+"&CompareType="+compareType+"&ColID="+colID+"&ColName="+colName+"&ColType="+colType+"&SerialNo="+serialno,"","dialogWidth=60;dialogheight=25;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no");
|
||||||
|
}
|
||||||
|
|
||||||
|
function reLoad()
|
||||||
|
{
|
||||||
|
AsControl.OpenView("/Accounting/Config/ConditionRuleDef.jsp","ObjectNo=<%=objectNo%>&ObjectType=<%=objectType%>","_self",OpenStyle);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
51
WebContent/Accounting/Config/CopyTermDialog.jsp
Normal file
51
WebContent/Accounting/Config/CopyTermDialog.jsp
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBeginMD.jsp"%>
|
||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>请输入新的组件编号和名称</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.black9pt {font-size: 9pt; color: #000000; text-decoration: none}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#FFF0E8">
|
||||||
|
<br>
|
||||||
|
<table align="center" border='1' cellspacing='0' bordercolor='#999999' bordercolordark='#FFFFFF'>
|
||||||
|
<tr>
|
||||||
|
<td nowarp align="left" class="black9pt" bgcolor="#FFF0E8" ></font>新组件编号<font color="#ff0000"> *</font></td>
|
||||||
|
<td nowarp bgcolor="#FFF0E8">
|
||||||
|
<input id="TermID" type="text" name="TermID" value="" style="width:60px">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td nowarp align="left" class="black9pt" bgcolor="#FFF0E8" ></font>新组件名称<font color="#ff0000"> *</font></td>
|
||||||
|
<td nowarp bgcolor="#FFF0E8">
|
||||||
|
<input id="TermName" type="text" name="TermName" value="" style="width:120px">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td nowarp bgcolor="#FFF0E8" height="25" colspan="2" align="center">
|
||||||
|
<input type="button" name="next" value="确认" onClick="javascript:newCustomer()" style="font-size:9pt;padding-top:3;padding-left:5;padding-right:5;background-image:url(../../Resources/functionbg.gif); border: #DEDFCE; border-style: outset; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px" border='1'>
|
||||||
|
<input type="button" name="Cancel" value="取消" onClick="javascript:self.returnValue='_CANCEL_';self.close()" style="font-size:9pt;padding-top:3;padding-left:5;padding-right:5;background-image:url(../../Resources/functionbg.gif); border: #DEDFCE; border-style: outset; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px" border='1'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<script language=javascript>
|
||||||
|
function newCustomer(){
|
||||||
|
var termID = trim(document.getElementById("TermID").value);
|
||||||
|
var termName = trim(document.getElementById("TermName").value);
|
||||||
|
if(termID == ""||termName==""){
|
||||||
|
alert("请输入组件编号及名称!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//返回变量:
|
||||||
|
self.returnValue = termID+"@"+termName+"@";
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
310
WebContent/Accounting/Config/MultiSelectTreeViewDialog.jsp
Normal file
310
WebContent/Accounting/Config/MultiSelectTreeViewDialog.jsp
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<script>
|
||||||
|
var multiTreeSelectFlag=true;
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
//获取参数:查询名称和参数
|
||||||
|
String sSelName = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("SelName"));
|
||||||
|
String sParaString = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ParaString"));
|
||||||
|
String sSelectedValue = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("SelectedValue"));
|
||||||
|
//将空值转化为空字符串
|
||||||
|
if(sSelName == null) sSelName = "";
|
||||||
|
if(sParaString == null) sParaString = "";
|
||||||
|
if(sSelectedValue == null) sSelectedValue = "";
|
||||||
|
|
||||||
|
//定义变量:查询结果集
|
||||||
|
ASResultSet rs = null;
|
||||||
|
//定义变量:SQL语句
|
||||||
|
String sSql = "";
|
||||||
|
//定义变量:查询类型、展现方式、参数、隐藏域
|
||||||
|
String sSelType = "",sSelBrowseMode = "",sSelArgs = "",sSelHideField = "";
|
||||||
|
//定义变量:代码、字段显示中文名称、表名、主键
|
||||||
|
String sSelCode = "",sSelFieldName = "",sSelTableName = "",sSelPrimaryKey = "";
|
||||||
|
//定义变量:字段显示风格、返回值、过滤字段、选择方式
|
||||||
|
String sSelFieldDisp = "",sSelReturnValue = "",sSelFilterField = "",sMutilOrSingle = "";
|
||||||
|
//定义变量:属性1、属性2、属性3、属性4、属性5
|
||||||
|
String sAttribute1 = "",sAttribute2 = "",sAttribute3 = "",sAttribute4 = "",sAttribute5 = "";
|
||||||
|
//定义变量:数组长度
|
||||||
|
int l = 0;
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "选择信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
sSql = " select SelType,SelTableName,SelPrimaryKey,SelBrowseMode,SelArgs,SelHideField,SelCode, "+
|
||||||
|
" SelFieldName,SelFieldDisp,SelReturnValue,SelFilterField,MutilOrSingle,Attribute1, "+
|
||||||
|
" Attribute2,Attribute3,Attribute4,Attribute5 "+
|
||||||
|
" from SELECT_CATALOG "+
|
||||||
|
" where SelName = '"+sSelName+"' "+
|
||||||
|
" and IsInUse = '1' ";
|
||||||
|
rs = Sqlca.getResultSet(sSql);
|
||||||
|
if(rs.next()){
|
||||||
|
sSelType = rs.getString("SelType");
|
||||||
|
sSelTableName = rs.getString("SelTableName");
|
||||||
|
sSelPrimaryKey = rs.getString("SelPrimaryKey");
|
||||||
|
sSelBrowseMode = rs.getString("SelBrowseMode");
|
||||||
|
sSelArgs = rs.getString("SelArgs");
|
||||||
|
sSelHideField = rs.getString("SelHideField");
|
||||||
|
sSelCode = rs.getString("SelCode");
|
||||||
|
sSelFieldName = rs.getString("SelFieldName");
|
||||||
|
sSelFieldDisp = rs.getString("SelFieldDisp");
|
||||||
|
sSelReturnValue = rs.getString("SelReturnValue");
|
||||||
|
sSelFilterField = rs.getString("SelFilterField");
|
||||||
|
sMutilOrSingle = rs.getString("MutilOrSingle");
|
||||||
|
sAttribute1 = rs.getString("Attribute1");
|
||||||
|
sAttribute2 = rs.getString("Attribute2");
|
||||||
|
sAttribute3 = rs.getString("Attribute3");
|
||||||
|
sAttribute4 = rs.getString("Attribute4");
|
||||||
|
sAttribute5 = rs.getString("Attribute5");
|
||||||
|
}
|
||||||
|
rs.getStatement().close();
|
||||||
|
|
||||||
|
//将空值转化为空字符串
|
||||||
|
if(sSelType == null) sSelType = "";
|
||||||
|
if(sSelTableName == null) sSelTableName = "";
|
||||||
|
if(sSelPrimaryKey == null) sSelPrimaryKey = "";
|
||||||
|
if(sSelBrowseMode == null) sSelBrowseMode = "";
|
||||||
|
if(sSelArgs == null) sSelArgs = "";
|
||||||
|
else sSelArgs = sSelArgs.trim();
|
||||||
|
if(sSelHideField == null) sSelHideField = "";
|
||||||
|
else sSelHideField = sSelHideField.trim();
|
||||||
|
if(sSelCode == null) sSelCode = "";
|
||||||
|
else sSelCode = sSelCode.trim();
|
||||||
|
if(sSelFieldName == null) sSelFieldName = "";
|
||||||
|
else sSelFieldName = sSelFieldName.trim();
|
||||||
|
if(sSelFieldDisp == null) sSelFieldDisp = "";
|
||||||
|
else sSelFieldDisp = sSelFieldDisp.trim();
|
||||||
|
if(sSelReturnValue == null) sSelReturnValue = "";
|
||||||
|
else sSelReturnValue = sSelReturnValue.trim();
|
||||||
|
if(sSelFilterField == null) sSelFilterField = "";
|
||||||
|
else sSelFilterField = sSelFilterField.trim();
|
||||||
|
if(sMutilOrSingle == null) sMutilOrSingle = "";
|
||||||
|
if(sAttribute1 == null) sAttribute1 = "";
|
||||||
|
if(sAttribute2 == null) sAttribute2 = "";
|
||||||
|
if(sAttribute3 == null) sAttribute3 = "";
|
||||||
|
if(sAttribute4 == null) sAttribute4 = "";
|
||||||
|
if(sAttribute5 == null) sAttribute5 = "";
|
||||||
|
|
||||||
|
//获取返回值
|
||||||
|
StringTokenizer st = new StringTokenizer(sSelReturnValue,"@");
|
||||||
|
String [] sReturnValue = new String[st.countTokens()];
|
||||||
|
while (st.hasMoreTokens())
|
||||||
|
{
|
||||||
|
sReturnValue[l] = st.nextToken();
|
||||||
|
l ++;
|
||||||
|
}
|
||||||
|
//设置显示标题
|
||||||
|
String sHeaders = sSelFieldName;
|
||||||
|
|
||||||
|
//将Sql中的变量用相对应的值替换
|
||||||
|
StringTokenizer stArgs = new StringTokenizer(sParaString,",");
|
||||||
|
while (stArgs.hasMoreTokens())
|
||||||
|
{
|
||||||
|
try{
|
||||||
|
String sArgName = stArgs.nextToken().trim();
|
||||||
|
String sArgValue = stArgs.nextToken().trim();
|
||||||
|
sSelCode = StringFunction.replace(sSelCode,"#"+sArgName,sArgValue );
|
||||||
|
}catch(NoSuchElementException ex){
|
||||||
|
throw new Exception("输入参数格式错误!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><%=PG_TITLE%></title>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
function TreeViewOnClick()
|
||||||
|
{
|
||||||
|
var sType = getCurTVItem().type;
|
||||||
|
var sName = getCurTVItem().name;
|
||||||
|
var sValue = getCurTVItem().value;
|
||||||
|
if(sValue == "root")
|
||||||
|
{
|
||||||
|
buff.ReturnString.value = "root";
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if(sType == "page" && "<%=sAttribute2%>" == '2')
|
||||||
|
{
|
||||||
|
buff.ReturnString.value = sValue + "@" + sName;
|
||||||
|
parent.sObjectInfo = buff.ReturnString.value;
|
||||||
|
}else if("<%=sAttribute2%>" == '1')
|
||||||
|
{
|
||||||
|
buff.ReturnString.value = sValue + "@" + sName;
|
||||||
|
parent.sObjectInfo = buff.ReturnString.value;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
alert("页节点信息不能选择,请重新选择!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增树图双击事件响应函数
|
||||||
|
function TreeViewOnDBLClick()
|
||||||
|
{
|
||||||
|
var sType = getCurTVItem().type;
|
||||||
|
var sName = getCurTVItem().name;
|
||||||
|
var sValue = getCurTVItem().value;
|
||||||
|
if(sValue == "root")
|
||||||
|
{
|
||||||
|
buff.ReturnString.value = "root";
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if(sType == "page" && "<%=sAttribute2%>" == '2')
|
||||||
|
{
|
||||||
|
buff.ReturnString.value = sValue + "@" + sName;
|
||||||
|
parent.returnValue = buff.ReturnString.value;
|
||||||
|
self.close();
|
||||||
|
}else if("<%=sAttribute2%>" == '1')
|
||||||
|
{
|
||||||
|
buff.ReturnString.value = sValue + "@" + sName;
|
||||||
|
parent.returnValue = buff.ReturnString.value;
|
||||||
|
self.close();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
alert("页节点信息不能选择,请重新选择!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMultiTreeValue(){
|
||||||
|
var ids="";
|
||||||
|
var names="";
|
||||||
|
for(ik=1;ik<nodes.length;ik++){
|
||||||
|
if(nodes[ik].checked){
|
||||||
|
ids+=nodes[ik].value+",";
|
||||||
|
names+=nodes[ik].name+",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ids.length>0) ids=ids.substring(0, ids.length-1);
|
||||||
|
if(names.length>0) names=names.substring(0, names.length-1);
|
||||||
|
return ids+"@"+names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMultiTreeValue(sTreeValueList){
|
||||||
|
var ids="";
|
||||||
|
var names="";
|
||||||
|
|
||||||
|
sTreeValueList = ","+sTreeValueList+",";
|
||||||
|
for(ik=1;ik<nodes.length;ik++){
|
||||||
|
if(sTreeValueList.indexOf(","+nodes[ik].value+",")>=0){
|
||||||
|
var nodeID = nodes[ik].id;
|
||||||
|
try{
|
||||||
|
setCheckTVItem(nodeID,true);
|
||||||
|
}
|
||||||
|
catch(e){}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ids.length>0) ids=ids.substring(0, ids.length-1);
|
||||||
|
if(names.length>0) names=names.substring(0, names.length-1);
|
||||||
|
return ids+"@"+names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function startMenu()
|
||||||
|
{
|
||||||
|
multiTreeSelectFlag=true;
|
||||||
|
<%
|
||||||
|
HTMLTreeView tviTemp = new HTMLTreeView(SqlcaRepository,CurComp,sServletURL,"选择信息列表","right");
|
||||||
|
tviTemp.TriggerClickEvent=true;
|
||||||
|
tviTemp.MultiSelect=true;
|
||||||
|
//参数从左至右依次为:
|
||||||
|
//ID字段(必须),Name字段(必须),Value字段,Script字段,Picture字段,From子句(必须),OrderBy子句,Sqlca
|
||||||
|
tviTemp.initWithSql(sSelHideField,sSelFieldDisp,sSelFieldName,"","",sSelCode,sSelFilterField,Sqlca);
|
||||||
|
|
||||||
|
tviTemp.ImageDirectory = sResourcesPath; //设置资源文件目录(图片、CSS)
|
||||||
|
out.println(tviTemp.generateHTMLTreeView());
|
||||||
|
%>
|
||||||
|
expandNode('root');
|
||||||
|
<%
|
||||||
|
int j = sAttribute1.split("@").length;
|
||||||
|
String sExportNode[] = new String[20];
|
||||||
|
sExportNode = sAttribute1.split("@");
|
||||||
|
for(int i=0;i<j;i++)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
try{
|
||||||
|
expandNode('<%=sExportNode[i]%>');
|
||||||
|
}catch(e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
setMultiTreeValue("<%=sSelectedValue%>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.black9pt { font-size: 9pt; color: #000000; text-decoration: none}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="pagebackground">
|
||||||
|
<center>
|
||||||
|
<form name="buff">
|
||||||
|
<input type="hidden" name="ReturnString" value="">
|
||||||
|
<table width="90%" border='1' height="98%" cellspacing='0' bordercolor='#999999' bordercolordark='#FFFFFF'>
|
||||||
|
<tr>
|
||||||
|
<td id="myleft" align=center width=100%><iframe name="left" src="" width=100% height=100% frameborder=0 scrolling=no ></iframe></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td nowarp bgcolor="" height="25" align=center>
|
||||||
|
<input type="button" name="ok" value="确认" onClick="javascript:returnSelection()" border='1'>
|
||||||
|
<input type="button" name="ok" value="清空" onClick="javascript:clearAll()" border='1'>
|
||||||
|
<input type="button" name="Cancel" value="取消" onClick="javascript:doCancel();" border='1'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
function returnSelection()
|
||||||
|
{
|
||||||
|
var returnValue=getMultiTreeValue();
|
||||||
|
if(returnValue==""){
|
||||||
|
if(confirm("您尚未进行选择,确认要返回吗?")){
|
||||||
|
returnValue="_NONE_";
|
||||||
|
}else{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
self.returnValue=returnValue;
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearAll()
|
||||||
|
{
|
||||||
|
self.returnValue='_CLEAR_';
|
||||||
|
self.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function doCancel()
|
||||||
|
{
|
||||||
|
self.returnValue='_CANCEL_';
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
startMenu();
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
91
WebContent/Accounting/Config/SelectDataSourceTree.jsp
Normal file
91
WebContent/Accounting/Config/SelectDataSourceTree.jsp
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||||
|
include file="/IncludeBeginMD.jsp"%><%
|
||||||
|
//获得页面参数
|
||||||
|
String colSource = CurPage.getParameter("ColSource"); //数据源类型
|
||||||
|
if (colSource == null) colSource = "";
|
||||||
|
String colValue = CurPage.getParameter("ColValue");//数据原值
|
||||||
|
if(colValue == null) colValue = "";
|
||||||
|
%>
|
||||||
|
<body leftmargin="0" topmargin="0" style="overflow: hidden;">
|
||||||
|
<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0" >
|
||||||
|
<tr height=1 valign=top >
|
||||||
|
<td>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><%=HTMLControls.generateButton("确定","确定","javascript:saveConfig()",sResourcesPath)%></td>
|
||||||
|
<td><%=HTMLControls.generateButton("清空","清空","javascript:clearConfig()",sResourcesPath)%></td>
|
||||||
|
<td><%=HTMLControls.generateButton("取消","取消","javascript:self.close()",sResourcesPath)%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" >
|
||||||
|
<table width='100%' cellpadding='0' cellspacing='0'>
|
||||||
|
<tr>
|
||||||
|
<td id="myleft" colspan='3' align=center width=100%>
|
||||||
|
<div style="positition:absolute;align:left;height:430px;overflow-y: hide;">
|
||||||
|
<iframe name="left" src="<%=sWebRootPath%>/Blank.jsp" width=100% height=100% frameborder=0 scrolling=no ></iframe>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
setDialogTitle("多选信息如下:");
|
||||||
|
function saveConfig(){
|
||||||
|
var nodes = getCheckedTVItems(); //树图选择的节点
|
||||||
|
var id ="";
|
||||||
|
var name = "";
|
||||||
|
for(var i=0;i<nodes.length;i++){
|
||||||
|
id += nodes[i].id + ",";
|
||||||
|
name += nodes[i].name + ",";
|
||||||
|
}
|
||||||
|
self.returnValue=id+"@"+name;
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearConfig(){
|
||||||
|
|
||||||
|
self.returnValue="_CLEAR_";
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function startMenu(){
|
||||||
|
<%
|
||||||
|
HTMLTreeView tviTemp = new HTMLTreeView("配置菜单可见角色","right");
|
||||||
|
tviTemp.ImageDirectory = sResourcesPath; //设置资源文件目录(图片、CSS)
|
||||||
|
tviTemp.TriggerClickEvent=false;
|
||||||
|
tviTemp.MultiSelect = true;
|
||||||
|
if(colSource.toUpperCase().startsWith("CODE:"))
|
||||||
|
tviTemp.initWithCode(colSource.substring(5),Sqlca);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
String fromCaluse = colSource.substring(colSource.toUpperCase().indexOf("FROM"));
|
||||||
|
colSource = colSource.substring(colSource.toUpperCase().indexOf("SELECT")+6,colSource.toUpperCase().indexOf("FROM"));
|
||||||
|
String id = colSource.split(",")[0].trim();
|
||||||
|
String name = colSource.split(",")[1].trim();
|
||||||
|
tviTemp.initWithSql(id,name,id,"",fromCaluse,Sqlca);
|
||||||
|
}
|
||||||
|
out.println(tviTemp.generateHTMLTreeView());
|
||||||
|
|
||||||
|
for(String col:colValue.split(",")){
|
||||||
|
%>
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setCheckTVItem('<%=col%>', true);
|
||||||
|
}catch(e){}
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
}
|
||||||
|
|
||||||
|
startMenu();
|
||||||
|
expandNode('root');
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
78
WebContent/Accounting/Config/SelectDoNoList.jsp
Normal file
78
WebContent/Accounting/Config/SelectDoNoList.jsp
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "分录模板参数信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
String sSql = "";
|
||||||
|
|
||||||
|
String inputparatemplete = (String)CurComp.getParameter("Inputparatemplete");
|
||||||
|
if(null==inputparatemplete|| "".equals(inputparatemplete)) inputparatemplete="ProductDefine";
|
||||||
|
|
||||||
|
String sHeaders[][] = {
|
||||||
|
{"DoNo","模板编号"},
|
||||||
|
{"ColName","参数定义"},
|
||||||
|
{"ColHeader","参数名称"}
|
||||||
|
};
|
||||||
|
|
||||||
|
sSql = " Select DoNo,ColName,ColHeader "+
|
||||||
|
" From dataobject_library "+
|
||||||
|
" Where dono='"+inputparatemplete+"' And ColType='Number' And colcheckformat='2' "+
|
||||||
|
" and colunit like '%元%' "+
|
||||||
|
" Order By colindex ";
|
||||||
|
|
||||||
|
//利用sSql生成数据对象
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sSql);
|
||||||
|
|
||||||
|
//设置显示文本框的长度及事件属性
|
||||||
|
doTemp.setHTMLStyle("ColHeader","style={width:180px} ");
|
||||||
|
|
||||||
|
//设置对齐方式
|
||||||
|
doTemp.setAlign("NormalBalance,OverDueBalance,PayInte","3");
|
||||||
|
doTemp.setType("NormalBalance,OverDueBalance,PayInte","Number");
|
||||||
|
//小数为2,整数为5
|
||||||
|
doTemp.setCheckFormat("NormalBalance,OverDueBalance,PayInte","2");
|
||||||
|
|
||||||
|
// 设置不可见项
|
||||||
|
doTemp.setVisible("ContractSerialNo,BusinessType,ReturnType,ReturnTypeName,CertID,BusinessSum",false);
|
||||||
|
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(16); //服务器分页
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow("");
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","确定","确定","confirm()","","","",""},
|
||||||
|
{"true","","Button","取消","取消","javaScript:self.close()","","","",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
|
||||||
|
/*~[Describe=确定;InputParam=无;OutPutParam=SerialNo;]~*/
|
||||||
|
function confirm()
|
||||||
|
{
|
||||||
|
var colName = getItemValue(0,getRow(),"ColName");
|
||||||
|
if(typeof(colName) == "undefined" || colName.length == 0 )
|
||||||
|
self.returnValue = "_CANCEL_";
|
||||||
|
else
|
||||||
|
self.returnValue = colName;
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
97
WebContent/Accounting/Config/TermConfigInfo.jsp
Normal file
97
WebContent/Accounting/Config/TermConfigInfo.jsp
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件详情"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String sItemNo = (String)CurPage.getParameter("ItemNo");
|
||||||
|
if(sItemNo==null||sItemNo.length()==0)sItemNo="";
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "TermConfigInfo";
|
||||||
|
String sTempletFilter = "1=1";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo,sTempletFilter);
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style = "2";//设置DW风格
|
||||||
|
dwTemp.ReadOnly = "0";//设置是否只读
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow("TermType"+","+sItemNo);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
|
||||||
|
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var bIsInsert = false; //标记DW是否处于“新增状态”
|
||||||
|
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
|
||||||
|
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(sPostEvents)
|
||||||
|
{
|
||||||
|
if(bIsInsert){
|
||||||
|
beforeInsert();
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeUpdate();
|
||||||
|
as_save("myiframe0",sPostEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=返回列表页面;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function goBack()
|
||||||
|
{
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermConfigList.jsp","","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
/*~[Describe=执行插入操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function beforeInsert()
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"InputUser","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"InputUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"InputOrg","<%=CurUser.getOrgID()%>");
|
||||||
|
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
|
||||||
|
bIsInsert = false;
|
||||||
|
}
|
||||||
|
/*~[Describe=执行更新操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function beforeUpdate()
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"UpdateUser","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"UpdateUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
|
||||||
|
setItemValue(0,0,"UpdateDate","<%=StringFunction.getToday()%>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=页面装载时,对DW进行初始化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initRow()
|
||||||
|
{
|
||||||
|
if (getRowCount(0)==0) //如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
{
|
||||||
|
bIsInsert = true;
|
||||||
|
setItemValue(0,0,"CodeNo","<%="TermType"%>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
//var bFreeFormMultiCol = true;
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
65
WebContent/Accounting/Config/TermConfigList.jsp
Normal file
65
WebContent/Accounting/Config/TermConfigList.jsp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件类别列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "TermConfigList";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(200);
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow("TermType");
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增一条记录","newRecord()","","","",""},
|
||||||
|
{"true","","Button","详情","查看/修改详情","viewAndEdit()","","","",""},
|
||||||
|
{"true","","Button","删除","删除所选中的记录","deleteRecord()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var sCurCodeNo=""; //记录当前所选择行的代码号
|
||||||
|
|
||||||
|
function newRecord()
|
||||||
|
{
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermConfigInfo.jsp","","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewAndEdit()
|
||||||
|
{
|
||||||
|
var sItemNo = getItemValue(0,getRow(),"ItemNo"); //条款类别编号
|
||||||
|
if(typeof(sItemNo)=="undefined" || sItemNo.length==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermConfigInfo.jsp","ItemNo="+sItemNo,"_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRecord()
|
||||||
|
{
|
||||||
|
var sItemNo = getItemValue(0,getRow(),"ItemNo"); //条款类别编号
|
||||||
|
if(typeof(sItemNo) == "undefined" || sItemNo.length == 0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))) //您真的想删除该信息吗?
|
||||||
|
{
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
49
WebContent/Accounting/Config/TermConfigMain.jsp
Normal file
49
WebContent/Accounting/Config/TermConfigMain.jsp
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件主界面"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
String PG_CONTENT_TITLE = " 业务组件管理 "; //默认的内容区标题
|
||||||
|
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
|
||||||
|
String PG_LEFT_WIDTH = "200";//默认的treeview宽度
|
||||||
|
|
||||||
|
//定义Treeview
|
||||||
|
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage, "业务组件管理查询","right");
|
||||||
|
|
||||||
|
//定义树图结构,去掉跟踪的不良资产和催收函快速查询
|
||||||
|
String sSqlTreeView = " from O where CodeNo= 'TermType' and IsInUse in('0','1') ";
|
||||||
|
tviTemp.init(JBOFactory.getBizObjectManager("jbo.sys.CODE_LIBRARY"), "SortNo","ItemName","ItemDescribe","","",sSqlTreeView,"Order By SortNo");
|
||||||
|
|
||||||
|
//ID字段(必须),Name字段(必须),Value字段,Script字段,Picture字段,From子句(必须),OrderBy子句,Sqlca
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_main.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function TreeViewOnClick(){
|
||||||
|
var sCurItemID = getCurTVItem().id;
|
||||||
|
var sCurItemName = getCurTVItem().name;
|
||||||
|
var sItemDescribe = getCurTVItem().value;
|
||||||
|
if(typeof(sItemDescribe) != "undefined" && sItemDescribe != "" && sItemDescribe != "null"){
|
||||||
|
AsControl.OpenView(sItemDescribe.split("@")[0],sItemDescribe.split("@")[2],"right");
|
||||||
|
setTitle(getCurTVItem().name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function startMenu(){
|
||||||
|
<%=tviTemp.generateHTMLTreeView()%>
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
startMenu();
|
||||||
|
expandNode('root');
|
||||||
|
selectItem('0010');
|
||||||
|
expandNode('0020');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
94
WebContent/Accounting/Config/TermItemList.jsp
Normal file
94
WebContent/Accounting/Config/TermItemList.jsp
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "组件参数列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String termID = (String)CurComp.getParameter("TermID");
|
||||||
|
if(termID == null)termID = "";
|
||||||
|
String objectType = (String)CurPage.getParameter("ObjectType");
|
||||||
|
if(objectType==null) objectType = "Term";
|
||||||
|
String objectNo = (String)CurPage.getParameter("ObjectNo");
|
||||||
|
if(objectNo==null) objectNo = termID;
|
||||||
|
String termType="",setFlag="";
|
||||||
|
ASResultSet rs=Sqlca.getASResultSet("select TermType,SetFlag from product_term_library "+
|
||||||
|
"where ObjectType='Term' and TermID = '"+termID+"'");
|
||||||
|
if(rs.next()){
|
||||||
|
termType=rs.getString("TermType");
|
||||||
|
setFlag=rs.getString("SetFlag");
|
||||||
|
}
|
||||||
|
rs.getStatement().close();
|
||||||
|
|
||||||
|
CurPage.setAttribute("TempletNo", "TermItemList");
|
||||||
|
String sTempletNo = "TermItemList";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(40);
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(termID);
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","引入","引入","importParameters()","","","",""},
|
||||||
|
{"true","","Button","删除","删除","deleteParam()","","","",""},
|
||||||
|
{"true","","Button","保存","保存","saveRecord()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
function importParameters()
|
||||||
|
{
|
||||||
|
var sReturn = selectObjectValue("SelectTermParameters","TermType,<%=termType%>,SetFlag,<%=setFlag%>","",0,0,"");
|
||||||
|
if(typeof(sReturn) != "undefined" && sReturn != "" && sReturn != "_NONE_" && sReturn != "_CLEAR_" && sReturn != "_CANCEL_")
|
||||||
|
{
|
||||||
|
var methodResult = RunMethod("ProductManage","ImportTermParameters","importTermParameters2,<%=objectNo%>,<%=termID%>,"+sReturn);
|
||||||
|
var ddd = parent;
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveRecord()
|
||||||
|
{
|
||||||
|
as_save("myiframe0","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteParam()
|
||||||
|
{
|
||||||
|
var sParaID = getItemValue(0,getRow(),"ParaID");
|
||||||
|
if (typeof(sParaID)=="undefined" || sParaID.length==0)
|
||||||
|
{
|
||||||
|
alert("请选择一条记录!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm("确定删除该信息吗?"))
|
||||||
|
{
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0","reloadSelf();"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var obj = parent.document.getElementById('ParameterList');
|
||||||
|
if(typeof(obj) != "undefined" && obj != null)
|
||||||
|
{
|
||||||
|
obj.style.height = ((getRowCount(0))*18+55)+"%";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
108
WebContent/Accounting/Config/TermLibraryInfo.jsp
Normal file
108
WebContent/Accounting/Config/TermLibraryInfo.jsp
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件详细信息"; // 浏览器窗口标题 <title> PG_TITLE </title>//20100803 ltma
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String termID = (String)CurPage.getParameter("TermID");
|
||||||
|
if(termID == null) termID = "";
|
||||||
|
String objectType = (String)CurPage.getParameter("ObjectType");
|
||||||
|
if(objectType == null) objectType = "Term";
|
||||||
|
String objectNo = (String)CurPage.getParameter("ObjectNo");
|
||||||
|
if(objectNo == null) objectNo = termID;
|
||||||
|
String termType = (String)CurPage.getParameter("TermType");
|
||||||
|
if(termType == null) termType = "";
|
||||||
|
|
||||||
|
String parameterCount = Sqlca.getString("select count(*) from product_term_para "
|
||||||
|
+" where ObjectType='"+objectType+"' and ObjectNo='"+objectNo+"' and TermID = '"+termID+"'");
|
||||||
|
|
||||||
|
String sTempletNo = "TermLibraryInfo";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
|
||||||
|
//dwTemp.setHarborTemplate(DWExtendedFunctions.getDWDockHTMLTemplate(sTempletNo,sTempletFilter,Sqlca));
|
||||||
|
//if(termID.length()>0) dwTemp.DataObject.setReadOnly("TermID,TermType", true);
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(termID);
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存","saveRecord()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
function saveRecord(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID)=="undefined" || termID.length==0)return;
|
||||||
|
setItemValue(0,0,"ObjectNo",termID);
|
||||||
|
var existsFlag = RunMethod("PublicMethod","GetColValue","1,product_term_library,String@ObjectType@Term~String@TermID@"+termID);
|
||||||
|
if(existsFlag =="1")
|
||||||
|
{
|
||||||
|
alert("组件编号重复,请确认!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm('确定保存吗?')){//20100806 ltma:进行数据库保存时请求修改者确认
|
||||||
|
|
||||||
|
//更新费用组件的名称 20121126 dxu1
|
||||||
|
var TermName = getItemValue(0,getRow(),"TermName");
|
||||||
|
if(typeof(TermName) !="undefined" && TermName.length !=0)
|
||||||
|
{
|
||||||
|
RunMethod("ProductManage","UpdateTermName",termID+","+TermName);
|
||||||
|
}
|
||||||
|
as_save("myiframe0","open_self();");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function open_self(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermLibraryInfo.jsp","ObjectNo="+termID+"&ObjectType=Term&TermID="+termID,"_self",OpenStyle);
|
||||||
|
}
|
||||||
|
|
||||||
|
function OpenSubPage(){
|
||||||
|
var setFlag = getItemValue(0,getRow(),"SetFlag");
|
||||||
|
if(typeof(setFlag)=="undefined" || setFlag.length==0) return;
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermItemList.jsp","TermID=<%=termID%>&ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>","ParameterList","");
|
||||||
|
if("<%=termID%>".length>0){
|
||||||
|
if(<%=Integer.parseInt(parameterCount)%> > 0){
|
||||||
|
if(setFlag=="BAS"||setFlag=="SEG"){
|
||||||
|
frames['myiframe0'].document.getElementById('ContentFrame_TermParaView').style.display="";
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermParaView.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&TermID=<%=termID%>","TermParaView","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermRelativeView.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&TermID=<%=termID%>","TermRelativeView","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0) {//如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
setItemValue(0,0,"TermType","<%=termType%>");
|
||||||
|
setItemValue(0,0,"ObjectType","<%=objectType%>");
|
||||||
|
setItemValue(0,0,"ObjectNo","<%=objectNo%>");
|
||||||
|
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgID()%>");
|
||||||
|
setItemValue(0,0,"InputUserID","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"InputDate","<%=StringFunction.getToday()%>");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
setItemValue(0,0,"UpdateDate","<%=StringFunction.getToday()%>");
|
||||||
|
}
|
||||||
|
OpenSubPage();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var bFreeFormMultiCol = true;
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
104
WebContent/Accounting/Config/TermLibraryInfo2.jsp
Normal file
104
WebContent/Accounting/Config/TermLibraryInfo2.jsp
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件详细信息"; // 浏览器窗口标题 <title> PG_TITLE </title>//20100803 ltma
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String termID = (String)CurPage.getParameter("TermID");
|
||||||
|
if(termID == null) termID = "";
|
||||||
|
String objectType = (String)CurPage.getParameter("ObjectType");
|
||||||
|
if(objectType == null) objectType = "Term";
|
||||||
|
String objectNo = (String)CurPage.getParameter("ObjectNo");
|
||||||
|
if(objectNo == null) objectNo = termID;
|
||||||
|
String termType = (String)CurPage.getParameter("TermType");
|
||||||
|
if(termType == null) termType = "";
|
||||||
|
|
||||||
|
String parameterCount = Sqlca.getString("select count(*) from product_term_para "
|
||||||
|
+" where ObjectType='"+objectType+"' and ObjectNo='"+objectNo+"' and TermID = '"+termID+"'");
|
||||||
|
String sTempletNo = "TermLibraryInfo2";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
|
||||||
|
//dwTemp.setHarborTemplate(DWExtendedFunctions.getDWDockHTMLTemplate(sTempletNo,sTempletFilter,Sqlca));
|
||||||
|
|
||||||
|
//if(termID.length()>0) dwTemp.DataObject.setReadOnly("TermID,TermType", true);
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(termID);
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String sButtons[][] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
function saveRecord(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID)=="undefined" || termID.length==0)
|
||||||
|
return;
|
||||||
|
setItemValue(0,0,"ObjectNo",termID);
|
||||||
|
var existsFlag = RunJavaMethodTrans("com.amarsoft.app.lending.bizlets.GetColValue","1,product_term_library,String@ObjectType@Term~String@TermID@"+termID);
|
||||||
|
var existsFlag = RunJavaMethodTrans("com.amarsoft.app.lending.bizlets.GetColValue","getColValue","TableName="+tableName +",ColName="+colName+",WhereClause="+whereClause+",Value="+value);
|
||||||
|
if(existsFlag =="1"){
|
||||||
|
alert("组件编号重复,请确认!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm('确定保存吗?')){//20100806 ltma:进行数据库保存时请求修改者确认
|
||||||
|
as_save("myiframe0","open_self();");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function open_self(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermLibraryInfo2.jsp","ObjectNo="+termID+"&ObjectType=Term&TermID="+termID,"_self",OpenStyle);
|
||||||
|
}
|
||||||
|
|
||||||
|
function OpenSubPage()
|
||||||
|
{
|
||||||
|
var setFlag = getItemValue(0,getRow(),"SetFlag");
|
||||||
|
if(typeof(setFlag)=="undefined" || setFlag.length==0) return;
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermItemList.jsp","TermID=<%=termID%>&ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>","ParameterList","");
|
||||||
|
if("<%=termID%>".length>0){
|
||||||
|
if(<%=Integer.parseInt(parameterCount)%> > 0){
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermParaView.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&TermID=<%=termID%>","TermParaView","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermRelativeView.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&TermID=<%=termID%>","TermRelativeView","");
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermSetSegmentList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&ParentTermID=<%=termID%>","TermParaList","");
|
||||||
|
}
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0) {//如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
setItemValue(0,0,"TermType","<%=termType%>");
|
||||||
|
setItemValue(0,0,"ObjectType","<%=objectType%>");
|
||||||
|
setItemValue(0,0,"ObjectNo","<%=objectNo%>");
|
||||||
|
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgID()%>");
|
||||||
|
setItemValue(0,0,"InputUserID","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"InputDate","<%=StringFunction.getToday()%>");
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"UpdateDate","<%=StringFunction.getToday()%>");
|
||||||
|
}
|
||||||
|
//OpenSubPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var bFreeFormMultiCol = true;
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
92
WebContent/Accounting/Config/TermLibraryList.jsp
Normal file
92
WebContent/Accounting/Config/TermLibraryList.jsp
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%@ page import="com.amarsoft.app.accounting.tools.*" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "功能组件列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
//拿到主键参数
|
||||||
|
String termType = (String)CurPage.getParameter("TermType");
|
||||||
|
if(termType == null)termType = "";
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "TermLibraryList";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(200);
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(termType);
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","定义新组件","定义新组件","newRecord()","","","",""},
|
||||||
|
{"true","","Button","编辑组件","编辑组件","viewAndEdit()","","","",""},
|
||||||
|
{"true","","Button","启用","启用","changeStatus(1)","","","",""},
|
||||||
|
{"true","","Button","停用","停用","changeStatus(2)","","","",""},
|
||||||
|
{"true","","Button","复制组件","复制组件","copyTerm()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
function newRecord(){
|
||||||
|
sReturn = AsControl.OpenView("/Accounting/Config/TermLibraryInfo.jsp","TermType=<%=termType%>&ObjectType=Term","_blank",OpenStyle);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeStatus(status){
|
||||||
|
sTermID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(sTermID)=="undefined" || sTermID==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
sReturn = RunMethod("PublicMethod","UpdateColValue","String@Status@"+status+",PRODUCT_TERM_LIBRARY,String@ObjectType@Term@String@TermID@"+sTermID);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyTerm(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
var termName = getItemValue(0,getRow(),"TermName");
|
||||||
|
if(typeof(termID)=="undefined" || termID==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
var returnValue = PopPage("/Accounting/Config/CopyTermDialog.jsp","","resizable=yes;dialogWidth=20;dialogHeight=10;center:yes;status:no;statusbar:no");
|
||||||
|
if(typeof(returnValue) != "undefined" && returnValue.length != 0 && returnValue != '_CANCEL_'){
|
||||||
|
returnValue=returnValue.split("@");
|
||||||
|
sReturn = RunMethod("ProductManage","CopyTerm","copyTerm,"+returnValue[0]+","+returnValue[1]+","+termID);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewAndEdit(){
|
||||||
|
termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
SetFlag = getItemValue(0,getRow(),"SetFlag");
|
||||||
|
if(typeof(termID)=="undefined" || termID==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
if(SetFlag=="BAS"||SetFlag=="SEG") {
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermLibraryInfo.jsp","ObjectNo="+termID+"&ObjectType=Term&TermID="+termID,"_blank",OpenStyle);
|
||||||
|
}else{
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermLibraryStrip.jsp","ObjectNo="+termID+"&ObjectType=Term&TermID="+termID,"_blank",OpenStyle);
|
||||||
|
}
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
47
WebContent/Accounting/Config/TermLibraryStrip.jsp
Normal file
47
WebContent/Accounting/Config/TermLibraryStrip.jsp
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: undefined 2016-07-08
|
||||||
|
Content: 通过数组定义生成strip框架页面示例
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
|
||||||
|
String termID = (String)CurPage.getParameter("TermID");
|
||||||
|
if(termID == null) termID = "";
|
||||||
|
String objectType = (String)CurPage.getParameter("ObjectType");
|
||||||
|
if(objectType == null) objectType = "Term";
|
||||||
|
String objectNo = (String)CurPage.getParameter("ObjectNo");
|
||||||
|
if(objectNo == null) objectNo = termID;
|
||||||
|
String termType = (String)CurPage.getParameter("TermType");
|
||||||
|
if(termType == null) termType = "";
|
||||||
|
|
||||||
|
String sTempletNo = "TermLibraryInfo2";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(termID);
|
||||||
|
|
||||||
|
|
||||||
|
//定义strip数组:
|
||||||
|
//参数:0.是否显示, 1.标题,2.高度,3.组件ID,4.URL,5,参数串,6.事件
|
||||||
|
String sStrips[][] = {
|
||||||
|
{"true","组件基本信息" ,"200","ExampleList","/Accounting/Config/TermLibraryInfo2.jsp","ObjectType="+objectType+"&ObjectNo="+objectNo+"&TermID="+termID,""},
|
||||||
|
{"true","组件参数列表" ,"200","ExampleInfo","/Accounting/Config/TermItemList.jsp","ObjectType="+objectType+"&ObjectNo="+objectNo+"&TermID="+termID,""},
|
||||||
|
{"true","组件参数维护" ,"200","ExampleInfo","/Accounting/Config/TermParaView.jsp","ObjectType="+objectType+"&ObjectNo="+objectNo+"&TermID="+termID,""},
|
||||||
|
{"true","组件参数关系关联" ,"200","ExampleInfo","/Accounting/Config/TermRelativeView.jsp","ObjectType="+objectType+"&ObjectNo="+objectNo+"&TermID="+termID,""},
|
||||||
|
{"true","子组件列表" ,"200","ExampleInfo","/Accounting/Config/TermSetSegmentList.jsp","ObjectType="+objectType+"&ObjectNo="+objectNo+"&TermID="+termID,""},
|
||||||
|
};
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存","aaa()","","","",""}
|
||||||
|
};
|
||||||
|
%><%@include file="/Resources/CodeParts/Strip05.jsp"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function aaa(){
|
||||||
|
alert(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
39
WebContent/Accounting/Config/TermParaSaveAction.jsp
Normal file
39
WebContent/Accounting/Config/TermParaSaveAction.jsp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBeginMD.jsp"%>
|
||||||
|
<%@page import="com.amarsoft.app.accounting.product.ProductManage"%>
|
||||||
|
<%
|
||||||
|
String termID = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("TermID"));
|
||||||
|
if(termID==null)termID = "";
|
||||||
|
String objectType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectType"));
|
||||||
|
if(objectType==null)objectType = "";
|
||||||
|
String objectNo = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectNo"));
|
||||||
|
if(objectNo==null)objectNo = "";
|
||||||
|
|
||||||
|
String sql="select * from PRODUCT_TERM_PARA where termID='"+termID+"' and objectType='"+objectType+"' and objectNo='"+objectNo+"'";
|
||||||
|
ASResultSet rs=Sqlca.getASResultSet(sql);
|
||||||
|
while(rs.next()){
|
||||||
|
String paraID = rs.getString("ParaID");
|
||||||
|
String maxValue=DataConvert.toRealString(iPostChange,(String)CurPage.getParameter(paraID+"_Max"));
|
||||||
|
if(maxValue==null||maxValue.length()==0)maxValue="null";
|
||||||
|
String minValue=DataConvert.toRealString(iPostChange,(String)CurPage.getParameter(paraID+"_Min"));
|
||||||
|
if(minValue==null||minValue.length()==0)minValue="null";
|
||||||
|
String defaultValue=DataConvert.toRealString(iPostChange,(String)CurPage.getParameter(paraID+"_DV"));
|
||||||
|
if(defaultValue==null)defaultValue="";
|
||||||
|
String valueList=DataConvert.toRealString(iPostChange,(String)CurPage.getParameter(paraID+"_VL"));
|
||||||
|
if(valueList==null)valueList="";
|
||||||
|
String valueListName=DataConvert.toRealString(iPostChange,(String)CurPage.getParameter(paraID+"_VLN"));
|
||||||
|
if(valueListName==null)valueListName="";
|
||||||
|
if(maxValue==null)maxValue="";
|
||||||
|
sql="MaxValue="+maxValue+",MinValue="+minValue+",defaultValue='"+defaultValue+"',valueList='"+valueList+"',valueListName='"+valueListName+"'";
|
||||||
|
|
||||||
|
String updatesql ="update PRODUCT_TERM_PARA set "+sql+" where TermID='"+termID+"' "+
|
||||||
|
" and ParaID='"+paraID+"' and ObjectType='"+objectType+"' and ObjectNo='"+objectNo+"'";
|
||||||
|
Sqlca.executeSQL(updatesql);
|
||||||
|
}
|
||||||
|
rs.getStatement().close();
|
||||||
|
%>
|
||||||
|
<script language=javascript>
|
||||||
|
self.returnValue = "±£´æ³É¹¦£¡";
|
||||||
|
self.close();
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
178
WebContent/Accounting/Config/TermParaView.jsp
Normal file
178
WebContent/Accounting/Config/TermParaView.jsp
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = ""; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
function setMultiObjectTreeValue(sObjectType,sParaString,sValueString,iArgDW,iArgRow,sStyle)
|
||||||
|
{
|
||||||
|
if(typeof(sStyle)=="undefined" || sStyle=="") sStyle = "dialogWidth:700px;dialogHeight:540px;resizable:yes;scrollbars:no;status:no;help:no";
|
||||||
|
var iDW = iArgDW;
|
||||||
|
if(iDW == null) iDW=0;
|
||||||
|
var iRow = iArgRow;
|
||||||
|
if(iRow == null) iRow=0;
|
||||||
|
|
||||||
|
var sValues = sValueString.split("@");
|
||||||
|
|
||||||
|
var i=sValues.length;
|
||||||
|
i=i-1;
|
||||||
|
if (i%2!=0)
|
||||||
|
{
|
||||||
|
alert("setObjectValue()返回参数设定有误!\r\n格式为:@ID列名@ID在返回串中的位置...");
|
||||||
|
return;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
var treeValueList="";
|
||||||
|
var j=i/2,m,sColumn,iID;
|
||||||
|
for(m=1;m<=j;m++)
|
||||||
|
{
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
iID = parseInt(sValues[2*m],10);
|
||||||
|
|
||||||
|
if(sColumn!="")
|
||||||
|
treeValueList+=","+getItemValue(iDW,iRow,sColumn);
|
||||||
|
}
|
||||||
|
|
||||||
|
sObjectNoString = selectMultipleTree(sObjectType,sParaString,sStyle,treeValueList);
|
||||||
|
|
||||||
|
if(typeof(sObjectNoString)=="undefined" )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}else if(sObjectNoString=="_CANCEL_" )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}else if(sObjectNoString=="_CLEAR_")
|
||||||
|
{
|
||||||
|
for(m=1;m<=j;m++)
|
||||||
|
{
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
if(sColumn!="")
|
||||||
|
setItemValue(iDW,iRow,sColumn,"");
|
||||||
|
}
|
||||||
|
}else if(sObjectNoString!="_NONE_" && sObjectNoString!="undefined")
|
||||||
|
{
|
||||||
|
sObjectNos = sObjectNoString.split("@");
|
||||||
|
for(m=1;m<=j;m++)
|
||||||
|
{
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
iID = parseInt(sValues[2*m],10);
|
||||||
|
|
||||||
|
if(sColumn!="")
|
||||||
|
setItemValue(iDW,iRow,sColumn,sObjectNos[iID]);
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//alert("选取对象编号失败!对象类型:"+sObjectType);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return sObjectNoString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectMultipleTree(sObjectType,sParaString,sStyle,sValue)
|
||||||
|
{
|
||||||
|
if(typeof(sStyle)=="undefined" || sStyle=="") sStyle = "dialogWidth:680px;dialogHeight:540px;resizable:yes;scrollbars:no;status:no;help:no";
|
||||||
|
if(typeof(sValue)=="undefined" || sValue=="") sValue = "";
|
||||||
|
sObjectNoString = AsControl.PopView("/Accounting/Config/MultiSelectTreeViewDialog.jsp","SelectedValue="+sValue+"&SelName="+sObjectType+"&ParaString="+sParaString,sStyle);
|
||||||
|
return sObjectNoString;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String termID = (String)CurPage.getParameter("TermID");
|
||||||
|
if(termID == null) termID = "";
|
||||||
|
String objectType = (String)CurPage.getParameter("ObjectType");
|
||||||
|
if(objectType == null) objectType = "Term";
|
||||||
|
String objectNo = (String)CurPage.getParameter("ObjectNo");
|
||||||
|
if(objectNo == null) objectNo = "";
|
||||||
|
|
||||||
|
ASDataWindow dwTemp=com.amarsoft.app.accounting.product.ProductTermView.createTermDataWindow(objectType, objectNo, termID, Sqlca, CurPage);
|
||||||
|
ASDataObject doTemp = dwTemp.DataObject;
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
Vector vTemp = dwTemp.genHTMLDataWindow("");
|
||||||
|
for(int i=0;i<vTemp.size();i++) out.print((String)vTemp.get(i));
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
|
||||||
|
<%
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存","updateParaValues()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
|
||||||
|
<%@include file="/Resources/CodeParts/List05.jsp"%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(){
|
||||||
|
as_save("myiframe0","updateParaValues();");
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateParaValues(){
|
||||||
|
var paraList="ObjectType=<%=objectType%>&VersionID=<%=objectNo%>&TermID=<%=termID%>";
|
||||||
|
<%
|
||||||
|
for(int i=0;i<doTemp.Columns.size();i++){
|
||||||
|
String paraname = doTemp.getColumnAttribute(i, "Name");
|
||||||
|
%>
|
||||||
|
var s=getItemValue(0,getRow(),"<%=paraname%>");
|
||||||
|
|
||||||
|
if(typeof(s) != "undefined" ){
|
||||||
|
s=real2Amarsoft(s);
|
||||||
|
paraList = paraList+"&<%=paraname%>="+s;
|
||||||
|
}
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
//modify end
|
||||||
|
var result =PopPage("/Accounting/Config/TermParaSaveAction.jsp?"+paraList,"","dialogWidth=60;dialogheight=25;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no");
|
||||||
|
alert(result);//parent.reloadSelf(1);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=页面装载时,进行初始化;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
AsOne.AsInit();
|
||||||
|
init();
|
||||||
|
var bFreeFormMultiCol = true;
|
||||||
|
my_load(2,0,'myiframe0');
|
||||||
|
|
||||||
|
var obj = parent.document.getElementById('TermParaView');
|
||||||
|
if(typeof(obj) != "undefined" && obj != null)
|
||||||
|
{
|
||||||
|
obj.style.height = ((DZ[0][1].length/2)*18+25)+"%";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
133
WebContent/Accounting/Config/TermParaView2.jsp
Normal file
133
WebContent/Accounting/Config/TermParaView2.jsp
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: ltma 2010-08-04
|
||||||
|
Tester:
|
||||||
|
Content: 条款管理
|
||||||
|
History Log: cwzhan 2004-12-15
|
||||||
|
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = ""; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%>
|
||||||
|
<%
|
||||||
|
CurPage.setAttribute("ShowDetailArea","true");
|
||||||
|
CurPage.setAttribute("DetailAreaHeight","150");
|
||||||
|
|
||||||
|
String termID = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("TermID"));
|
||||||
|
if(termID == null)
|
||||||
|
{
|
||||||
|
termID = "";
|
||||||
|
}
|
||||||
|
String objectType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectType"));
|
||||||
|
if(objectType == null)
|
||||||
|
{
|
||||||
|
objectType = "Term";
|
||||||
|
}
|
||||||
|
String objectNo = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectNo"));
|
||||||
|
if(objectNo == null)
|
||||||
|
{
|
||||||
|
objectNo = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
ASDataWindow dwTemp=com.amarsoft.app.accounting.product.ProductTermView.createTermDataWindow(objectType, objectNo, termID, Sqlca, CurPage);
|
||||||
|
ASDataObject doTemp = dwTemp.DataObject;
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
Vector vTemp = dwTemp.genHTMLDataWindow("");
|
||||||
|
for(int i=0;i<vTemp.size();i++) out.print((String)vTemp.get(i));
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
|
||||||
|
<%
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存","updateParaValues()",sResourcesPath},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
|
||||||
|
<%@include file="/Resources/CodeParts/List05.jsp"%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(){
|
||||||
|
as_save("myiframe0","updateParaValues();");
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateParaValues(){
|
||||||
|
var paraList="ObjectType=<%=objectType%>&VersionID=<%=objectNo%>&TermID=<%=termID%>";
|
||||||
|
<%
|
||||||
|
for(int i=0;i<doTemp.Columns.size();i++){
|
||||||
|
String paraname = doTemp.getColumnAttribute(i, "Name");
|
||||||
|
%>
|
||||||
|
var s=getItemValue(0,getRow(),"<%=paraname%>");
|
||||||
|
|
||||||
|
if(typeof(s) != "undefined" ){
|
||||||
|
s=real2Amarsoft(s);
|
||||||
|
paraList = paraList+"&<%=paraname%>="+s;
|
||||||
|
}
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
var result =PopPage("/Accounting/Config/TermParaSaveAction.jsp?"+paraList,"","dialogWidth=60;dialogheight=25;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no");
|
||||||
|
alert(result);//parent.reloadSelf(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function OpenSubPage()
|
||||||
|
{
|
||||||
|
OpenPage("/Accounting/Config/TermSetSegmentList.jsp?ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&ParentTermID=<%=termID%>","DetailFrame");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=页面装载时,进行初始化;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
AsOne.AsInit();
|
||||||
|
init();
|
||||||
|
var bFreeFormMultiCol = true;
|
||||||
|
my_load(2,0,'myiframe0');
|
||||||
|
OpenSubPage();
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
93
WebContent/Accounting/Config/TermRelativeView.jsp
Normal file
93
WebContent/Accounting/Config/TermRelativeView.jsp
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "组件关联关系列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
|
||||||
|
//获得组件参数
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String sObjectType = (String)CurPage.getParameter("ObjectType");
|
||||||
|
String sObjectNo = (String)CurPage.getParameter("ObjectNo");
|
||||||
|
String sTermID = (String)CurPage.getParameter("TermID");
|
||||||
|
if(sObjectType==null) sObjectType="";
|
||||||
|
if(sObjectNo==null) sObjectNo="";
|
||||||
|
if(sTermID==null) sTermID="";
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "TermRelativeView";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
dwTemp.genHTMLObjectWindow(sTermID+","+sObjectNo+","+sObjectType);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","添加互斥关联","添加互斥关联","addExclusiveRelative()","","","",""},
|
||||||
|
{"true","","Button","添加绑定关联","添加绑定关联","addBindRelative()","","","",""},
|
||||||
|
{"true","","Button","删除","删除组件关联","deleterelative()","","","",""}
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var bIsInsert = false; //标记DW是否处于“新增状态”
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
var s="";
|
||||||
|
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(sPostEvents)
|
||||||
|
{
|
||||||
|
if(bIsInsert){
|
||||||
|
beforeInsert();
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeUpdate();
|
||||||
|
as_save("myiframe0",sPostEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addExclusiveRelative()
|
||||||
|
{
|
||||||
|
var returnValue=setObjectValue("SelectAllTerms","termId,<%=sTermID%>","",0,0,"");
|
||||||
|
if(typeof(returnValue) != "undefined" && returnValue != "" && returnValue != "_NONE_" && returnValue != "_CLEAR_" && returnValue != "_CANCEL_")
|
||||||
|
{
|
||||||
|
RunMethod("ProductManage","addExclusiveRelative","addExclusiveRelative,<%=sTermID%>,"+returnValue+","+"<%=sObjectType%>,"+"<%=sObjectNo%>");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addBindRelative()
|
||||||
|
{
|
||||||
|
var returnValue=setObjectValue("SelectAllTerms","termId,<%=sTermID%>","",0,0,"");
|
||||||
|
if(typeof(returnValue) != "undefined" && returnValue != "" && returnValue != "_NONE_" && returnValue != "_CLEAR_" && returnValue != "_CANCEL_")
|
||||||
|
{
|
||||||
|
RunMethod("ProductManage","addBindRelative","addBindRelative,<%=sTermID%>,"+returnValue+","+"<%=sObjectType%>,"+"<%=sObjectNo%>");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleterelative()
|
||||||
|
{
|
||||||
|
var sTermId = getItemValue(0,getRow(),"TERMID"); //组件ID
|
||||||
|
var sRelativeTermID = getItemValue(0,getRow(),"RELATIVETERMID");//关联组件ID
|
||||||
|
if(typeof(sTermId) == "undefined" || sTermId.length == 0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))) //您真的想删除该信息吗?
|
||||||
|
{
|
||||||
|
//as_del("myiframe0");
|
||||||
|
//as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
RunMethod("ProductManage","deleteRelative","deleteRelative,"+sTermId+","+sRelativeTermID);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
114
WebContent/Accounting/Config/TermSetSegmentInfo.jsp
Normal file
114
WebContent/Accounting/Config/TermSetSegmentInfo.jsp
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务组件详细信息"; // 浏览器窗口标题 <title> PG_TITLE </title>//20100803 ltma
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String termID = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("TermID"));
|
||||||
|
if(termID == null)
|
||||||
|
{
|
||||||
|
termID = "";
|
||||||
|
}
|
||||||
|
String parentTermID = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ParentTermID"));
|
||||||
|
if(parentTermID == null)
|
||||||
|
{
|
||||||
|
parentTermID = "";
|
||||||
|
}
|
||||||
|
String termType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("TermType"));
|
||||||
|
if(termType == null)
|
||||||
|
{
|
||||||
|
termType = Sqlca.getString("select TermType from PRODUCT_TERM_LIBRARY where TermID = '"+parentTermID+"' ");
|
||||||
|
}
|
||||||
|
String objectType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectType"));
|
||||||
|
if(objectType == null)
|
||||||
|
{
|
||||||
|
objectType = "Term";
|
||||||
|
}
|
||||||
|
String objectNo = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectNo"));
|
||||||
|
if(objectNo == null)
|
||||||
|
{
|
||||||
|
objectNo = parentTermID;
|
||||||
|
}
|
||||||
|
String sTempletNo = "TermSetSegmentInfo";
|
||||||
|
String sTempletFilter = "1=1";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo,sTempletFilter);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
//集成多个页面
|
||||||
|
dwTemp.setHarborTemplate(DWExtendedFunctions.getDWDockHTMLTemplate(sTempletNo,sTempletFilter,Sqlca));
|
||||||
|
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setEvent("AfterInsert","!ProductManage.CreateSegTerm(#TermID,"+parentTermID+","+objectType+","+objectNo+")+!ProductManage.ImportSegTermParameter(#TermID,"+parentTermID+","+objectType+","+objectNo+")");
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(termID+","+parentTermID+","+objectType+","+objectNo);
|
||||||
|
|
||||||
|
String parameterCount = Sqlca.getString("select count(*) from PRODUCT_TERM_PARA where TermID = '"+termID+"'");
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存","saveRecord()",sResourcesPath},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
function saveRecord(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
var sortNo = getItemValue(0,getRow(),"SortNo");
|
||||||
|
if(typeof(sortNo)=="undefined" || sortNo.length==0){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
if(typeof(termID)=="undefined" || termID.length==0){
|
||||||
|
var parentTermID = getItemValue(0,getRow(),"ParentTermID");
|
||||||
|
termID=parentTermID+"-"+sortNo;
|
||||||
|
setItemValue(0,0,"TermID",termID);
|
||||||
|
}
|
||||||
|
var sReturn = RunMethod("PublicMethod","GetColValue","1,PRODUCT_TERM_LIBRARY,String@ObjectNo@<%=objectNo%>~String@ObjectType@<%=objectType%>~String@TermID@"+termID);
|
||||||
|
if(sReturn =="1"){
|
||||||
|
alert("区段编号重复,请确认!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm('确定保存吗?')){//20100806 ltma:进行数据库保存时请求修改者确认
|
||||||
|
as_save("myiframe0","open_self();");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function open_self(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
var parentTermID = getItemValue(0,getRow(),"ParentTermID");
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermSetSegmentInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&TermID="+termID+"&ParentTermID="+parentTermID,"_self",OpenStyle);
|
||||||
|
}
|
||||||
|
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0) {//如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
setItemValue(0,0,"TermType","<%=termType%>");
|
||||||
|
setItemValue(0,0,"ObjectType","<%=objectType%>");
|
||||||
|
setItemValue(0,0,"ObjectNo","<%=objectNo%>");
|
||||||
|
setItemValue(0,0,"ParentTermID","<%=parentTermID%>");
|
||||||
|
}
|
||||||
|
<%if(termID!=null&&termID.length()>0){%>
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermItemList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&TermID=<%=termID%>","ParameterList","");
|
||||||
|
<%if(Integer.parseInt(parameterCount)>0){%>
|
||||||
|
frames['myiframe0'].document.getElementById('ContentFrame_TermParaView').style.display="";
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermParaView.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&TermID=<%=termID%>","TermParaView","");
|
||||||
|
<%}%>
|
||||||
|
<%}%>
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var bFreeFormMultiCol = true;
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
72
WebContent/Accounting/Config/TermSetSegmentList.jsp
Normal file
72
WebContent/Accounting/Config/TermSetSegmentList.jsp
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "区段列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String parentTermID = (String)CurPage.getParameter("ParentTermID");
|
||||||
|
if(parentTermID == null) parentTermID = "";
|
||||||
|
String objectType = (String)CurPage.getParameter("ObjectType");
|
||||||
|
if(objectType == null) objectType = "Term";
|
||||||
|
String objectNo = (String)CurPage.getParameter("ObjectNo");
|
||||||
|
if(objectNo == null) objectNo = parentTermID;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("TermSetSegmentList");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
//dwTemp.setEvent("AfterDelete","!ProductManage.DeleteTermParameter(#TermID,"+objectType+","+objectNo+")+!ProductManage.DeleteTermRelative(#TermID,"+parentTermID+","+objectType+","+objectNo+")");
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(parentTermID+","+objectType+","+objectNo);
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
String sButtons[][] = {
|
||||||
|
{parentTermID.equals("")?"false":"true","","Button","新增区段","新增区段","newRecord()","","","",""},
|
||||||
|
{"true","","Button","编辑区段","编辑区段","viewAndEdit()","","","",""},
|
||||||
|
{"true","","Button","删除区段","删除区段","deleteRecord()","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
function newRecord(){
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermSetSegmentInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&ParentTermID=<%=parentTermID%>","_blank",OpenStyle);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRecord(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if (typeof(termID)=="undefined" || termID.length==0){
|
||||||
|
alert("请选择一条记录!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm("您真的想删除该信息吗?")){
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewAndEdit(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID)=="undefined" || termID==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
AsControl.OpenView("/Accounting/Config/TermSetSegmentInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&ParentTermID=<%=parentTermID%>&TermID="+termID,"_blank",OpenStyle);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
22
WebContent/Accounting/Config/TransEntryConfigFrame.jsp
Normal file
22
WebContent/Accounting/Config/TransEntryConfigFrame.jsp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||||
|
include file="/IncludeBegin.jsp"%><%
|
||||||
|
/*
|
||||||
|
页面说明: 示例上下联动框架页面
|
||||||
|
*/
|
||||||
|
String sTransID = (String)CurComp.getParameter("ItemNo");
|
||||||
|
String inputparatemplete = (String)CurComp.getParameter("attribute1");
|
||||||
|
|
||||||
|
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
mytoptd.height=300;
|
||||||
|
OpenList();
|
||||||
|
|
||||||
|
function OpenList(){
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransEntryConfigList.jsp","TransID="+<%=sTransID%>+"&Inputparatemplete=<%=inputparatemplete%>&ToInheritObj=y","rightup");
|
||||||
|
}
|
||||||
|
|
||||||
|
function OpenInfo(args){
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransEntryConfigInfo.jsp", args, "rightdown");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
95
WebContent/Accounting/Config/TransEntryConfigInfo.jsp
Normal file
95
WebContent/Accounting/Config/TransEntryConfigInfo.jsp
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "会计分录定义详情"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
String sSortID = (String)CurComp.getParameter("SortID");//分录序号
|
||||||
|
String sTransID = (String)CurComp.getParameter("TransID");//交易编号
|
||||||
|
String inputparatemplete = (String)CurComp.getParameter("Inputparatemplete");//该分录模板
|
||||||
|
if(sSortID==null) sSortID="";
|
||||||
|
if(sTransID==null) sTransID="";
|
||||||
|
if(inputparatemplete==null) inputparatemplete="";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("TransEntryConfigInfo");//分录模板设置
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(sTransID+","+sSortID);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存记录","saveRecord()","","","",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
function saveRecord(){
|
||||||
|
as_save("myiframe0","parent.reloadSelf(1)");
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectSumScript(){
|
||||||
|
alert(1);
|
||||||
|
|
||||||
|
AsDialog.OpenSelector("SelectVndr","","",function(sReturn){
|
||||||
|
alert(1);
|
||||||
|
if(!sReturn||sReturn=="_CANCEL_"){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sReturn = sReturn.split("@");
|
||||||
|
//setItemValue(0,0,"VNDR", sReturn[0]);
|
||||||
|
//setItemValue(0,0,"VNDRNAME", sReturn[1]);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
AsDialog.OpenSelector("SelectDoNo","","",function(sReturn){
|
||||||
|
alert(2);
|
||||||
|
if(!sReturn||sReturn=="_CANCEL_"){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sReturn = sReturn.split("@");
|
||||||
|
alert(sReturn[0]);
|
||||||
|
setItemValue(0,0,"DONO", sReturn[0]);
|
||||||
|
setItemValue(0,0,"COLNAME", sReturn[1]);
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectVndr(){
|
||||||
|
//选择可发起立项的客户
|
||||||
|
AsDialog.OpenSelector("SelectVndr","","",function(sReturn){
|
||||||
|
if(!sReturn||sReturn=="_CANCEL_"){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sReturn = sReturn.split("@");
|
||||||
|
setItemValue(0,0,"VNDR", sReturn[0]);
|
||||||
|
setItemValue(0,0,"VNDRNAME", sReturn[1]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0){
|
||||||
|
setItemValue(0,0,"TransID","<%=sTransID%>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var bFreeFormMultiCol = true;
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
74
WebContent/Accounting/Config/TransEntryConfigList.jsp
Normal file
74
WebContent/Accounting/Config/TransEntryConfigList.jsp
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "会计分录列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
CurPage.setAttribute("ShowDetailArea","true");
|
||||||
|
CurPage.setAttribute("DetailAreaHeight","200");
|
||||||
|
CurPage.setAttribute("DetailFrameInitialText","请选择一笔记录");
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
String sTransID = (String)CurComp.getParameter("ItemNo");
|
||||||
|
String inputparatemplete = CurComp.getParameter("attribute1");
|
||||||
|
if(sTransID==null) sTransID="";
|
||||||
|
if(inputparatemplete==null) inputparatemplete="";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("TransEntryConfigList");
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(sTransID);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增一条记录","newRecord()","","","",""},
|
||||||
|
{"true","","Button","删除","删除","deleteRecord()","","","",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
function newRecord(){
|
||||||
|
var transID = "<%=sTransID%>";
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransEntryConfigInfo.jsp","TransID="+transID+"&Inputparatemplete=<%=inputparatemplete%>&ToInheritObj=y","DetailFrame","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function mySelectRow(){
|
||||||
|
var transID = getItemValue(0,getRow(),"TransID");
|
||||||
|
var sortID = getItemValue(0,getRow(),"SortID");
|
||||||
|
if (typeof(transID) == "undefined" || transID.length == 0) return;
|
||||||
|
parent.OpenInfo("TransID="+transID+"&SortID="+sortID+"&Inputparatemplete=<%=inputparatemplete%>&ToInheritObj=y");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
var sortID = getItemValue(0,getRow(),"SortID");
|
||||||
|
if (typeof(sortID)=="undefined" || sortID.length==0){
|
||||||
|
alert("请选择一条记录!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm("确定删除该信息吗?")){
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
bHighlightFirst = true;
|
||||||
|
mySelectRow();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var bHighlightFirst = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
73
WebContent/Accounting/Config/TransactionConfigInfo.jsp
Normal file
73
WebContent/Accounting/Config/TransactionConfigInfo.jsp
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "核算交易定义详情"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
String sitemno = CurPage.getParameter("ItemNo");//交易编号
|
||||||
|
if(sitemno==null) sitemno="";
|
||||||
|
String scodeno = CurPage.getParameter("CodeNo");//交易代码
|
||||||
|
if(scodeno==null) scodeno="";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("TransactionConfigInfo");//交易定义详情模板
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(sitemno);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存记录","saveRecord()","","","",""},
|
||||||
|
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var bIsInsert = false;
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
function saveRecord()
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"UpdateUser","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"UpdateUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
|
||||||
|
as_save("myiframe0");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回交易列表
|
||||||
|
function goBack()
|
||||||
|
{
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransactionConfigList.jsp","","right","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function initRow()
|
||||||
|
{
|
||||||
|
if (getRowCount(0)==0) //如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"TypeSortNo","1");
|
||||||
|
setItemValue(0,0,"InputUser","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"InputUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"InputOrg","<%=CurOrg.getOrgID()%>");
|
||||||
|
setItemValue(0,0,"InputOrgName","<%=CurOrg.getOrgName()%>");
|
||||||
|
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
|
||||||
|
setItemValue(0,0,"UpdateUser","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"UpdateUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
|
||||||
|
setItemValue(0,0,"CodeNo","T_Transaction_Def");
|
||||||
|
bIsInsert = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
89
WebContent/Accounting/Config/TransactionConfigList.jsp
Normal file
89
WebContent/Accounting/Config/TransactionConfigList.jsp
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "核算交易定义列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("TransactionConfigList");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(20);
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow("%");
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增一条记录","newRecord()","","","",""},
|
||||||
|
{"true","","Button","删除","删除一条记录","delRecord()","","","",""},
|
||||||
|
{"true","","Button","详情","详细信息","myDetail()","","","",""},
|
||||||
|
{"true","","Button","分录模板","会计分录模板定义","viewTransEntry()","","","","btn_icon_detail"},
|
||||||
|
{"true","","Button","交易参数列表","交易参数列表","viewDoNo()","","","","btn_icon_detail"}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
function newRecord(){
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransactionConfigInfo.jsp","","right","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewDoNo(){
|
||||||
|
//【过滤未选择记录可以弹出空记录的界面。By ghshi 2013-07-30】
|
||||||
|
var sItemNo = getItemValue(0,getRow(),"ItemNo");
|
||||||
|
if (typeof(sItemNo) == "undefined" || sItemNo.length == 0){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var attribute1 = getItemValue(0,getRow(),"attribute1");
|
||||||
|
if(typeof(attribute1) == "undefined" || attribute1=="")
|
||||||
|
alert("没有配置相应的显示模板。");
|
||||||
|
else
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransactionParameterList.jsp","attribute1="+attribute1,"_blank","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function myDetail(){
|
||||||
|
var sitemno = getItemValue(0,getRow(),"ItemNo");
|
||||||
|
var scodeno = getItemValue(0,getRow(),"CodeNo");
|
||||||
|
if (typeof(sitemno) == "undefined" || sitemno.length == 0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransactionConfigInfo.jsp","ItemNo="+sitemno+"&CodeNo="+scodeno,"right","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewTransEntry(){
|
||||||
|
var sitemno = getItemValue(0,getRow(),"ItemNo");
|
||||||
|
var status = getItemValue(0,getRow(),"Status");
|
||||||
|
var attribute1 = getItemValue(0,getRow(),"attribute1");
|
||||||
|
if (typeof(sitemno) == "undefined" || sitemno.length == 0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransEntryConfigFrame.jsp","ItemNo="+sitemno+"&attribute1="+attribute1,"_blank","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function delRecord()
|
||||||
|
{
|
||||||
|
var sCodeno = getItemValue(0,getRow(),"CodeNo");
|
||||||
|
var sItemNo=getItemValue(0,getRow(),"ItemNo");
|
||||||
|
|
||||||
|
if (typeof(sItemNo) == "undefined" || sItemNo.length == 0){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm(getHtmlMessage('2')))
|
||||||
|
{
|
||||||
|
as_delete("myiframe0");
|
||||||
|
as_save("myiframe0"); //如果单个删除,则要调用此语句
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
19
WebContent/Accounting/Config/TransactionConfigMain.jsp
Normal file
19
WebContent/Accounting/Config/TransactionConfigMain.jsp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "核算交易定义"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
String PG_CONTENT_TITLE = " 核算交易定义 "; //默认的内容区标题
|
||||||
|
String PG_CONTNET_TEXT = "请稍后";//默认的内容区文字
|
||||||
|
String PG_LEFT_WIDTH = "1";//默认的treeview宽度
|
||||||
|
%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_main.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
myleft.width=1;
|
||||||
|
AsControl.OpenView("/Accounting/Config/TransactionConfigList.jsp","","right","");
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
|
|
||||||
28
WebContent/Accounting/Config/TransactionParameterList.jsp
Normal file
28
WebContent/Accounting/Config/TransactionParameterList.jsp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "交易模板参数信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
String attribute1 = (String)CurPage.getParameter("attribute1");
|
||||||
|
if(attribute1==null) attribute1="";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("TransactionParameterList");//交易对应的输入要素模板
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(50);
|
||||||
|
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(attribute1);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
65
WebContent/Accounting/LoanDetail/AcctLoanBasicInfo.jsp
Normal file
65
WebContent/Accounting/LoanDetail/AcctLoanBasicInfo.jsp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "借据基本信息列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
String templetFilter="1=1";
|
||||||
|
String templetNo;
|
||||||
|
//获得组件参数
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String SerialNo = CurPage.getParameter("ObjectNo");//借据编号
|
||||||
|
if(SerialNo == null)SerialNo = "";
|
||||||
|
//通过显示模版产生ASObjectModel对象doTemp---------------------------------
|
||||||
|
String sTemplete = "ACCT_LOAN";
|
||||||
|
templetNo=sTemplete;
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTemplete);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
//生成HTMLObjectWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(SerialNo);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
// function afterLoad()
|
||||||
|
// {
|
||||||
|
// calcLoanRateTermID();
|
||||||
|
// calcRPTTermID();
|
||||||
|
// }
|
||||||
|
/*~[Describe=利率信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
// function calcLoanRateTermID(){
|
||||||
|
// var sLoanRateTermID = getItemValue(0,getRow(),"LoanRateTermID");
|
||||||
|
// if(typeof(sLoanRateTermID) == "undefined" || sLoanRateTermID.length == 0) return;
|
||||||
|
// var currency = getItemValue(0,getRow(),"CurrencyCode");
|
||||||
|
// var sPutoutDate = getItemValue(0,getRow(),"PutOutDate");
|
||||||
|
// var sMaturityDate = getItemValue(0,getRow(),"MaturityDate");
|
||||||
|
// var termMonth = RunMethod("BusinessManage","GetUpMonths",sPutoutDate+","+sMaturityDate);
|
||||||
|
|
||||||
|
<%-- OpenComp("BusinessTermView","/Accounting/LoanDetail/LoanTerm/BusinessTermView.jsp","Currency="+currency+"&ToInheritObj=y&termMonth="+termMonth+"&Status=1&ObjectNo="+"<%=SerialNo%>"+"&ObjectType="+"<%=BUSINESSOBJECT_CONSTANTS.loan%>"+"&TempletNo=RateSegmentView&TermObjectType="+"<%=BUSINESSOBJECT_CONSTANTS.loan_rate_segment%>"+"&TermID="+sLoanRateTermID,"RatePart",""); --%>
|
||||||
|
// }
|
||||||
|
// /*~[Describe=还款方式信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
// function calcRPTTermID(){
|
||||||
|
// var sRPTTermID = getItemValue(0,getRow(),"RPTTermID");
|
||||||
|
// if(typeof(sRPTTermID) == "undefined" || sRPTTermID.length == 0) return;
|
||||||
|
<%-- OpenComp("BusinessTermView","/Accounting/LoanDetail/LoanTerm/BusinessTermView.jsp","ToInheritObj=y&Status=1&ObjectNo=<%=SerialNo%>&ObjectType=<%=BUSINESSOBJECT_CONSTANTS.loan%>&TempletNo=RPTSegmentView&TermObjectType=<%=BUSINESSOBJECT_CONSTANTS.loan_rpt_segment%>&TermID="+sRPTTermID,"RPTPart",""); --%>
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// AsOne.AsInit();
|
||||||
|
// init();
|
||||||
|
// my_load(2,0,'myiframe0');
|
||||||
|
// afterLoad();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
55
WebContent/Accounting/LoanDetail/AcctLoanList.jsp
Normal file
55
WebContent/Accounting/LoanDetail/AcctLoanList.jsp
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "台帐信息管理"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//定义变量
|
||||||
|
String businessType = "";
|
||||||
|
String projectVersion = "";
|
||||||
|
|
||||||
|
//获得组件参数
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String sObjectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
if(sObjectNo == null) sObjectNo = "";
|
||||||
|
|
||||||
|
//显示模版编号
|
||||||
|
String sTempletNo = "AcctLoanList";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(sObjectNo);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "详情", "详情","viewRecord()","","","","btn_icon_detail",""},
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*~[Describe=查看及修改详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewRecord()
|
||||||
|
{
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if(typeof(sSerialNo)=="undefined" || sSerialNo.length==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OpenComp("AcctLoanView","/Accounting/LoanDetail/AcctLoanView.jsp","ObjectNo="+sSerialNo+"&ObjectType=<%=BUSINESSOBJECT_CONSTANTS.loan%>"+"&RightType=ReadOnly","_blank","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
//初始化
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
/*~END~*/
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
131
WebContent/Accounting/LoanDetail/AcctLoanView.jsp
Normal file
131
WebContent/Accounting/LoanDetail/AcctLoanView.jsp
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
<%@page import="com.amarsoft.app.base.util.BUSINESSOBJECT_CONSTANTS"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
<%@page import="com.amarsoft.app.bizmethod.*"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Main00;Describe=注释区;]~*/%>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author:
|
||||||
|
Tester:
|
||||||
|
Content: 台帐申请主界面
|
||||||
|
Input Param:
|
||||||
|
SerialNo:业务申请流水号
|
||||||
|
Output param:
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=View01;Describe=定义页面属性;]~*/%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "业务申请"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
String PG_CONTENT_TITLE = " 基本信息 "; //默认的内容区标题
|
||||||
|
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
|
||||||
|
String PG_LEFT_WIDTH = "200";//默认的treeview宽度
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=View02;Describe=定义变量,获取参数;]~*/%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
String sBusinessType = "",sCustomerID = "";
|
||||||
|
String sOccurType = "";
|
||||||
|
String sApplyType="";//申请类型
|
||||||
|
String sTable="";
|
||||||
|
|
||||||
|
//获得组件参数
|
||||||
|
String sObjectType = CurPage.getParameter("ObjectType");
|
||||||
|
String sObjectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=View03;Describe=定义树图;]~*/%>
|
||||||
|
<%
|
||||||
|
//定义Treeview
|
||||||
|
HTMLTreeView tviTemp = new HTMLTreeView(SqlcaRepository,CurComp,sServletURL,"业务详情","right");
|
||||||
|
tviTemp.ImageDirectory = sWebRootPath; //设置资源文件目录(图片、CSS)
|
||||||
|
tviTemp.toRegister = false; //设置是否需要将所有的节点注册为功能点及权限点
|
||||||
|
tviTemp.TriggerClickEvent=true; //是否自动触发选中事件
|
||||||
|
|
||||||
|
String sSqlTreeView = "";
|
||||||
|
//定义树图结构,根据阶段(RelativeCode)、发生类型(Attribute1)、业务品种(Attribute2)、排除的业务品种(Attribute3)生成不同的树图
|
||||||
|
sSqlTreeView = "from code_library where CodeNo= 'AcctLoanView' and isinuse = '1' ";
|
||||||
|
|
||||||
|
tviTemp.initWithSql("SortNo","ItemName","ItemDescribe","","",sSqlTreeView,"Order By SortNo",Sqlca);
|
||||||
|
//参数从左至右依次为:
|
||||||
|
//ID字段(必须),Name字段(必须),Value字段,Script字段,Picture字段,From子句(必须),OrderBy子句,Sqlca
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~不可编辑区[Editable=false;CodeAreaID=View04;Describe=主体页面]~*/%>
|
||||||
|
<%@include file="/Resources/CodeParts/View04.jsp"%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区[Editable=true;CodeAreaID=View05;]~*/%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
setDialogTitle(" <b>合同对应的帐户信息-详情-只读-无权限</b>");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function openChildComp(sCompID,sURL,sParameterString){
|
||||||
|
sParaStringTmp = "";
|
||||||
|
|
||||||
|
sObjectType="<%=BUSINESSOBJECT_CONSTANTS.loan%>";
|
||||||
|
sObjectNo="<%=sObjectNo%>";
|
||||||
|
|
||||||
|
sLastChar=sParameterString.substring(sParameterString.length-1);
|
||||||
|
if(sLastChar=="&") sParaStringTmp=sParameterString;
|
||||||
|
else sParaStringTmp=sParameterString+"&";
|
||||||
|
sParaStringTmp += "ToInheritObj=y&OpenerFunctionName="+getCurTVItem().name;
|
||||||
|
sParaStringTmp=sParaStringTmp.replace("#ObjectType",sObjectType);
|
||||||
|
sParaStringTmp=sParaStringTmp.replace("#ObjectNo",sObjectNo);
|
||||||
|
OpenComp(sCompID,sURL,sParaStringTmp,"right");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//treeview单击选中事件
|
||||||
|
function TreeViewOnClick(){
|
||||||
|
var AccountType="";
|
||||||
|
var sSerialNo = getCurTVItem().id;
|
||||||
|
if (sSerialNo == "root") return;
|
||||||
|
var sCurItemName = getCurTVItem().name;
|
||||||
|
var sCurItemDescribe = getCurTVItem().value;
|
||||||
|
sCurItemDescribe = sCurItemDescribe.split("@");
|
||||||
|
sCurItemDescribe0=sCurItemDescribe[0];
|
||||||
|
sCurItemDescribe1=sCurItemDescribe[1];
|
||||||
|
sCurItemDescribe2=sCurItemDescribe[2];
|
||||||
|
|
||||||
|
openChildComp(sCurItemDescribe1,sCurItemDescribe0,"ComponentName="+sCurItemName+"&"+sCurItemDescribe2);
|
||||||
|
setTitle(getCurTVItem().name);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function startMenu() {
|
||||||
|
<%=tviTemp.generateHTMLTreeView()%>
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区[Editable=true;CodeAreaID=View06;Describe=在页面装载时执行,初始化]~*/%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
myleft.width=170;
|
||||||
|
startMenu();
|
||||||
|
expandNode('root');
|
||||||
|
selectItem('010');
|
||||||
|
setTitle("基本信息");
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
46
WebContent/Accounting/LoanDetail/FinList.jsp
Normal file
46
WebContent/Accounting/LoanDetail/FinList.jsp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<%@page import="com.amarsoft.acct.systemconfig.ModelReturn"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2015-11-19
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectno = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String status = CurPage.getParameter("Status");//对象状态
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("FinList");
|
||||||
|
doTemp.appendJboWhere(" and Status ="+status);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
//dwTemp.MultiSelect = true; //多选
|
||||||
|
//dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(objectno+","+objectType);
|
||||||
|
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"false","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||||
|
{"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||||
|
{"false","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function newRecord(){
|
||||||
|
var sUrl = "";
|
||||||
|
AsControl.OpenView(sUrl,'','_self','');
|
||||||
|
}
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUrl = "";
|
||||||
|
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("参数不能为空!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
43
WebContent/Accounting/LoanDetail/InterestLogList.jsp
Normal file
43
WebContent/Accounting/LoanDetail/InterestLogList.jsp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: undefined 2016-06-27
|
||||||
|
Tester:
|
||||||
|
Content:
|
||||||
|
Input Param:
|
||||||
|
Output param:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("InterestLogList");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
//dwTemp.MultiSelect = true; //多选
|
||||||
|
//dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
{"false","","Button","详情","详情","edit()","","","","btn_icon_detail",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function add(){
|
||||||
|
var sUrl = "";
|
||||||
|
AsControl.OpenView(sUrl,'','_self','');
|
||||||
|
}
|
||||||
|
function edit(){
|
||||||
|
var sUrl = "";
|
||||||
|
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("参数不能为空!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
43
WebContent/Accounting/LoanDetail/LoanDetailList.jsp
Normal file
43
WebContent/Accounting/LoanDetail/LoanDetailList.jsp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "账户信息管理"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//定义变量
|
||||||
|
String businessType = "";
|
||||||
|
String projectVersion = "";
|
||||||
|
|
||||||
|
//获得组件参数
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String sObjectNo = CurPage.getParameter("TransSerialNo");
|
||||||
|
if(sObjectNo == null) sObjectNo = "";
|
||||||
|
|
||||||
|
|
||||||
|
//显示模版编号
|
||||||
|
String sTempletNo = "LoanDetailList";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style = "1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(sObjectNo);
|
||||||
|
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script language=javascript>
|
||||||
|
//初始化
|
||||||
|
// AsOne.AsInit();
|
||||||
|
init();
|
||||||
|
// my_load(2,0,'myiframe0');
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,139 @@
|
|||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObjectManager"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObject"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "账户信息管理"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//定义变量
|
||||||
|
String businessType = "";
|
||||||
|
String projectVersion = "";
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String SerialNo = CurPage.getParameter("SerialNo");
|
||||||
|
String sObjectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
String sObjectType = CurPage.getParameter("ObjectType");
|
||||||
|
String sStatus = CurPage.getParameter("Status");
|
||||||
|
String sAccountIndicator = CurPage.getParameter("AccountIndicator");
|
||||||
|
String right=CurPage.getParameter("RightType");
|
||||||
|
if(SerialNo == null) SerialNo = "";
|
||||||
|
if(sObjectNo == null) sObjectNo = "";
|
||||||
|
if(sObjectType == null) sObjectType = "";
|
||||||
|
if(sStatus == null) sStatus = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bom = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject bo = bom.loadBusinessObject(sObjectType, "serialno", sObjectNo);
|
||||||
|
|
||||||
|
//显示模版编号
|
||||||
|
String sTempletNo = "BusinessAccountInfo";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
|
||||||
|
if("00".equals(sAccountIndicator) || "01".equals(sAccountIndicator) || !"".equals(SerialNo))
|
||||||
|
doTemp.setReadOnly("AccountIndicator",true);
|
||||||
|
else if("99".equals(sAccountIndicator))
|
||||||
|
doTemp.setDDDWJbo("AccountIndicator", "select itemno,itemname from code_library where codeno = 'AccountIndicator' and itemno in('02','03','04')");
|
||||||
|
if("00".equals(sAccountIndicator) || "99".equals(sAccountIndicator) || !"".equals(SerialNo)){
|
||||||
|
doTemp.setVisible("PriorityFlag",false);
|
||||||
|
doTemp.setDefaultValue("PriorityFlag","1");
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style = "2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
if("ReadOnly".equals(right)||sObjectType.equals("PutOutApply")){
|
||||||
|
dwTemp.ReadOnly = "1";
|
||||||
|
}else{
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
}
|
||||||
|
dwTemp.genHTMLObjectWindow(SerialNo);
|
||||||
|
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "保存", "新增一条信息","saveRecord()",""},
|
||||||
|
{"true", "", "Button", "返回", "返回","goBack()","","","","btn_icon_return"},
|
||||||
|
};
|
||||||
|
if("ReadOnly".equals(right)||sObjectType.equals("PutOutApply")){
|
||||||
|
sButtons[0][1]="false";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
var coreCheckFlag = false;
|
||||||
|
//保存
|
||||||
|
function saveRecord(){
|
||||||
|
if(bIsInsert){
|
||||||
|
beforeInsert();
|
||||||
|
}else
|
||||||
|
//账户性质 如果为放款账户则为多个可以保存如果为其他账户性质则只能保存一次再次出现则不能保存
|
||||||
|
var accountIndicator = getItemValue(0,getRow(),"AccountIndicator");
|
||||||
|
var status = getItemValue(0,getRow(),"Status");
|
||||||
|
var serialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
var returnValue = RunJavaMethodSqlca("com.amarsoft.acct.accounting.web.DistinctAccount","getAccountNumber","objectNo="+"<%=sObjectNo%>,objectType=<%=bo.getBizClassName()%>,accountIndicator="+accountIndicator+",serialNo="+serialNo);
|
||||||
|
if(typeof(returnValue)!="undifined"&& returnValue!="fasle"&&parseInt(returnValue)>=1){
|
||||||
|
alert("该账户性质已存在");
|
||||||
|
return;
|
||||||
|
}else
|
||||||
|
as_save("myiframe0","goBack();");
|
||||||
|
}
|
||||||
|
//返回
|
||||||
|
function goBack(){
|
||||||
|
OpenPage("/Accounting/LoanDetail/LoanTerm/BusinessAccountList.jsp?Status=<%=sStatus%>&ObjectNo=<%=sObjectNo%>&ObjectType=<%=sObjectType%>","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=执行新增操作前初始化流水号;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function beforeInsert(){
|
||||||
|
initSerialNo();
|
||||||
|
bIsInsert = false;
|
||||||
|
}
|
||||||
|
/*~[Describe=初始化流水号字段;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initSerialNo(){
|
||||||
|
var sTableName = "ACCT_BUSINESS_ACCOUNT";//表名
|
||||||
|
var sColumnName = "SerialNo";//字段名
|
||||||
|
var sPrefix = "";//前缀
|
||||||
|
//获取流水号
|
||||||
|
var sSerialNo = getSerialNo(sTableName,sColumnName,sPrefix);
|
||||||
|
//将流水号置入对应字段
|
||||||
|
setItemValue(0,getRow(),sColumnName,sSerialNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=页面装载时,对OW进行初始化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0) //如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
{
|
||||||
|
setItemValue(0,0,"ObjectType","<%=bo.getBizClassName()%>");
|
||||||
|
setItemValue(0,0,"ObjectNo","<%=sObjectNo%>");
|
||||||
|
setItemValue(0,0,"Status","0");
|
||||||
|
bIsInsert = true;
|
||||||
|
if("<%=sAccountIndicator%>" == "00")
|
||||||
|
setItemValue(0,0,"AccountIndicator","00");
|
||||||
|
else if("<%=sAccountIndicator%>" == "01")
|
||||||
|
setItemValue(0,0,"AccountIndicator","01");
|
||||||
|
}else{
|
||||||
|
bIsInsert = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//改变账户性质引发其他选项的改变
|
||||||
|
function changeAccountIndicator(){
|
||||||
|
var sResult = getItemValue(0,getRow(),"AccountIndicator");
|
||||||
|
if("00"==sResult){
|
||||||
|
setItemDisabled(0,getRow(),"PRI",false);
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"PRI","1");
|
||||||
|
setItemDisabled(0,getRow(),"PRI",true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
//初始化
|
||||||
|
var bFreeFormMultiCol = true;
|
||||||
|
var bIsInsert = true;
|
||||||
|
my_load(2,0,'myiframe0');
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObjectManager"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObject"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "账户信息管理"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//定义变量
|
||||||
|
String businessType = "";
|
||||||
|
String projectVersion = "";
|
||||||
|
|
||||||
|
//获得组件参数
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String sObjectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
String sObjectType = CurPage.getParameter("ObjectType");
|
||||||
|
String status = CurPage.getParameter("Status");
|
||||||
|
String right=CurPage.getParameter("RightType");
|
||||||
|
if(sObjectNo == null) sObjectNo = "";
|
||||||
|
if(sObjectType == null) sObjectType = "";
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bom = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject bo = bom.loadBusinessObject(sObjectType, "serialno", sObjectNo);
|
||||||
|
|
||||||
|
//显示模版编号
|
||||||
|
String sTempletNo = "BusinessAccountList";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
String statusStr = status.replaceAll("@","','");
|
||||||
|
doTemp.appendJboWhere(" and Status in('"+statusStr+"')");
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style = "1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.genHTMLObjectWindow(sObjectNo+","+bo.getBizClassName());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "新增放款帐号", "新增一条放款帐号信息","createRecord('00')",""},
|
||||||
|
{"true", "", "Button", "新增还款帐号", "新增一条还款帐号信息","createRecord('01')",""},
|
||||||
|
{"true", "", "Button", "新增其他帐号", "新增一条其他帐号信息","createRecord('99')",""},
|
||||||
|
{"true", "", "Button", "详情", "账号详情","viewRecord()",""},
|
||||||
|
{"true", "", "Button", "删除", "删除一条信息","deleteRecord()",""},
|
||||||
|
};
|
||||||
|
if("ReadOnly".equals(right)||sObjectType.equals("PutOutApply")){
|
||||||
|
sButtons[0][0]="false";
|
||||||
|
sButtons[1][0]="false";
|
||||||
|
sButtons[2][0]="false";
|
||||||
|
sButtons[4][0]="false";
|
||||||
|
}
|
||||||
|
if(sObjectType.equals("jbo.acct.ACCT_LOAN_CHANGE" )){
|
||||||
|
sButtons[0][0]="false";
|
||||||
|
sButtons[2][0]="false";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script language=javascript>
|
||||||
|
/*~[Describe=新增;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function createRecord(AccountIndicator){
|
||||||
|
OpenPage("/Accounting/LoanDetail/LoanTerm/BusinessAccountInfo.jsp?Status=<%=status%>&ObjectNo=<%=sObjectNo%>&ObjectType=<%=sObjectType%>&AccountIndicator="+AccountIndicator,"_self","");
|
||||||
|
//reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewRecord(){
|
||||||
|
var SerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if(typeof(SerialNo)=="undefined"||SerialNo.length==0){
|
||||||
|
alert("请选择一条记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
OpenPage("/Accounting/LoanDetail/LoanTerm/BusinessAccountInfo.jsp?Status=<%=status%>&ObjectNo=<%=sObjectNo%>&ObjectType=<%=sObjectType%>&SerialNo="+SerialNo,"_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
|
||||||
|
alert("请选择一条记录!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm("确定删除该信息吗?")){
|
||||||
|
as_delete("myiframe0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//初始化
|
||||||
|
// my_load(2,0,'myiframe0');
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
187
WebContent/Accounting/LoanDetail/LoanTerm/BusinessFINInfo.jsp
Normal file
187
WebContent/Accounting/LoanDetail/LoanTerm/BusinessFINInfo.jsp
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<%@page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "功能组件信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject businessObject= bomanager.keyLoadBusinessObject(objectType,objectNo);
|
||||||
|
if(businessObject==null){
|
||||||
|
throw new Exception("未取到业务主对象ObjectType="+objectType+",ObjectNo="+objectNo+",请检查!");
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessObject loan = bomanager.keyLoadBusinessObject(businessObject.getString("ObjectType"), businessObject.getString("ObjectNo"));
|
||||||
|
if(StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='02' and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"Status",status.split(","));
|
||||||
|
if(ratList != null && !ratList.isEmpty())
|
||||||
|
{
|
||||||
|
termID = ratList.get(0).getString("TermID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='02' and TermID<>:TermID and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"TermID",termID,"Status",status.split(","));
|
||||||
|
bomanager.deleteBusinessObjects(ratList);
|
||||||
|
bomanager.updateDB();
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("FINSegmentInfo");
|
||||||
|
|
||||||
|
//利率选择项
|
||||||
|
List<BusinessObject> ratList = com.amarsoft.app.als.prd.config.loader.ProductConfig.getBusinessTypeConfig(loan.getString("BusinessType")).getBusinessObjectsBySql(BusinessComponentConfig.BUSINESS_COMPONENT, "Type='PRD0303'");
|
||||||
|
if(ratList == null || ratList.isEmpty()) ratList = BusinessComponentConfig.getComponents("Type='PRD0303'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ratList, "ID");
|
||||||
|
String ratCodeTable="";
|
||||||
|
for(BusinessObject rat:ratList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ratCodeTable)) ratCodeTable+= rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
else ratCodeTable+= ","+rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", ratCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
//利率调整方式选择
|
||||||
|
String[] ptKeys = CashFlowConfig.getRepriceTypeConfigKeys();
|
||||||
|
String ptCodeTable="";
|
||||||
|
List<BusinessObject> ptList = new ArrayList<BusinessObject>();
|
||||||
|
for(String key:ptKeys)
|
||||||
|
{
|
||||||
|
ptList.add(CashFlowConfig.getRepriceTypeConfig(key));
|
||||||
|
}
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ptList, "ID");
|
||||||
|
for(BusinessObject pt:ptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ptCodeTable)) ptCodeTable+= pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
else ptCodeTable+= ","+pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("RepriceType", ptCodeTable);
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
BusinessObject ratComponent = BusinessObjectHelper.getBusinessObjectBySql(ratList, "ID='"+termID+"'");
|
||||||
|
List<BusinessObject> parameters = ratComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable(parameter.getString("PARAMETERID"), codeTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("Value");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
//获取贷款基本信息
|
||||||
|
String currency = "";
|
||||||
|
String putoutDate = "";
|
||||||
|
String maturityDate = "";
|
||||||
|
int yearDays = 360;
|
||||||
|
if(loan!=null)
|
||||||
|
{
|
||||||
|
currency = loan.getString("currency");
|
||||||
|
putoutDate = loan.getString("PutOutDate");
|
||||||
|
maturityDate = loan.getString("MaturityDate");
|
||||||
|
yearDays = CashFlowHelper.getYearBaseDay(loan);
|
||||||
|
}
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="<%=sWebRootPath%>/Accounting/js/loan/term/rateterm.js"></script>
|
||||||
|
<script language=javascript>
|
||||||
|
var currency = "<%=currency%>";
|
||||||
|
var putoutDate = "<%=putoutDate%>";
|
||||||
|
var maturityDate = "<%=maturityDate%>";
|
||||||
|
var businessDate = "<%=DateHelper.getBusinessDate()%>";
|
||||||
|
var yearDays = "<%=yearDays%>";
|
||||||
|
|
||||||
|
function saveRecord(){
|
||||||
|
if(!iV_all("myiframe0")) return false;
|
||||||
|
as_save("myiframe0");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTerm(){
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID) == "undefined" || termID.length == 0 || "<%=termID%>" == termID) return;
|
||||||
|
|
||||||
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
||||||
|
if("1"==view)
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessFINInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
else
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessFINList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
}
|
||||||
|
if("ReadOnly" != "<%=CurPage.getParameter("RightType")%>")
|
||||||
|
{
|
||||||
|
setBaseRateGrade();
|
||||||
|
setRepriceInfo();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
174
WebContent/Accounting/LoanDetail/LoanTerm/BusinessFINList.jsp
Normal file
174
WebContent/Accounting/LoanDetail/LoanTerm/BusinessFINList.jsp
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "列表信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject businessObject= bomanager.keyLoadBusinessObject(objectType,objectNo);
|
||||||
|
if(businessObject==null){
|
||||||
|
throw new Exception("未取到业务主对象ObjectType="+objectType+",ObjectNo="+objectNo+",请检查!");
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("FINSegmentList");
|
||||||
|
|
||||||
|
//利率选择项
|
||||||
|
List<BusinessObject> ratList = BusinessComponentConfig.getComponents("Type='FIN'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ratList, "ID");
|
||||||
|
String ratCodeTable="";
|
||||||
|
for(BusinessObject rat:ratList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ratCodeTable)) ratCodeTable+= rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
else ratCodeTable+= ","+rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", ratCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
//利率调整方式选择
|
||||||
|
String[] ptKeys = CashFlowConfig.getRepriceTypeConfigKeys();
|
||||||
|
String ptCodeTable="";
|
||||||
|
List<BusinessObject> ptList = new ArrayList<BusinessObject>();
|
||||||
|
for(String key:ptKeys)
|
||||||
|
{
|
||||||
|
ptList.add(CashFlowConfig.getRepriceTypeConfig(key));
|
||||||
|
}
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ptList, "ID");
|
||||||
|
for(BusinessObject pt:ptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ptCodeTable)) ptCodeTable+= pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
else ptCodeTable+= ","+pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("RepriceType", ptCodeTable);
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
BusinessObject ratComponent = BusinessComponentConfig.getComponent(termID);
|
||||||
|
List<BusinessObject> parameters = ratComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable(parameter.getString("PARAMETERID"), codeTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("DefaultValue");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
//获取贷款基本信息
|
||||||
|
String currency = "";
|
||||||
|
String putoutDate = "";
|
||||||
|
String maturityDate = "";
|
||||||
|
int yearDays = 360;
|
||||||
|
BusinessObject loan = bomanager.keyLoadBusinessObject(businessObject.getString("ObjectType"), businessObject.getString("ObjectNo"));
|
||||||
|
if(loan!=null)
|
||||||
|
{
|
||||||
|
currency = loan.getString("currency");
|
||||||
|
putoutDate = loan.getString("PutOutDate");
|
||||||
|
maturityDate = loan.getString("MaturityDate");
|
||||||
|
yearDays = CashFlowHelper.getYearBaseDay(loan);
|
||||||
|
}
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "新增", "新增一条信息","newRecord()","","","",""},
|
||||||
|
{"true","","Button","保存","保存记录","saveRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "删除", "删除一条信息","deleteRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "返回", "返回","back()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript" src="<%=sWebRootPath%>/Accounting/js/loan/term/rateterm.js"></script>
|
||||||
|
<script language=javascript>
|
||||||
|
var currency = "<%=currency%>";
|
||||||
|
var putoutDate = "<%=putoutDate%>";
|
||||||
|
var maturityDate = "<%=maturityDate%>";
|
||||||
|
var businessDate = "<%=DateHelper.getBusinessDate()%>";
|
||||||
|
var yearDays = "<%=yearDays%>";
|
||||||
|
|
||||||
|
/*~[Describe=保存;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(){
|
||||||
|
as_save("myiframe0","");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=新增;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
as_add("myiframe0");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))){ //您真的想删除该信息吗?
|
||||||
|
as_delete("myiframe0","reload()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function back(){
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessFINInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID=","_self","");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
216
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRATInfo.jsp
Normal file
216
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRATInfo.jsp
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
<%@page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "功能组件信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
String backFlag = CurPage.getParameter("BackFlag");//返回标示
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject businessObject= bomanager.keyLoadBusinessObject(objectType,objectNo);
|
||||||
|
if(businessObject==null){
|
||||||
|
throw new Exception("未取到业务主对象ObjectType="+objectType+",ObjectNo="+objectNo+",请检查!");
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessObject loan = bomanager.keyLoadBusinessObject(businessObject.getString("ObjectType"), businessObject.getString("ObjectNo"));
|
||||||
|
if(StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='01' and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"Status",status.split(","));
|
||||||
|
if(ratList != null && !ratList.isEmpty())
|
||||||
|
{
|
||||||
|
termID = ratList.get(0).getString("TermID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='01' and TermID<>:TermID and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"TermID",termID,"Status",status.split(","));
|
||||||
|
bomanager.deleteBusinessObjects(ratList);
|
||||||
|
bomanager.updateDB();
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RATSegmentInfo");
|
||||||
|
|
||||||
|
//利率选择项
|
||||||
|
List<BusinessObject> ratList = com.amarsoft.app.als.prd.config.loader.ProductConfig.getBusinessTypeConfig(loan.getString("BusinessType")).getBusinessObjectsBySql(BusinessComponentConfig.BUSINESS_COMPONENT, "Type='PRD0302'");
|
||||||
|
if(ratList == null || ratList.isEmpty()) ratList = BusinessComponentConfig.getComponents("Type='PRD0302'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ratList, "ID");
|
||||||
|
String ratCodeTable="";
|
||||||
|
for(BusinessObject rat:ratList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ratCodeTable)) ratCodeTable+= rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
else ratCodeTable+= ","+rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", ratCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
//利率调整方式选择
|
||||||
|
String[] ptKeys = CashFlowConfig.getRepriceTypeConfigKeys();
|
||||||
|
String ptCodeTable="";
|
||||||
|
List<BusinessObject> ptList = new ArrayList<BusinessObject>();
|
||||||
|
for(String key:ptKeys)
|
||||||
|
{
|
||||||
|
ptList.add(CashFlowConfig.getRepriceTypeConfig(key));
|
||||||
|
}
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ptList, "ID");
|
||||||
|
for(BusinessObject pt:ptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ptCodeTable)) ptCodeTable+= pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
else ptCodeTable+= ","+pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("RepriceType", ptCodeTable);
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
BusinessObject ratComponent = BusinessObjectHelper.getBusinessObjectBySql(ratList, "ID='"+termID+"'");
|
||||||
|
List<BusinessObject> parameters = ratComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(parameter.getString("DISPLAYNAME")))
|
||||||
|
{
|
||||||
|
doTemp.setHeader(parameter.getString("PARAMETERID"), parameter.getString("DISPLAYNAME"));
|
||||||
|
}
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable(parameter.getString("PARAMETERID"), codeTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("Value");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
//获取贷款基本信息
|
||||||
|
String currency = "";
|
||||||
|
String putoutDate = "";
|
||||||
|
String maturityDate = "";
|
||||||
|
int yearDays = 360;
|
||||||
|
if(loan!=null)
|
||||||
|
{
|
||||||
|
currency = loan.getString("currency");
|
||||||
|
putoutDate = loan.getString("PutOutDate");
|
||||||
|
maturityDate = loan.getString("MaturityDate");
|
||||||
|
yearDays = CashFlowHelper.getYearBaseDay(loan);
|
||||||
|
}
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="<%=sWebRootPath%>/Accounting/js/loan/term/rateterm.js"></script>
|
||||||
|
<script language=javascript>
|
||||||
|
var currency = "<%=currency%>";
|
||||||
|
var putoutDate = "<%=putoutDate%>";
|
||||||
|
var maturityDate = "<%=maturityDate%>";
|
||||||
|
var businessDate = "<%=DateHelper.getBusinessDate()%>";
|
||||||
|
var yearDays = "<%=yearDays%>";
|
||||||
|
|
||||||
|
function saveRecord(){
|
||||||
|
if(!iV_all("myiframe0")) return false;
|
||||||
|
as_save("myiframe0");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTerm(){
|
||||||
|
CHANGED=false;
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID) == "undefined" || termID.length == 0 || "<%=termID%>" == termID) return;
|
||||||
|
|
||||||
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
||||||
|
if("1"==view)
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRATInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
else
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRATList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
var values = {};
|
||||||
|
values[0]={};
|
||||||
|
for(var i=0;i<DisplayFields[0].length;i++){
|
||||||
|
values[0][DisplayFields[0][i]] = getItemValue(0,getRow(),DisplayFields[0][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(iV_all(0)){
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
if("ReadOnly" != "<%=CurPage.getParameter("RightType")%>")
|
||||||
|
{
|
||||||
|
setBaseRateGrade();
|
||||||
|
setRepriceInfo();
|
||||||
|
}
|
||||||
|
var termID = "<%=termID%>";
|
||||||
|
if(typeof(termID) == "undefined" || termID.length == 0 || termID == "null") return;
|
||||||
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
||||||
|
if("1"!=view && "1" != "<%=backFlag%>")
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRATList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
319
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRATList.jsp
Normal file
319
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRATList.jsp
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "列表信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject businessObject= bomanager.keyLoadBusinessObject(objectType,objectNo);
|
||||||
|
if(businessObject==null){
|
||||||
|
throw new Exception("未取到业务主对象ObjectType="+objectType+",ObjectNo="+objectNo+",请检查!");
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessObject loan = bomanager.keyLoadBusinessObject(businessObject.getString("ObjectType"), businessObject.getString("ObjectNo"));
|
||||||
|
if(StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='01' and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"Status",status.split(","));
|
||||||
|
if(ratList != null && !ratList.isEmpty())
|
||||||
|
{
|
||||||
|
termID = ratList.get(0).getString("TermID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='01' and TermID<>:TermID and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"TermID",termID,"Status",status.split(","));
|
||||||
|
bomanager.deleteBusinessObjects(ratList);
|
||||||
|
bomanager.updateDB();
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RATSegmentList");
|
||||||
|
//利率选择项
|
||||||
|
List<BusinessObject> ratList = com.amarsoft.app.als.prd.config.loader.ProductConfig.getBusinessTypeConfig(loan.getString("BusinessType")).getBusinessObjectsBySql(BusinessComponentConfig.BUSINESS_COMPONENT, "Type='PRD0302'");
|
||||||
|
if(ratList == null || ratList.isEmpty()) ratList = BusinessComponentConfig.getComponents("Type='PRD0302'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ratList, "ID");
|
||||||
|
String ratCodeTable="";
|
||||||
|
for(BusinessObject rat:ratList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ratCodeTable)) ratCodeTable+= rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
else ratCodeTable+= ","+rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", ratCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
BusinessObject map = BusinessObject.createBusinessObject();
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
String segRPTCodeTable="";
|
||||||
|
BusinessObject rptComponent = BusinessComponentConfig.getComponent(termID);
|
||||||
|
List<BusinessObject> childrenComponents = rptComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_COMPONENT_CHILDRENCOMPONENT);
|
||||||
|
for(BusinessObject childrenComponent:childrenComponents)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(segRPTCodeTable)) segRPTCodeTable+= childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
else segRPTCodeTable+= ","+childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
|
||||||
|
sb.append(" if(!olddata[getRow()]) olddata[getRow()]={}; \r\n");
|
||||||
|
sb.append(" var segTermID = getItemValue(0,getRow(),'SegTermID'); \r\n");
|
||||||
|
sb.append(" if(segTermID == '"+childrenComponent.getString("ID")+"'){ \r\n");
|
||||||
|
|
||||||
|
List<BusinessObject> parameters = childrenComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=false; \r\n");
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=true; \r\n");
|
||||||
|
sb.append(" setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"',''); \r\n");
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String str = map.getString(parameter.getString("PARAMETERID"));
|
||||||
|
if(StringX.isEmpty(str)) str = "";
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(str.indexOf(values[i]+",") > -1) continue;//如果代码已经存在直接跳过
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" var value = getItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"'); \r\n");
|
||||||
|
sb.append(" if('"+valueList+"'.indexOf(value) == -1){alert('录入值不符合要求,请重新录入。');setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"',''); };");
|
||||||
|
|
||||||
|
if(StringX.isEmpty(str))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),codeTable);
|
||||||
|
}
|
||||||
|
else if(!StringX.isEmpty(codeTable))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),str+","+codeTable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("Value");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
sb.append(" setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"','"+defaultValue+"'); \r\n");
|
||||||
|
sb.append(" olddata[getRow()]['"+parameter.getString("PARAMETERID").toUpperCase()+"'] = '"+defaultValue+"';\r\n");
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" } \r\n");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("SegTermID", segRPTCodeTable);
|
||||||
|
|
||||||
|
|
||||||
|
for(String key:map.getAttributeIDArray())
|
||||||
|
{
|
||||||
|
doTemp.setDDDWCodeTable(key, map.getString(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
|
||||||
|
//获取贷款基本信息
|
||||||
|
String currency = "";
|
||||||
|
String putoutDate = "";
|
||||||
|
String maturityDate = "";
|
||||||
|
int yearDays = 360;
|
||||||
|
if(loan!=null)
|
||||||
|
{
|
||||||
|
currency = loan.getString("currency");
|
||||||
|
putoutDate = loan.getString("PutOutDate");
|
||||||
|
maturityDate = loan.getString("MaturityDate");
|
||||||
|
yearDays = CashFlowHelper.getYearBaseDay(loan);
|
||||||
|
}
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "新增", "新增一条信息","newRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "删除", "删除一条信息","deleteRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "返回", "返回","back()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<script type="text/javascript" src="<%=sWebRootPath%>/Accounting/js/loan/term/rateterm.js"></script>
|
||||||
|
<script language=javascript>
|
||||||
|
var olddata={};
|
||||||
|
var currency = "<%=currency%>";
|
||||||
|
var putoutDate = "<%=putoutDate%>";
|
||||||
|
var maturityDate = "<%=maturityDate%>";
|
||||||
|
var businessDate = "<%=DateHelper.getBusinessDate()%>";
|
||||||
|
var yearDays = "<%=yearDays%>";
|
||||||
|
|
||||||
|
/*~[Describe=保存;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(){
|
||||||
|
as_save("myiframe0","");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=新增;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
var position= getRowCount(0);
|
||||||
|
as_add("myiframe0");
|
||||||
|
if(position == 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',"<%=DateHelper.getBusinessDate()%>");
|
||||||
|
else if(position > 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',getItemValue(0,position-1,"SegToDate"));
|
||||||
|
|
||||||
|
//setItemValue(0,position,'SegToDate',parent.getItemValue(0,0,"MaturityDate"));
|
||||||
|
setItemValue(0,position,'ObjectType',"<%=objectType%>");
|
||||||
|
setItemValue(0,position,'ObjectNo',"<%=objectNo%>");
|
||||||
|
setItemValue(0,position,'Status',"1");
|
||||||
|
setItemValue(0,position,'TermID',"<%=termID%>");
|
||||||
|
document.all("INPUT_myiframe0_SegToDate_"+position+"_"+getColumnIndex("SegToDate")).onblur=changeSegDate;
|
||||||
|
document.all("INPUT_myiframe0_SegTermID_"+position+"_"+getColumnIndex("SegTermID")).onblur=changeRight;
|
||||||
|
document.all("INPUT_myiframe0_BaseRateType_"+position+"_"+getColumnIndex("BaseRateType")).onblur=setBaseRateGrade;
|
||||||
|
document.all("INPUT_myiframe0_RateFloat_"+position+"_"+getColumnIndex("RateFloat")).onblur=setBusinessRate;
|
||||||
|
document.all("INPUT_myiframe0_RateFloatType_"+position+"_"+getColumnIndex("RateFloatType")).onblur=setBusinessRate;
|
||||||
|
document.all("INPUT_myiframe0_RepriceType_"+position+"_"+getColumnIndex("RepriceType")).onblur=setRepriceList;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeSegDate(){
|
||||||
|
if(getRow()+1 < getRowCount(0))
|
||||||
|
setItemValue(0,getRow()+1,'SegFromDate',getItemValue(0,getRow(),"SegToDate"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))){ //您真的想删除该信息吗?
|
||||||
|
as_delete("myiframe0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getColumnIndex(sCol){
|
||||||
|
var cnt=0;
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
if(DZ[0][1][i][2]!=1) continue;
|
||||||
|
if(typeof(sCol)=="string"){
|
||||||
|
if(DZ[0][1][i][15].toUpperCase()==sCol.toUpperCase()) return cnt;
|
||||||
|
}else{
|
||||||
|
if(DZ[0][1][i][15]==sCol) return cnt;
|
||||||
|
}
|
||||||
|
cnt++
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function back(){
|
||||||
|
CHANGED=false;
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRATInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID=&BackFlag=1","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//根据组件定义生成的JS脚本规则,设置对应的值和显示规则
|
||||||
|
function changeRight()
|
||||||
|
{
|
||||||
|
<%=sb.toString()%>;
|
||||||
|
setBaseRateGrade();
|
||||||
|
setRepriceList();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
if(getRowCount(0) < 2){
|
||||||
|
alert("必须录入两条及以上数据。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var values = {};
|
||||||
|
for(var row = 0; row < getRowCount(0); row ++)
|
||||||
|
{
|
||||||
|
values[row] = {};
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
var v = getItemValue(0,row,DZ[0][1][i][15]);
|
||||||
|
if(typeof(v) == "undefined" && !olddata[row][DZ[0][1][i][15].toUpperCase()])
|
||||||
|
v = olddata[row][DZ[0][1][i][15].toUpperCase()];
|
||||||
|
values[row][DZ[0][1][i][15]] = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
values[row]["TermID"]="<%=termID%>";
|
||||||
|
|
||||||
|
//起始日期-到期日判断
|
||||||
|
var segFromDate = getItemValue(0,row,"SegFromDate");
|
||||||
|
var segToDate = getItemValue(0,row,"SegToDate");
|
||||||
|
var businessRate = getItemValue(0,row,"BusinessRate");
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate > segToDate){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能大于结束日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate < "<%=DateHelper.getBusinessDate()%>"){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能小于贷款发放日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segToDate > parent.getItemValue(0,0,"MaturityDate")){
|
||||||
|
alert("第"+(row+1)+"行结束日期不能大于贷款到期日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row == getRowCount(0)-1 && segToDate)
|
||||||
|
{
|
||||||
|
alert("第"+(row+1)+"行结束日期不用输入。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(businessRate <= 0 ){
|
||||||
|
alert("第"+(row+1)+"行利率为空或小于零。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
211
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRPTInfo.jsp
Normal file
211
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRPTInfo.jsp
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
<%@page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "功能组件信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
String backFlag = CurPage.getParameter("BackFlag");//返回标示
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject businessObject= bomanager.keyLoadBusinessObject(objectType,objectNo);
|
||||||
|
if(businessObject==null){
|
||||||
|
throw new Exception("未取到业务主对象ObjectType="+objectType+",ObjectNo="+objectNo+",请检查!");
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessObject loan = bomanager.keyLoadBusinessObject(businessObject.getString("ObjectType"), businessObject.getString("ObjectNo"));
|
||||||
|
if(StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
List<BusinessObject> rptList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rpt_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"Status",status.split(","));
|
||||||
|
if(rptList != null && !rptList.isEmpty())
|
||||||
|
{
|
||||||
|
termID = rptList.get(0).getString("TermID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<BusinessObject> rptList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rpt_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and TermID<>:TermID and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"TermID",termID,"Status",status.split(","));
|
||||||
|
bomanager.deleteBusinessObjects(rptList);
|
||||||
|
bomanager.updateDB();
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RPTSegmentInfo");
|
||||||
|
|
||||||
|
//还款方式选择项
|
||||||
|
List<BusinessObject> rptList = com.amarsoft.app.als.prd.config.loader.ProductConfig.getBusinessTypeConfig(loan.getString("BusinessType")).getBusinessObjectsBySql(BusinessComponentConfig.BUSINESS_COMPONENT, "Type='PRD0301'");
|
||||||
|
if(rptList == null || rptList.isEmpty()) rptList = BusinessComponentConfig.getComponents("Type='PRD0301'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(rptList, "ID");
|
||||||
|
String rptCodeTable="";
|
||||||
|
for(BusinessObject rpt:rptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(rptCodeTable)) rptCodeTable+= rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
else rptCodeTable+= ","+rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", rptCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
//还款周期选择
|
||||||
|
String[] pftKeys = CashFlowConfig.getPayFrequencyTypeConfigKeys();
|
||||||
|
String pftCodeTable="";
|
||||||
|
List<BusinessObject> pftList = new ArrayList<BusinessObject>();
|
||||||
|
for(String key:pftKeys)
|
||||||
|
{
|
||||||
|
pftList.add(CashFlowConfig.getPayFrequencyTypeConfig(key));
|
||||||
|
}
|
||||||
|
BusinessObjectHelper.sortBusinessObject(pftList, "ID");
|
||||||
|
for(BusinessObject pft:pftList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(pftCodeTable)) pftCodeTable+= pft.getString("ID")+","+pft.getString("Name");
|
||||||
|
else pftCodeTable+= ","+pft.getString("ID")+","+pft.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("PayFrequencyType", pftCodeTable);
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
BusinessObject rptComponent = BusinessObjectHelper.getBusinessObjectBySql(rptList, "ID='"+termID+"'");
|
||||||
|
List<BusinessObject> parameters = rptComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
if(!StringX.isEmpty(parameter.getString("DISPLAYNAME")))
|
||||||
|
{
|
||||||
|
doTemp.setHeader(parameter.getString("PARAMETERID"), parameter.getString("DISPLAYNAME"));
|
||||||
|
}
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i].trim()+","+valueNames[i].trim();
|
||||||
|
else codeTable+=","+values[i].trim()+","+valueNames[i].trim();
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable(parameter.getString("PARAMETERID"), codeTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("VALUE");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
function saveRecord(){
|
||||||
|
if(!iV_all("myiframe0")) return false;
|
||||||
|
as_save("myiframe0");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTerm(){
|
||||||
|
CHANGED=false;
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID) == "undefined" || termID.length == 0 || "<%=termID%>" == termID) return;
|
||||||
|
|
||||||
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
||||||
|
if("1"==view)
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRPTInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
else
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRPTList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function changePayFrequencyType(){
|
||||||
|
var payFrequencyType = getItemValue(0,getRow(),"PayFrequencyType");
|
||||||
|
if("6" == payFrequencyType) //指定还款周期
|
||||||
|
{
|
||||||
|
showItem(0,"PayFrequencyUnit");
|
||||||
|
showItem(0,"PayFrequency");
|
||||||
|
setItemRequired(0,"PayFrequencyUnit",true);
|
||||||
|
setItemRequired(0,"PayFrequency",true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hideItem(0,"PayFrequencyUnit");
|
||||||
|
hideItem(0,"PayFrequency");
|
||||||
|
setItemRequired(0,"PayFrequencyUnit",false);
|
||||||
|
setItemRequired(0,"PayFrequency",false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
var values = {};
|
||||||
|
values[0]={};
|
||||||
|
for(var i=0;i<DisplayFields[0].length;i++){
|
||||||
|
values[0][DisplayFields[0][i]] = getItemValue(0,getRow(),DisplayFields[0][i]);
|
||||||
|
}
|
||||||
|
if(iV_all(0)){
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
changePayFrequencyType();
|
||||||
|
parent.document.all("RPTFrame").style.height = 150;
|
||||||
|
var termID = "<%=termID%>";
|
||||||
|
if(typeof(termID) == "undefined" || termID.length == 0 || termID == "null") return;
|
||||||
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
||||||
|
if("1"!=view && "1" != "<%=backFlag%>")
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRPTList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
326
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRPTList.jsp
Normal file
326
WebContent/Accounting/LoanDetail/LoanTerm/BusinessRPTList.jsp
Normal file
@ -0,0 +1,326 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "列表信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject businessObject= bomanager.keyLoadBusinessObject(objectType,objectNo);
|
||||||
|
if(businessObject==null){
|
||||||
|
throw new Exception("未取到业务主对象ObjectType="+objectType+",ObjectNo="+objectNo+",请检查!");
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessObject loan = bomanager.keyLoadBusinessObject(businessObject.getString("ObjectType"), businessObject.getString("ObjectNo"));
|
||||||
|
if(StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
List<BusinessObject> rptList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rpt_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"Status",status.split(","));
|
||||||
|
if(rptList != null && !rptList.isEmpty())
|
||||||
|
{
|
||||||
|
termID = rptList.get(0).getString("TermID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<BusinessObject> rptList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rpt_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and TermID<>:TermID and Status in(:Status)",
|
||||||
|
"ObjectType",objectType,"ObjectNo",objectNo,"TermID",termID,"Status",status.split(","));
|
||||||
|
bomanager.deleteBusinessObjects(rptList);
|
||||||
|
bomanager.updateDB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RPTSegmentList");
|
||||||
|
|
||||||
|
//还款方式选择项
|
||||||
|
List<BusinessObject> rptList = com.amarsoft.app.als.prd.config.loader.ProductConfig.getBusinessTypeConfig(loan.getString("BusinessType")).getBusinessObjectsBySql(BusinessComponentConfig.BUSINESS_COMPONENT, "Type='PRD0301'");
|
||||||
|
if(rptList == null || rptList.isEmpty()) rptList = BusinessComponentConfig.getComponents("Type='PRD0301'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(rptList, "ID");
|
||||||
|
String rptCodeTable="";
|
||||||
|
for(BusinessObject rpt:rptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(rptCodeTable)) rptCodeTable+= rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
else rptCodeTable+= ","+rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", rptCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
BusinessObject map = BusinessObject.createBusinessObject();
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
String segRPTCodeTable="";
|
||||||
|
BusinessObject rptComponent = BusinessComponentConfig.getComponent(termID);
|
||||||
|
List<BusinessObject> childrenComponents = rptComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_COMPONENT_CHILDRENCOMPONENT);
|
||||||
|
for(BusinessObject childrenComponent:childrenComponents)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(segRPTCodeTable)) segRPTCodeTable+= childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
else segRPTCodeTable+= ","+childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
|
||||||
|
sb.append(" if(!olddata[getRow()]) olddata[getRow()]={}; \r\n");
|
||||||
|
sb.append(" var segTermID = getItemValue(0,getRow(),'SegTermID'); \r\n");
|
||||||
|
sb.append(" if(segTermID == '"+childrenComponent.getString("ID")+"'){ \r\n");
|
||||||
|
|
||||||
|
List<BusinessObject> parameters = childrenComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=false; \r\n");
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=true; \r\n");
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String str = map.getString(parameter.getString("PARAMETERID"));
|
||||||
|
if(StringX.isEmpty(str)) str = "";
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(str.indexOf(values[i]+",") > -1) continue;//如果代码已经存在直接跳过
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" var value = getItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"'); \r\n");
|
||||||
|
sb.append(" if('"+valueList+"'.indexOf(value) == -1){alert('录入值不符合要求,请重新录入。');setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"',''); };");
|
||||||
|
|
||||||
|
if(StringX.isEmpty(str))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),codeTable);
|
||||||
|
}
|
||||||
|
else if(!StringX.isEmpty(codeTable))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),str+","+codeTable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("Value");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
sb.append(" setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"','"+defaultValue+"'); \r\n");
|
||||||
|
sb.append(" olddata[getRow()]['"+parameter.getString("PARAMETERID").toUpperCase()+"'] = '"+defaultValue+"';\r\n");
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" } \r\n");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("SegTermID", segRPTCodeTable);
|
||||||
|
|
||||||
|
|
||||||
|
for(String key:map.getAttributeIDArray())
|
||||||
|
{
|
||||||
|
doTemp.setDDDWCodeTable(key, map.getString(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
doTemp.setDefaultValue("Status", "1");
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "新增", "新增一条信息","newRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "删除", "删除一条信息","deleteRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "返回", "返回","back()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<script language=javascript>
|
||||||
|
/*~[Describe=保存;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(){
|
||||||
|
if(!iV_all("myiframe0")) return false;
|
||||||
|
as_save("myiframe0","");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
var olddata={};
|
||||||
|
/*~[Describe=新增;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
var position= getRowCount(0);
|
||||||
|
as_add("myiframe0");
|
||||||
|
if(position == 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',"<%=DateHelper.getBusinessDate()%>");
|
||||||
|
else if(position > 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',getItemValue(0,position-1,"SegToDate"));
|
||||||
|
|
||||||
|
//setItemValue(0,position,'SegToDate',parent.getItemValue(0,0,"MaturityDate"));
|
||||||
|
setItemValue(0,position,'ObjectType',"<%=objectType%>");
|
||||||
|
setItemValue(0,position,'ObjectNo',"<%=objectNo%>");
|
||||||
|
setItemValue(0,position,'Status',"1");
|
||||||
|
setItemValue(0,position,'TermID',"<%=termID%>");
|
||||||
|
setItemValue(0,position,'AutoPayFlag','1');
|
||||||
|
|
||||||
|
document.all("INPUT_myiframe0_SegToDate_"+position+"_1").onblur=changeSegDate;
|
||||||
|
document.all("INPUT_myiframe0_SegTermID_"+position+"_2").onblur=changeRight;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyType_"+position+"_3").onblur=changeRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeSegDate(){
|
||||||
|
if(getRow()+1 < getRowCount(0))
|
||||||
|
setItemValue(0,getRow()+1,'SegFromDate',getItemValue(0,getRow(),"SegToDate"));
|
||||||
|
}
|
||||||
|
|
||||||
|
function changePayFrequencyType(){
|
||||||
|
var payFrequencyType = getItemValue(0,getRow(),"PayFrequencyType");
|
||||||
|
if("6" == payFrequencyType) //指定还款周期
|
||||||
|
{
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_2").disabled=false;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_4").disabled=false;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_6").disabled=false;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequency_"+getRow()+"_5").disabled=false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_2").disabled=true;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_4").disabled=true;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_6").disabled=true;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequency_"+getRow()+"_5").disabled=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))){ //您真的想删除该信息吗?
|
||||||
|
as_delete("myiframe0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function back(){
|
||||||
|
CHANGED=false;
|
||||||
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRPTInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID=&BackFlag=1","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function getColumnIndex(sCol){
|
||||||
|
var cnt=0;
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
if(DZ[0][1][i][2]!=1) continue;
|
||||||
|
if(typeof(sCol)=="string"){
|
||||||
|
if(DZ[0][1][i][15].toUpperCase()==sCol.toUpperCase()) return cnt;
|
||||||
|
}else{
|
||||||
|
if(DZ[0][1][i][15]==sCol) return cnt;
|
||||||
|
}
|
||||||
|
cnt++
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据组件定义生成的JS脚本规则,设置对应的值和显示规则
|
||||||
|
function changeRight()
|
||||||
|
{
|
||||||
|
<%=sb.toString()%>;
|
||||||
|
changePayFrequencyType();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
if(getRowCount(0) < 2){
|
||||||
|
alert("必须录入两条及以上数据。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var values = {};
|
||||||
|
var amt = 0.0;
|
||||||
|
for(var row = 0; row < getRowCount(0); row ++)
|
||||||
|
{
|
||||||
|
values[row] = {};
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
var v = getItemValue(0,row,DZ[0][1][i][15]);
|
||||||
|
if(typeof(v) == "undefined")
|
||||||
|
v = olddata[row][DZ[0][1][i][15].toUpperCase()];
|
||||||
|
values[row][DZ[0][1][i][15]] = v;
|
||||||
|
}
|
||||||
|
values[row]["TermID"]="<%=termID%>";
|
||||||
|
//起始日期-到期日判断
|
||||||
|
var segFromDate = getItemValue(0,row,"SegFromDate");
|
||||||
|
var segToDate = getItemValue(0,row,"SegToDate");
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate > segToDate){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能大于结束日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate < "<%=DateHelper.getBusinessDate()%>"){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能小于贷款发放日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segToDate > parent.getItemValue(0,0,"MaturityDate")){
|
||||||
|
alert("第"+(row+1)+"行结束日期不能大于贷款到期日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row == getRowCount(0)-1 && segToDate)
|
||||||
|
{
|
||||||
|
alert("第"+(row+1)+"行结束日期不用输入。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
amt += parseFloat(getItemValue(0,row,"SegRPTAmount"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(amt != parseFloat(parent.getItemValue(0,0,"NormalBalance")))
|
||||||
|
{
|
||||||
|
alert("指定金额总和必须和贷款剩余正常本金相同。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(iV_all(0)){
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
//改变父页面大小
|
||||||
|
parent.document.all("RPTFrame").style.height = 300;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
108
WebContent/Accounting/LoanDetail/PaymentRecordList.jsp
Normal file
108
WebContent/Accounting/LoanDetail/PaymentRecordList.jsp
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: zmxu 2012/04/19
|
||||||
|
Tester:
|
||||||
|
Describe: 还款记录
|
||||||
|
Input Param:
|
||||||
|
Output Param:
|
||||||
|
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "还款记录"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List02;Describe=定义变量,获取参数;]~*/%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//定义变量
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");
|
||||||
|
|
||||||
|
|
||||||
|
if(objectNo==null) objectNo="";
|
||||||
|
if(objectType==null) objectType="";
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%>
|
||||||
|
<%
|
||||||
|
//String sTempletNo = "PaymentRecordList";
|
||||||
|
|
||||||
|
String sTempletNo = "PaymentLogList";
|
||||||
|
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置为Grid风格
|
||||||
|
dwTemp.ReadOnly = "1"; //设置为只读
|
||||||
|
dwTemp.setPageSize(20); //服务器分页
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType);
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
|
||||||
|
<%
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"false","","Button","导出EXCEL","导出EXCEL","exportAll()",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
/*~[Describe=使用OpenComp打开详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
|
||||||
|
/*~[Describe=导出;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function exportAll()
|
||||||
|
{
|
||||||
|
amarExport("myiframe0");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=页面装载时,进行初始化;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
// init();
|
||||||
|
var bHighlightFirst = true;//自动选中第一条记录
|
||||||
|
// my_load(2,0,'myiframe0');
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
69
WebContent/Accounting/LoanDetail/PaymentScheduleList.jsp
Normal file
69
WebContent/Accounting/LoanDetail/PaymentScheduleList.jsp
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "现金流列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");
|
||||||
|
String sPayType = CurPage.getParameter("PayType");
|
||||||
|
|
||||||
|
if(objectNo==null) objectNo="";
|
||||||
|
if(objectType==null) objectType="";
|
||||||
|
if(sPayType==null) sPayType="";
|
||||||
|
|
||||||
|
// 贷款台账列表
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("PaymentScheduleList");
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置为Grid风格
|
||||||
|
dwTemp.ReadOnly = "1"; //设置为只读
|
||||||
|
dwTemp.setPageSize(15);//服务器分页
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
//---------------------定义按钮事件------------------------------------
|
||||||
|
/*~[Describe=使用OpenComp打开详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
|
||||||
|
function exportAll()
|
||||||
|
{
|
||||||
|
amarExport("myiframe0");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=查询还款计划表;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewPayment(){
|
||||||
|
PopComp("SimulationPaymentSchedule","/Accounting/Transaction/SimulationPaymentSchedule.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&RightType=ReadOnly","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=页面初始化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initRow(){
|
||||||
|
//计算应还总金额、实还总金额
|
||||||
|
var num = getRowCount(0);
|
||||||
|
for(var i=0;i<num;i++){
|
||||||
|
var PayPrincipalAmt=getItemValue(0,i,"PayPrincipalAmt");
|
||||||
|
var PayInteAMT=getItemValue(0,i,"PayInteAMT");
|
||||||
|
var PayFineAMT=getItemValue(0,i,"PayFineAMT");
|
||||||
|
var PayCompdInteAMT=getItemValue(0,i,"PayCompdInteAMT");
|
||||||
|
var sPayAll=PayPrincipalAmt+PayInteAMT+PayFineAMT+PayCompdInteAMT;
|
||||||
|
setItemValue(0,i,"PayAll",sPayAll);
|
||||||
|
var ActualPayPrincipalAmt=getItemValue(0,i,"ActualPayPrincipalAmt");
|
||||||
|
var ActualPayInteAMT=getItemValue(0,i,"ActualPayInteAMT");
|
||||||
|
var ActualPayFineAMT=getItemValue(0,getRow(),"ActualPayFineAMT");
|
||||||
|
var ActualPayCompdInteAMT=getItemValue(0,i,"ActualPayCompdInteAMT");
|
||||||
|
var sActualAll=ActualPayPrincipalAmt+ActualPayInteAMT+ActualPayFineAMT+ActualPayCompdInteAMT;
|
||||||
|
setItemValue(0,i,"ActualAll",sActualAll);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
46
WebContent/Accounting/LoanDetail/RATList.jsp
Normal file
46
WebContent/Accounting/LoanDetail/RATList.jsp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<%@page import="com.amarsoft.acct.systemconfig.ModelReturn"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2015-11-19
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectno = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String status = CurPage.getParameter("Status");//对象状态
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RATList");
|
||||||
|
doTemp.appendJboWhere(" and Status ="+status);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
//dwTemp.MultiSelect = true; //多选
|
||||||
|
//dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(objectno+","+objectType);
|
||||||
|
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"false","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||||
|
{"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||||
|
{"false","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function newRecord(){
|
||||||
|
var sUrl = "";
|
||||||
|
AsControl.OpenView(sUrl,'','_self','');
|
||||||
|
}
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUrl = "";
|
||||||
|
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("参数不能为空!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
46
WebContent/Accounting/LoanDetail/RPTList.jsp
Normal file
46
WebContent/Accounting/LoanDetail/RPTList.jsp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<%@page import="com.amarsoft.acct.systemconfig.ModelReturn"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2015-11-19
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectno = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String status = CurPage.getParameter("Status");//对象状态
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RPTList");
|
||||||
|
doTemp.appendJboWhere(" and Status ="+status);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
//dwTemp.MultiSelect = true; //多选
|
||||||
|
//dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(objectno+","+objectType);
|
||||||
|
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"false","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||||
|
{"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||||
|
{"false","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function newRecord(){
|
||||||
|
var sUrl = "";
|
||||||
|
AsControl.OpenView(sUrl,'','_self','');
|
||||||
|
}
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUrl = "";
|
||||||
|
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("参数不能为空!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
45
WebContent/Accounting/LoanDetail/SubsidiaryledgerList.jsp
Normal file
45
WebContent/Accounting/LoanDetail/SubsidiaryledgerList.jsp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "分账信息列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
String sObjectNo = CurPage.getParameter("ObjectNo");
|
||||||
|
String sObjectType = CurPage.getParameter("ObjectType");
|
||||||
|
if(sObjectNo==null) sObjectNo = "";
|
||||||
|
if(sObjectType==null) sObjectType = "";
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "SubsidiaryledgerList";
|
||||||
|
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(20);
|
||||||
|
|
||||||
|
|
||||||
|
//增加过滤器
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(20);
|
||||||
|
dwTemp.genHTMLObjectWindow(sObjectNo+","+sObjectType);
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
// AsOne.AsInit();
|
||||||
|
// init();
|
||||||
|
// my_load(2,0,'myiframe0');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
71
WebContent/Accounting/LoanDetail/TransactionRecord.jsp
Normal file
71
WebContent/Accounting/LoanDetail/TransactionRecord.jsp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "交易记录列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
if(objectNo == null)objectNo = "";
|
||||||
|
if(objectType == null)objectType = "";
|
||||||
|
|
||||||
|
//通过显示模版产生ASDataObject对象doTemp
|
||||||
|
String sTempletNo = "Acct_Transaction";
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
||||||
|
dwTemp.setPageSize(20);
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType);
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "交易详情", "交易详情","viewLoanRecord()",""},
|
||||||
|
{"true", "", "Button", "分录详情", "分录详情","viewSubjectRecord()",""},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*~[Describe=查看及修改交易详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewLoanRecord()
|
||||||
|
{
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
var sObjectType = getItemValue(0,getRow(),"ObjectType");
|
||||||
|
var sDocumentType = getItemValue(0,getRow(),"DocumentType");
|
||||||
|
if(typeof(sSerialNo)=="undefined" || sSerialNo.length==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
}
|
||||||
|
if(typeof(sDocumentType)=="undefined" || sDocumentType.length==0) {
|
||||||
|
alert("此类交易没有详情信息!")
|
||||||
|
}else{
|
||||||
|
OpenComp("TransactionInfo","/Accounting/Transaction/TransactionInfo.jsp","ObjectNo="+sSerialNo+"&ObjectType="+sObjectType+"&ToInheritObj=y","_blank","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=查看及修改分录详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewSubjectRecord()
|
||||||
|
{
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if(typeof(sSerialNo)=="undefined" || sSerialNo.length==0) {
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OpenComp("LoanDetailList","/Accounting/LoanDetail/LoanDetailList.jsp","TransSerialNo="+sSerialNo,"_blank","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// AsOne.AsInit();
|
||||||
|
// init();
|
||||||
|
// my_load(2,0,'myiframe0');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
59
WebContent/Accounting/LoanSimulation/CashFlowChangeList.jsp
Normal file
59
WebContent/Accounting/LoanSimulation/CashFlowChangeList.jsp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String docId = CurPage.getParameter("docId");
|
||||||
|
if(docId == null) docId = "100000";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String taskno=CurPage.getParameter("TaskNo");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("ProjCashFlowChangeList");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory");
|
||||||
|
}
|
||||||
|
dwTemp.Style="1";
|
||||||
|
dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1";
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
|
||||||
|
dwTemp.genHTMLObjectWindow(docId);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
//var sUserID=getItemValue(0,getRow(),"InputUserId");
|
||||||
|
var sCustomerID = getItemValue(0,getRow(),"cust_id");
|
||||||
|
if (typeof(sCustomerID)=="undefined" || sCustomerID.length==0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}else if(sUserID=='<%=CurUser.getUserID()%>'){
|
||||||
|
if(confirm(getHtmlMessage('2')))
|
||||||
|
{
|
||||||
|
as_delete('myiframe0');
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
alert(getHtmlMessage('3'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=查看及修改详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUserID=getItemValue(0,getRow(),"creator_");
|
||||||
|
if(sUserID=='<%=CurUser.getUserID()%>')
|
||||||
|
sEditRight='02';
|
||||||
|
else
|
||||||
|
sEditRight='01';
|
||||||
|
var sCustomerID = getItemValue(0,getRow(),"cust_id");
|
||||||
|
var sAccountId = getItemValue(0,getRow(),"id");
|
||||||
|
if (typeof(sCustomerID)=="undefined" || sCustomerID.length==0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
OpenPage("/Accounting/LoanSimulation/RentPlanList.jsp?cust_id="+sCustomerID+"&id="+sAccountId+"&EditRight="+sEditRight, "_self","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
36
WebContent/Accounting/LoanSimulation/CashFlowList.jsp
Normal file
36
WebContent/Accounting/LoanSimulation/CashFlowList.jsp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
|
||||||
|
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");//方案编号
|
||||||
|
String planCName=CurPage.getParameter("planCName");//项目方案 合同方案 投放编号 列名
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
TabCalBean tcb=TbBeanTools.getTabInfo(calType);
|
||||||
|
if(flowunid == null) flowunid = "100000";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String taskno=CurPage.getParameter("TaskNo");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCCashFlowTemp");
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
CurPage.setAttribute("modelno","cash");
|
||||||
|
doTemp.setJboClass(tcb.getContractCashTb());
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1";
|
||||||
|
dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1";
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
75
WebContent/Accounting/LoanSimulation/FundPlanChangeList.jsp
Normal file
75
WebContent/Accounting/LoanSimulation/FundPlanChangeList.jsp
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String docId = CurPage.getParameter("docId");
|
||||||
|
if(docId == null) docId = "100000";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String taskno=CurPage.getParameter("TaskNo");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("ProjFundPlanChangeList");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory");
|
||||||
|
}
|
||||||
|
dwTemp.Style="1";
|
||||||
|
dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1";
|
||||||
|
dwTemp.setPageSize(25);
|
||||||
|
|
||||||
|
dwTemp.genHTMLObjectWindow(docId);
|
||||||
|
String sButtons[][] =null;
|
||||||
|
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
RightType="ReadOnly";
|
||||||
|
sButtons=new String[][] {
|
||||||
|
|
||||||
|
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons = new String[][]{
|
||||||
|
{"true","All","Button","新增","新增银行账户信息","newRecord()","","","",""},
|
||||||
|
{"true","","Button","修改","查看银行账户信息详情","viewAndEdit()","","","","btn_icon_edit"},
|
||||||
|
{"true","All","Button","删除","删除银行账户信息","deleteRecord()","","","",""},
|
||||||
|
};}
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
var sPara="flow_unid=<%=docId%>&TaskNo=<%=taskno%>"+"&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>";
|
||||||
|
OpenPage("/Accounting/LoanSimulation/FundPlanInfo.jsp?EditRight=02","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
//var sUserID=getItemValue(0,getRow(),"InputUserId");
|
||||||
|
var sCustomerID = getItemValue(0,getRow(),"cust_id");
|
||||||
|
if (typeof(sCustomerID)=="undefined" || sCustomerID.length==0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}else if(sUserID=='<%=CurUser.getUserID()%>'){
|
||||||
|
if(confirm(getHtmlMessage('2')))
|
||||||
|
{
|
||||||
|
as_delete('myiframe0');
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
alert(getHtmlMessage('3'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=查看及修改详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUserID=getItemValue(0,getRow(),"creator_");
|
||||||
|
if(sUserID=='<%=CurUser.getUserID()%>')
|
||||||
|
sEditRight='02';
|
||||||
|
else
|
||||||
|
sEditRight='01';
|
||||||
|
var sCustomerID = getItemValue(0,getRow(),"cust_id");
|
||||||
|
var sAccountId = getItemValue(0,getRow(),"id");
|
||||||
|
if (typeof(sCustomerID)=="undefined" || sCustomerID.length==0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
OpenPage("/Accounting/LoanSimulation/FundPlanList.jsp?cust_id="+sCustomerID+"&id="+sAccountId+"&EditRight="+sEditRight, "_self","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
253
WebContent/Accounting/LoanSimulation/FundPlanInfo.jsp
Normal file
253
WebContent/Accounting/LoanSimulation/FundPlanInfo.jsp
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||||
|
String sCustomerID = CurPage.getParameter("cust_id");
|
||||||
|
String sAccountID = CurPage.getParameter("id");
|
||||||
|
String sEditRight = CurPage.getParameter("EditRight");
|
||||||
|
|
||||||
|
if(sCustomerID == null) sCustomerID = "";
|
||||||
|
if(sAccountID == null) sAccountID = "";
|
||||||
|
if(sEditRight == null) sEditRight = "";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("ProjFundPlanInfo");
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="2";
|
||||||
|
|
||||||
|
dwTemp.genHTMLObjectWindow(sCustomerID+","+sAccountID);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"false","","Button","新增","新增高管信息","newRecord()","","","",""},
|
||||||
|
{(sEditRight.equals("02")?"true":"false"),"All","Button","保存","保存所有修改","saveRecord(false)","","","",""},
|
||||||
|
{(sEditRight.equals("02")?"true":"false"),"All","Button","保存并新增","保存所有修改并新增","saveRecord(true)","","","",""},
|
||||||
|
{"true","All","Button","详情","查看银行账户详情","viewKeymanInfo()","","","",""},
|
||||||
|
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var flag = false;//判断高管信息的输入是用户输入(false)还是从系统中选择(true)
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
OpenPage("/Accounting/LoanSimulation/FundPlanInfo.jsp?","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=保存与保存并新增按钮;InputParam=是否在保存后展示新页面;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(isNewRecord){
|
||||||
|
var relationship = getItemValue(0,getRow(),"RelationShip");
|
||||||
|
var relativeID = getItemValue(0,getRow(),"RelativeID");
|
||||||
|
//保存前进行关联关系检查
|
||||||
|
if(!ValidityCheck()) return;
|
||||||
|
|
||||||
|
as_save(0,"saveSuccess("+isNewRecord+")");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveSuccess(isNewRecord){
|
||||||
|
//保存成功后防止反向修改Customer_Info和Ind_Info数据
|
||||||
|
setItemReadOnly(0,0,"RelationShip",true);
|
||||||
|
setItemReadOnly(0,0,"CertType",true);
|
||||||
|
setItemReadOnly(0,0,"CertID",true);
|
||||||
|
setItemReadOnly(0,0,"CustomerName",true);
|
||||||
|
setItemReadOnly(0,0,"CustomerType",true);
|
||||||
|
setItemReadOnly(0,0,"Birthday",true);
|
||||||
|
if(isNewRecord){
|
||||||
|
CHANGED=false;//跳转新页面时是否弹框提示已修改本页。
|
||||||
|
newRecord();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ValidityCheck(){
|
||||||
|
//从业年限和年龄比较
|
||||||
|
var birthday = getItemValue(0,getRow(),"Birthday");
|
||||||
|
var nowDate = new Date().getFullYear();
|
||||||
|
var engageTerm = getItemValue(0,getRow(),"EngageTerm");
|
||||||
|
setErrorTips("EngageTerm","");
|
||||||
|
if(engageTerm>=(nowDate-birthday.split('/')[0])){
|
||||||
|
setErrorTips("EngageTerm",getBusinessMessage("974"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/*~[Describe=返回高管信息详情页面;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewKeymanInfo(){
|
||||||
|
var sAccountID = getItemValue(0,getRow(),"id");
|
||||||
|
if(typeof(sAccountID) == "undefined" || sAccountID == ""){
|
||||||
|
alert(getMessageText('ALS72003'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sAccountID = getItemValue(0,getRow(),"id");
|
||||||
|
sReturn = RunJavaMethodTrans("com.amarsoft.app.als.customer.action.CheckRolesAction","checkRoles","customerid="+sAccountID+",userid=<%=CurUser.getUserID()%>");
|
||||||
|
if (typeof(sReturn) == "undefined" || sReturn.length == 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sReturnValue = sReturn.split("@");
|
||||||
|
sReturnValue1 = sReturnValue[0];
|
||||||
|
sReturnValue2 = sReturnValue[1];
|
||||||
|
sReturnValue3 = sReturnValue[2];
|
||||||
|
if(sReturnValue1 == "Y" || sReturnValue2 == "Y1" || sReturnValue3 == "Y2"){
|
||||||
|
openObject("CustInfo",sAccountID,"001");
|
||||||
|
}else{
|
||||||
|
alert(getBusinessMessage('115'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function goBack(){
|
||||||
|
OpenPage("/Accounting/LoanSimulation/FundPlanList.jsp?","_self","");
|
||||||
|
}
|
||||||
|
/*~[Describe=根据证件类型和证件编号获得客户编号和客户名称;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function getCustomerName(){
|
||||||
|
var sCertType = getItemValue(0,getRow(),"CertType");
|
||||||
|
var sCertID = getItemValue(0,getRow(),"CertID");
|
||||||
|
if(typeof(sCertType) != "undefined" && sCertType != "" && typeof(sCertID) != "undefined" && sCertID != ""){
|
||||||
|
sReturn=RunJavaMethodTrans("com.amarsoft.app.als.customer.action.CustomerInfoAction","getCustomerInfo","certID="+sCertID+",certType="+sCertType);
|
||||||
|
if(typeof(sReturn) != "undefined" && sReturn != ""){
|
||||||
|
var sReturn = sReturn.split('@');
|
||||||
|
setItemValue(0,getRow(),"RelativeID",sReturn[0]);
|
||||||
|
setItemValue(0,getRow(),"CustomerName",sReturn[1]);
|
||||||
|
setItemDisabled(0,0,"CustomerName",true);
|
||||||
|
}else{
|
||||||
|
setItemValue(0,getRow(),"RelativeID","");
|
||||||
|
setItemValue(0,getRow(),"CustomerName","");
|
||||||
|
setItemDisabled(0,0,"CustomerName",false);
|
||||||
|
}
|
||||||
|
//将身份证的出生日期自动赋给出生日期字段
|
||||||
|
if (!GetBirthday()) return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=弹出客户选择窗口,并置将返回的值设置到指定的域;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function selectCustomer(){
|
||||||
|
//返回客户的相关信息、客户代码、客户名称、证件类型、客户证件号码
|
||||||
|
//实现清空功能:如是用户自己输入的信息时,只清空高管姓名,如是从系统里关联查询出来,则清空 证件类型、证件号码和高管姓名字段;实现字段关联显示功能。
|
||||||
|
sObjectNoString = AsDialog.SelectGridValue("SelectManager", "<%=CurUser.getOrgID()%>", "CustomerID@CustomerName@CertID@CertType@CertTypeName", null, false);
|
||||||
|
sValueString = "@RelativeID@0@CustomerName@1@CertID@2@CertType@3";
|
||||||
|
sValues = sValueString.split("@");
|
||||||
|
var i=sValues.length;
|
||||||
|
i=i-1;
|
||||||
|
if (i%2!=0){
|
||||||
|
alert(getMessageText('ALS72004'));
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
var j=i/2,m,sColumn,iID;
|
||||||
|
if(typeof(sObjectNoString)=="undefined"){
|
||||||
|
|
||||||
|
return;
|
||||||
|
}else if(String(sObjectNoString)==String("_CANCEL_") ){
|
||||||
|
return;
|
||||||
|
}else if(String(sObjectNoString)==String("_CLEAR_")){
|
||||||
|
setItemDisabled(0,0,"CertType",false);
|
||||||
|
setItemDisabled(0,0,"CertID",false);
|
||||||
|
setItemDisabled(0,0,"CustomerName",false);
|
||||||
|
setItemValue(0,0,"CustomerName","");
|
||||||
|
if(flag){
|
||||||
|
setItemValue(0,0,"CertType","");
|
||||||
|
setItemValue(0,0,"CertID","");
|
||||||
|
setItemValue(0,0,"Sex","");
|
||||||
|
setItemValue(0,0,"Birthday","");
|
||||||
|
}
|
||||||
|
flag = false;
|
||||||
|
}else if(String(sObjectNoString)!=String("_NONE_") && String(sObjectNoString)!=String("undefined")){
|
||||||
|
sObjectNos = sObjectNoString.split("@");
|
||||||
|
for(m=1;m<=j;m++){
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
iID = parseInt(sValues[2*m],10);
|
||||||
|
if(sColumn!="")
|
||||||
|
setItemValue(0,0,sColumn,sObjectNos[iID]);
|
||||||
|
}
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
sCustomerName = getItemValue(0,0,"CustomerName");
|
||||||
|
if( String(sObjectNoString)!=String("_CLEAR_") && typeof(sCustomerName) != "undefined" && sCustomerName != "" ){
|
||||||
|
setItemDisabled(0,0,"CertType",true);
|
||||||
|
setItemDisabled(0,0,"CertID",true);
|
||||||
|
setItemDisabled(0,0,"CustomerName",true);
|
||||||
|
setItemDisabled(0,0,"CustomerType",true);
|
||||||
|
setItemDisabled(0,0,"Birthday",true);
|
||||||
|
setItemReadOnly(0,0,"Birthday",true);
|
||||||
|
$("#R0F"+getColIndex(0,"Birthday")+"_innerbt", frames["myiframe0"].document).hide(); //隐藏内置按钮
|
||||||
|
}else{
|
||||||
|
setItemDisabled(0,0,"CertType",false);
|
||||||
|
setItemDisabled(0,0,"CertID",false);
|
||||||
|
setItemDisabled(0,0,"CustomerName",false);
|
||||||
|
setItemDisabled(0,0,"Birthday",false);
|
||||||
|
$("#R0F"+getColIndex(0,"Birthday")+"_innerbt", frames["myiframe0"].document).show(); //显示内置按钮
|
||||||
|
setItemFocus(0,0,"CustomerName");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//将身份证的出生日期自动赋给出生日期字段
|
||||||
|
if (!GetBirthday()) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*~[Describe=页面装载时,对DW进行初始化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0){
|
||||||
|
setItemValue(0,0,"CustomerID","<%=sCustomerID%>");
|
||||||
|
setItemValue(0,0,"InputUserId","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"InputUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"InputOrgId","<%=CurOrg.getOrgID()%>");
|
||||||
|
setItemValue(0,0,"InputOrgName","<%=CurOrg.getOrgName()%>");
|
||||||
|
setItemValue(0,0,"InputDate","<%=StringFunction.getToday()%>");
|
||||||
|
setItemValue(0,0,"UpdateDate","<%=StringFunction.getToday()%>");
|
||||||
|
}else{
|
||||||
|
setItemReadOnly(0,0,"RelationShip",true); //详情进入时锁定
|
||||||
|
//初始化设置成只读,隐藏日期选择框
|
||||||
|
setItemReadOnly(0,0,"Birthday",true);
|
||||||
|
setItemReadOnly(0,0,"Sex",true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=根据身份证号获取出生日期;InputParam=无;OutPutParam=通过true,否则false;]~*/
|
||||||
|
function GetBirthday(){
|
||||||
|
var sCertType = getItemValue(0,0,"CertType");
|
||||||
|
var sCertID = getItemValue(0,0,"CertID");
|
||||||
|
//判断身份证合法性,个人身份证号码应该是15或18位!
|
||||||
|
if(sCertType =='Ind01' || sCertType =='Ind08'){
|
||||||
|
if (!CheckLicense(sCertID)){
|
||||||
|
}
|
||||||
|
// 如果选择的证件类型为身份证,则输入身份证后生日和性别自动获取,不允许修改。
|
||||||
|
setItemDisabled(0,0,"Birthday",true);
|
||||||
|
setItemDisabled(0,0,"Sex",true);
|
||||||
|
//将身份证中的日期自动赋给出生日期,把性别置上
|
||||||
|
if(sCertID.length == 15){
|
||||||
|
sSex = sCertID.substring(14);
|
||||||
|
sSex = parseInt(sSex);
|
||||||
|
sCertID = sCertID.substring(6,12);
|
||||||
|
sCertID = "19"+sCertID.substring(0,2)+"/"+sCertID.substring(2,4)+"/"+sCertID.substring(4,6);
|
||||||
|
setItemValue(0,getRow(),"Birthday",sCertID);
|
||||||
|
if(sSex%2==0)//奇男偶女
|
||||||
|
setItemValue(0,getRow(),"Sex","2");
|
||||||
|
else
|
||||||
|
setItemValue(0,getRow(),"Sex","1");
|
||||||
|
}
|
||||||
|
if(sCertID.length == 18){
|
||||||
|
sSex = sCertID.substring(16,17);
|
||||||
|
sSex = parseInt(sSex);
|
||||||
|
sCertID = sCertID.substring(6,14);
|
||||||
|
sCertID = sCertID.substring(0,4)+"/"+sCertID.substring(4,6)+"/"+sCertID.substring(6,8);
|
||||||
|
setItemValue(0,getRow(),"Birthday",sCertID);
|
||||||
|
if(sSex%2==0)//奇男偶女
|
||||||
|
setItemValue(0,getRow(),"Sex","2");
|
||||||
|
else
|
||||||
|
setItemValue(0,getRow(),"Sex","1");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// 如果选择的证件类型不为身份证,生日和性别要求手动输入。
|
||||||
|
setItemDisabled(0,0,"Birthday",false);
|
||||||
|
setItemDisabled(0,0,"Sex",false);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function setErrorTips(colName,tips){
|
||||||
|
if(tips==""){
|
||||||
|
setItemUnit(0,getRow(),colName,"");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
setItemUnit(0,getRow(),colName,"<font color=red>"+tips+"</font>");
|
||||||
|
}
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
154
WebContent/Accounting/LoanSimulation/FundPlanList.jsp
Normal file
154
WebContent/Accounting/LoanSimulation/FundPlanList.jsp
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
|
||||||
|
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||||
|
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
|
||||||
|
String contractid="";
|
||||||
|
if(flow!=null){
|
||||||
|
contractid=flow.getAttribute("contract_id").getString();
|
||||||
|
}
|
||||||
|
|
||||||
|
String productId=CurPage.getParameter("ProductId");
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");//方案编号
|
||||||
|
String planCName=CurPage.getParameter("planCName");//项目方案 合同方案 投放编号 列名
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
TabCalBean tcb=TbBeanTools.getTabInfo(calType);
|
||||||
|
if(flowunid == null) flowunid = "100000";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String taskno=CurPage.getParameter("TaskNo");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCFundPlanTemp");
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
CurPage.setAttribute("modelno","fund");
|
||||||
|
doTemp.setJboClass(tcb.getFundFundPlan_tb());
|
||||||
|
if("quoted_price".equals(calType)){
|
||||||
|
doTemp.setColumnAttribute("customername","colreadonly", "1");
|
||||||
|
doTemp.setColumnAttribute("customername","colinnerbtevent", "");
|
||||||
|
}
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
}else{
|
||||||
|
dwTemp.ReadOnly = "0";
|
||||||
|
}
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
|
||||||
|
String sButtons[][] =null;
|
||||||
|
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
|
||||||
|
RightType="ReadOnly";
|
||||||
|
sButtons=new String[][] {
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"true","","Button","复制","复制","copy()","","","","btn_icon_copy",""},
|
||||||
|
{"true","","Button","保存","保存","save()","","","btn_icon_save",""},
|
||||||
|
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))deleteRecord()","","","","btn_icon_delete",""},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function save(){
|
||||||
|
as_save(0,'updateFlow()');
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCustomer(){
|
||||||
|
var selname="selectCustAndAssuror2";
|
||||||
|
var param="flowunid,<%=flowunid%>";
|
||||||
|
if("pay_process"=="<%=calType%>")
|
||||||
|
{
|
||||||
|
selname="selectContractCustAndAssuror";
|
||||||
|
param="contractid,<%=contractid%>";
|
||||||
|
}
|
||||||
|
AsDialog.OpenSelector(selname,param,"dialogWidth=" + parseInt(window.screen.width * 0.5) + "px dialogHeight=" + parseInt(window.screen.height * 0.3) + "px",function(sReturn){
|
||||||
|
if(!sReturn || sReturn == "_CANCEL_"||sReturn=="_NONE_"||sReturn=="_CLEAR_"){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sReturn = sReturn.split("@");
|
||||||
|
setItemValue(0,getRow(),"PAY_OBJ",sReturn[0]);
|
||||||
|
setItemValue(0,getRow(),"customername",sReturn[1]);
|
||||||
|
},"请选客户");
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRecord(){
|
||||||
|
//var sUserID=getItemValue(0,getRow(),"InputUserId");
|
||||||
|
var id = getItemValue(0,getRow(),"id");
|
||||||
|
if (typeof(id)=="undefined" || id.length==0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(getItemValue(0,getRow(0),"plan_list")=="1"&&getItemValue(0,getRow(0),"FEE_TYPE")=="feetype10"){
|
||||||
|
alert("不能删除所有设备款");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
as_delete('myiframe0','updateFlow()');
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateFlow(){
|
||||||
|
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateCashFlow","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>,productId=<%=productId%>");
|
||||||
|
//reloadSelf();/Accounting/LoanSimulation/LoanBasicInfo.jsp
|
||||||
|
var param="FlowUnid=<%=flowunid%>&calType=<%=calType%>&plannumber=<%=plannumber%>&ProductId=<%=productId%>";
|
||||||
|
window.parent.parent.ischeck=false;
|
||||||
|
ischeck=false;
|
||||||
|
window.parent.parent.AsControl.OpenView("/Accounting/LoanSimulation/LoanBasicInfo.jsp",param, "_self");
|
||||||
|
}
|
||||||
|
var ischeck=true;
|
||||||
|
function checkModified(){
|
||||||
|
var sUnloadMessage = "\n\r当前页面内容已经被修改,\n\r按“取消”则留在当前页,然后再按当前页上的“保存”按钮以保存修改过的数据,\n\r按“确定”则不保存修改过的数据并且离开当前页.";
|
||||||
|
if(!ischeck){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(as_isPageChanged()){
|
||||||
|
return confirm(sUnloadMessage);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function copy(){
|
||||||
|
var count=getRowCount(0);
|
||||||
|
if(count <= 0 ){
|
||||||
|
alert("请先进行租金测算");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var column = DZ[0][1];
|
||||||
|
var obj = {};
|
||||||
|
for(var i=0;i<column.length;i++){
|
||||||
|
var columnName = column[i][15];
|
||||||
|
if(columnName != 'id'){
|
||||||
|
obj[columnName] = getItemValue(0,getRow(),columnName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//找到该类型最大的付款编号,然后++1
|
||||||
|
var number = 1;
|
||||||
|
for(var i = 0 ; i< count ;i++){
|
||||||
|
if(getItemValue(0,i,'FEE_TYPE') == obj['FEE_TYPE']){
|
||||||
|
number++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
obj['payment_id'] = number+"";
|
||||||
|
as_add(0);
|
||||||
|
for(var p in obj){
|
||||||
|
if(p=="plan_list"){
|
||||||
|
setItemValue(0,getRow(0),p,obj['payment_id'])
|
||||||
|
}else{
|
||||||
|
setItemValue(0,getRow(0),p,obj[p])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
alert("复制成功");
|
||||||
|
as_save(0,"reloadSelf()");
|
||||||
|
}
|
||||||
|
function deleteAllRecords(){
|
||||||
|
RunJavaMethodTrans("com.tenwa.reckon.executor.CalcExecutor","deleteAllRecordsForFundPlanList","flowunid=<%=flowunid%>,planCName=<%=planCName%>,plannumber=<%=plannumber%>,calType=<%=calType%>");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
34
WebContent/Accounting/LoanSimulation/GetResultSum.jsp
Normal file
34
WebContent/Accounting/LoanSimulation/GetResultSum.jsp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<!--create by bxzhou at 2003.08.14-->
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBeginMD.jsp"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
double MonthPay=0.0D;
|
||||||
|
double MonthRate=0.0D;
|
||||||
|
int Term=0;
|
||||||
|
double LoanSum=0.0D;
|
||||||
|
|
||||||
|
String sMonthPay = CurPage.getParameter("MonthPay");
|
||||||
|
String sMonthRate = CurPage.getParameter("MonthRate");
|
||||||
|
String sTerm = CurPage.getParameter("Term");
|
||||||
|
|
||||||
|
if(sMonthPay == null || sMonthPay.length() == 0)
|
||||||
|
sMonthPay = "";
|
||||||
|
else
|
||||||
|
MonthPay = Double.parseDouble(sMonthPay);
|
||||||
|
if(sMonthRate == null || sMonthRate.length() == 0)
|
||||||
|
sMonthRate = "";
|
||||||
|
else
|
||||||
|
MonthRate = Double.parseDouble(sMonthRate);
|
||||||
|
if(sTerm == null || sTerm.length() == 0)
|
||||||
|
sTerm = "";
|
||||||
|
else
|
||||||
|
Term = Integer.parseInt(sTerm);
|
||||||
|
|
||||||
|
LoanSum = Math.round(MonthPay/(MonthRate / 1000 + MonthRate /(1000 * (Math.pow(1 + MonthRate / 1000,Term)-1)))*100)/100;
|
||||||
|
%>
|
||||||
|
<script language="javascript">
|
||||||
|
self.returnValue = <%=LoanSum%>
|
||||||
|
self.close();
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
47
WebContent/Accounting/LoanSimulation/GetResultTerm.jsp
Normal file
47
WebContent/Accounting/LoanSimulation/GetResultTerm.jsp
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<!--create by bxzhou at 2003.08.14-->
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBeginMD.jsp"%>
|
||||||
|
<%
|
||||||
|
double MonthPay=0.0D;
|
||||||
|
double MonthRate=0.0D;
|
||||||
|
double Sum=0.0D;
|
||||||
|
int Term=0;
|
||||||
|
|
||||||
|
String sMonthPay = CurComp.getParameter("MonthPay");
|
||||||
|
String sMonthRate = CurComp.getParameter("MonthRate");
|
||||||
|
String sSum = CurComp.getParameter("Sum");
|
||||||
|
|
||||||
|
if(sMonthPay == null || sMonthPay.length() == 0)
|
||||||
|
sMonthPay = "";
|
||||||
|
else
|
||||||
|
MonthPay = Double.parseDouble(sMonthPay);
|
||||||
|
|
||||||
|
if(sMonthRate == null || sMonthRate.length() == 0)
|
||||||
|
sMonthRate = "";
|
||||||
|
else
|
||||||
|
MonthRate = Double.parseDouble(sMonthRate);
|
||||||
|
if(sSum == null || sSum.length() == 0)
|
||||||
|
sSum = "";
|
||||||
|
else
|
||||||
|
Sum = Double.parseDouble(sSum);
|
||||||
|
|
||||||
|
if (MonthPay-Sum*MonthRate/1000<=0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<script language="javascript">
|
||||||
|
alert("你的期还款本息额太小!");
|
||||||
|
self.returnValue = 0;
|
||||||
|
self.close();
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Term = (int)Math.ceil(Math.round(Math.log10(MonthPay/(MonthPay-Sum*MonthRate/1000))/Math.log10(1+MonthRate/1000)*100)/100);
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<script language="javascript">
|
||||||
|
self.returnValue = <%=Term%>;
|
||||||
|
self.close();
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
122
WebContent/Accounting/LoanSimulation/KnowConfigList.jsp
Normal file
122
WebContent/Accounting/LoanSimulation/KnowConfigList.jsp
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
|
||||||
|
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");//方案编号
|
||||||
|
String planCName=CurPage.getParameter("planCName");//项目方案 合同方案 投放编号 列名
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
TabCalBean tcb=TbBeanTools.getTabInfo(calType);
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String taskno=CurPage.getParameter("TaskNo");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCCalcRulesTempList");
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
CurPage.setAttribute("modelno","rule");
|
||||||
|
doTemp.setJboClass(tcb.getRuleTb());
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1";
|
||||||
|
dwTemp.ReadOnly = "0";
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
String sButtons[][] =null;
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
RightType="ReadOnly";
|
||||||
|
sButtons=new String[][] {
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons = new String[][]{
|
||||||
|
{"true","","Button","新增","新增","newRecord()","","","",""},
|
||||||
|
{"true","","Button","保存","保存","save()","","","",""},
|
||||||
|
{"true","","Button","删除","删除","deleteRecord()","","","",""}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function save(){
|
||||||
|
var count=getRowCount(0);
|
||||||
|
if(count > 0){
|
||||||
|
var totalCount = Number(getItemValue(0,count-1,'end_list'));
|
||||||
|
parent.setItemValue(0,getRow(),"INCOME_NUMBER",totalCount+"");
|
||||||
|
parent.CalcControl.InitLsaseTerm();
|
||||||
|
}
|
||||||
|
setRules();
|
||||||
|
var endlist=1;
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
if(i>0){
|
||||||
|
if(Number( getItemValue(0,i,"START_LIST"))<=endlist){
|
||||||
|
alert("第"+(i+1)+"行开始期次小于上一行结束期次,不能保存");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endlist=Number( getItemValue(0,i,"END_LIST"));
|
||||||
|
}
|
||||||
|
as_save(0);
|
||||||
|
}
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
setRules();
|
||||||
|
if(iV_all(0)==false){
|
||||||
|
showErrors(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var startList = 1;
|
||||||
|
var count=getRowCount(0);
|
||||||
|
if(count > 0){
|
||||||
|
startList = Number(getItemValue(0,count-1,'end_list')) + 1;
|
||||||
|
}
|
||||||
|
as_add(0);
|
||||||
|
setItemValue(0,getRow(0),'flowunid','<%=flowunid%>');
|
||||||
|
setItemValue(0,getRow(0),'<%=planCName%>','<%=plannumber%>');
|
||||||
|
setItemValue(0,getRow(0),'start_list',startList+"");
|
||||||
|
as_save(0);
|
||||||
|
}
|
||||||
|
//验证校验
|
||||||
|
function setRules(){
|
||||||
|
TableFactory.initCheck=false;
|
||||||
|
_user_valid_errors[0] = new Array();
|
||||||
|
TableFactory.ColValidInfo[0] = new Array();
|
||||||
|
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
var startlist=getItemValue(0,i,"start_list");
|
||||||
|
var endlist=getItemValue(0,i,"end_list");
|
||||||
|
var planmoney=getItemValue(0,i,"plan_money");
|
||||||
|
if(endlist.length==0){
|
||||||
|
_user_valid_errors[0][_user_valid_errors[0].length]= "结束期次必填[第" + (i+1) +"行]";
|
||||||
|
TableFactory.ColValidInfo[0][TableFactory.ColValidInfo[0].length] = [i,"end_list"];
|
||||||
|
}
|
||||||
|
if(planmoney.length==0){
|
||||||
|
_user_valid_errors[0][_user_valid_errors[0].length]= "金额必填[第" + (i+1) +"行]";
|
||||||
|
TableFactory.ColValidInfo[0][TableFactory.ColValidInfo[0].length] = [i,"plan_money"];
|
||||||
|
}
|
||||||
|
if(Number(endlist)<Number(startlist)){
|
||||||
|
_user_valid_errors[0][_user_valid_errors[0].length]= "结束期次必须大于开始期次[第" + (i+1) +"行]";
|
||||||
|
TableFactory.ColValidInfo[0][TableFactory.ColValidInfo[0].length] = [i,"end_list"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRecord(){
|
||||||
|
//s_c_p[0]+1 当前页 s_p_c[0] 最后一页
|
||||||
|
if(s_c_p[0]+1<s_p_c[0]){
|
||||||
|
alert('请依次从最后一期开始删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var count=getRowCount(0);
|
||||||
|
var rentList = getItemValue(0,getRow(0),'START_LIST');
|
||||||
|
var start=getItemValue(0,count-1,'start_list');
|
||||||
|
if(Number(rentList) < start){
|
||||||
|
alert('请依次从最后一期开始删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm('确实要删除吗?'))as_delete(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
1243
WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp
Normal file
1243
WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp
Normal file
File diff suppressed because it is too large
Load Diff
424
WebContent/Accounting/LoanSimulation/LoanBasicInfoChange.jsp
Normal file
424
WebContent/Accounting/LoanSimulation/LoanBasicInfoChange.jsp
Normal file
@ -0,0 +1,424 @@
|
|||||||
|
<%@page import="com.amarsoft.app.accounting.config.impl.CashFlowConfig"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.config.impl.BusinessComponentConfig"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.util.DateHelper"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObjectHelper"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObject"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
<%-- <script type="text/javascript" src="<%=sWebRootPath%>/Accounting/LoanSimulation/js/DataUtil.js"></script> --%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
String sTempletNo = "LoanSimulationBasicInfoChange";//--模板号--
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
String docId = CurPage.getParameter("flow_unid");
|
||||||
|
String contractId = CurPage.getParameter("contractId");
|
||||||
|
if(docId == null){
|
||||||
|
docId = "100000";
|
||||||
|
}
|
||||||
|
|
||||||
|
String calType = CurPage.getParameter("calType");
|
||||||
|
if(calType == null){
|
||||||
|
calType = "proj_process";
|
||||||
|
}
|
||||||
|
doTemp.setHtmlEvent("SETTLE_METHOD", "onchange", "changeSettleMethod");
|
||||||
|
CurPage.getCurComp().setAttribute("RightType", null);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据
|
||||||
|
}
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
dwTemp.ReadOnly = "-2";//只读模式
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
dwTemp.Style = "2";//freeform
|
||||||
|
//dwTemp.ReadOnly = "-2";//只读模式
|
||||||
|
dwTemp.genHTMLObjectWindow(docId);
|
||||||
|
CurPage.getCurComp().setAttribute("RightType", RightType);//
|
||||||
|
//字段显示子页面
|
||||||
|
for (int i = 0; i < dwTemp.getDataObject().Columns.size(); ++i){
|
||||||
|
ASColumn column = (ASColumn) dwTemp.getDataObject().Columns.get(i);
|
||||||
|
String htmlStyle = column.getAttribute("ColHTMLStyle");
|
||||||
|
if(!StringX.isEmpty(htmlStyle) && htmlStyle.indexOf("iframe") > -1)
|
||||||
|
{
|
||||||
|
String name = column.getAttribute("ColName");
|
||||||
|
dwTemp.replaceColumn(name, htmlStyle, CurPage.getObjectWindowOutput());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String compClientID = request.getParameter("CompClientID");
|
||||||
|
|
||||||
|
dwTemp.replaceColumn("condition_plan", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"600px\" frameborder=\"0\" src=\""+sWebRootPath+"/Accounting/LoanSimulation_change/condition_plan.jsp?CompClientID="+compClientID+"&docId="+docId+"&contractId="+contractId+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&calType="+calType+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||||
|
dwTemp.replaceColumn("knowing_config", "<iframe type='iframe' id='frame_list_knowing' name=\"frame_list_knowing\" width=\"100%\" height=\"200px\" frameborder=\"0\" src=\""+sWebRootPath+"/Accounting/LoanSimulation_common/KnowConfigList.jsp?CompClientID="+compClientID+"&docId="+docId+"&IsHistory="+IsHistory+"&NodeNo="+nodeNo+"&calType="+calType+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||||
|
String businessDate = DateHelper.getBusinessDate();
|
||||||
|
String sButtons[][] = {
|
||||||
|
//{"true","All","Button","重置","重置","reloadSelf()","","","",""},
|
||||||
|
{"true","All","Button","租金测算","租金测算","saveRecord()","","","",""}
|
||||||
|
};
|
||||||
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$("#INCOME_NUMBER").keyup(function(){
|
||||||
|
var val = $("#INCOME_NUMBER").val();
|
||||||
|
if(val.indexOf("-")!=-1){
|
||||||
|
alert("此处不能输入负数!");
|
||||||
|
$("#INCOME_NUMBER").val(val.replace("-",""));
|
||||||
|
lsaseTerm();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
var count = 0;
|
||||||
|
function saveRecord(sPostEvents){
|
||||||
|
//设备款大于0
|
||||||
|
var equipAmt = getItemValue(0,getRow(),"EQUIP_AMT");
|
||||||
|
if(!equipAmt || Number(equipAmt) <= 0){
|
||||||
|
alert('设备款需大于0 !!!');
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
//已知本金已知租金,判断保存后的租金和本地是否跟净融资额匹配?
|
||||||
|
var rentOrRate = getItemValue(0,getRow(),"RENT_OR_RATE");
|
||||||
|
var cleanLeaseMoney = getItemValue(0,getRow(),"CLEAN_LEASE_MONEY");
|
||||||
|
var equipEndValue = getItemValue(0,getRow(),"EQUIP_END_VALUE");
|
||||||
|
if(rentOrRate.indexOf('knowing') > -1){
|
||||||
|
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","checkKnowingConfig","docId=<%=docId%>,rentOrRate="+rentOrRate+",cleanLeasemoney="+cleanLeaseMoney+",equipEndValue="+equipEndValue);
|
||||||
|
if(result){
|
||||||
|
alert(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
as_save("myiframe0","run()");
|
||||||
|
}
|
||||||
|
function ValidityCheck(){
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function run()
|
||||||
|
{
|
||||||
|
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","run","docId=<%=docId%>,calType=<%=calType%>");
|
||||||
|
document.all("frame_list").src = document.all("frame_list").src;
|
||||||
|
if(result.info){
|
||||||
|
for(var p in result.info){
|
||||||
|
setItemValue(0,getRow(),p.toUpperCase(),result.info[p]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//租金推算方法
|
||||||
|
function rentOrRateChange(){
|
||||||
|
var rentOrRate = getItemValue(0,getRow(),"RENT_OR_RATE");
|
||||||
|
document.all("A_Group_calc_config").style.display="none";
|
||||||
|
setEnable('INCOME_NUMBER');
|
||||||
|
if(rentOrRate == 'rate'){
|
||||||
|
setEnable('RATE_FLOAT_TYPE');
|
||||||
|
}else if(rentOrRate == 'rent'){
|
||||||
|
setItemValue(0,getRow(),"RATE_FLOAT_TYPE","fixed");
|
||||||
|
setDisable('RATE_FLOAT_TYPE');
|
||||||
|
if(getItemValue(0,getRow(),"SETTLE_METHOD") == 'even_corpus'){
|
||||||
|
setItemValue(0,getRow(),"SETTLE_METHOD","even_rent");
|
||||||
|
}
|
||||||
|
}else if(rentOrRate == 'knowing_rent'){
|
||||||
|
setItemValue(0,getRow(),"RATE_FLOAT_TYPE","fixed");
|
||||||
|
setDisable('RATE_FLOAT_TYPE');
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
setItemValue(0,getRow(),"SETTLE_METHOD","even_rent");
|
||||||
|
//还租次数只读
|
||||||
|
setDisable('INCOME_NUMBER');
|
||||||
|
}else if(rentOrRate== 'knowing_corpus'){
|
||||||
|
setEnable('RATE_FLOAT_TYPE');
|
||||||
|
setItemValue(0,getRow(),"SETTLE_METHOD","even_corpus");
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
setDisable('INCOME_NUMBER');
|
||||||
|
}
|
||||||
|
document.all("frame_list_knowing").src = document.all("frame_list_knowing").src;
|
||||||
|
RATTermID();
|
||||||
|
if(count > 0){
|
||||||
|
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDelteKnowing","docId=<%=docId%>");
|
||||||
|
setItemValue(0,getRow(),"RENT_OR_RATE_VALUE","0");
|
||||||
|
setItemValue(0,getRow(),"YEAR_RATE","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<%-- function rentOrRateChange(){
|
||||||
|
var rentOrRate = getItemValue(0,getRow(),"RENT_OR_RATE");
|
||||||
|
document.all("A_Group_calc_config").style.display="none";
|
||||||
|
setEnable('INCOME_NUMBER');
|
||||||
|
if(rentOrRate == 'rent'){
|
||||||
|
setItemValue(0,getRow(),"RATE_FLOAT_TYPE","fixed");
|
||||||
|
if(getItemValue(0,getRow(),"SETTLE_METHOD") == 'even_corpus'){
|
||||||
|
setItemValue(0,getRow(),"SETTLE_METHOD","even_rent");
|
||||||
|
}
|
||||||
|
}else if(rentOrRate == 'knowing_rent'){
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
setItemValue(0,getRow(),"SETTLE_METHOD","even_rent");
|
||||||
|
//还租次数只读
|
||||||
|
setDisable('INCOME_NUMBER');
|
||||||
|
}else if(rentOrRate== 'knowing_corpus'){
|
||||||
|
setItemValue(0,getRow(),"SETTLE_METHOD","even_corpus");
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
setDisable('INCOME_NUMBER');
|
||||||
|
}
|
||||||
|
document.all("frame_list_knowing").src = document.all("frame_list_knowing").src;
|
||||||
|
RATTermID();
|
||||||
|
if(count > 0){
|
||||||
|
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDelteKnowing","docId=<%=docId%>");
|
||||||
|
setItemValue(0,getRow(),"RENT_OR_RATE_VALUE","0");
|
||||||
|
setItemValue(0,getRow(),"YEAR_RATE","0");
|
||||||
|
}
|
||||||
|
} --%>
|
||||||
|
|
||||||
|
//根据起始日期和贷款月数得到贷款结束日期
|
||||||
|
function getMaturityDate(){
|
||||||
|
var putoutDate = getItemValue(0,getRow(),"PutoutDate");
|
||||||
|
var term = getItemValue(0,getRow(),"LoanTerm");
|
||||||
|
if(typeof(putoutDate) == "undefined" ||putoutDate==null||putoutDate=="") return;
|
||||||
|
if(typeof(term) == "undefined" ||term==null||term=="") return;
|
||||||
|
var maturityDate = AsControl.RunJavaMethod("com.amarsoft.acct.accounting.web.DateCal","getRelativeDate","date="+putoutDate+",termUnit=M"+",term="+term);
|
||||||
|
setItemValue(0,getRow(),"MaturityDate",maturityDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算租赁期限
|
||||||
|
function lsaseTerm(){
|
||||||
|
var INCOME_NUMBER_YEAR = getItemValue(0,getRow(),"INCOME_NUMBER_YEAR").replace("income_","");//还款间隔
|
||||||
|
var INCOME_NUMBER = getItemValue(0,getRow(),"INCOME_NUMBER");//还款次数
|
||||||
|
var grace = getItemValue(0,getRow(),"GRACE");
|
||||||
|
setItemValue(0,getRow(),"LEASE_TERM",INCOME_NUMBER_YEAR* (Number(INCOME_NUMBER) + Number(grace)));
|
||||||
|
}
|
||||||
|
//根据金额算比例
|
||||||
|
function getRatioByMoney(){
|
||||||
|
var equipMoney = getItemValue(0,getRow(),"EQUIP_AMT");//设备款
|
||||||
|
var FirstPayment = getItemValue(0,getRow(),"FIRST_PAYMENT");//首付款
|
||||||
|
var cautionMoney = getItemValue(0,getRow(),"CAUTION_MONEY");//保证金
|
||||||
|
var handleMoney = getItemValue(0,getRow(),"HANDLING_CHARGE_MONEY");//手续费
|
||||||
|
var manageMoney = getItemValue(0,getRow(),"MANAGEMENT_MONEY");//管理费
|
||||||
|
setItemValue(0,getRow(),"FIRST_PAYMENT_RATIO",Number(FirstPayment/equipMoney*100).toFixed(6));
|
||||||
|
setItemValue(0,getRow(),"CAUTION_DEDUCTION_RATIO",Number(cautionMoney/equipMoney*100).toFixed(6));
|
||||||
|
setItemValue(0,getRow(),"HANDLING_CHARGE_MONEY_RATIO",Number(handleMoney/equipMoney*100).toFixed(6));
|
||||||
|
setItemValue(0,getRow(),"MANAGEMENT_MONEY_RATIO",Number(manageMoney/equipMoney*100).toFixed(6));
|
||||||
|
cleanLeaseMoney();
|
||||||
|
}
|
||||||
|
//保险计算方式事件
|
||||||
|
function insureMoneyTypeChange(){
|
||||||
|
var sResult = getItemValue(0,getRow(),"INSURE_MONEY_TYPE");
|
||||||
|
if("insure_type1"==sResult){
|
||||||
|
setItemValue(0,0,"INSURANCE_LESSEE","0");
|
||||||
|
setEnable('insurance_lessor');
|
||||||
|
setDisable('INSURANCE_LESSEE');
|
||||||
|
return;
|
||||||
|
}else if("insure_type3"==sResult){
|
||||||
|
setItemValue(0,0,"insurance_lessor","0");
|
||||||
|
setEnable('INSURANCE_LESSEE');
|
||||||
|
setDisable('insurance_lessor');
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"insurance_lessor","0");
|
||||||
|
setItemValue(0,0,"INSURANCE_LESSEE","0");
|
||||||
|
setDisable('INSURANCE_LESSEE');
|
||||||
|
setDisable('insurance_lessor');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保险费计算
|
||||||
|
function sumInsureMoneyTwo(){
|
||||||
|
var payment = getItemValue(0,getRow(),"insurance_lessor");
|
||||||
|
var income = getItemValue(0,getRow(),"INSURANCE_LESSEE");
|
||||||
|
setItemValue(0,0,"INSURE_MONEY",Number(payment)+Number(income));
|
||||||
|
if(!getItemValue(0,getRow(),"INSURE_MONEY")){
|
||||||
|
setItemValue(0,0,"INSURE_MONEY","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保证金事件
|
||||||
|
function cautionMoney(){
|
||||||
|
var cautionMoney = getItemValue(0,getRow(),"CAUTION_MONEY");//保证金
|
||||||
|
var equipMoney = getItemValue(0,getRow(),"EQUIP_AMT");//设备款
|
||||||
|
var cautionDeductionMoney = cautionMoney;//保证金抵扣
|
||||||
|
setItemValue(0,0,"CAUTION_DEDUCTION_MONEY",cautionDeductionMoney);
|
||||||
|
setItemValue(0,getRow(),"CAUTION_DEDUCTION_RATIO",Number(cautionMoney/equipMoney*100).toFixed(6));
|
||||||
|
var cautionMoneyRemain=Number(cautionMoney)-Number(cautionDeductionMoney);//保证金退还
|
||||||
|
if(cautionMoneyRemain<0){
|
||||||
|
setItemValue(0,0,"CAUTION_DEDUCTION_MONEY",cautionMoney);
|
||||||
|
alert("保证金退还金额填写过大!");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"CAUTION_MONEY_REMAIN",cautionMoneyRemain);
|
||||||
|
}
|
||||||
|
if(!getItemValue(0,getRow(),"CAUTION_MONEY_REMAIN")){
|
||||||
|
setItemValue(0,0,"CAUTION_MONEY_REMAIN","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保证金抵扣事件
|
||||||
|
function cautionDeductionMoney(){
|
||||||
|
var cautionMoney = getItemValue(0,getRow(),"CAUTION_MONEY");//保证金
|
||||||
|
var cautionDeductionMoney = getItemValue(0,getRow(),"CAUTION_DEDUCTION_MONEY");//保证金抵扣
|
||||||
|
var cautionMoneyRemain=Number(cautionMoney)-Number(cautionDeductionMoney);//保证金退还
|
||||||
|
if(cautionMoneyRemain<0){
|
||||||
|
setItemValue(0,0,"CAUTION_DEDUCTION_MONEY",cautionMoney);
|
||||||
|
setItemValue(0,0,"CAUTION_MONEY_REMAIN","0");
|
||||||
|
alert("保证金退还金额填写过大!");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"CAUTION_MONEY_REMAIN",cautionMoneyRemain);
|
||||||
|
}
|
||||||
|
if(!getItemValue(0,getRow(),"CAUTION_MONEY_REMAIN")){
|
||||||
|
setItemValue(0,0,"CAUTION_MONEY_REMAIN","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//计算融资额
|
||||||
|
function cleanLeaseMoney(){
|
||||||
|
var equipMoney = getItemValue(0,getRow(),"EQUIP_AMT");//设备款
|
||||||
|
var FirstPayment = getItemValue(0,getRow(),"FIRST_PAYMENT");//首付款
|
||||||
|
setItemValue(0,0,"CLEAN_LEASE_MONEY",Number(equipMoney)-Number(FirstPayment));
|
||||||
|
}
|
||||||
|
function getValues(){
|
||||||
|
var values = {};
|
||||||
|
for(var i=0;i<DisplayFields[0].length;i++){
|
||||||
|
values[DisplayFields[0][i]] = getItemValue(0,getRow(),DisplayFields[0][i]);
|
||||||
|
}
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}
|
||||||
|
//利率计算方式 联动 控制基准利率 利率调整值 年利率
|
||||||
|
function RATTermID(){
|
||||||
|
var rateway = getItemValue(0,getRow(),"RATE_FLOAT_TYPE");//利率计算方式
|
||||||
|
if(rateway=="fixed"){
|
||||||
|
setItemValue(0,0,"BASE_RATE","0");
|
||||||
|
setItemValue(0,0,"RATE_FLOAT_AMT","0");
|
||||||
|
setDisable('BASE_RATE');
|
||||||
|
setDisable('RATE_FLOAT_AMT');
|
||||||
|
setEnable('RENT_OR_RATE_VALUE');
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"YEAR_RATE","0");
|
||||||
|
setItemValue(0,0,"RENT_OR_RATE_VALUE","0");
|
||||||
|
setDisable('RENT_OR_RATE_VALUE');
|
||||||
|
setEnable('BASE_RATE');
|
||||||
|
setEnable('RATE_FLOAT_AMT');
|
||||||
|
}
|
||||||
|
baserate();
|
||||||
|
}
|
||||||
|
|
||||||
|
function rentOrRateValueChange(){
|
||||||
|
//按租金计算年利率的年利率置为0
|
||||||
|
var rentOrRent = getItemValue(0,getRow(),"RENT_OR_RATE");
|
||||||
|
var rentOrRentValue = getItemValue(0,getRow(),"RENT_OR_RATE_VALUE");
|
||||||
|
var rateFloatType = getItemValue(0,getRow(),"RATE_FLOAT_TYPE");
|
||||||
|
if(rentOrRent == 'rent' || rentOrRent == 'knowing_rent' || rateFloatType == 'fixed'){
|
||||||
|
setItemValue(0,0,"YEAR_RATE",rentOrRentValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* function rentOrRateValueChange(){
|
||||||
|
//按租金计算年利率的年利率置为0
|
||||||
|
var rentOrRent = getItemValue(0,getRow(),"RENT_OR_RATE");
|
||||||
|
var rentOrRentValue = getItemValue(0,getRow(),"RENT_OR_RATE_VALUE");
|
||||||
|
if(rentOrRent == 'rate' || rentOrRent == 'knowing_corpus'){
|
||||||
|
setItemValue(0,0,"YEAR_RATE",rentOrRentValue);
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
|
function baserate(){
|
||||||
|
var rateway = getItemValue(0,getRow(),"RATE_FLOAT_TYPE");//利率计算方式
|
||||||
|
var baserate = getItemValue(0,getRow(),"BASE_RATE");//利率计算方式
|
||||||
|
var ratefloatamt = getItemValue(0,getRow(),"RATE_FLOAT_AMT");//利率计算方式
|
||||||
|
var rate="";
|
||||||
|
if(rateway=="add"){
|
||||||
|
rate=Number(baserate)+Number(ratefloatamt);
|
||||||
|
}else if(rateway=="proportion"){
|
||||||
|
rate=Number(baserate)*(1+Number(ratefloatamt));
|
||||||
|
}
|
||||||
|
if(rateway != 'fixed'){
|
||||||
|
setItemValue(0,0,"YEAR_RATE",rate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function periodChange(flag){
|
||||||
|
periodChangeGrace();
|
||||||
|
if(count > 0){
|
||||||
|
changeDate(getItemValue(0,getRow(),"LEASE_AMT_DATE"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function leaseamtDateChange(){
|
||||||
|
var leaseAmtDate = getItemValue(0,getRow(),"LEASE_AMT_DATE");//投放日
|
||||||
|
var startDate = getItemValue(0,getRow(),"START_DATE");//投放日
|
||||||
|
var firstPlanDate = getItemValue(0,getRow(),"FIRST_PLAN_DATE");//第二期租金支付日
|
||||||
|
var secondPlanDate = getItemValue(0,getRow(),"SECOND_PLAN_DATE");//第二期租金支付日
|
||||||
|
if(!startDate && !firstPlanDate && !secondPlanDate){
|
||||||
|
changeDate(leaseAmtDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeDate(leaseAmtDate){
|
||||||
|
var incomenumberyear = Number(getItemValue(0,getRow(),"INCOME_NUMBER_YEAR").replace("income_",""));
|
||||||
|
var periodType = getItemValue(0,getRow(),"PERIOD_TYPE");
|
||||||
|
setItemValue(0,0,"START_DATE",leaseAmtDate);
|
||||||
|
if("period_type_1" == periodType){
|
||||||
|
setItemValue(0,0,"FIRST_PLAN_DATE",leaseAmtDate);
|
||||||
|
setItemValue(0,0,"SECOND_PLAN_DATE",dateAdd('m',incomenumberyear,new Date(leaseAmtDate)).format('yyyy\/MM\/dd'));
|
||||||
|
}else{
|
||||||
|
changedate = dateAdd('m',incomenumberyear,new Date(leaseAmtDate));
|
||||||
|
setItemValue(0,0,"FIRST_PLAN_DATE",changedate.format('yyyy\/MM\/dd'));
|
||||||
|
setItemValue(0,0,"SECOND_PLAN_DATE",dateAdd('m',incomenumberyear,new Date(changedate)).format('yyyy\/MM\/dd'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function periodChangeGrace(){
|
||||||
|
var periodType = getItemValue(0,getRow(),"PERIOD_TYPE");
|
||||||
|
if(periodType == 'period_type_1'){
|
||||||
|
setDisable("GRACE");
|
||||||
|
setItemValue(0,0,"GRACE","0");
|
||||||
|
lsaseTerm();
|
||||||
|
}else{
|
||||||
|
setEnable("GRACE");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function dateAdd(strInterval, num, date){
|
||||||
|
date = arguments[2] || new Date();
|
||||||
|
switch (strInterval) {
|
||||||
|
case 's' :return new Date(date.getTime() + (1000 * num));
|
||||||
|
case 'n' :return new Date(date.getTime() + (60000 * num));
|
||||||
|
case 'h' :return new Date(date.getTime() + (3600000 * num));
|
||||||
|
case 'd' :return new Date(date.getTime() + (86400000 * num));
|
||||||
|
case 'w' :return new Date(date.getTime() + ((86400000 * 7) * num));
|
||||||
|
case 'm' :return new Date(date.getFullYear(), (date.getMonth()) + num, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());
|
||||||
|
case 'y' :return new Date((date.getFullYear() + num), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$(function(){
|
||||||
|
insureMoneyTypeChange();
|
||||||
|
RATTermID();
|
||||||
|
periodChangeGrace();
|
||||||
|
setItemValue(0,0,"flow_unid",<%=docId%>);
|
||||||
|
rentOrRateChange();
|
||||||
|
periodChange();
|
||||||
|
count++;
|
||||||
|
});
|
||||||
|
document.all("A_Group_calc_config").style.display="none";
|
||||||
|
function setEnable(id){
|
||||||
|
setItemDisabled(0,getRow(),id,false);
|
||||||
|
getObj(0,id).style.backgroundColor="";
|
||||||
|
}
|
||||||
|
function setDisable(id){
|
||||||
|
setItemDisabled(0,getRow(),id,true);
|
||||||
|
getObj(0,id).style.backgroundColor="#EBEBE4";
|
||||||
|
}
|
||||||
|
function changeSettleMethod(){
|
||||||
|
var method=getItemValue(0,getRow(),"SETTLE_METHOD");
|
||||||
|
var button = document.getElementById("InfoButtonArea").getElementsByTagName('a')[0];
|
||||||
|
if(method == 'irregular_rent'){
|
||||||
|
button.title = '保存';
|
||||||
|
button.childNodes[2].childNodes[1].innerText = '保存';
|
||||||
|
}else{
|
||||||
|
button.title = '租金测算';
|
||||||
|
button.childNodes[2].childNodes[1].innerText = '租金测算';
|
||||||
|
}
|
||||||
|
var param="CompClientID=<%=compClientID%>&docId=<%=docId%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>&method="+method;
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/condition_plan.jsp",param, "frame_list");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
11
WebContent/Accounting/LoanSimulation/LoanBasicInfo_Mic.jsp
Normal file
11
WebContent/Accounting/LoanSimulation/LoanBasicInfo_Mic.jsp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||||
|
include file="/IncludeBegin.jsp"%><%
|
||||||
|
/*
|
||||||
|
页面说明: 贷款咨询功能页面
|
||||||
|
*/
|
||||||
|
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
mytoptd.height=150;
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanElementInfo.jsp","","rightup","");
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
233
WebContent/Accounting/LoanSimulation/LoanBasicInfo_new.jsp
Normal file
233
WebContent/Accounting/LoanSimulation/LoanBasicInfo_new.jsp
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
<%@page import="com.amarsoft.app.accounting.config.impl.CashFlowConfig"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.config.impl.BusinessComponentConfig"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.util.DateHelper"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObjectHelper"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObject"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||||
|
|
||||||
|
String sTempletNo = "LoanSimulationBasicInfo";//--模板号--
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||||
|
dwTemp.Style = "2";//freeform
|
||||||
|
//dwTemp.ReadOnly = "-2";//只读模式
|
||||||
|
dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo"));
|
||||||
|
|
||||||
|
//字段显示子页面
|
||||||
|
for (int i = 0; i < dwTemp.getDataObject().Columns.size(); ++i){
|
||||||
|
ASColumn column = (ASColumn) dwTemp.getDataObject().Columns.get(i);
|
||||||
|
String htmlStyle = column.getAttribute("ColHTMLStyle");
|
||||||
|
if(!StringX.isEmpty(htmlStyle) && htmlStyle.indexOf("iframe") > -1)
|
||||||
|
{
|
||||||
|
String name = column.getAttribute("ColName");
|
||||||
|
dwTemp.replaceColumn(name, htmlStyle, CurPage.getObjectWindowOutput());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String businessDate = DateHelper.getBusinessDate();
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","All","Button","重置","重置","reloadSelf()","","","",""},
|
||||||
|
{"true","All","Button","贷款咨询","贷款咨询","run()","","","",""},
|
||||||
|
};
|
||||||
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function run()
|
||||||
|
{
|
||||||
|
var rpt=RPTFrame.getValues();
|
||||||
|
if(!rpt) return;
|
||||||
|
var rat=RATFrame.getValues();
|
||||||
|
if(!rat) return;
|
||||||
|
var loan = getValues();
|
||||||
|
if(!loan) return;
|
||||||
|
RPTFrame.CHANGED=false;
|
||||||
|
RATFrame.CHANGED=false;
|
||||||
|
CHANGED=false;
|
||||||
|
document.all("A_Group_PSPart").style.display="";
|
||||||
|
|
||||||
|
var form = document.createElement("form");
|
||||||
|
form.id="runform";
|
||||||
|
form.method="post";
|
||||||
|
form.action="<%=sWebRootPath%>/Accounting/LoanSimulation/PaymentScheduleList.jsp";
|
||||||
|
form.target="PSFrame";
|
||||||
|
var hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "loan"
|
||||||
|
hideInput.value= loan;
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "rpt"
|
||||||
|
hideInput.value= rpt;
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "rat"
|
||||||
|
hideInput.value= rat;
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "CompClientID"
|
||||||
|
hideInput.value= "<%=sCompClientID%>";
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
document.body.appendChild(form);
|
||||||
|
form.submit();
|
||||||
|
document.body.removeChild(form);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=打开还款方式信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function openRPT(iframe,param){
|
||||||
|
var putoutDate = getItemValue(0,getRow(),"PutOutDate");
|
||||||
|
if(!putoutDate){
|
||||||
|
AsControl.OpenView("/Blank.jsp","TextToShow=请先输入发放日期",iframe,"");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var maturityDate = getItemValue(0,getRow(),"MaturityDate");
|
||||||
|
if(!maturityDate){
|
||||||
|
AsControl.OpenView("/Blank.jsp","TextToShow=请先输入到期日期",iframe,"");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
document.all("A_Group_RPTPart").style.display="";
|
||||||
|
var obj = document.getElementById(iframe);
|
||||||
|
if(typeof(obj) == "undefined" || obj == null) return;
|
||||||
|
obj.CHANGED=false;
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRPTInfo.jsp","ObjectType=&ObjectNo=&"+param,iframe,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=打开利率信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function openRAT(iframe,param){
|
||||||
|
var currency = getItemValue(0,getRow(),"Currency");
|
||||||
|
if(!currency){
|
||||||
|
AsControl.OpenView("/Blank.jsp","TextToShow=请先输入币种",iframe,"");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var putoutDate = getItemValue(0,getRow(),"PutOutDate");
|
||||||
|
if(!putoutDate){
|
||||||
|
AsControl.OpenView("/Blank.jsp","TextToShow=请先输入发放日期",iframe,"");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var maturityDate = getItemValue(0,getRow(),"MaturityDate");
|
||||||
|
if(!maturityDate){
|
||||||
|
AsControl.OpenView("/Blank.jsp","TextToShow=请先输入到期日期",iframe,"");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
document.all("A_Group_RatePart").style.display="";
|
||||||
|
var obj = document.getElementById(iframe);
|
||||||
|
if(typeof(obj) == "undefined" || obj == null) return;
|
||||||
|
obj.CHANGED=false;
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRATInfo.jsp","ObjectType=&ObjectNo=&"+param,iframe,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据起始日期和贷款月数得到贷款结束日期
|
||||||
|
function getMaturityDate(){
|
||||||
|
var putoutDate = getItemValue(0,getRow(),"PutoutDate");
|
||||||
|
var term = getItemValue(0,getRow(),"LoanTerm");
|
||||||
|
if(typeof(putoutDate) == "undefined" ||putoutDate==null||putoutDate=="") return;
|
||||||
|
if(typeof(term) == "undefined" ||term==null||term=="") return;
|
||||||
|
var maturityDate = AsControl.RunJavaMethod("com.amarsoft.acct.accounting.web.DateCal","getRelativeDate","date="+putoutDate+",termUnit=M"+",term="+term);
|
||||||
|
setItemValue(0,getRow(),"MaturityDate",maturityDate);
|
||||||
|
openRPT("RPTFrame","Status=0,1");
|
||||||
|
openRAT("RATFrame","Status=0,1");
|
||||||
|
}
|
||||||
|
//根据金额算比例
|
||||||
|
function getRatioByMoney(){
|
||||||
|
var equipMoney = getItemValue(0,getRow(),"v.EquipMoney");//设备款
|
||||||
|
var FirstPayment = getItemValue(0,getRow(),"v.FirstPayment");//首付款
|
||||||
|
var cautionMoney = getItemValue(0,getRow(),"v.cautionMoney");//保证金
|
||||||
|
var handleMoney = getItemValue(0,getRow(),"v.handleMoney");//手续费
|
||||||
|
var manageMoney = getItemValue(0,getRow(),"v.manageMoney");//管理费
|
||||||
|
setItemValue(0,getRow(),"v.FirstPaymentRadio",Number(FirstPayment/equipMoney*100).toFixed(6));
|
||||||
|
setItemValue(0,getRow(),"v.cautionMoneyRadio",Number(cautionMoney/equipMoney*100).toFixed(6));
|
||||||
|
setItemValue(0,getRow(),"v.handleMoneyRadio",Number(handleMoney/equipMoney*100).toFixed(6));
|
||||||
|
setItemValue(0,getRow(),"v.manageMoneyRadio",Number(manageMoney/equipMoney*100).toFixed(6));
|
||||||
|
}
|
||||||
|
//保险计算方式事件
|
||||||
|
function insureMoneyTypeChange(){
|
||||||
|
var sResult = getItemValue(0,getRow(),"v.insureMoneyType");
|
||||||
|
if("insure_type1"==sResult){
|
||||||
|
setItemValue(0,0,"v.insuranceLessee","0");
|
||||||
|
setItemDisabled(0,getRow(),"v.insuranceLessor",false);
|
||||||
|
setItemDisabled(0,getRow(),"v.insuranceLessee",true);
|
||||||
|
return;
|
||||||
|
}else if("insure_type3"==sResult){
|
||||||
|
setItemValue(0,0,"v.insuranceLessor","0");
|
||||||
|
setItemDisabled(0,getRow(),"v.insuranceLessor",true);
|
||||||
|
setItemDisabled(0,getRow(),"v.insuranceLessee",false);
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"v.insuranceLessor","0");
|
||||||
|
setItemValue(0,0,"v.insuranceLessee","0");
|
||||||
|
setItemDisabled(0,getRow(),"v.insuranceLessor",true);
|
||||||
|
setItemDisabled(0,getRow(),"v.insuranceLessee",true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保险费计算
|
||||||
|
function sumInsureMoneyTwo(){
|
||||||
|
var payment = getItemValue(0,getRow(),"v.insuranceLessor");
|
||||||
|
var income = getItemValue(0,getRow(),"v.insuranceLessee");
|
||||||
|
setItemValue(0,0,"v.insureMoney",Number(payment)+Number(income));
|
||||||
|
if(!getItemValue(0,getRow(),"v.insureMoney")){
|
||||||
|
setItemValue(0,0,"v.insureMoney","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保证金事件
|
||||||
|
function cautionMoney(){
|
||||||
|
var cautionMoney = getItemValue(0,getRow(),"v.cautionMoney");//保证金
|
||||||
|
var cautionDeductionMoney = cautionMoney;//保证金抵扣
|
||||||
|
setItemValue(0,0,"v.cautionDeductionMoney",cautionDeductionMoney);
|
||||||
|
var cautionMoneyRemain=Number(cautionMoney)-Number(cautionDeductionMoney);//保证金退还
|
||||||
|
if(cautionMoneyRemain<0){
|
||||||
|
setItemValue(0,0,"v.cautionDeductionMoney",cautionMoney);
|
||||||
|
alert("保证金退还金额填写过大!");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"v.cautionMoneyRemain",cautionMoneyRemain);
|
||||||
|
}
|
||||||
|
if(!getItemValue(0,getRow(),"v.cautionMoneyRemain")){
|
||||||
|
setItemValue(0,0,"v.cautionMoneyRemain","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保证金抵扣事件
|
||||||
|
function cautionDeductionMoney(){
|
||||||
|
var cautionMoney = getItemValue(0,getRow(),"v.cautionMoney");//保证金
|
||||||
|
var cautionDeductionMoney = getItemValue(0,getRow(),"v.cautionDeductionMoney");//保证金抵扣
|
||||||
|
var cautionMoneyRemain=Number(cautionMoney)-Number(cautionDeductionMoney);//保证金退还
|
||||||
|
if(cautionMoneyRemain<0){
|
||||||
|
setItemValue(0,0,"v.cautionDeductionMoney",cautionMoney);
|
||||||
|
alert("保证金退还金额填写过大!");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
setItemValue(0,0,"v.cautionMoneyRemain",cautionMoneyRemain);
|
||||||
|
}
|
||||||
|
if(!getItemValue(0,getRow(),"v.cautionMoneyRemain")){
|
||||||
|
setItemValue(0,0,"v.cautionMoneyRemain","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//计算融资额
|
||||||
|
function cleanLeaseMoney(){
|
||||||
|
var equipMoney = getItemValue(0,getRow(),"v.EquipMoney");//设备款
|
||||||
|
var FirstPayment = getItemValue(0,getRow(),"v.FirstPayment");//首付款
|
||||||
|
setItemValue(0,0,"v.BusinessSum",Number(equipMoney)-Number(FirstPayment));
|
||||||
|
}
|
||||||
|
function getValues(){
|
||||||
|
var values = {};
|
||||||
|
for(var i=0;i<DisplayFields[0].length;i++){
|
||||||
|
values[DisplayFields[0][i]] = getItemValue(0,getRow(),DisplayFields[0][i]);
|
||||||
|
}
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.all("A_Group_RPTPart").style.display="none";
|
||||||
|
document.all("A_Group_RatePart").style.display="none";
|
||||||
|
document.all("A_Group_PSPart").style.display="none";
|
||||||
|
$(function(){
|
||||||
|
insureMoneyTypeChange();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
94
WebContent/Accounting/LoanSimulation/LoanElementInfo.jsp
Normal file
94
WebContent/Accounting/LoanSimulation/LoanElementInfo.jsp
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Main00;Describe=注释区;]~*/%>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: ttyu 2013.8.26
|
||||||
|
Tester:
|
||||||
|
Content: 贷款概要信息
|
||||||
|
Input Param:
|
||||||
|
productID: 产品编号
|
||||||
|
productVersion:产品版本
|
||||||
|
Output param:
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "贷款咨询";
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
|
||||||
|
<%
|
||||||
|
String displayTemplet = "LoanElementInfo";
|
||||||
|
ASDataObject doTemp = new ASDataObject(displayTemplet,Sqlca);
|
||||||
|
//生成DataWindow对象
|
||||||
|
ASDataWindow dwTemp = new ASDataWindow(CurPage,doTemp,Sqlca);
|
||||||
|
//设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.Style="2";
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
Vector vTemp = dwTemp.genHTMLDataWindow("");
|
||||||
|
for(int i=0;i<vTemp.size();i++) out.print((String)vTemp.get(i));
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
|
||||||
|
<%
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","All","Button","生成还款计划","生成还款计划","makePlan()","","","",""},
|
||||||
|
{"true","All","Button","保存还款计划","保存还款计划","as_save(0)","","","",""},
|
||||||
|
{"true","All","Button","导出Execl","导出Execl","as_save(0)","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
|
||||||
|
<%@include file="/Resources/CodeParts/Info05.jsp"%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info07;Describe=自定义函数;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
function makePlan(){
|
||||||
|
var sBusinessSum = getItemValue(0,getRow(),"BusinessSum");
|
||||||
|
var sRateYear = getItemValue(0,getRow(),"RateYear");
|
||||||
|
var sRepayFrequency = getItemValue(0,getRow(),"RepayFrequency");
|
||||||
|
var sPutOutDate = getItemValue(0,getRow(),"PutOutDate");
|
||||||
|
var sTermMonth = getItemValue(0,getRow(),"TermMonth");
|
||||||
|
var sFirstRepaymentDate = getItemValue(0,getRow(),"FirstRepaymentDate");
|
||||||
|
|
||||||
|
var sParam = "BusinessSum="+sBusinessSum+"&RateYear="+sRateYear+"&RepayFrequency="+sRepayFrequency+"&PutOutDate="+sPutOutDate+"&TermMonth="+sTermMonth+"&FirstRepaymentDate="+sFirstRepaymentDate;
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanPlanInfo.jsp",sParam,"rightdown","");
|
||||||
|
}
|
||||||
|
/*~[Describe=页面装载时,对DW进行初始化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0){ //如果没有找到对应记录,则新增一条,并设置字段默认值
|
||||||
|
as_add("myiframe0");//新增记录
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
AsOne.AsInit();
|
||||||
|
init();
|
||||||
|
bFreeFormMultiCol=true;
|
||||||
|
bCheckBeforeUnload=false;
|
||||||
|
my_load(2,0,'myiframe0');
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
63
WebContent/Accounting/LoanSimulation/LoanPlanInfo.jsp
Normal file
63
WebContent/Accounting/LoanSimulation/LoanPlanInfo.jsp
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||||
|
include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<p style=margin-left:10px;margin-top:5px;font-size:16px;color:#4169e1; >还款计划明细</p>
|
||||||
|
<%
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("PaymentScheduleTemp");
|
||||||
|
doTemp.setReadOnly("SEQID",true);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置为Grid风格
|
||||||
|
dwTemp.ReadOnly = "0";//编辑模式
|
||||||
|
dwTemp.genHTMLObjectWindow("");
|
||||||
|
|
||||||
|
String sButtons[][] = {};
|
||||||
|
%>
|
||||||
|
<table style="margin-left:10px;">
|
||||||
|
<tr>
|
||||||
|
<td >合计:</td>
|
||||||
|
<td >本金总额:</td><td><input type="text" size="10" value="" style="text-align:right;"/></td>
|
||||||
|
<td >利息总额:</td><td><input type="text" size="10" value="" style="text-align:right;"/></td>
|
||||||
|
<td >还款总额:</td><td><input type="text" size="10" value="" style="text-align:right;"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<%@include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%-- <%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%> --%>
|
||||||
|
|
||||||
|
<%-- <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
|
||||||
|
<%
|
||||||
|
String sBusinessSum = DataConvert.toString(DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("BusinessSum")));
|
||||||
|
String sRateYear = DataConvert.toString(DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("RateYear")));
|
||||||
|
String sRepayFrequency = DataConvert.toString(DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("RepayFrequency")));
|
||||||
|
String sPutOutDate = DataConvert.toString(DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("PutOutDate")));
|
||||||
|
String sTermMonth = DataConvert.toString(DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("TermMonth")));
|
||||||
|
String sFirstRepaymentDate = DataConvert.toString(DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("FirstRepaymentDate")));
|
||||||
|
if (sBusinessSum == null) sBusinessSum = "";
|
||||||
|
if (sRateYear == null) sRateYear = "";
|
||||||
|
if (sRepayFrequency == null) sRepayFrequency = "";
|
||||||
|
if (sPutOutDate == null) sPutOutDate = "";
|
||||||
|
if (sTermMonth == null) sTermMonth = "";
|
||||||
|
if (sFirstRepaymentDate == null) sFirstRepaymentDate = "";
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
<%
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("TestCustomerList");
|
||||||
|
doTemp.setReadOnly("SERIALNO",true);
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //设置为Grid风格
|
||||||
|
dwTemp.ReadOnly = "0";//编辑模式
|
||||||
|
dwTemp.genHTMLObjectWindow("");
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增","as_add(0)","","","",""},
|
||||||
|
{"true","","Button","保存","保存","as_save(0)","","","",""},
|
||||||
|
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","",""}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<%@
|
||||||
|
include file="/Frame/resources/include/include_end.jspf"%> --%>
|
||||||
20
WebContent/Accounting/LoanSimulation/LoanSimulationMain.jsp
Normal file
20
WebContent/Accounting/LoanSimulation/LoanSimulationMain.jsp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||||
|
include file="/IncludeBegin.jsp"%><%
|
||||||
|
/*
|
||||||
|
Author: #{author} #{createddate}
|
||||||
|
Content: 隐藏左侧区域的Main页面
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String PG_TITLE = "贷款咨询"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
String PG_CONTENT_TITLE = " 贷款咨询 "; //默认的内容区标题
|
||||||
|
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
|
||||||
|
String PG_LEFT_WIDTH = "1";//默认的treeview宽度
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
//String sInputUser = CurPage.getParameter("InputUser");
|
||||||
|
//if(sInputUser==null) sInputUser="";
|
||||||
|
%><%@include file="/Resources/CodeParts/Main04.jsp"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanBasicInfo.jsp","","right","");
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Main00;Describe=注释区;]~*/%>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author:魏治毅
|
||||||
|
Tester:
|
||||||
|
Content:贷款咨询管理主页面
|
||||||
|
Input Param:
|
||||||
|
|
||||||
|
Output param:
|
||||||
|
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Main01;Describe=定义页面属性;]~*/%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "贷款咨询"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
String PG_CONTENT_TITLE = " 贷款咨询 "; //默认的内容区标题
|
||||||
|
String PG_CONTNET_TEXT = "请选择菜单功能";//默认的内容区文字
|
||||||
|
String PG_LEFT_WIDTH = "1";//默认的treeview宽度
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Main02;Describe=定义变量,获取参数;]~*/%>
|
||||||
|
<%
|
||||||
|
//定义变量
|
||||||
|
|
||||||
|
//获得组件参数
|
||||||
|
|
||||||
|
//获得页面参数
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Main03;Describe=定义树图;]~*/%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//参数从左至右依次为: ID字段,Name字段,Value字段,Script字段,Picture字段,From子句,OrderBy子句,Sqlca
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~不可编辑区[Editable=false;CodeAreaID=Main04;Describe=主体页面;]~*/%>
|
||||||
|
<%@include file="/Resources/CodeParts/Main04.jsp"%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区[Editable=true;CodeAreaID=Main05;Describe=树图事件;]~*/%>
|
||||||
|
<script language=javascript>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区[Editable=true;CodeAreaID=Main06;Describe=在页面装载时执行,初始化;]~*/%>
|
||||||
|
<script language="javascript">
|
||||||
|
myleft.width=1;
|
||||||
|
OpenComp("ACCT_LoanSimulationTab","/Accounting/LoanSimulation/LoanSimulationTab_Mic.jsp","","right");
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
@ -0,0 +1,171 @@
|
|||||||
|
<%@page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "功能组件信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RATSegmentInfo");
|
||||||
|
|
||||||
|
//利率选择项
|
||||||
|
List<BusinessObject> ratList = BusinessComponentConfig.getComponents("Type='PRD0302'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ratList, "ID");
|
||||||
|
String ratCodeTable="";
|
||||||
|
for(BusinessObject rat:ratList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ratCodeTable)) ratCodeTable+= rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
else ratCodeTable+= ","+rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", ratCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
//利率调整方式选择
|
||||||
|
String[] ptKeys = CashFlowConfig.getRepriceTypeConfigKeys();
|
||||||
|
String ptCodeTable="";
|
||||||
|
List<BusinessObject> ptList = new ArrayList<BusinessObject>();
|
||||||
|
for(String key:ptKeys)
|
||||||
|
{
|
||||||
|
ptList.add(CashFlowConfig.getRepriceTypeConfig(key));
|
||||||
|
}
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ptList, "ID");
|
||||||
|
for(BusinessObject pt:ptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ptCodeTable)) ptCodeTable+= pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
else ptCodeTable+= ","+pt.getString("ID")+","+pt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("RepriceType", ptCodeTable);
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
BusinessObject ratComponent = BusinessObjectHelper.getBusinessObjectBySql(ratList, "ID='"+termID+"'");
|
||||||
|
List<BusinessObject> parameters = ratComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(parameter.getString("DISPLAYNAME")))
|
||||||
|
{
|
||||||
|
doTemp.setHeader(parameter.getString("PARAMETERID"), parameter.getString("DISPLAYNAME"));
|
||||||
|
}
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable(parameter.getString("PARAMETERID"), codeTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("Value");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="<%=sWebRootPath%>/Accounting/js/loan/term/rateterm.js"></script>
|
||||||
|
<script language=javascript>
|
||||||
|
var currency = parent.getItemValue(0,0,"Currency");
|
||||||
|
var putoutDate = parent.getItemValue(0,0,"PutOutDate");
|
||||||
|
var maturityDate = parent.getItemValue(0,0,"MaturityDate");
|
||||||
|
var businessDate = "<%=DateHelper.getBusinessDate()%>";
|
||||||
|
var yearDays = parent.getItemValue(0,0,"YearDays");
|
||||||
|
|
||||||
|
function saveRecord(){
|
||||||
|
if(!iV_all("myiframe0")) return false;
|
||||||
|
as_save("myiframe0");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTerm(){
|
||||||
|
CHANGED=false;
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID) == "undefined" || termID.length == 0 || "<%=termID%>" == termID) return;
|
||||||
|
|
||||||
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
||||||
|
if("1"==view)
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRATInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
else
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRATList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
}
|
||||||
|
if("ReadOnly" != "<%=CurPage.getParameter("RightType")%>")
|
||||||
|
{
|
||||||
|
setBaseRateGrade();
|
||||||
|
setRepriceInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
var values = {};
|
||||||
|
values[0]={};
|
||||||
|
for(var i=0;i<DisplayFields[0].length;i++){
|
||||||
|
values[0][DisplayFields[0][i]] = getItemValue(0,getRow(),DisplayFields[0][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(iV_all(0)){
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,269 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "列表信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RATSegmentList");
|
||||||
|
//利率选择项
|
||||||
|
List<BusinessObject> ratList = BusinessComponentConfig.getComponents("Type='PRD0302'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(ratList, "ID");
|
||||||
|
String ratCodeTable="";
|
||||||
|
for(BusinessObject rat:ratList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(ratCodeTable)) ratCodeTable+= rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
else ratCodeTable+= ","+rat.getString("ID")+","+rat.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", ratCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
BusinessObject map = BusinessObject.createBusinessObject();
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
String segRPTCodeTable="";
|
||||||
|
BusinessObject rptComponent = BusinessComponentConfig.getComponent(termID);
|
||||||
|
List<BusinessObject> childrenComponents = rptComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_COMPONENT_CHILDRENCOMPONENT);
|
||||||
|
for(BusinessObject childrenComponent:childrenComponents)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(segRPTCodeTable)) segRPTCodeTable+= childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
else segRPTCodeTable+= ","+childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
|
||||||
|
sb.append(" if(!olddata[getRow()]) olddata[getRow()]={}; \r\n");
|
||||||
|
sb.append(" var segTermID = getItemValue(0,getRow(),'SegTermID'); \r\n");
|
||||||
|
sb.append(" if(segTermID == '"+childrenComponent.getString("ID")+"'){ \r\n");
|
||||||
|
|
||||||
|
List<BusinessObject> parameters = childrenComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=false; \r\n");
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=true; \r\n");
|
||||||
|
sb.append(" setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"',''); \r\n");
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String str = map.getString(parameter.getString("PARAMETERID"));
|
||||||
|
if(StringX.isEmpty(str)) str = "";
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(str.indexOf(values[i]+",") > -1) continue;//如果代码已经存在直接跳过
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" var value = getItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"'); \r\n");
|
||||||
|
sb.append(" if('"+valueList+"'.indexOf(value) == -1){alert('录入值不符合要求,请重新录入。');setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"',''); };");
|
||||||
|
|
||||||
|
if(StringX.isEmpty(str))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),codeTable);
|
||||||
|
}
|
||||||
|
else if(!StringX.isEmpty(codeTable))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),str+","+codeTable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("Value");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
sb.append(" setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"','"+defaultValue+"'); \r\n");
|
||||||
|
sb.append(" olddata[getRow()]['"+parameter.getString("PARAMETERID").toUpperCase()+"'] = '"+defaultValue+"';\r\n");
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" } \r\n");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("SegTermID", segRPTCodeTable);
|
||||||
|
|
||||||
|
|
||||||
|
for(String key:map.getAttributeIDArray())
|
||||||
|
{
|
||||||
|
doTemp.setDDDWCodeTable(key, map.getString(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "新增", "新增一条信息","newRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "删除", "删除一条信息","deleteRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "返回", "返回","back()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<script type="text/javascript" src="<%=sWebRootPath%>/Accounting/js/loan/term/rateterm.js"></script>
|
||||||
|
<script language=javascript>
|
||||||
|
var olddata={};
|
||||||
|
var currency = parent.getItemValue(0,0,"Currency");
|
||||||
|
var putoutDate = parent.getItemValue(0,0,"PutOutDate");
|
||||||
|
var maturityDate = parent.getItemValue(0,0,"MaturityDate");
|
||||||
|
var businessDate = "<%=DateHelper.getBusinessDate()%>";
|
||||||
|
var yearDays = parent.getItemValue(0,0,"YearDays");
|
||||||
|
|
||||||
|
/*~[Describe=新增;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
var position= getRowCount(0);
|
||||||
|
as_add("myiframe0");
|
||||||
|
if(position == 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',parent.getItemValue(0,0,"PutOutDate"));
|
||||||
|
else if(position > 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',getItemValue(0,position-1,"SegToDate"));
|
||||||
|
|
||||||
|
//setItemValue(0,position,'SegToDate',parent.getItemValue(0,0,"MaturityDate"));
|
||||||
|
document.all("INPUT_myiframe0_SegToDate_"+position+"_"+getColumnIndex("SegToDate")).onblur=changeSegDate;
|
||||||
|
document.all("INPUT_myiframe0_SegTermID_"+position+"_"+getColumnIndex("SegTermID")).onblur=changeRight;
|
||||||
|
document.all("INPUT_myiframe0_BaseRateType_"+position+"_"+getColumnIndex("BaseRateType")).onblur=setBaseRateGrade;
|
||||||
|
document.all("INPUT_myiframe0_RateFloat_"+position+"_"+getColumnIndex("RateFloat")).onblur=setBusinessRate;
|
||||||
|
document.all("INPUT_myiframe0_RateFloatType_"+position+"_"+getColumnIndex("RateFloatType")).onblur=setBusinessRate;
|
||||||
|
document.all("INPUT_myiframe0_RepriceType_"+position+"_"+getColumnIndex("RepriceType")).onblur=setRepriceList;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeSegDate(){
|
||||||
|
if(getRow()+1 < getRowCount(0))
|
||||||
|
setItemValue(0,getRow()+1,'SegFromDate',getItemValue(0,getRow(),"SegToDate"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))){ //您真的想删除该信息吗?
|
||||||
|
as_delete("myiframe0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getColumnIndex(sCol){
|
||||||
|
var cnt=0;
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
if(DZ[0][1][i][2]!=1) continue;
|
||||||
|
if(typeof(sCol)=="string"){
|
||||||
|
if(DZ[0][1][i][15].toUpperCase()==sCol.toUpperCase()) return cnt;
|
||||||
|
}else{
|
||||||
|
if(DZ[0][1][i][15]==sCol) return cnt;
|
||||||
|
}
|
||||||
|
cnt++
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function back(){
|
||||||
|
CHANGED=false;
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRATInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID=","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//根据组件定义生成的JS脚本规则,设置对应的值和显示规则
|
||||||
|
function changeRight()
|
||||||
|
{
|
||||||
|
<%=sb.toString()%>;
|
||||||
|
setBaseRateGrade();
|
||||||
|
setRepriceList();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
if(getRowCount(0) < 2){
|
||||||
|
alert("必须录入两条及以上数据。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var values = {};
|
||||||
|
for(var row = 0; row < getRowCount(0); row ++)
|
||||||
|
{
|
||||||
|
values[row] = {};
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
var v = getItemValue(0,row,DZ[0][1][i][15]);
|
||||||
|
if(typeof(v) == "undefined" && !olddata[row][DZ[0][1][i][15].toUpperCase()])
|
||||||
|
v = olddata[row][DZ[0][1][i][15].toUpperCase()];
|
||||||
|
values[row][DZ[0][1][i][15]] = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
values[row]["TermID"]="<%=termID%>";
|
||||||
|
|
||||||
|
//起始日期-到期日判断
|
||||||
|
var segFromDate = getItemValue(0,row,"SegFromDate");
|
||||||
|
var segToDate = getItemValue(0,row,"SegToDate");
|
||||||
|
var businessRate = getItemValue(0,row,"BusinessRate");
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate > segToDate){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能大于结束日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate < "<%=DateHelper.getBusinessDate()%>"){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能小于贷款发放日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segToDate > parent.getItemValue(0,0,"MaturityDate")){
|
||||||
|
alert("第"+(row+1)+"行结束日期不能大于贷款到期日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row == getRowCount(0)-1 && segToDate)
|
||||||
|
{
|
||||||
|
alert("第"+(row+1)+"行结束日期不用输入。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(businessRate <= 0 ){
|
||||||
|
alert("第"+(row+1)+"行利率为空或小于零。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,177 @@
|
|||||||
|
<%@page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "功能组件信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RPTSegmentInfo");
|
||||||
|
|
||||||
|
//还款方式选择项
|
||||||
|
List<BusinessObject> rptList = BusinessComponentConfig.getComponents("Type='PRD0301'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(rptList, "ID");
|
||||||
|
String rptCodeTable="";
|
||||||
|
for(BusinessObject rpt:rptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(rptCodeTable)) rptCodeTable+= rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
else rptCodeTable+= ","+rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", rptCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
//还款周期选择
|
||||||
|
String[] pftKeys = CashFlowConfig.getPayFrequencyTypeConfigKeys();
|
||||||
|
String pftCodeTable="";
|
||||||
|
List<BusinessObject> pftList = new ArrayList<BusinessObject>();
|
||||||
|
for(String key:pftKeys)
|
||||||
|
{
|
||||||
|
pftList.add(CashFlowConfig.getPayFrequencyTypeConfig(key));
|
||||||
|
}
|
||||||
|
BusinessObjectHelper.sortBusinessObject(pftList, "ID");
|
||||||
|
for(BusinessObject pft:pftList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(pftCodeTable)) pftCodeTable+= pft.getString("ID")+","+pft.getString("Name");
|
||||||
|
else pftCodeTable+= ","+pft.getString("ID")+","+pft.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("PayFrequencyType", pftCodeTable);
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
BusinessObject rptComponent = BusinessObjectHelper.getBusinessObjectBySql(rptList, "ID='"+termID+"'");
|
||||||
|
List<BusinessObject> parameters = rptComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
if(!StringX.isEmpty(parameter.getString("DISPLAYNAME")))
|
||||||
|
{
|
||||||
|
doTemp.setHeader(parameter.getString("PARAMETERID"), parameter.getString("DISPLAYNAME"));
|
||||||
|
}
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i].trim()+","+valueNames[i].trim();
|
||||||
|
else codeTable+=","+values[i].trim()+","+valueNames[i].trim();
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable(parameter.getString("PARAMETERID"), codeTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("VALUE");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
function saveRecord(){
|
||||||
|
if(!iV_all("myiframe0")) return false;
|
||||||
|
as_save("myiframe0");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTerm(){
|
||||||
|
CHANGED=false;
|
||||||
|
var termID = getItemValue(0,getRow(),"TermID");
|
||||||
|
if(typeof(termID) == "undefined" || termID.length == 0 || "<%=termID%>" == termID) return;
|
||||||
|
|
||||||
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
||||||
|
if("1"==view)
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRPTInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
else
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRPTList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function changePayFrequencyType(){
|
||||||
|
var payFrequencyType = getItemValue(0,getRow(),"PayFrequencyType");
|
||||||
|
if("6" == payFrequencyType) //指定还款周期
|
||||||
|
{
|
||||||
|
showItem(0,"PayFrequencyUnit");
|
||||||
|
showItem(0,"PayFrequency");
|
||||||
|
setItemRequired(0,"PayFrequencyUnit",true);
|
||||||
|
setItemRequired(0,"PayFrequency",true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hideItem(0,"PayFrequencyUnit");
|
||||||
|
hideItem(0,"PayFrequency");
|
||||||
|
setItemRequired(0,"PayFrequencyUnit",false);
|
||||||
|
setItemRequired(0,"PayFrequency",false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
var values = {};
|
||||||
|
values[0]={};
|
||||||
|
for(var i=0;i<DisplayFields[0].length;i++){
|
||||||
|
values[0][DisplayFields[0][i]] = getItemValue(0,getRow(),DisplayFields[0][i]);
|
||||||
|
}
|
||||||
|
if(iV_all(0)){
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
changePayFrequencyType();
|
||||||
|
parent.document.all("RPTFrame").style.height = 150;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,285 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "列表信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
//获取参数
|
||||||
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
||||||
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
||||||
|
String termID = CurPage.getParameter("TermID");//组件ID
|
||||||
|
String status = CurPage.getParameter("Status");//状态
|
||||||
|
if(status == null) status = "";
|
||||||
|
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("RPTSegmentList");
|
||||||
|
|
||||||
|
//还款方式选择项
|
||||||
|
List<BusinessObject> rptList = BusinessComponentConfig.getComponents("Type='PRD0301'");
|
||||||
|
BusinessObjectHelper.sortBusinessObject(rptList, "ID");
|
||||||
|
String rptCodeTable="";
|
||||||
|
for(BusinessObject rpt:rptList)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(rptCodeTable)) rptCodeTable+= rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
else rptCodeTable+= ","+rpt.getString("ID")+","+rpt.getString("Name");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("TermID", rptCodeTable);
|
||||||
|
doTemp.setDefaultValue("TermID", termID);
|
||||||
|
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
BusinessObject map = BusinessObject.createBusinessObject();
|
||||||
|
if(!StringX.isEmpty(termID))
|
||||||
|
{
|
||||||
|
String segRPTCodeTable="";
|
||||||
|
BusinessObject rptComponent = BusinessComponentConfig.getComponent(termID);
|
||||||
|
List<BusinessObject> childrenComponents = rptComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_COMPONENT_CHILDRENCOMPONENT);
|
||||||
|
for(BusinessObject childrenComponent:childrenComponents)
|
||||||
|
{
|
||||||
|
if(StringX.isEmpty(segRPTCodeTable)) segRPTCodeTable+= childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
else segRPTCodeTable+= ","+childrenComponent.getString("ID")+","+childrenComponent.getString("Name");
|
||||||
|
|
||||||
|
sb.append(" if(!olddata[getRow()]) olddata[getRow()]={}; \r\n");
|
||||||
|
sb.append(" var segTermID = getItemValue(0,getRow(),'SegTermID'); \r\n");
|
||||||
|
sb.append(" if(segTermID == '"+childrenComponent.getString("ID")+"'){ \r\n");
|
||||||
|
|
||||||
|
List<BusinessObject> parameters = childrenComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
||||||
|
for(BusinessObject parameter:parameters)
|
||||||
|
{
|
||||||
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
||||||
|
String apermission = parameter.getString("ARIGHTTYPE");
|
||||||
|
if("Required".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=false; \r\n");
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
||||||
|
sb.append(" document.all('INPUT_myiframe0_"+parameter.getString("PARAMETERID")+"_'+getRow()+'_'+getColumnIndex('"+parameter.getString("PARAMETERID")+"')).disabled=true; \r\n");
|
||||||
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
else if("Hide".equalsIgnoreCase(apermission)){
|
||||||
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
String valueList = parameter.getString("OPTIONALVALUE");
|
||||||
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
||||||
|
if(!StringX.isEmpty(valueList))
|
||||||
|
{
|
||||||
|
String str = map.getString(parameter.getString("PARAMETERID"));
|
||||||
|
if(StringX.isEmpty(str)) str = "";
|
||||||
|
String[] values = valueList.split(",");
|
||||||
|
String[] valueNames = valueListName.split(",");
|
||||||
|
String codeTable = "";
|
||||||
|
for(int i = 0; i < values.length; i ++)
|
||||||
|
{
|
||||||
|
if(str.indexOf(values[i]+",") > -1) continue;//如果代码已经存在直接跳过
|
||||||
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
||||||
|
else codeTable+=","+values[i]+","+valueNames[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" var value = getItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"'); \r\n");
|
||||||
|
sb.append(" if('"+valueList+"'.indexOf(value) == -1){alert('录入值不符合要求,请重新录入。');setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"',''); };");
|
||||||
|
|
||||||
|
if(StringX.isEmpty(str))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),codeTable);
|
||||||
|
}
|
||||||
|
else if(!StringX.isEmpty(codeTable))
|
||||||
|
{
|
||||||
|
map.setAttributeValue(parameter.getString("PARAMETERID"),str+","+codeTable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String defaultValue = parameter.getString("Value");
|
||||||
|
if(!StringX.isEmpty(defaultValue))
|
||||||
|
{
|
||||||
|
sb.append(" setItemValue(0,getRow(),'"+parameter.getString("PARAMETERID")+"','"+defaultValue+"'); \r\n");
|
||||||
|
sb.append(" olddata[getRow()]['"+parameter.getString("PARAMETERID").toUpperCase()+"'] = '"+defaultValue+"';\r\n");
|
||||||
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" } \r\n");
|
||||||
|
}
|
||||||
|
doTemp.setDDDWCodeTable("SegTermID", segRPTCodeTable);
|
||||||
|
|
||||||
|
|
||||||
|
for(String key:map.getAttributeIDArray())
|
||||||
|
{
|
||||||
|
doTemp.setDDDWCodeTable(key, map.getString(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("ObjectType", objectType);
|
||||||
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
||||||
|
|
||||||
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
||||||
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||||
|
|
||||||
|
|
||||||
|
//生成HTMLDataWindow
|
||||||
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
||||||
|
//依次为:
|
||||||
|
//0.是否显示
|
||||||
|
//1.注册目标组件号(为空则自动取当前组件)
|
||||||
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
||||||
|
//3.按钮文字
|
||||||
|
//4.说明文字
|
||||||
|
//5.事件
|
||||||
|
//6.资源图片路径
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true", "", "Button", "新增", "新增一条信息","newRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "删除", "删除一条信息","deleteRecord()","","","",""},
|
||||||
|
{"true", "", "Button", "返回", "返回","back()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
|
||||||
|
%>
|
||||||
|
<script language=javascript>
|
||||||
|
var olddata={};
|
||||||
|
/*~[Describe=新增;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
var position= getRowCount(0);
|
||||||
|
as_add("myiframe0");
|
||||||
|
if(position == 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',parent.getItemValue(0,0,"PutOutDate"));
|
||||||
|
else if(position > 0)
|
||||||
|
setItemValue(0,position,'SegFromDate',getItemValue(0,position-1,"SegToDate"));
|
||||||
|
|
||||||
|
//setItemValue(0,position,'SegToDate',parent.getItemValue(0,0,"MaturityDate"));
|
||||||
|
|
||||||
|
document.all("INPUT_myiframe0_SegToDate_"+position+"_1").onblur=changeSegDate;
|
||||||
|
document.all("INPUT_myiframe0_SegTermID_"+position+"_2").onblur=changeRight;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyType_"+position+"_3").onblur=changeRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeSegDate(){
|
||||||
|
if(getRow()+1 < getRowCount(0))
|
||||||
|
setItemValue(0,getRow()+1,'SegFromDate',getItemValue(0,getRow(),"SegToDate"));
|
||||||
|
}
|
||||||
|
|
||||||
|
function changePayFrequencyType(){
|
||||||
|
var payFrequencyType = getItemValue(0,getRow(),"PayFrequencyType");
|
||||||
|
if("6" == payFrequencyType) //指定还款周期
|
||||||
|
{
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_2").disabled=false;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_4").disabled=false;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_6").disabled=false;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequency_"+getRow()+"_5").disabled=false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_2").disabled=true;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_4").disabled=true;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequencyUnit_"+getRow()+"_4_6").disabled=true;
|
||||||
|
document.all("INPUT_myiframe0_PayFrequency_"+getRow()+"_5").disabled=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
|
||||||
|
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
|
||||||
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(getHtmlMessage('2'))){ //您真的想删除该信息吗?
|
||||||
|
as_delete("myiframe0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function back(){
|
||||||
|
CHANGED=false;
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/LoanTerm/BusinessRPTInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID=","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function getColumnIndex(sCol){
|
||||||
|
var cnt=0;
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
if(DZ[0][1][i][2]!=1) continue;
|
||||||
|
if(typeof(sCol)=="string"){
|
||||||
|
if(DZ[0][1][i][15].toUpperCase()==sCol.toUpperCase()) return cnt;
|
||||||
|
}else{
|
||||||
|
if(DZ[0][1][i][15]==sCol) return cnt;
|
||||||
|
}
|
||||||
|
cnt++
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据组件定义生成的JS脚本规则,设置对应的值和显示规则
|
||||||
|
function changeRight()
|
||||||
|
{
|
||||||
|
<%=sb.toString()%>;
|
||||||
|
changePayFrequencyType();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValues(){
|
||||||
|
if(getRowCount(0) < 2){
|
||||||
|
alert("必须录入两条及以上数据。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var values = {};
|
||||||
|
var amt = 0.0;
|
||||||
|
for(var row = 0; row < getRowCount(0); row ++)
|
||||||
|
{
|
||||||
|
values[row] = {};
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
var v = getItemValue(0,row,DZ[0][1][i][15]);
|
||||||
|
if(typeof(v) == "undefined")
|
||||||
|
v = olddata[row][DZ[0][1][i][15].toUpperCase()];
|
||||||
|
values[row][DZ[0][1][i][15]] = v;
|
||||||
|
}
|
||||||
|
values[row]["TermID"]="<%=termID%>";
|
||||||
|
//起始日期-到期日判断
|
||||||
|
var segFromDate = getItemValue(0,row,"SegFromDate");
|
||||||
|
var segToDate = getItemValue(0,row,"SegToDate");
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate > segToDate){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能大于结束日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segFromDate < parent.getItemValue(0,0,"PutOutDate")){
|
||||||
|
alert("第"+(row+1)+"行开始日期不能小于贷款发放日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row < getRowCount(0)-1 && segToDate > parent.getItemValue(0,0,"MaturityDate")){
|
||||||
|
alert("第"+(row+1)+"行结束日期不能大于贷款到期日期。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(row == getRowCount(0)-1 && segToDate)
|
||||||
|
{
|
||||||
|
alert("第"+(row+1)+"行结束日期不用输入。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
amt += parseFloat(getItemValue(0,row,"SegRPTAmount"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(amt != parseFloat(parent.getItemValue(0,0,"BusinessSum")))
|
||||||
|
{
|
||||||
|
alert("指定金额总和必须和贷款金额相同。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(iV_all(0)){
|
||||||
|
return JSON.stringify(values);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//改变父页面大小
|
||||||
|
parent.document.all("RPTFrame").style.height = 300;
|
||||||
|
</script>
|
||||||
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
35
WebContent/Accounting/LoanSimulation/LoanTimePlan.jsp
Normal file
35
WebContent/Accounting/LoanSimulation/LoanTimePlan.jsp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>×Éѯ°´½ÒÊý¶î</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<body class="pagebackground" leftmargin="0" topmargin="0" onload="init();my_loadshow(2,0,'myiframe0');" >
|
||||||
|
-->
|
||||||
|
<body class="pagebackground" leftmargin="0" topmargin="0" onload="">
|
||||||
|
<object ID="AsOne" WIDTH=0 HEIGHT=0
|
||||||
|
<%=(String)session.getValue("CABNAME")%> >
|
||||||
|
</object>
|
||||||
|
<table border="0" width="100%" height="98%" cellspacing="0" cellpadding="0" >
|
||||||
|
<tr>
|
||||||
|
<td colpsan=3>
|
||||||
|
<iframe name="myiframe0" src="" width=100% height=100% frameborder=1></iframe>
|
||||||
|
</td>
|
||||||
|
<td colpsan=3>
|
||||||
|
<iframe name="myiframe1" src="" width=100% height=100% frameborder=1></iframe>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
<script language=javascript>
|
||||||
|
OpenPage("/Accounting/LoanSimulation/LoanSum.jsp","myiframe0");
|
||||||
|
OpenPage("/Accounting/LoanSimulation/LoanTerm.jsp","myiframe1");
|
||||||
|
// OpenPage("/Accounting/LoanSimulation/LoanMonthPay.jsp","myiframe2");
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
427
WebContent/Accounting/LoanSimulation/PaymentScheduleList.jsp
Normal file
427
WebContent/Accounting/LoanSimulation/PaymentScheduleList.jsp
Normal file
@ -0,0 +1,427 @@
|
|||||||
|
<%@page import="com.amarsoft.app.accounting.cashflow.CashFlowHelper"%>
|
||||||
|
<%@page import="com.amarsoft.app.accounting.config.impl.CashFlowConfig"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.util.DateHelper"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.util.BUSINESSOBJECT_CONSTANTS"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObjectManager"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.trans.TransactionHelper"%>
|
||||||
|
<%@page import="com.amarsoft.app.base.businessobject.BusinessObject"%>
|
||||||
|
<%@page import="com.amarsoft.are.util.json.*" %>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
|
||||||
|
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
|
||||||
|
<%
|
||||||
|
String PG_TITLE = "还款计划列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||||
|
|
||||||
|
String rpt = CurPage.getParameterNoCheck("rpt");
|
||||||
|
String rat = CurPage.getParameterNoCheck("rat");
|
||||||
|
String loan = CurPage.getParameterNoCheck("loan");
|
||||||
|
String ps = CurPage.getParameterNoCheck("ps");
|
||||||
|
|
||||||
|
BusinessObject simulationObject = BusinessObject.createBusinessObject("jbo.acct.ACCT_PUTOUT");
|
||||||
|
simulationObject.setAttributes(BusinessObject.createBusinessObject(JSONDecoder.decode(loan)));
|
||||||
|
simulationObject.setAttributeValue("SerialNo", "simulation_loan");
|
||||||
|
simulationObject.setAttributeValue("LoanSerialNo", "simulation_loan");
|
||||||
|
simulationObject.setAttributeValue("LoanPeriod", 0);
|
||||||
|
|
||||||
|
|
||||||
|
JSONObject rpts = JSONDecoder.decode(rpt);
|
||||||
|
BusinessObject RPTObject=null;
|
||||||
|
for(int i = 0;i < rpts.size(); i ++)
|
||||||
|
{
|
||||||
|
RPTObject = BusinessObject.createBusinessObject("jbo.acct.ACCT_RPT_SEGMENT");
|
||||||
|
RPTObject.setAttributes(BusinessObject.createBusinessObject((JSONObject)rpts.get(i).getValue()));
|
||||||
|
RPTObject.setAttributeValue("STATUS", "1");
|
||||||
|
RPTObject.setAttributeValue("AMOUNTCODE", CashFlowConfig.getPaymentScheduleAttribute("1", "AmountCode"));
|
||||||
|
RPTObject.generateKey();
|
||||||
|
simulationObject.appendBusinessObject(RPTObject.getBizClassName(), RPTObject);
|
||||||
|
}
|
||||||
|
if(!"RPT-14".equals(RPTObject.getString("TERMID"))){
|
||||||
|
JSONObject rats = JSONDecoder.decode(rat);
|
||||||
|
for(int i = 0;i < rats.size(); i ++)
|
||||||
|
{
|
||||||
|
BusinessObject rateObject = BusinessObject.createBusinessObject("jbo.acct.ACCT_RATE_SEGMENT");
|
||||||
|
rateObject.setAttributes(BusinessObject.createBusinessObject((JSONObject)rats.get(i).getValue()));
|
||||||
|
rateObject.setAttributeValue("STATUS", "1");
|
||||||
|
rateObject.generateKey();
|
||||||
|
simulationObject.appendBusinessObject(rateObject.getBizClassName(), rateObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!StringX.isEmpty(ps))
|
||||||
|
{
|
||||||
|
JSONObject pss = JSONDecoder.decode(ps);
|
||||||
|
for(int i = 0;i < pss.size(); i ++)
|
||||||
|
{
|
||||||
|
BusinessObject paymentSchedule = BusinessObject.createBusinessObject("jbo.acct.ACCT_PAYMENT_SCHEDULE");
|
||||||
|
paymentSchedule.setAttributes(BusinessObject.createBusinessObject((JSONObject)pss.get(i).getValue()));
|
||||||
|
paymentSchedule.setAttributeValue("STATUS", "1");
|
||||||
|
paymentSchedule.generateKey();
|
||||||
|
simulationObject.appendBusinessObject("FixPaymentSchedule", paymentSchedule);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||||
|
BusinessObject transaction = TransactionHelper.createTransaction("1001", simulationObject, null,
|
||||||
|
CurUser.getUserID(), CurUser.getOrgID(), DateHelper.getBusinessDate(),bomanager);
|
||||||
|
TransactionHelper.executeTransaction(transaction, bomanager);
|
||||||
|
BusinessObject relativeObject = transaction.getBusinessObject(transaction.getString("RelativeObjectType"));
|
||||||
|
|
||||||
|
List<BusinessObject> rates = relativeObject.getBusinessObjects("jbo.acct.ACCT_RATE_SEGMENT");
|
||||||
|
|
||||||
|
simulationObject.setAttributeValue("LoanSerialNo", relativeObject.getKeyString());
|
||||||
|
List<BusinessObject> list =relativeObject.getBusinessObjectsBySql(BUSINESSOBJECT_CONSTANTS.payment_schedule,"PSType='1'");
|
||||||
|
String rptTermID = RPTObject.getString("TERMID");
|
||||||
|
String rightType = "RPT-20".equals(rptTermID)?"":"ReadOnly";//灵活等额本息就要求可修改
|
||||||
|
|
||||||
|
double allPrincipalAmt = 0.0;
|
||||||
|
double allInteAmt = 0.0;
|
||||||
|
double allAmt = 0.0;
|
||||||
|
String putoutDate = relativeObject.getString("PutOutDate");
|
||||||
|
String maturityDate = relativeObject.getString("MaturityDate");
|
||||||
|
int firstPeriodNo = list.get(0).getInt("PERIODNO");
|
||||||
|
int maxPeriodNo = list.size() + firstPeriodNo - 1;
|
||||||
|
String defaultDueDay = "";
|
||||||
|
if("RPT-20".equals(rptTermID)){
|
||||||
|
List<BusinessObject> rptList = relativeObject.getBusinessObjects("jbo.acct.ACCT_RPT_SEGMENT");
|
||||||
|
if(rptList!=null &&rptList.size() > 0 ) {
|
||||||
|
for(BusinessObject bo:rptList)
|
||||||
|
{
|
||||||
|
|
||||||
|
defaultDueDay = bo.getString("DefaultDueDay");
|
||||||
|
if(defaultDueDay.length() == 1)
|
||||||
|
defaultDueDay = "0" + defaultDueDay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(defaultDueDay.equals("")){
|
||||||
|
defaultDueDay = simulationObject.getString("PutOutDate").substring(8,10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%/*~END~*/%>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
var boList = new Array();
|
||||||
|
</script>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body class=pagebackground leftmargin="0" topmargin="0" >
|
||||||
|
|
||||||
|
<div id="Layer1" style="position:absolute;width:99.9%; height:99.9%; z-index:1; overflow: auto">
|
||||||
|
<table align='center' width='70%' border=0 cellspacing="4" cellpadding="0">
|
||||||
|
<tr id = "CRTitle">
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'></font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'></font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'><input type=button value='导出' onclick="excelShow()"> </font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'><input type=button value='重置还款计划' style="<%=("ReadOnly".equals(rightType) ? "display:none" : "") %>" onclick="reset()"> </font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'></font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr id = "CRTitle">
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'>期次</font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'>还款日期</font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'>本金</font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'>利息</font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'>还款金额</font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 11pt;FONT-WEIGHT: bold;'>剩余本金</font></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
if(list != null)
|
||||||
|
{
|
||||||
|
for(BusinessObject bo:list)
|
||||||
|
{
|
||||||
|
String payPrincipalColor = "black";
|
||||||
|
String payInteColor = "black";
|
||||||
|
String payDateColor = "black";
|
||||||
|
String fixInstallmentColor = "black";
|
||||||
|
String flag = ""; //1 为本金调整 2 为还款额调整
|
||||||
|
|
||||||
|
if( bo.getDouble("FixPayPrincipalAmt") != 0.0d)
|
||||||
|
{
|
||||||
|
payPrincipalColor = "red";
|
||||||
|
flag = "1";
|
||||||
|
}
|
||||||
|
else if(bo.getDouble("FixPayInstalmentAmt") != 0.0d)
|
||||||
|
{
|
||||||
|
fixInstallmentColor = "red";
|
||||||
|
flag = "2";
|
||||||
|
}
|
||||||
|
else if(!defaultDueDay.equals("") && !bo.getString("PayDate").substring(8, 10).equals(defaultDueDay) && !bo.getString("PayDate").equals(maturityDate))
|
||||||
|
{
|
||||||
|
payDateColor = "red";
|
||||||
|
}
|
||||||
|
|
||||||
|
allPrincipalAmt += bo.getDouble("PayPrincipalAmt");
|
||||||
|
allInteAmt += bo.getDouble("PAYINTERESTAMT");
|
||||||
|
allAmt += bo.getDouble("PayPrincipalAmt")+bo.getDouble("PAYINTERESTAMT");
|
||||||
|
%>
|
||||||
|
<script language="javascript">
|
||||||
|
boList[<%=bo.getInt("PERIODNO")%>] = Array('<%=bo.getString("PayDate")%>',<%=bo.getDouble("PayPrincipalAmt")%>,<%=bo.getDouble("PAYINTERESTAMT")%>,<%=Arith.round(bo.getDouble("PayPrincipalAmt")+bo.getDouble("PAYINTERESTAMT"),CashFlowHelper.getMoneyPrecision(simulationObject))%>,<%=bo.getDouble("FixPayInstalmentAmt")%>,<%=bo.getDouble("FixPayPrincipalAmt")%>);
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1" align='center'><font style=' font-size: 9pt;'><%=bo.getInt("PERIODNO")%><input id="SerialNo<%=bo.getInt("PERIODNO")%>" type=hidden value="<%=bo.getString("SerialNo")%>"/></font></td>
|
||||||
|
<input id="Flag<%=bo.getInt("PERIODNO")%>" type=hidden value="<%=flag%>"/></font></td>
|
||||||
|
<td colspan="1" align='center'><font style=' font-size: 9pt;'><input id="PayDate<%=bo.getInt("PERIODNO")%>" style='text-align: right;WIDTH: 80px;COLOR: <%=payDateColor%>' class=fftdinput type=text readOnly value="<%=DataConvert.toString(bo.getString("PayDate"))%>" <%=rightType %> onclick=selectDate("<%=bo.getInt("PERIODNO")%>","PayDate") ></font></td>
|
||||||
|
<td colspan="1" align='center'><font style=' font-size: 9pt;'><input id="PayPrincipalAmt<%=bo.getInt("PERIODNO")%>" style='text-align: right;WIDTH: 80px;COLOR: <%=payPrincipalColor%>' class=fftdinput type=text value="<%=DataConvert.toMoney(bo.getDouble("PayPrincipalAmt"))%>" <%=rightType %> onchange=ChangeValue("<%=bo.getInt("PERIODNO")%>","PayPrincipalAmt")></font></td>
|
||||||
|
<td colspan="1" align='center'><font style=' font-size: 9pt;'><input id="PAYINTERESTAMT<%=bo.getInt("PERIODNO")%>" style='text-align: right;WIDTH: 80px;COLOR: <%=payInteColor%>; ' class=fftdinput type=text readOnly value="<%=DataConvert.toMoney(bo.getDouble("PAYINTERESTAMT"))%>" onchange=ChangeValue("<%=bo.getInt("PERIODNO")%>","PAYINTERESTAMT")></font></td>
|
||||||
|
<td colspan="1" align='center'><font style=' font-size: 9pt;'><input id="FixPayInstalmentAmt<%=bo.getInt("PERIODNO")%>" style='text-align: right;WIDTH: 80px;COLOR: <%=fixInstallmentColor%>' class=fftdinput type=text value="<%=DataConvert.toMoney(bo.getDouble("PayPrincipalAmt")+bo.getDouble("PAYINTERESTAMT"))%>" <%=rightType %> onchange=ChangeValue("<%=bo.getInt("PERIODNO")%>","FixPayInstalmentAmt")></font></td>
|
||||||
|
<td colspan="1" align='center'><font style=' font-size: 9pt;'><input id="PrincipalBalance<%=bo.getInt("PERIODNO")%>" style='text-align: right;WIDTH: 80px; COLOR: black;' class=fftdinput type=text readOnly value="<%=DataConvert.toMoney(bo.getDouble("PrincipalBalance"))%>" onchange=ChangeValue("<%=bo.getInt("PERIODNO")%>","PrincipalBalance")></font></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 9pt;FONT-WEIGHT: bold;'>合计</font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 9pt;FONT-WEIGHT: bold;'></font></td>
|
||||||
|
<td colspan="1" align='center'><font align='right' color='#000880' style=' font-size: 9pt;FONT-WEIGHT: bold;'><%=DataConvert.toMoney(allPrincipalAmt)%></font></td>
|
||||||
|
<td colspan="1" align='center'><font align='right' color='#000880' style=' font-size: 9pt;FONT-WEIGHT: bold;'><%=DataConvert.toMoney(allInteAmt)%></font></td>
|
||||||
|
<td colspan="1" align='center'><font align='right' color='#000880' style=' font-size: 9pt;FONT-WEIGHT: bold;'><%=DataConvert.toMoney(allAmt)%></font></td>
|
||||||
|
<td colspan="1" align='center'><font color='#000880' style=' font-size: 9pt;FONT-WEIGHT: bold;'></font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
function ChangeValue(colID,colName)
|
||||||
|
{
|
||||||
|
var value = document.getElementById(colName+colID).value;
|
||||||
|
var serialNo = document.getElementById("SerialNo"+colID).value;
|
||||||
|
var flag = document.getElementById("Flag"+colID).value;
|
||||||
|
if(value == null) return;
|
||||||
|
var boTemp = boList[colID];
|
||||||
|
if(boTemp == null)
|
||||||
|
{
|
||||||
|
alert("不存在该还款计划,请刷新后重新输入!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(colName == "FixPayInstalmentAmt")
|
||||||
|
{
|
||||||
|
if(parseFloat(value) < boTemp[2] && parseFloat(value) != 0)
|
||||||
|
{
|
||||||
|
alert("还款金额不能小于利息金额!");
|
||||||
|
document.getElementById(colName+colID).value=boTemp[1]+boTemp[2];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(flag == "1")
|
||||||
|
{
|
||||||
|
alert("已经进行本金调整,不能再调整还款金额!");
|
||||||
|
document.getElementById(colName+colID).value=boTemp[1]+boTemp[2];
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
if(value==0) value=-1;
|
||||||
|
|
||||||
|
reLoad();
|
||||||
|
}
|
||||||
|
else if(colName == "PayPrincipalAmt")
|
||||||
|
{
|
||||||
|
if(parseFloat(value) < 0.0)
|
||||||
|
{
|
||||||
|
alert("调整本金不能将应还本金调整为负数!");
|
||||||
|
document.getElementById(colName+colID).value=boTemp[1];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(value==0) value=-1;
|
||||||
|
if(flag == "2")
|
||||||
|
{
|
||||||
|
alert("已经进行还款金额调整,不能再调整本金!");
|
||||||
|
document.getElementById(colName+colID).value=boTemp[1];
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
reLoad();
|
||||||
|
}else if(colName == "PayDate")
|
||||||
|
{
|
||||||
|
if(typeof(value)=="undefined")
|
||||||
|
return;
|
||||||
|
if(flag == "1" || flag == "2")
|
||||||
|
{
|
||||||
|
alert("已经进行还款金额调整,不能再调整日期!");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
reLoad();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*~[Describe=导出excel;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function excelShow()
|
||||||
|
{
|
||||||
|
var mystr = document.all('Layer1').innerHTML;
|
||||||
|
spreadsheetTransfer(mystr.replace(/type=checkbox/g,"type=hidden"));
|
||||||
|
}
|
||||||
|
/*~[Describe=重置还款计划;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function reset()
|
||||||
|
{
|
||||||
|
var form = document.createElement("form");
|
||||||
|
form.id="runform";
|
||||||
|
form.method="post";
|
||||||
|
form.action="<%=sWebRootPath%>/Accounting/LoanSimulation/PaymentScheduleList.jsp";
|
||||||
|
form.target="_self";
|
||||||
|
var hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "loan"
|
||||||
|
hideInput.value= JSON.stringify(<%=loan%>);
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "rpt"
|
||||||
|
hideInput.value= JSON.stringify(<%=rpt%>);
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "rat"
|
||||||
|
hideInput.value= JSON.stringify(<%=rat%>);
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "CompClientID"
|
||||||
|
hideInput.value= "<%=sCompClientID%>";
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
document.body.appendChild(form);
|
||||||
|
form.submit();
|
||||||
|
document.body.removeChild(form);
|
||||||
|
}
|
||||||
|
|
||||||
|
function reLoad()
|
||||||
|
{
|
||||||
|
//获取还款计划调整内容
|
||||||
|
var ps = {};
|
||||||
|
var maxPeriodNo = <%=maxPeriodNo%>;
|
||||||
|
var firstPeriodNo = <%=firstPeriodNo%>;
|
||||||
|
for(var i = firstPeriodNo;i <= maxPeriodNo;i++)
|
||||||
|
{
|
||||||
|
ps[i]={};
|
||||||
|
ps[i]["PeriodNo"] = i+"";
|
||||||
|
ps[i]["PayDate"] = document.getElementById("PayDate"+i).value;
|
||||||
|
|
||||||
|
var reg=new RegExp(",","g"); //创建正则RegExp对象
|
||||||
|
|
||||||
|
var payPrincipalAmt = document.getElementById("PayPrincipalAmt"+i).value.replace(reg,"");
|
||||||
|
if(parseFloat(payPrincipalAmt) == 0) payPrincipalAmt = "-1";
|
||||||
|
if(parseFloat(payPrincipalAmt) != boList[i][1])
|
||||||
|
ps[i]["FixPayPrincipalAmt"] = payPrincipalAmt;
|
||||||
|
else
|
||||||
|
ps[i]["FixPayPrincipalAmt"] = boList[i][5];
|
||||||
|
ps[i]["PayPrincipalAmt"] = document.getElementById("PayPrincipalAmt"+i).value.replace(reg,"");
|
||||||
|
ps[i]["PAYINTERESTAMT"] = document.getElementById("PAYINTERESTAMT"+i).value.replace(reg,"");
|
||||||
|
var value = document.getElementById("FixPayInstalmentAmt"+i).value.replace(reg,"");
|
||||||
|
if(parseFloat(value) == 0) value = "-1";
|
||||||
|
if(parseFloat(value) != boList[i][3])
|
||||||
|
ps[i]["FixPayInstalmentAmt"] = value;
|
||||||
|
else
|
||||||
|
ps[i]["FixPayInstalmentAmt"] = boList[i][4];
|
||||||
|
ps[i]["PrincipalBalance"] = document.getElementById("PrincipalBalance"+i).value.replace(reg,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var form = document.createElement("form");
|
||||||
|
form.id="runform";
|
||||||
|
form.method="post";
|
||||||
|
form.action="<%=sWebRootPath%>/Accounting/LoanSimulation/PaymentScheduleList.jsp";
|
||||||
|
form.target="_self";
|
||||||
|
var hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "loan"
|
||||||
|
hideInput.value= JSON.stringify(<%=loan%>);
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "rpt"
|
||||||
|
hideInput.value= JSON.stringify(<%=rpt%>);
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "rat"
|
||||||
|
hideInput.value= JSON.stringify(<%=rat%>);
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "ps"
|
||||||
|
hideInput.value= JSON.stringify(ps);
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
hideInput = document.createElement("input");
|
||||||
|
hideInput.type="hidden";
|
||||||
|
hideInput.name= "CompClientID"
|
||||||
|
hideInput.value= "<%=sCompClientID%>";
|
||||||
|
form.appendChild(hideInput);
|
||||||
|
|
||||||
|
document.body.appendChild(form);
|
||||||
|
form.submit();
|
||||||
|
document.body.removeChild(form);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDate(colID,colName){
|
||||||
|
var rpt = "<%=rptTermID%>";
|
||||||
|
if(rpt != "RPT-20") return;
|
||||||
|
var putoutDate = "<%=putoutDate%>";
|
||||||
|
var maturityDate = "<%=maturityDate%>";
|
||||||
|
var maxPeriodNo = "<%=maxPeriodNo%>";
|
||||||
|
var firstPeriodNo = "<%=firstPeriodNo%>";
|
||||||
|
|
||||||
|
var sDate = PopPage("/FixStat/SelectDate.jsp?rand="+randomNumber(),"","dialogWidth=300px;dialogHeight=220px;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no");
|
||||||
|
|
||||||
|
if(typeof(sDate)!="undefined" && sDate!=""){
|
||||||
|
if((parseInt(colID) > parseInt(firstPeriodNo)) && (parseInt(colID) < parseInt(maxPeriodNo))){
|
||||||
|
if((sDate > document.getElementById(colName+(parseInt(colID)-1)).value) && (sDate < document.getElementById(colName+(parseInt(colID)+1)).value))
|
||||||
|
{
|
||||||
|
document.getElementById(colName+colID).value=sDate;
|
||||||
|
ChangeValue(colID,colName);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert("本期还款日期应当介于上期和下期还款日期,请重新选择!");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ if(parseInt(firstPeriodNo) == parseInt(colID)){
|
||||||
|
if(sDate <= putoutDate){
|
||||||
|
alert("还款日期必需大于贷款出账日期,请重新选择!");
|
||||||
|
reloadSelf();
|
||||||
|
}else if(parseInt(colID) < parseInt(maxPeriodNo) && sDate > document.getElementById(colName+(parseInt(colID)+1)).value){
|
||||||
|
alert("还款日期必需小于下期还款日期,请重新选择!");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
document.getElementById(colName+colID).value=sDate;
|
||||||
|
ChangeValue(colID,colName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(parseInt(maxPeriodNo) == parseInt(colID)){
|
||||||
|
if(sDate >= maturityDate){
|
||||||
|
alert("还款日期必需小于贷款到期日期,请重新选择!");
|
||||||
|
reloadSelf();
|
||||||
|
}else if(parseInt(firstPeriodNo) < parseInt(maxPeriodNo) && sDate < document.getElementById(colName+(parseInt(colID)-1)).value){
|
||||||
|
alert("还款日期必需大于上期还款日期,请重新选择!");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
document.getElementById(colName+colID).value=sDate;
|
||||||
|
ChangeValue(colID,colName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//对于指定还款额反算利率使用下面代码
|
||||||
|
try{parent.RATFrame.setItemValue(0,0,"BusinessRate","<%=rates.get(0).getRate("BusinessRate")%>");}catch(e){}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
66
WebContent/Accounting/LoanSimulation/RentPlanChangeList.jsp
Normal file
66
WebContent/Accounting/LoanSimulation/RentPlanChangeList.jsp
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String docId = CurPage.getParameter("docId");
|
||||||
|
if(docId == null) docId = "100000";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("ProjRentPlanChangeList");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.Style="1";
|
||||||
|
dwTemp.ReadOnly = "1";
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
|
||||||
|
dwTemp.genHTMLObjectWindow(docId);
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","编辑","详情","viewAndEdit()","","","",""}
|
||||||
|
};
|
||||||
|
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
OpenPage("/Accounting/LoanSimulation/RentPlanInfo.jsp?EditRight=02","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function deleteRecord(){
|
||||||
|
//var sUserID=getItemValue(0,getRow(),"InputUserId");
|
||||||
|
var sCustomerID = getItemValue(0,getRow(),"cust_id");
|
||||||
|
if (typeof(sCustomerID)=="undefined" || sCustomerID.length==0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}else if(sUserID=='<%=CurUser.getUserID()%>'){
|
||||||
|
if(confirm(getHtmlMessage('2')))
|
||||||
|
{
|
||||||
|
as_delete('myiframe0');
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
alert(getHtmlMessage('3'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=查看及修改详情;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUserID=getItemValue(0,getRow(),"creator_");
|
||||||
|
if(sUserID=='<%=CurUser.getUserID()%>')
|
||||||
|
sEditRight='02';
|
||||||
|
else
|
||||||
|
sEditRight='01';
|
||||||
|
var sCustomerID = getItemValue(0,getRow(),"cust_id");
|
||||||
|
var sAccountId = getItemValue(0,getRow(),"id");
|
||||||
|
if (typeof(sCustomerID)=="undefined" || sCustomerID.length==0){
|
||||||
|
alert(getHtmlMessage('1'));
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
OpenPage("/Accounting/LoanSimulation/RentPlanList.jsp?cust_id="+sCustomerID+"&id="+sAccountId+"&EditRight="+sEditRight, "_self","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
253
WebContent/Accounting/LoanSimulation/RentPlanInfo.jsp
Normal file
253
WebContent/Accounting/LoanSimulation/RentPlanInfo.jsp
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||||
|
String sCustomerID = CurPage.getParameter("cust_id");
|
||||||
|
String sAccountID = CurPage.getParameter("id");
|
||||||
|
String sEditRight = CurPage.getParameter("EditRight");
|
||||||
|
|
||||||
|
if(sCustomerID == null) sCustomerID = "";
|
||||||
|
if(sAccountID == null) sAccountID = "";
|
||||||
|
if(sEditRight == null) sEditRight = "";
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("ProjRentPlanList");
|
||||||
|
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="2";
|
||||||
|
|
||||||
|
dwTemp.genHTMLObjectWindow(sCustomerID+","+sAccountID);
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"false","","Button","新增","新增高管信息","newRecord()","","","",""},
|
||||||
|
{(sEditRight.equals("02")?"true":"false"),"All","Button","保存","保存所有修改","saveRecord(false)","","","",""},
|
||||||
|
{(sEditRight.equals("02")?"true":"false"),"All","Button","保存并新增","保存所有修改并新增","saveRecord(true)","","","",""},
|
||||||
|
{"true","All","Button","详情","查看银行账户详情","viewKeymanInfo()","","","",""},
|
||||||
|
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var flag = false;//判断高管信息的输入是用户输入(false)还是从系统中选择(true)
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
OpenPage("/Accounting/LoanSimulation/RentPlanInfo.jsp?","_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=保存与保存并新增按钮;InputParam=是否在保存后展示新页面;OutPutParam=无;]~*/
|
||||||
|
function saveRecord(isNewRecord){
|
||||||
|
var relationship = getItemValue(0,getRow(),"RelationShip");
|
||||||
|
var relativeID = getItemValue(0,getRow(),"RelativeID");
|
||||||
|
//保存前进行关联关系检查
|
||||||
|
if(!ValidityCheck()) return;
|
||||||
|
|
||||||
|
as_save(0,"saveSuccess("+isNewRecord+")");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveSuccess(isNewRecord){
|
||||||
|
//保存成功后防止反向修改Customer_Info和Ind_Info数据
|
||||||
|
setItemReadOnly(0,0,"RelationShip",true);
|
||||||
|
setItemReadOnly(0,0,"CertType",true);
|
||||||
|
setItemReadOnly(0,0,"CertID",true);
|
||||||
|
setItemReadOnly(0,0,"CustomerName",true);
|
||||||
|
setItemReadOnly(0,0,"CustomerType",true);
|
||||||
|
setItemReadOnly(0,0,"Birthday",true);
|
||||||
|
if(isNewRecord){
|
||||||
|
CHANGED=false;//跳转新页面时是否弹框提示已修改本页。
|
||||||
|
newRecord();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ValidityCheck(){
|
||||||
|
//从业年限和年龄比较
|
||||||
|
var birthday = getItemValue(0,getRow(),"Birthday");
|
||||||
|
var nowDate = new Date().getFullYear();
|
||||||
|
var engageTerm = getItemValue(0,getRow(),"EngageTerm");
|
||||||
|
setErrorTips("EngageTerm","");
|
||||||
|
if(engageTerm>=(nowDate-birthday.split('/')[0])){
|
||||||
|
setErrorTips("EngageTerm",getBusinessMessage("974"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/*~[Describe=返回高管信息详情页面;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewKeymanInfo(){
|
||||||
|
var sAccountID = getItemValue(0,getRow(),"id");
|
||||||
|
if(typeof(sAccountID) == "undefined" || sAccountID == ""){
|
||||||
|
alert(getMessageText('ALS72003'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sAccountID = getItemValue(0,getRow(),"id");
|
||||||
|
sReturn = RunJavaMethodTrans("com.amarsoft.app.als.customer.action.CheckRolesAction","checkRoles","customerid="+sAccountID+",userid=<%=CurUser.getUserID()%>");
|
||||||
|
if (typeof(sReturn) == "undefined" || sReturn.length == 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sReturnValue = sReturn.split("@");
|
||||||
|
sReturnValue1 = sReturnValue[0];
|
||||||
|
sReturnValue2 = sReturnValue[1];
|
||||||
|
sReturnValue3 = sReturnValue[2];
|
||||||
|
if(sReturnValue1 == "Y" || sReturnValue2 == "Y1" || sReturnValue3 == "Y2"){
|
||||||
|
openObject("CustInfo",sAccountID,"001");
|
||||||
|
}else{
|
||||||
|
alert(getBusinessMessage('115'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function goBack(){
|
||||||
|
OpenPage("/Accounting/LoanSimulation/RentPlanList.jsp?","_self","");
|
||||||
|
}
|
||||||
|
/*~[Describe=根据证件类型和证件编号获得客户编号和客户名称;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function getCustomerName(){
|
||||||
|
var sCertType = getItemValue(0,getRow(),"CertType");
|
||||||
|
var sCertID = getItemValue(0,getRow(),"CertID");
|
||||||
|
if(typeof(sCertType) != "undefined" && sCertType != "" && typeof(sCertID) != "undefined" && sCertID != ""){
|
||||||
|
sReturn=RunJavaMethodTrans("com.amarsoft.app.als.customer.action.CustomerInfoAction","getCustomerInfo","certID="+sCertID+",certType="+sCertType);
|
||||||
|
if(typeof(sReturn) != "undefined" && sReturn != ""){
|
||||||
|
var sReturn = sReturn.split('@');
|
||||||
|
setItemValue(0,getRow(),"RelativeID",sReturn[0]);
|
||||||
|
setItemValue(0,getRow(),"CustomerName",sReturn[1]);
|
||||||
|
setItemDisabled(0,0,"CustomerName",true);
|
||||||
|
}else{
|
||||||
|
setItemValue(0,getRow(),"RelativeID","");
|
||||||
|
setItemValue(0,getRow(),"CustomerName","");
|
||||||
|
setItemDisabled(0,0,"CustomerName",false);
|
||||||
|
}
|
||||||
|
//将身份证的出生日期自动赋给出生日期字段
|
||||||
|
if (!GetBirthday()) return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=弹出客户选择窗口,并置将返回的值设置到指定的域;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function selectCustomer(){
|
||||||
|
//返回客户的相关信息、客户代码、客户名称、证件类型、客户证件号码
|
||||||
|
//实现清空功能:如是用户自己输入的信息时,只清空高管姓名,如是从系统里关联查询出来,则清空 证件类型、证件号码和高管姓名字段;实现字段关联显示功能。
|
||||||
|
sObjectNoString = AsDialog.SelectGridValue("SelectManager", "<%=CurUser.getOrgID()%>", "CustomerID@CustomerName@CertID@CertType@CertTypeName", null, false);
|
||||||
|
sValueString = "@RelativeID@0@CustomerName@1@CertID@2@CertType@3";
|
||||||
|
sValues = sValueString.split("@");
|
||||||
|
var i=sValues.length;
|
||||||
|
i=i-1;
|
||||||
|
if (i%2!=0){
|
||||||
|
alert(getMessageText('ALS72004'));
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
var j=i/2,m,sColumn,iID;
|
||||||
|
if(typeof(sObjectNoString)=="undefined"){
|
||||||
|
|
||||||
|
return;
|
||||||
|
}else if(String(sObjectNoString)==String("_CANCEL_") ){
|
||||||
|
return;
|
||||||
|
}else if(String(sObjectNoString)==String("_CLEAR_")){
|
||||||
|
setItemDisabled(0,0,"CertType",false);
|
||||||
|
setItemDisabled(0,0,"CertID",false);
|
||||||
|
setItemDisabled(0,0,"CustomerName",false);
|
||||||
|
setItemValue(0,0,"CustomerName","");
|
||||||
|
if(flag){
|
||||||
|
setItemValue(0,0,"CertType","");
|
||||||
|
setItemValue(0,0,"CertID","");
|
||||||
|
setItemValue(0,0,"Sex","");
|
||||||
|
setItemValue(0,0,"Birthday","");
|
||||||
|
}
|
||||||
|
flag = false;
|
||||||
|
}else if(String(sObjectNoString)!=String("_NONE_") && String(sObjectNoString)!=String("undefined")){
|
||||||
|
sObjectNos = sObjectNoString.split("@");
|
||||||
|
for(m=1;m<=j;m++){
|
||||||
|
sColumn = sValues[2*m-1];
|
||||||
|
iID = parseInt(sValues[2*m],10);
|
||||||
|
if(sColumn!="")
|
||||||
|
setItemValue(0,0,sColumn,sObjectNos[iID]);
|
||||||
|
}
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
sCustomerName = getItemValue(0,0,"CustomerName");
|
||||||
|
if( String(sObjectNoString)!=String("_CLEAR_") && typeof(sCustomerName) != "undefined" && sCustomerName != "" ){
|
||||||
|
setItemDisabled(0,0,"CertType",true);
|
||||||
|
setItemDisabled(0,0,"CertID",true);
|
||||||
|
setItemDisabled(0,0,"CustomerName",true);
|
||||||
|
setItemDisabled(0,0,"CustomerType",true);
|
||||||
|
setItemDisabled(0,0,"Birthday",true);
|
||||||
|
setItemReadOnly(0,0,"Birthday",true);
|
||||||
|
$("#R0F"+getColIndex(0,"Birthday")+"_innerbt", frames["myiframe0"].document).hide(); //隐藏内置按钮
|
||||||
|
}else{
|
||||||
|
setItemDisabled(0,0,"CertType",false);
|
||||||
|
setItemDisabled(0,0,"CertID",false);
|
||||||
|
setItemDisabled(0,0,"CustomerName",false);
|
||||||
|
setItemDisabled(0,0,"Birthday",false);
|
||||||
|
$("#R0F"+getColIndex(0,"Birthday")+"_innerbt", frames["myiframe0"].document).show(); //显示内置按钮
|
||||||
|
setItemFocus(0,0,"CustomerName");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//将身份证的出生日期自动赋给出生日期字段
|
||||||
|
if (!GetBirthday()) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*~[Describe=页面装载时,对DW进行初始化;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function initRow(){
|
||||||
|
if (getRowCount(0)==0){
|
||||||
|
setItemValue(0,0,"CustomerID","<%=sCustomerID%>");
|
||||||
|
setItemValue(0,0,"InputUserId","<%=CurUser.getUserID()%>");
|
||||||
|
setItemValue(0,0,"InputUserName","<%=CurUser.getUserName()%>");
|
||||||
|
setItemValue(0,0,"InputOrgId","<%=CurOrg.getOrgID()%>");
|
||||||
|
setItemValue(0,0,"InputOrgName","<%=CurOrg.getOrgName()%>");
|
||||||
|
setItemValue(0,0,"InputDate","<%=StringFunction.getToday()%>");
|
||||||
|
setItemValue(0,0,"UpdateDate","<%=StringFunction.getToday()%>");
|
||||||
|
}else{
|
||||||
|
setItemReadOnly(0,0,"RelationShip",true); //详情进入时锁定
|
||||||
|
//初始化设置成只读,隐藏日期选择框
|
||||||
|
setItemReadOnly(0,0,"Birthday",true);
|
||||||
|
setItemReadOnly(0,0,"Sex",true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=根据身份证号获取出生日期;InputParam=无;OutPutParam=通过true,否则false;]~*/
|
||||||
|
function GetBirthday(){
|
||||||
|
var sCertType = getItemValue(0,0,"CertType");
|
||||||
|
var sCertID = getItemValue(0,0,"CertID");
|
||||||
|
//判断身份证合法性,个人身份证号码应该是15或18位!
|
||||||
|
if(sCertType =='Ind01' || sCertType =='Ind08'){
|
||||||
|
if (!CheckLicense(sCertID)){
|
||||||
|
}
|
||||||
|
// 如果选择的证件类型为身份证,则输入身份证后生日和性别自动获取,不允许修改。
|
||||||
|
setItemDisabled(0,0,"Birthday",true);
|
||||||
|
setItemDisabled(0,0,"Sex",true);
|
||||||
|
//将身份证中的日期自动赋给出生日期,把性别置上
|
||||||
|
if(sCertID.length == 15){
|
||||||
|
sSex = sCertID.substring(14);
|
||||||
|
sSex = parseInt(sSex);
|
||||||
|
sCertID = sCertID.substring(6,12);
|
||||||
|
sCertID = "19"+sCertID.substring(0,2)+"/"+sCertID.substring(2,4)+"/"+sCertID.substring(4,6);
|
||||||
|
setItemValue(0,getRow(),"Birthday",sCertID);
|
||||||
|
if(sSex%2==0)//奇男偶女
|
||||||
|
setItemValue(0,getRow(),"Sex","2");
|
||||||
|
else
|
||||||
|
setItemValue(0,getRow(),"Sex","1");
|
||||||
|
}
|
||||||
|
if(sCertID.length == 18){
|
||||||
|
sSex = sCertID.substring(16,17);
|
||||||
|
sSex = parseInt(sSex);
|
||||||
|
sCertID = sCertID.substring(6,14);
|
||||||
|
sCertID = sCertID.substring(0,4)+"/"+sCertID.substring(4,6)+"/"+sCertID.substring(6,8);
|
||||||
|
setItemValue(0,getRow(),"Birthday",sCertID);
|
||||||
|
if(sSex%2==0)//奇男偶女
|
||||||
|
setItemValue(0,getRow(),"Sex","2");
|
||||||
|
else
|
||||||
|
setItemValue(0,getRow(),"Sex","1");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// 如果选择的证件类型不为身份证,生日和性别要求手动输入。
|
||||||
|
setItemDisabled(0,0,"Birthday",false);
|
||||||
|
setItemDisabled(0,0,"Sex",false);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function setErrorTips(colName,tips){
|
||||||
|
if(tips==""){
|
||||||
|
setItemUnit(0,getRow(),colName,"");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
setItemUnit(0,getRow(),colName,"<font color=red>"+tips+"</font>");
|
||||||
|
}
|
||||||
|
initRow();
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
84
WebContent/Accounting/LoanSimulation/RentPlanList.jsp
Normal file
84
WebContent/Accounting/LoanSimulation/RentPlanList.jsp
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
|
||||||
|
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");//方案编号
|
||||||
|
String planCName=CurPage.getParameter("planCName");//项目方案 合同方案 投放编号 列名
|
||||||
|
String calType=CurPage.getParameter("calType");//项目方案 合同方案 投放编号 列名
|
||||||
|
|
||||||
|
TabCalBean tcb=TbBeanTools.getTabInfo(calType);
|
||||||
|
if(flowunid == null) flowunid = "100000";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String method= CurPage.getParameter("method");
|
||||||
|
if(method==null)method="";
|
||||||
|
String taskno=CurPage.getParameter("TaskNo");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCRentPlanTemp");
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
CurPage.setAttribute("modelno","rent");
|
||||||
|
doTemp.setJboClass(tcb.getRentPlan_tb());
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
|
||||||
|
String sButtons[][] =null;
|
||||||
|
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
RightType="ReadOnly";
|
||||||
|
sButtons=new String[][] {
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"false","","Button","租金调整","租金调整","rentAdjust()","","","","btn_icon_set",""},
|
||||||
|
{method.equals("irregular_rent")+"","","Button","不规则导入","不规则导入","importRent()","","","","btn_icon_import",""},
|
||||||
|
{method.equals("irregular_rent")+"","","Button","模板下载","模板下载","downloadTemplate()","","","","btn_icon_down",""},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function rentAdjust(){
|
||||||
|
//TODO
|
||||||
|
}
|
||||||
|
function importRent(){
|
||||||
|
//判断商务条件是否保存
|
||||||
|
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","checkIsSaveCondition","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>,planCName=<%=planCName%>");
|
||||||
|
|
||||||
|
if(result == 'true'){
|
||||||
|
var importCondition={};//导入配置
|
||||||
|
importCondition["flowunid"]="<%=flowunid%>";
|
||||||
|
importCondition["plannumber"]="<%=plannumber%>";
|
||||||
|
importCondition["calType"]="<%=calType%>";
|
||||||
|
//增加其他配置参数
|
||||||
|
var sparam=JSON.stringify(importCondition).replace(/,/g,"@");
|
||||||
|
AsDialog.PopView("/Accounting/LoanSimulation/upload/uploadRent.jsp","importparam="+sparam,
|
||||||
|
{width:"350px",height:"40px",title:"上传租金计划"},function(sreturn){
|
||||||
|
if(sreturn=="true"){
|
||||||
|
var param="FlowUnid=<%=flowunid%>&calType=<%=calType%>&plannumber=<%=plannumber%>";
|
||||||
|
window.parent.parent.AsControl.OpenView("/Accounting/LoanSimulation/LoanBasicInfo.jsp",param, "_self");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
alert('请先保存商务条件!!!');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadTemplate(){
|
||||||
|
var templateId="2017051200000002";
|
||||||
|
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||||
|
window.open(sWebRootPath+"/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>&sqlString=save@"+templateId, "downloadTemplate");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
21
WebContent/Accounting/LoanSimulation/condition_plan.jsp
Normal file
21
WebContent/Accounting/LoanSimulation/condition_plan.jsp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
<%
|
||||||
|
String flowunid = CurPage.getParameter("flowunid");
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");
|
||||||
|
String planCName=CurPage.getParameter("planCName");
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
String IsHistory=CurPage.getParameter("IsHistory");
|
||||||
|
String RightType=CurPage.getParameter("RightType");
|
||||||
|
String productId=CurPage.getParameter("ProductId");
|
||||||
|
|
||||||
|
String params="flowunid="+flowunid+"&plannumber="+plannumber+"&planCName="+planCName+"&calType="+calType+"&IsHistory="+IsHistory+"&RightType="+RightType+"&ProductId="+productId;
|
||||||
|
//参数:0.是否显示, 1.标题,2.URL,3,参数串, 4. Strip高度(默认600px),5. 是否有关闭按钮(默认无) 6. 是否缓存(默认是)
|
||||||
|
String sTabStrip[][] = {
|
||||||
|
{"true", "租金计划", "/Accounting/LoanSimulation/RentPlanList.jsp",params, "", "", "false"},
|
||||||
|
{"true", "资金计划", "/Accounting/LoanSimulation/FundPlanList.jsp",params, "", "", "false"},
|
||||||
|
{"true", "现金流", "/Accounting/LoanSimulation/CashFlowList.jsp",params, "", "", "false"},
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<%@ include file="/Resources/CodeParts/Tab01.jsp"%>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
48
WebContent/Accounting/LoanSimulation/js/basicinfo.js
Normal file
48
WebContent/Accounting/LoanSimulation/js/basicinfo.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*~[Describe=利率信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function calcLoanRateTermID(functionID){
|
||||||
|
var loanRateTermID = getItemValue(0,getRow(),"LoanRateTermID");
|
||||||
|
if(typeof(loanRateTermID) == "undefined" || loanRateTermID.length == 0) return;
|
||||||
|
//window.frames['myiframe0'].document.getElementById('ContentFrame_RatePart').style.display="";
|
||||||
|
var currency = getItemValue(0,getRow(),"BusinessCurrency");
|
||||||
|
if(typeof(currency) == "undefined" || currency.length == 0)
|
||||||
|
currency = getItemValue(0,getRow(),"Currency");
|
||||||
|
if(typeof(currency) == "undefined" || currency.length == 0) currency = "";
|
||||||
|
|
||||||
|
var sPutoutDate = getItemValue(0,getRow(),"PutOutDate");
|
||||||
|
var sMaturity = getItemValue(0,getRow(),"Maturity"); //类型为BusinessPutOut时
|
||||||
|
var sMaturityDate = getItemValue(0,getRow(),"MaturityDate"); //类型为Loan时,即点完咨询后
|
||||||
|
if(typeof(sMaturity)=="undefined" || sMaturity.length==0)
|
||||||
|
sMaturity = sMaturityDate;
|
||||||
|
var termMonth = RunMethod("BusinessManage","GetUpMonths",sPutoutDate+","+sMaturity);
|
||||||
|
|
||||||
|
OpenPage("/Accounting/LoanSimulation/LoanTerm/BusinessTermView.jsp?TermID="+loanRateTermID+"&TermMonth="+termMonth+"&Currency="+currency,"RatePart","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=还款方式信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function calcRPTTermID(functionID){
|
||||||
|
var sRPTTermID = getItemValue(0,getRow(),"RPTTermID");
|
||||||
|
if(typeof(sRPTTermID) == "undefined" || sRPTTermID.length == 0) return;
|
||||||
|
//frames['myiframe0'].document.getElementById('ContentFrame_RPTPart').style.display="";
|
||||||
|
OpenPage("/Accounting/LoanSimulation/LoanTerm/BusinessTermView.jsp?TermID="+sRPTTermID,"RPTPart","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=列表形式的组件信息;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function viewTermList(functionID,termType,frameName){
|
||||||
|
var obj = frames['myiframe0'].document.getElementById("ContentFrame_"+frameName);
|
||||||
|
if(typeof(obj) == "undefined" || obj == null) return;
|
||||||
|
OpenPage("/Accounting/LoanSimulation/LoanTerm/BusinessTermList.jsp?TermType="+termType,frameName,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
function runTransaction1(transactionSerialNo){
|
||||||
|
var returnValue = PopPage("/Accounting/LoanSimulation/LoanTerm/RunTransaction.jsp?TransactionSerialNo="+transactionSerialNo+"&ToInheritObj=y","","resizable=yes;dialogWidth=30;dialogHeight=30;dialogLeft=400;dialogTop=200;center:yes;status:no;statusbar:no");
|
||||||
|
if(returnValue==0) alert("交易执行成功!");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
function runTransaction2(transcode,documenttype,documentno,transDate){
|
||||||
|
var returnValue = PopPage("/Accounting/LoanSimulation/LoanTerm/RunTransaction.jsp?TransDate="+transDate+"TransCode="+transcode+"&DocumentType="+documenttype+"&DocumentNo="+documentno+"&ToInheritObj=y","","resizable=yes;dialogWidth=30;dialogHeight=30;dialogLeft=400;dialogTop=200;center:yes;status:no;statusbar:no");
|
||||||
|
if(returnValue==0) alert("交易执行成功!");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
60
WebContent/Accounting/LoanSimulation/js/businessobject.js
Normal file
60
WebContent/Accounting/LoanSimulation/js/businessobject.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
function saveBusinessObjectToSession(businessObjectType,parentObjectType,parentObjectNo){
|
||||||
|
if(businessObjectType=="jbo.app.BUSINESS_PUTOUT"){
|
||||||
|
var r = checkSave();
|
||||||
|
if(r==1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var colCount = DZ[0][1].length;//列数
|
||||||
|
var paraStr = "RowCount="+getRowCount(0);
|
||||||
|
var colnames="";
|
||||||
|
for(var i=0;i<DZ[0][1].length;i++){
|
||||||
|
var updateable=DZ[0][1][i][5];
|
||||||
|
//alert(updateable+"--"+getColName(0,i));
|
||||||
|
if(updateable==0) continue;
|
||||||
|
colnames+=getColName(0,i)+",";
|
||||||
|
}
|
||||||
|
for(var j=1;j<=getRowCount(0);j++){
|
||||||
|
for(var i=0;i<colCount;i++){
|
||||||
|
var updateable=DZ[0][1][i][5];
|
||||||
|
if(updateable==0) continue;
|
||||||
|
var value=getItemValueByIndex(0,j-1,i);
|
||||||
|
if(typeof(value)=="undefined"||value==null || value.length==0||value=="null"||value=="Null") continue;
|
||||||
|
paraStr += "&"+getColName(0,i)+j+"="+value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(typeof(parentObjectType)=="undefined"||parentObjectType==null ||parentObjectType=="null"||parentObjectType=="Null")
|
||||||
|
parentObjectType="";
|
||||||
|
if(typeof(parentObjectNo)=="undefined"||parentObjectNo==null ||parentObjectNo=="null"||parentObjectNo=="Null")
|
||||||
|
parentObjectNo="";
|
||||||
|
paraStr+="&ParentObjectType="+parentObjectType;
|
||||||
|
paraStr+="&ParentObjectNo="+parentObjectNo;
|
||||||
|
paraStr+="&BusinessObjectType="+businessObjectType+"&ColNames="+colnames;
|
||||||
|
//空行不保存,再次刷新后无空行出现
|
||||||
|
var returnValue = PopPage("/Accounting/LoanSimulation/BusinessObjectAction.jsp?"+paraStr,"","resizable=yes;dialogWidth=0;dialogHeight=0;dialogLeft=0;dialogTop=0;center:yes;status:no;statusbar:yes");
|
||||||
|
if(returnValue=="true"){
|
||||||
|
alert("保存成功!");
|
||||||
|
if(businessObjectType=="jbo.app.BUSINESS_PUTOUT"){
|
||||||
|
parent.tt();
|
||||||
|
}
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
else alert("保存失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteBusinessObjectFromSession(businessObjectType,keyCol){
|
||||||
|
var serialNo = getItemValue(0,getRow(),keyCol);
|
||||||
|
if (typeof(serialNo)=="undefined" || serialNo.length==0){
|
||||||
|
alert("请选择一条记录!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var paraStr="BusinessObjectType="+businessObjectType+"&SerialNo="+serialNo;
|
||||||
|
//空行不保存,再次刷新后无空行出现
|
||||||
|
var returnValue = PopPage("/Accounting/LoanSimulation/BusinessObjectDelete.jsp?"+paraStr,"","resizable=yes;dialogWidth=0;dialogHeight=0;dialogLeft=0;dialogTop=0;center:yes;status:no;statusbar:yes");
|
||||||
|
if(returnValue=="true"){
|
||||||
|
alert("删除成功!");
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
else alert("删除失败!");
|
||||||
|
|
||||||
|
}
|
||||||
160
WebContent/Accounting/LoanSimulation/reriod/LCCalcReriodList.jsp
Normal file
160
WebContent/Accounting/LoanSimulation/reriod/LCCalcReriodList.jsp
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
|
||||||
|
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-06-12
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");
|
||||||
|
String planCName=CurPage.getParameter("planCName");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
TabCalBean tcb=TbBeanTools.getTabInfo(calType);
|
||||||
|
String RightType=CurPage.getParameter("RightType");
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCCalcReriodList");
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
doTemp.setJboClass(tcb.getPeriodTb());
|
||||||
|
CurPage.setAttribute("modelno","reriod");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ReadOnly = "0"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
System.out.println( dwTemp.getPageCount());
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增","newRecord()","","","",""},
|
||||||
|
{"true","","Button","保存","保存","save()","","","",""},
|
||||||
|
{"true","","Button","删除","删除","deleteRecord()","","","",""},
|
||||||
|
{"true","","Button","导入","导入","importRent()","","","","btn_icon_set",""},
|
||||||
|
{"true","","Button","模板下载","模板下载","downloadTemplate()","","","","btn_icon_set",""},
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function save(){
|
||||||
|
var pa=s_c_p[0]+1;
|
||||||
|
|
||||||
|
var count=getRowCount(0);
|
||||||
|
var start=parent.getItemValue(0,0,"start_date");
|
||||||
|
if(pa>1){
|
||||||
|
start=AsControl.RunJavaMethodTrans("com.tenwa.reckon.action.CalcAction","getUpperPlanDate","flowunid=<%=flowunid%>,planCValue=<%=plannumber%>,planCName=<%=planCName%>,calType=<%=calType%>,planlist="+getItemValue(0,0,"PLAN_list"));
|
||||||
|
}
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
if(getItemValue(0,i,"PLAN_DATE")<start){
|
||||||
|
alert("第"+getItemValue(0,i,"PLAN_list")+"期日期不能小于上一期日期");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
start=getItemValue(0,i,"PLAN_DATE");
|
||||||
|
}
|
||||||
|
if(pa<s_p_c[0]){
|
||||||
|
var nextplandate=AsControl.RunJavaMethodTrans("com.tenwa.reckon.action.CalcAction","getNextPlanDate","flowunid=<%=flowunid%>,calType=<%=calType%>,planCValue=<%=plannumber%>,planCName=<%=planCName%>,planlist="+getItemValue(0,count-1,"PLAN_list"));
|
||||||
|
if(getItemValue(0,count-1,"plan_date")>nextplandate){
|
||||||
|
alert("第"+getItemValue(0,count-1,"plan_list")+"期日期不能大于下一期日期");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pa==1){
|
||||||
|
if(count>0&&getItemValue(0,0,'plan_date')){
|
||||||
|
parent.setItemValue(0,0,"FIRST_PLAN_DATE",getItemValue(0,0,'plan_date'));
|
||||||
|
}
|
||||||
|
if(count>1&&getItemValue(0,1,'plan_date')){
|
||||||
|
parent.setItemValue(0,0,"SECOND_PLAN_DATE",getItemValue(0,1,'plan_date'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
as_save(0,'setIncomeNumber()');
|
||||||
|
}
|
||||||
|
|
||||||
|
function setIncomeNumber(){
|
||||||
|
var lastplanlist=AsControl.RunJavaMethodTrans("com.tenwa.reckon.action.CalcAction","getLastPlanList","flowunid=<%=flowunid%>,calType=<%=calType%>,planCValue=<%=plannumber%>,planCName=<%=planCName%>");
|
||||||
|
|
||||||
|
parent.setItemValue(0,getRow(),"INCOME_NUMBER",lastplanlist);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
var a=HiddenChangedValues;
|
||||||
|
var pa=s_c_p[0]+1;
|
||||||
|
if(pa!=s_p_c[0]&&s_p_c[0]!=0){
|
||||||
|
alert("请在最后一页新增");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
var count=1;
|
||||||
|
if(getRowCount(0)>0){
|
||||||
|
count=Number( getItemValue(0,getRowCount(0)-1,'plan_list'))+1;
|
||||||
|
}
|
||||||
|
as_add(0);
|
||||||
|
setItemValue(0,getRow(0),'flowunid','<%=flowunid%>');
|
||||||
|
setItemValue(0,getRow(0),'<%=planCName%>','<%=plannumber%>');
|
||||||
|
setItemValue(0,getRow(0),'plan_list',count+"");
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRecord(){
|
||||||
|
//s_c_p[0]+1 当前页 s_p_c[0] 最后一页
|
||||||
|
if(s_c_p[0]+1<s_p_c[0]){
|
||||||
|
alert('请依次从最后一期开始删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断当前期次是否已回笼,并且是不是最后一期
|
||||||
|
var count=getRowCount(0);
|
||||||
|
var rentList = getItemValue(0,getRow(0),'PLAN_LIST');
|
||||||
|
var plan=getItemValue(0,count-1,'plan_list');
|
||||||
|
if(rentList !=plan){
|
||||||
|
alert('请依次从最后一期开始删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm('确实要删除吗?')){
|
||||||
|
deleteHiddenChanged(count-1);
|
||||||
|
as_delete(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function importRent(){
|
||||||
|
|
||||||
|
var importCondition={};//导入配置
|
||||||
|
importCondition["flowunid"]="<%=flowunid%>";
|
||||||
|
importCondition["plannumber"]="<%=plannumber%>";
|
||||||
|
importCondition["planCName"]="<%=planCName%>";
|
||||||
|
importCondition["calType"]="<%=calType%>";
|
||||||
|
importCondition["CLEAN_LEASE_MONEY"]=parent.getItemValue(0,0,"CLEAN_LEASE_MONEY");
|
||||||
|
importCondition["RENT_OR_RATE"]=parent.getItemValue(0,0,"RENT_OR_RATE");
|
||||||
|
importCondition["EQUIP_END_VALUE"]=parent.getItemValue(0,0,"EQUIP_END_VALUE");
|
||||||
|
//增加其他配置参数
|
||||||
|
var sparam=JSON.stringify(importCondition).replace(/,/g,"@");
|
||||||
|
AsDialog.PopView("/Accounting/LoanSimulation/reriod/uploadReriod.jsp","importparam="+sparam,
|
||||||
|
{width:"350px",height:"40px",title:"上传租金表"},function(ew){
|
||||||
|
var result=eval("("+ew+")");
|
||||||
|
parent.setItemValue(0,0,"INCOME_NUMBER",result["index"]);
|
||||||
|
parent.setItemValue(0,0,"FIRST_PLAN_DATE",result["firstplan"]);
|
||||||
|
parent.setItemValue(0,0,"SECOND_PLAN_DATE",result["second"]);
|
||||||
|
//parent.lsaseTerm();
|
||||||
|
reloadSelf();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadTemplate(){
|
||||||
|
var templateId="bf1b960acfc94c3f9457ff801bb88628";
|
||||||
|
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||||
|
window.open(sWebRootPath+"/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>&sqlString=save@"+templateId, "downloadTemplate");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
52
WebContent/Accounting/LoanSimulation/reriod/uploadReriod.jsp
Normal file
52
WebContent/Accounting/LoanSimulation/reriod/uploadReriod.jsp
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%><%
|
||||||
|
String importparam = CurPage.getParameter("importparam");
|
||||||
|
boolean isReadOnly = "ReadOnly".equals(CurPage.getParameter("RightType"));
|
||||||
|
String[][] sButtons = {
|
||||||
|
{"true","All","Button","上传","","importRecord()","","","","btn_icon_up"}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<body style="overflow:hidden;" onresize="javascript:changeStyle();">
|
||||||
|
<div id="ButtonsDiv" style="margin-left:5px">
|
||||||
|
<table><tr><%if(!isReadOnly){%>
|
||||||
|
<td><form name="Attachment" action="<%=sWebRootPath%>/Accounting/LoanSimulation/reriod/uploadReriodOperator.jsp?CompClientID=<%=CurComp.getClientID()%>" accept-charset="GBK" style="margin-bottom:0px;" enctype="multipart/form-data" method="post">
|
||||||
|
<input type="file" name="File" />
|
||||||
|
<input type="hidden" name="importparam" value="<%=importparam%>" >
|
||||||
|
<input type="hidden" name="FileName" />
|
||||||
|
</form></td><%}%>
|
||||||
|
<td><%@ include file="/Frame/resources/include/ui/include_buttonset_dw.jspf"%></td>
|
||||||
|
</tr></table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
setDialogTitle("模板管理");
|
||||||
|
|
||||||
|
function importRecord(){
|
||||||
|
var o = document.forms["Attachment"];
|
||||||
|
var sFileName = o.File.value;
|
||||||
|
if(sFileName.indexOf(".xlsx")<=0&&sFileName.indexOf(".xls")<=0){
|
||||||
|
alert("上传的文档必需是excel文件");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var nameArr = sFileName.split("\\");
|
||||||
|
o.FileName.value = encodeURI(nameArr[nameArr.length-1]);
|
||||||
|
if (typeof(sFileName) == "undefined" || sFileName==""){
|
||||||
|
alert("请选择一个文件名!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var fileSize;
|
||||||
|
if(typeof(ActiveXObject) == "function"){ // IE
|
||||||
|
var fso = new ActiveXObject("Scripting.FileSystemObject");
|
||||||
|
var f1 = fso.GetFile(sFileName);
|
||||||
|
fileSize = f1.size;
|
||||||
|
}else{
|
||||||
|
fileSize = o.File.files[0].size;
|
||||||
|
}
|
||||||
|
if(fileSize > 2*1024*1024){
|
||||||
|
alert("文件大于2048k,不能上传!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return o.submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
<%@page import="com.tenwa.reckon.executor.CreateTransactionExecutor"%>
|
||||||
|
<%@page import="com.tenwa.file.TemplateManage.*"%>
|
||||||
|
<%@page import="java.net.URLDecoder"%>
|
||||||
|
<%@page import="com.amarsoft.are.jbo.impl.BizObjectTableMapper"%>
|
||||||
|
<%@page import="com.amarsoft.awe.util.DBKeyHelp"%>
|
||||||
|
<%@page import="com.amarsoft.awe.common.attachment.*"%>
|
||||||
|
<%@page import="com.amarsoft.are.util.json.*"%>
|
||||||
|
<%@page import="com.tenwa.officetempalte.util.FileOperatorUtil"%>
|
||||||
|
<%@page import="java.io.*" %>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
<%
|
||||||
|
ServletContext s1=this.getServletContext();
|
||||||
|
String rootPath=s1.getRealPath("/");
|
||||||
|
AmarsoftUpload myAmarsoftUpload = new AmarsoftUpload();
|
||||||
|
myAmarsoftUpload.initialize(pageContext);
|
||||||
|
myAmarsoftUpload.upload();
|
||||||
|
String cindex="";
|
||||||
|
String cmessage="";
|
||||||
|
if (!myAmarsoftUpload.getFiles().getFile(0).isMissing()){
|
||||||
|
try {
|
||||||
|
JBOTransaction tx=JBOFactory.getFactory().createTransaction();
|
||||||
|
String importparam= CurPage.getParameter("importparam");
|
||||||
|
importparam=importparam.replaceAll("@", ",");
|
||||||
|
JSONObject paramJson=JSONDecoder.decode(importparam);
|
||||||
|
Map<String,String>sourceMap=FileOperatorUtil.getJsonObjectToMap(paramJson);
|
||||||
|
System.out.println(sourceMap.toString());
|
||||||
|
CreateTransactionExecutor transaction = new CreateTransactionExecutor();
|
||||||
|
cindex=transaction.importRentOrCorpusTable( myAmarsoftUpload.getFiles().getFile(0).getFileName(), myAmarsoftUpload.getFiles().getFile(0).toInputStream(), sourceMap);
|
||||||
|
myAmarsoftUpload = null;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
myAmarsoftUpload = null;
|
||||||
|
cmessage=e.getMessage();
|
||||||
|
%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
alert("上传失败<%=cmessage%>");//上传文件失败!
|
||||||
|
window.close();
|
||||||
|
parent.AsDialog.ClosePage();
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
//alert("成功上传<%=cindex%>条");//上传文件成功!
|
||||||
|
parent.AsDialog.ClosePage('<%=cindex%>');
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
@ -0,0 +1,235 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
|
||||||
|
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-06-12
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");
|
||||||
|
String planCName=CurPage.getParameter("planCName");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
TabCalBean tcb=TbBeanTools.getTabInfo(calType);
|
||||||
|
String RightType=CurPage.getParameter("RightType");
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCCalcSubsectionList");
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
CurPage.setAttribute("modelno","subsection");
|
||||||
|
doTemp.setJboClass(tcb.getSubsectionTb());
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.getDataObject().setHtmlEvent("INCOME_NUMBER_YEAR", "onchange", "changeIncome");
|
||||||
|
dwTemp.getDataObject().setHtmlEvent("SETTLE_METHOD", "onchange", "eventMethod");
|
||||||
|
dwTemp.getDataObject().setHtmlEvent("APPOINT_TYPE", "onchange", "changeAppointType");
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ReadOnly = "0"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","新增","新增","newRecord()","","","",""},
|
||||||
|
{"true","","Button","保存","保存","save()","","","",""},
|
||||||
|
{"true","","Button","删除","删除","deleteRecord()","","","",""}
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var a;
|
||||||
|
var count=0;
|
||||||
|
window.onload=function(){
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
function save(){
|
||||||
|
var count=getRowCount(0);
|
||||||
|
if(count > 0){
|
||||||
|
var totalCount = Number(getItemValue(0,count-1,'end_list'));
|
||||||
|
parent.setItemValue(0,getRow(),"INCOME_NUMBER",totalCount+"");
|
||||||
|
var INCOME_NUMBER_YEAR=getItemValue(0,0,'INCOME_NUMBER_YEAR');
|
||||||
|
parent.setItemValue(0,0,"INCOME_NUMBER_YEAR",INCOME_NUMBER_YEAR);
|
||||||
|
parent.setItemValue(0,0,"INCOME_INTERVAL_MONTH",getItemValue(0,0,'INCOME_INTERVAL_MONTH'));
|
||||||
|
parent.CalcControl.InitStartDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
setRules();
|
||||||
|
var endlist=1;
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
if(i>0){
|
||||||
|
if(Number( getItemValue(0,i,"START_LIST"))<=endlist){
|
||||||
|
alert("第"+(i+1)+"段开始期次小于上一段结束期次,不能保存");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endlist=Number( getItemValue(0,i,"END_LIST"));
|
||||||
|
}
|
||||||
|
as_save(0,'location.href=location.href');
|
||||||
|
}
|
||||||
|
|
||||||
|
//required0
|
||||||
|
//验证校验
|
||||||
|
function setRules(){
|
||||||
|
TableFactory.initCheck=false;
|
||||||
|
_user_valid_errors[0] = new Array();
|
||||||
|
TableFactory.ColValidInfo[0] = new Array();
|
||||||
|
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
var SETTLE_METHOD=getItemValue(0,i,"SETTLE_METHOD");
|
||||||
|
var appointType=getItemValue(0,i,"APPOINT_TYPE");
|
||||||
|
var appointMoney=getItemValue(0,i,"APPOINT_MONEY");
|
||||||
|
var appointRate=getItemValue(0,i,"APPOINT_RATE");
|
||||||
|
if(appointType.length>0&&appointMoney.length==0){
|
||||||
|
_user_valid_errors[0][_user_valid_errors[0].length]= "指定了类型必须指定金额[第" + (i+1) +"行]";
|
||||||
|
TableFactory.ColValidInfo[0][TableFactory.ColValidInfo[0].length] = [i,"APPOINT_MONEY"];
|
||||||
|
}
|
||||||
|
if(SETTLE_METHOD=="even_corpus"&&appointRate.length==0){
|
||||||
|
_user_valid_errors[0][_user_valid_errors[0].length]= "等额本金测算必须指定利率[第" + (i+1) +"行]";
|
||||||
|
TableFactory.ColValidInfo[0][TableFactory.ColValidInfo[0].length] = [i,"APPOINT_RATE"];
|
||||||
|
}
|
||||||
|
if(SETTLE_METHOD!="even_corpus"&&appointRate.length==0&&appointType.length==0){
|
||||||
|
_user_valid_errors[0][_user_valid_errors[0].length]= "测算未指定租金必须指定利率[第" + (i+1) +"行]";
|
||||||
|
TableFactory.ColValidInfo[0][TableFactory.ColValidInfo[0].length] = [i,"APPOINT_RATE"];
|
||||||
|
}
|
||||||
|
if(Number(getItemValue(0,i,"END_LIST"))<=Number( getItemValue(0,i,"START_LIST"))){
|
||||||
|
_user_valid_errors[0][_user_valid_errors[0].length]= "结束期次不能小于开始期次[第" + (i+1) +"行]";
|
||||||
|
TableFactory.ColValidInfo[0][TableFactory.ColValidInfo[0].length] = [i,"END_LIST"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||||
|
function newRecord(){
|
||||||
|
setRules();
|
||||||
|
if(iV_all(0)==false){
|
||||||
|
showErrors(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var startList = 1;
|
||||||
|
var count=getRowCount(0);
|
||||||
|
if(count > 0){
|
||||||
|
startList = Number(getItemValue(0,count-1,'end_list')) + 1;
|
||||||
|
}
|
||||||
|
as_add(0);
|
||||||
|
setItemValue(0,getRow(0),'flowunid','<%=flowunid%>');
|
||||||
|
setItemValue(0,getRow(0),'<%=planCName%>','<%=plannumber%>');
|
||||||
|
setItemValue(0,getRow(0),'start_list',startList+"");
|
||||||
|
changeIncomeNumber($(getObj(0,getRow(0),"INCOME_NUMBER_YEAR")));
|
||||||
|
//as_save(0);
|
||||||
|
//changeIncomeNumber(changeIncomeNumber($(getObj(0,getRowCount(0)-1,"INCOME_NUMBER_YEAR"))));
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRecord(){
|
||||||
|
|
||||||
|
//s_c_p[0]+1 当前页 s_p_c[0] 最后一页
|
||||||
|
if(s_c_p[0]+1<s_p_c[0]){
|
||||||
|
alert('请依次从最后一期开始删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var count=getRowCount(0);
|
||||||
|
var rentList = getItemValue(0,getRow(0),'START_LIST');
|
||||||
|
var start=getItemValue(0,count-1,'start_list');
|
||||||
|
if(Number(rentList) < start){
|
||||||
|
alert('请依次从最后一期开始删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm('确实要删除吗?'))as_delete(0)
|
||||||
|
}
|
||||||
|
function changeIncome(e){
|
||||||
|
var tar=e.target;
|
||||||
|
changeIncomeNumber(tar);
|
||||||
|
}
|
||||||
|
function changeIncomeNumber(obj){
|
||||||
|
var value=$(obj).val();
|
||||||
|
if(value=='income_n'){
|
||||||
|
$(obj).parent().parent().next().find("input").removeAttr("readonly");;
|
||||||
|
$(obj).parent().parent().next().find("input").attr("style", "");
|
||||||
|
}else{
|
||||||
|
value=value.replace('income_','');
|
||||||
|
$(obj).parent().parent().next().find("input").attr("readonly","readonly");
|
||||||
|
$(obj).parent().parent().next().find("input").attr("style", "background-color:#EBEBE4");
|
||||||
|
$(obj).parent().parent().next().find("input").val(value);
|
||||||
|
$(obj).parent().parent().next().find("input").blur();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function eventMethod(){
|
||||||
|
var provValue = getItemValue(0,getRow(0),"SETTLE_METHOD",getRow(0));
|
||||||
|
changeSettleMethod(provValue);
|
||||||
|
}
|
||||||
|
function changeSettleMethod(provValue,rowindex,typeValue){
|
||||||
|
if(rowindex==undefined){
|
||||||
|
rowindex=getRow(0);
|
||||||
|
setItemValue(0,rowindex,"APPOINT_MONEY","");
|
||||||
|
setItemValue(0,rowindex,"APPOINT_TYPE","");
|
||||||
|
}
|
||||||
|
var aCode ={"appoint_type.1":"指定每期本金","appoint_type.3":"指定剩余本金","appoint_type.4":"指定偿还本金"};
|
||||||
|
var aCode2={"appoint_type.2":"指定每期租金"};
|
||||||
|
|
||||||
|
var oCity = getObj(0,rowindex,"APPOINT_TYPE");
|
||||||
|
var options = oCity.options;
|
||||||
|
options.length = 1;
|
||||||
|
options[0] = new Option("","");
|
||||||
|
options[0].selected = true;
|
||||||
|
var i=1;
|
||||||
|
if("even_corpus"==provValue){
|
||||||
|
for(var key in aCode){
|
||||||
|
options[i] = new Option(aCode[key],key);
|
||||||
|
if(key==typeValue)options[i].selected = true;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
for(var key in aCode2){
|
||||||
|
options[i] = new Option(aCode2[key],key);
|
||||||
|
if(key==typeValue)options[i].selected = true;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
changeAppointType(typeValue,rowindex);
|
||||||
|
}
|
||||||
|
function afterSearch(){
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
var sPro = getItemValue(0,i,'SETTLE_METHOD');
|
||||||
|
var stype = getItemValue(0,i,'APPOINT_TYPE');
|
||||||
|
changeSettleMethod(sPro,i,stype);
|
||||||
|
changeAppointType(stype,i);
|
||||||
|
changeIncomeNumber($(getObj(0,i,"INCOME_NUMBER_YEAR")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function changeAppointType(appointType,rowindex){
|
||||||
|
if(!rowindex&&rowindex!=0){
|
||||||
|
rowindex=getRow(0);
|
||||||
|
appointType=getItemValue(0,rowindex,"APPOINT_TYPE");
|
||||||
|
}
|
||||||
|
var index=getColIndex(0,"APPOINT_RATE");
|
||||||
|
var iTableColIndex = TableFactory.getTableColIndexFromDZ("myiframe0",index);
|
||||||
|
var id="INPUT_myiframe0_APPOINT_RATE_"+rowindex+"_"+iTableColIndex;
|
||||||
|
|
||||||
|
var moneyIndex=getColIndex(0,"APPOINT_MONEY");
|
||||||
|
var moneyTableColIndex = TableFactory.getTableColIndexFromDZ("myiframe0",moneyIndex);
|
||||||
|
if(appointType=="appoint_type.2"){
|
||||||
|
$("#INPUT_myiframe0_APPOINT_MONEY_"+rowindex+"_"+moneyTableColIndex).removeAttr("readOnly");
|
||||||
|
setItemValue(0,rowindex,"APPOINT_RATE","");
|
||||||
|
$("#"+id).attr("readOnly","readOnly");
|
||||||
|
}else if(appointType==""||!appointType){
|
||||||
|
setItemValue(0,rowindex,"APPOINT_MONEY","");
|
||||||
|
$("#INPUT_myiframe0_APPOINT_MONEY_"+rowindex+"_"+moneyTableColIndex).attr("readOnly","readOnly");
|
||||||
|
$("#"+id).removeAttr("readOnly");
|
||||||
|
} else{
|
||||||
|
$("#INPUT_myiframe0_APPOINT_MONEY_"+rowindex+"_"+moneyTableColIndex).removeAttr("readOnly");
|
||||||
|
$("#"+id).removeAttr("readOnly");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
59
WebContent/Accounting/LoanSimulation/upload/uploadRent.jsp
Normal file
59
WebContent/Accounting/LoanSimulation/upload/uploadRent.jsp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%><%
|
||||||
|
String importparam = CurPage.getParameter("importparam");
|
||||||
|
boolean isReadOnly = "ReadOnly".equals(CurPage.getParameter("RightType"));
|
||||||
|
String[][] sButtons = {
|
||||||
|
{"true","All","Button","上传","","importRecord()","","","","btn_icon_up"}
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
<body style="overflow:hidden;" onresize="javascript:changeStyle();">
|
||||||
|
<div id="ButtonsDiv" style="margin-left:5px">
|
||||||
|
<table><tr><%if(!isReadOnly){%>
|
||||||
|
<td><form name="Attachment" action="<%=sWebRootPath%>/Accounting/LoanSimulation/upload/uploadRentOperator.jsp?CompClientID=<%=CurComp.getClientID()%>" accept-charset="GBK" style="margin-bottom:0px;" enctype="multipart/form-data" method="post">
|
||||||
|
<input type="file" name="File" />
|
||||||
|
<input type="hidden" name="importparam" value="<%=importparam%>" >
|
||||||
|
<input type="hidden" name="FileName" />
|
||||||
|
</form></td><%}%>
|
||||||
|
<td><%@ include file="/Frame/resources/include/ui/include_buttonset_dw.jspf"%></td>
|
||||||
|
</tr></table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
setDialogTitle("模板管理");
|
||||||
|
|
||||||
|
function importRecord(){
|
||||||
|
var o = document.forms["Attachment"];
|
||||||
|
var sFileName = o.File.value;
|
||||||
|
if(sFileName.indexOf(".xlsx")<=0&&sFileName.indexOf(".xls")<=0){
|
||||||
|
alert("上传的文档必需是excel文件");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var nameArr = sFileName.split("\\");
|
||||||
|
o.FileName.value = encodeURI(nameArr[nameArr.length-1]);
|
||||||
|
if (typeof(sFileName) == "undefined" || sFileName==""){
|
||||||
|
alert("请选择一个文件名!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var fileSize;
|
||||||
|
if(typeof(ActiveXObject) == "function"){ // IE
|
||||||
|
var fso = new ActiveXObject("Scripting.FileSystemObject");
|
||||||
|
var f1 = fso.GetFile(sFileName);
|
||||||
|
fileSize = f1.size;
|
||||||
|
}else{
|
||||||
|
fileSize = o.File.files[0].size;
|
||||||
|
}
|
||||||
|
if(fileSize > 2*1024*1024){
|
||||||
|
alert("文件大于2048k,不能上传!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return o.submit();
|
||||||
|
}
|
||||||
|
function delRecord(){
|
||||||
|
window.frames["AttachmentList"].deleteRecord();
|
||||||
|
}
|
||||||
|
function viewFile(){
|
||||||
|
window.frames["AttachmentList"].viewFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
<%@page import="com.tenwa.reckon.executor.CreateTransactionExecutor"%>
|
||||||
|
<%@page import="com.tenwa.file.TemplateManage.*"%>
|
||||||
|
<%@page import="java.net.URLDecoder"%>
|
||||||
|
<%@page import="com.amarsoft.are.jbo.impl.BizObjectTableMapper"%>
|
||||||
|
<%@page import="com.amarsoft.awe.util.DBKeyHelp"%>
|
||||||
|
<%@page import="com.amarsoft.awe.common.attachment.*"%>
|
||||||
|
<%@page import="com.amarsoft.awe.common.attachment.*"%>
|
||||||
|
<%@page import="com.amarsoft.are.util.json.*"%>
|
||||||
|
<%@page import="com.tenwa.officetempalte.util.FileOperatorUtil"%>
|
||||||
|
<%@page import="java.io.*" %>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/IncludeBegin.jsp"%>
|
||||||
|
<%
|
||||||
|
ServletContext s1=this.getServletContext();
|
||||||
|
String rootPath=s1.getRealPath("/");
|
||||||
|
AmarsoftUpload myAmarsoftUpload = new AmarsoftUpload();
|
||||||
|
myAmarsoftUpload.initialize(pageContext);
|
||||||
|
myAmarsoftUpload.upload();
|
||||||
|
int cindex=0;
|
||||||
|
String cmessage="";
|
||||||
|
if (!myAmarsoftUpload.getFiles().getFile(0).isMissing()){
|
||||||
|
try {
|
||||||
|
JBOTransaction tx=JBOFactory.getFactory().createTransaction();
|
||||||
|
String importparam= CurPage.getParameter("importparam");
|
||||||
|
importparam=importparam.replaceAll("@", ",");
|
||||||
|
JSONObject paramJson=JSONDecoder.decode(importparam);
|
||||||
|
Map<String,String>sourceMap=FileOperatorUtil.getJsonObjectToMap(paramJson);
|
||||||
|
System.out.println(sourceMap.toString());
|
||||||
|
CreateTransactionExecutor transaction = new CreateTransactionExecutor();
|
||||||
|
cindex=transaction.importRentPlan( myAmarsoftUpload.getFiles().getFile(0).getFileName(), myAmarsoftUpload.getFiles().getFile(0).toInputStream(), sourceMap);
|
||||||
|
myAmarsoftUpload = null;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
myAmarsoftUpload = null;
|
||||||
|
cmessage=e.getMessage();
|
||||||
|
%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
alert("上传失败<%=cmessage%>");//上传文件失败!
|
||||||
|
window.close();
|
||||||
|
parent.AsDialog.ClosePage();
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
alert("成功上传<%=cindex%>条");//上传文件成功!
|
||||||
|
parent.AsDialog.ClosePage("true");
|
||||||
|
</script>
|
||||||
|
<%@ include file="/IncludeEnd.jsp"%>
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-05-12
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String flowunid = CurPage.getParameter("FlowUnid");//流程
|
||||||
|
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);
|
||||||
|
String projid=flow.getAttribute("proj_id").getString();
|
||||||
|
String contract_id=flow.getAttribute("contract_id").getString();
|
||||||
|
String ProductId=CurPage.getParameter("ProductId");//产品编号
|
||||||
|
String calType = CurPage.getParameter("calType");
|
||||||
|
String sRightType= CurPage.getParameter("RightType");
|
||||||
|
String compClientID = CurPage.getParameter("CompClientID");
|
||||||
|
String ishistory = CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
if(sRightType==null){
|
||||||
|
sRightType="";
|
||||||
|
}
|
||||||
|
|
||||||
|
String planCName="PROJECT_PLAN_NUMBER";
|
||||||
|
if("proj_process".equals(calType)){
|
||||||
|
planCName="PROJECT_PLAN_NUMBER";
|
||||||
|
|
||||||
|
}else if("pay_process".equals(calType)||"onHire_process".equals(calType)){
|
||||||
|
|
||||||
|
planCName="PAYMENT_NUMBER";
|
||||||
|
}else{
|
||||||
|
planCName="CONTRACT_PLAN_NUMBER";
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCCalcPlanTempList");
|
||||||
|
doTemp.setVisible(planCName, true);
|
||||||
|
doTemp.setVisible("FILENAME", false);
|
||||||
|
doTemp.setVisible("INPUTTIME", false);
|
||||||
|
doTemp.setVisible("ACTION", false);
|
||||||
|
if(null!=ishistory&&ishistory.equals("true"))
|
||||||
|
{
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcListArachiveShow");
|
||||||
|
}
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] =null;
|
||||||
|
if("ContractOnhireChangeFlow".equals(CurPage.getParameter("FlowNo"))){
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_edit"},
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons=new String[][]{
|
||||||
|
{"true","All","Button","修改","新增","viewAndEdit()","","","","btn_icon_add",""},
|
||||||
|
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_edit"},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUrl = "/Accounting/LoanSimulation_onhire/LoanBasicInfo.jsp";
|
||||||
|
var sPara = getItemValue(0,getRow(0),'ID');
|
||||||
|
var flowunid = getItemValue(0,getRow(0),'FLOWUNID');
|
||||||
|
var plannumber = getItemValue(0,getRow(0),'<%=planCName%>');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("参数不能为空!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sParam="ID="+sPara+"&FlowUnid="+flowunid+"&plannumber="+plannumber+"&RightType=<%=sRightType%>&ProductId=<%=ProductId%>&calType=<%=calType%>";
|
||||||
|
sParam+="&NodeNo=<%=nodeNo%>";
|
||||||
|
AsControl.OpenView(sUrl,sParam,'_self','');
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
225
WebContent/Accounting/LoanSimulationPlan/LCCalcPlanTempList.jsp
Normal file
225
WebContent/Accounting/LoanSimulationPlan/LCCalcPlanTempList.jsp
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-05-12
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String flowunid = CurPage.getParameter("FlowUnid");//流程
|
||||||
|
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);
|
||||||
|
String projid=flow.getAttribute("proj_id").getString();
|
||||||
|
String contract_id=flow.getAttribute("contract_id").getString();
|
||||||
|
String ProductId=CurPage.getParameter("ProductId");//产品编号
|
||||||
|
String calType = CurPage.getParameter("calType");
|
||||||
|
String sRightType= CurPage.getParameter("RightType");
|
||||||
|
String compClientID = CurPage.getParameter("CompClientID");
|
||||||
|
String ishistory = CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
if(sRightType==null){
|
||||||
|
sRightType="";
|
||||||
|
}
|
||||||
|
|
||||||
|
String planCName="PROJECT_PLAN_NUMBER";
|
||||||
|
if("proj_process".equals(calType)){
|
||||||
|
planCName="PROJECT_PLAN_NUMBER";
|
||||||
|
}else if("pay_process".equals(calType)){
|
||||||
|
planCName="PAYMENT_NUMBER";
|
||||||
|
}else{
|
||||||
|
planCName="CONTRACT_PLAN_NUMBER";
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCCalcPlanTempList");
|
||||||
|
doTemp.setVisible(planCName, true);
|
||||||
|
if(null!=ishistory&&ishistory.equals("true"))
|
||||||
|
{
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcListArachiveShow");
|
||||||
|
}
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] =null;
|
||||||
|
if("ContractOnhireChangeFlow".equals(CurPage.getParameter("FlowNo"))){
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_edit"},
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons=new String[][]{
|
||||||
|
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||||
|
{"true","All","Button","复制方案","新增","copyCalc()","","","","btn_icon_add",""},
|
||||||
|
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||||
|
{"true","All","Button","删除","删除","if(confirm('确实要删除吗?'))deletePlan()","","","","btn_icon_delete",""},
|
||||||
|
{"true","All","Button","生成报价单","生成报价单","generateQuotation()","","","",""},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function copyCalc(){
|
||||||
|
var sPara = getItemValue(0,getRow(0),'ID');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("请选择一条记录!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
var sParam="conditionid="+getItemValue(0,getRow(0),"id")+",calType=<%=calType%>";
|
||||||
|
var result=RunJavaMethodTrans("com.tenwa.flow.fund.paymentplan.PaymentPlanAction","copyTempCondition",sParam);
|
||||||
|
alert(result);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
function newRecord(){
|
||||||
|
var sUrl = "/Accounting/LoanSimulation/LoanBasicInfo.jsp";
|
||||||
|
var sParam="FlowUnid=<%=flowunid%>&ProductId=<%=ProductId%>&calType=<%=calType%>"
|
||||||
|
AsControl.OpenView(sUrl,sParam,'_self','');
|
||||||
|
}
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUrl = "/Accounting/LoanSimulation/LoanBasicInfo.jsp";
|
||||||
|
var sPara = getItemValue(0,getRow(0),'ID');
|
||||||
|
var flowunid = getItemValue(0,getRow(0),'FLOWUNID');
|
||||||
|
var plannumber = getItemValue(0,getRow(0),'<%=planCName%>');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("参数不能为空!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sParam="ID="+sPara+"&FlowUnid="+flowunid+"&plannumber="+plannumber+"&RightType=<%=sRightType%>&ProductId=<%=ProductId%>&calType=<%=calType%>";
|
||||||
|
sParam+="&NodeNo=<%=nodeNo%>";
|
||||||
|
AsControl.OpenView(sUrl,sParam,'_self','');
|
||||||
|
}
|
||||||
|
|
||||||
|
function deletePlan(){
|
||||||
|
var flowunid = getItemValue(0,getRow(0),'FLOWUNID');
|
||||||
|
var planCName="<%=planCName%>";
|
||||||
|
var plannumber = getItemValue(0,getRow(0),'<%=planCName%>');
|
||||||
|
var sParam="flowunid="+flowunid+",plannumber="+plannumber+",planCName="+planCName;
|
||||||
|
var result=RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","deletePlan",sParam);
|
||||||
|
alert(result);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
function generateQuotation()
|
||||||
|
{
|
||||||
|
var param={};
|
||||||
|
var tempParam={};
|
||||||
|
var sparam="";
|
||||||
|
var sPara = getItemValue(0,getRow(0),'ID');
|
||||||
|
var PROJECT_PLAN_NUMBER=getItemValue(0,getRow(0),'PROJECT_PLAN_NUMBER');
|
||||||
|
var CONTRACT_PLAN_NUMBER=getItemValue(0,getRow(0),'CONTRACT_PLAN_NUMBER');
|
||||||
|
var PAYMENT_NUMBER=getItemValue(0,getRow(0),'PAYMENT_NUMBER');
|
||||||
|
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||||
|
alert("请选择一条信息!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
//模板号
|
||||||
|
param["templateNo"]="2017052300000001";
|
||||||
|
//生成文件关联关系
|
||||||
|
tempParam["OBJECTTYPE"]="报价单";
|
||||||
|
tempParam["FLOW_UNID"]="<%=flowunid%>";
|
||||||
|
tempParam["PROJ_ID"]="<%=projid%>";
|
||||||
|
if("<%=contract_id%>".length>0)
|
||||||
|
{
|
||||||
|
tempParam["CONTRACT_ID"]="<%=contract_id%>";
|
||||||
|
}
|
||||||
|
tempParam["contract_id"]="<%=contract_id%>";
|
||||||
|
tempParam["PROJ_PLAN_NUMBER"]=getItemValue(0,getRow(0),'<%=planCName%>');
|
||||||
|
tempParam["CONTRACT_PLAN_NUMBER"]=getItemValue(0,getRow(0),'<%=planCName%>');
|
||||||
|
tempParam["PLAN_NUMBER"]=getItemValue(0,getRow(0),'<%=planCName%>');
|
||||||
|
//生成模板固定参数
|
||||||
|
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||||
|
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
|
||||||
|
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||||
|
debugger;
|
||||||
|
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
|
||||||
|
for(var key in param){
|
||||||
|
if(sparam.length>0){sparam+=",";}
|
||||||
|
sparam+=key+"="+param[key];
|
||||||
|
}
|
||||||
|
var deleteparam="";
|
||||||
|
if('<%=planCName%>'=='PROJECT_PLAN_NUMBER'){
|
||||||
|
deleteparam="PROJECT_PLAN_NUMBER="+PROJECT_PLAN_NUMBER;
|
||||||
|
}else if('<%=planCName%>'=='CONTRACT_PLAN_NUMBER'){
|
||||||
|
deleteparam="CONTRACT_PLAN_NUMBER="+CONTRACT_PLAN_NUMBER;
|
||||||
|
}else{
|
||||||
|
deleteparam="CONTRACT_PLAN_NUMBER="+PAYMENT_NUMBER;
|
||||||
|
}
|
||||||
|
|
||||||
|
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.QutationAction","deletequtation",deleteparam);
|
||||||
|
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||||
|
if("success"==result){
|
||||||
|
alert("生成成功!");
|
||||||
|
}
|
||||||
|
reloadSelf();
|
||||||
|
|
||||||
|
}
|
||||||
|
//在加载完表格后调用
|
||||||
|
function afterSearch(){
|
||||||
|
var RightType = "<%=sRightType%>";
|
||||||
|
var ishistory = "<%=ishistory%>";
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
var html="";
|
||||||
|
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"attrid")+'\')><font color="blue">'+getObj(0,i,"FILENAME").innerHTML+'</font></a>';
|
||||||
|
getObj(0,i,"FILENAME").innerHTML=html;
|
||||||
|
};
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
html='<a class="btn_icon_detail" onclick="viewOffice()"> </a> ';
|
||||||
|
if((null ==RightType||RightType!="ReadOnly")&&(null==ishistory||ishistory!="true")){
|
||||||
|
html+=' <a class="btn_icon_edit" onclick="editOffice()"> </a> <a class="btn_icon_delete"onclick="deleteFile()"> </a> ';
|
||||||
|
}
|
||||||
|
getObj(0,i,"ACTION").innerHTML=html;
|
||||||
|
}
|
||||||
|
setColumnWidth(0,"ACTION",150);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function viewOffice(){
|
||||||
|
var id = getItemValue(0,getRow(),"attrid");
|
||||||
|
var filename = getItemValue(0,getRow(),"FILENAME");
|
||||||
|
var filetype=filename.substr(filename.indexOf(".")+1);
|
||||||
|
var status=1;
|
||||||
|
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=compClientID%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
|
||||||
|
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
|
||||||
|
return;
|
||||||
|
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
|
||||||
|
alert("提交成功!");
|
||||||
|
reloadSelf();
|
||||||
|
}else{
|
||||||
|
alert("提交失败!");
|
||||||
|
}
|
||||||
|
},"查看文档");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function editOffice(){
|
||||||
|
var id = getItemValue(0,getRow(),"attrid");
|
||||||
|
var filename = getItemValue(0,getRow(),"FILENAME");
|
||||||
|
var filetype=filename.substr(filename.indexOf(".")+1);
|
||||||
|
var status=2;
|
||||||
|
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=compClientID%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
|
||||||
|
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
|
||||||
|
return;
|
||||||
|
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
|
||||||
|
alert("提交成功!");
|
||||||
|
reloadSelf();
|
||||||
|
}else{
|
||||||
|
alert("提交失败!");
|
||||||
|
}
|
||||||
|
},"编辑文档");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function deleteFile(){
|
||||||
|
var id = getItemValue(0,getRow(),"attrid");
|
||||||
|
var sParams="attId="+id;
|
||||||
|
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteFile",sParams);
|
||||||
|
reloadSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function downloadFile(id){
|
||||||
|
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||||
|
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-05-12
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String flowunid = CurPage.getParameter("FlowUnid");//流程
|
||||||
|
String ProductId=CurPage.getParameter("ProductId");//产品编号
|
||||||
|
String calType = CurPage.getParameter("calType");
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String ishistory= CurPage.getParameter("IsHistory");
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCContractConditionList");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true"))
|
||||||
|
{
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory");
|
||||||
|
}
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","复制方案","复制方案","copyPlan()","","","","btn_icon_add",""},
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function copyPlan(){
|
||||||
|
var params="conditionid="+getItemValue(0,getRow(0),"ID");
|
||||||
|
var sReturn=RunJavaMethodTrans("com.tenwa.flow.fund.paymentplan.PaymentPlanAction","copyCondition",params);
|
||||||
|
if(sReturn.length>0){
|
||||||
|
alert(sReturn);
|
||||||
|
}else{
|
||||||
|
alert("操作成功!请到本次投放查看");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
<%@page import="com.tenwa.reckon.product.ProductCondition"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||||
|
|
||||||
|
String ID = CurPage.getParameter("id");
|
||||||
|
if(ID == null)ID = "";
|
||||||
|
String sFlowUnid = CurPage.getParameter("flowunid");//流程编号
|
||||||
|
String planCName = CurPage.getParameter("planCName");//流程编号
|
||||||
|
String plannumber = CurPage.getParameter("plannumber");//流程编号
|
||||||
|
String productId=CurPage.getParameter("productId");
|
||||||
|
if(sFlowUnid == null)sFlowUnid = "";
|
||||||
|
String sInfoTempletNo = CurPage.getParameter("InfoTempletNo");//模板号
|
||||||
|
if(sInfoTempletNo == null) sInfoTempletNo = "LCFundPlanChangeInInfoTemp_calc";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
if(RightType == null) RightType = "";
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sInfoTempletNo);
|
||||||
|
doTemp.setDefaultValue("PAYMENT_NUMBER",plannumber);
|
||||||
|
doTemp.setDefaultValue("OPERATION_STATUS","opera_after");
|
||||||
|
doTemp.setDefaultValue("flowunid",sFlowUnid);
|
||||||
|
ProductCondition pc=new ProductCondition();
|
||||||
|
String condition=pc.getProductFundList(productId);
|
||||||
|
doTemp.setColumnAttribute("FEE_TYPE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='FeeType' and itemno in ("+pc.getSqlWhere(condition)+") order by sortno");
|
||||||
|
doTemp.setHtmlEvent("FEE_TYPE","onchange","changPlanList");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||||
|
dwTemp.Style = "2";//
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
dwTemp.ReadOnly = "1";//只读模式
|
||||||
|
}
|
||||||
|
dwTemp.genHTMLObjectWindow(ID);
|
||||||
|
CurPage.getCurComp().setAttribute("RightType", RightType);
|
||||||
|
String sButtons[][] =null;
|
||||||
|
sButtons =new String[][] {
|
||||||
|
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
|
||||||
|
{"true","","Button","返回","返回","goBack()","","","","btn_icon_return"}
|
||||||
|
};
|
||||||
|
sButtonPosition = "south";
|
||||||
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
if('<%=ID%>'==''){
|
||||||
|
setItemReadOnly(0, getRow(), "FEE_TYPE", false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function saveRecord(){
|
||||||
|
var paymentnumber = getItemValue(0, getRow(), 'PAYMENT_NUMBER');
|
||||||
|
var feetype=getItemValue(0,getRow(),"FEE_TYPE");
|
||||||
|
var contractid = getItemValue(0, getRow(), 'CONTRACT_ID');
|
||||||
|
var sparam = contractid+"@"+paymentnumber+"@"+feetype+"@"+"<%=sFlowUnid%>"+"@"+"<%=CurUser.getUserID()%>";
|
||||||
|
as_save("myiframe0","checkCautionMoney('"+sparam+"')");
|
||||||
|
}
|
||||||
|
function checkCautionMoney(sparam){
|
||||||
|
var params = sparam.split("@");
|
||||||
|
if(params[2]=='feetype2' || params[2]=='feetype16' ||params[2]=='feetype17' ){
|
||||||
|
var sParam = "ContractId="+params[0]+",PaymentNumber="+params[1]+",FlowUnid="+params[3]+",CurUserID="+params[4];
|
||||||
|
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","checkCautionMoney",sParam);
|
||||||
|
returnValue = returnValue.split("@");
|
||||||
|
if(returnValue[0]=='success'){
|
||||||
|
alert(returnValue[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function goBack(){
|
||||||
|
var sUrl="/Accounting/LoanSimulation_change/FundPlanList.jsp";
|
||||||
|
var sParam = "flowunid="+"<%=sFlowUnid%>"+"&planCName=<%=planCName%>&plannumber=<%=plannumber%>&productId=<%=productId%>";
|
||||||
|
AsControl.OpenView(sUrl,sParam,"_self","");
|
||||||
|
}
|
||||||
|
function selectPayObject(){
|
||||||
|
AsDialog.OpenSelector("selectPayObject","","",function(sReturn){
|
||||||
|
if(!sReturn||sReturn=="_CANCEL_"){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sReturn = sReturn.split("@");
|
||||||
|
setItemValue(0,0,"PAY_OBJ", sReturn[0]);
|
||||||
|
setItemValue(0,0,"PAY_OBJ_NAME", sReturn[1]);
|
||||||
|
},"请选择支付对象");
|
||||||
|
}
|
||||||
|
function changPlanList(){
|
||||||
|
var paymentnumber = getItemValue(0, getRow(), 'PAYMENT_NUMBER');
|
||||||
|
var feetype=getItemValue(0,getRow(),"FEE_TYPE");
|
||||||
|
var contractid = getItemValue(0, getRow(), 'CONTRACT_ID');
|
||||||
|
if(typeof(paymentnumber)!=undefined && paymentnumber!='' && typeof(feetype)!=undefined&& feetype!=''){
|
||||||
|
var sparam = "ContractId="+contractid+",PaymentNumber="+paymentnumber+",FeeType=" + feetype + ",FlowUnid=<%=sFlowUnid%>,CurUserID=<%=CurUser.getUserID()%>";
|
||||||
|
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","createFundPlanList",sparam);
|
||||||
|
setItemValue(0,0,"PLAN_LIST", returnValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
118
WebContent/Accounting/LoanSimulation_change/FundPlanList.jsp
Normal file
118
WebContent/Accounting/LoanSimulation_change/FundPlanList.jsp
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");//方案编号
|
||||||
|
String planCName=CurPage.getParameter("planCName");//项目方案 合同方案 投放编号 列名
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
String productId=CurPage.getParameter("productId");
|
||||||
|
if(flowunid == null) flowunid = "100000";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String taskno=CurPage.getParameter("TaskNo");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCFundPlanChangeTemp");
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
CurPage.setAttribute("modelno","fund");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
|
||||||
|
String sButtons[][] =null;
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
sButtons=new String[][] {
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add"},
|
||||||
|
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
|
||||||
|
{"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete"},
|
||||||
|
{"true","","Button","更新现金流","修改","updateFlow()","","","","btn_icon_edit"},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function updateFlow(){
|
||||||
|
var s= AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateConditionFund","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,productId=<%=productId%>");
|
||||||
|
if(s!="true"){
|
||||||
|
alert(s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateCashFlow","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>");
|
||||||
|
//reloadSelf();/Accounting/LoanSimulation/LoanBasicInfo.jsp
|
||||||
|
alert("更新成功!");
|
||||||
|
}
|
||||||
|
function newRecord(){
|
||||||
|
var sUrl = "/Accounting/LoanSimulation_change/FundPlanChangeInfo.jsp";
|
||||||
|
var sParam = "flowunid=<%=flowunid%>&planCName=<%=planCName%>&plannumber=<%=plannumber%>&productId=<%=productId%>";
|
||||||
|
AsControl.OpenView(sUrl,sParam,'_self','');
|
||||||
|
}
|
||||||
|
function viewAndEdit(){
|
||||||
|
if('<%=RightType%>'!='ReadOnly'&&'<%=ishistory%>'!='true'){
|
||||||
|
if("feetype10"==getItemValue(0,getRow(0),"FEE_TYPE")){
|
||||||
|
alert("不能修改设备款");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
var planstatus=getItemValue(0,getRow(0),'PLAN_STATUS');
|
||||||
|
if(planstatus=='planstatus1' || planstatus=='planstatus2'){
|
||||||
|
alert("该费用已收款或部分收款,不允许修改!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(planstatus=='planstatus4' || planstatus=='planstatus5'){
|
||||||
|
alert("该费用已付款或部分付款,不允许修改!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(planstatus=='planstatus6'){
|
||||||
|
var id = getItemValue(0,getRow(0),'ID');
|
||||||
|
var sParam = "PlanId="+id+",CurUserID=<%=CurUser.getUserID()%>";
|
||||||
|
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","checkPayOutApplyPass",sParam);
|
||||||
|
if(returnValue=='fail'){
|
||||||
|
alert("该费用已申请通过,不允许修改!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var sUrl = "/Accounting/LoanSimulation_change/FundPlanChangeInfo.jsp";
|
||||||
|
var id = getItemValue(0,getRow(0),'ID');
|
||||||
|
if(typeof(id)=="undefined" || id.length==0 ){
|
||||||
|
alert("请选择一条数据!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
sParam = "id="+id+"&flowunid=<%=flowunid%>&planCName=<%=planCName%>&plannumber=<%=plannumber%>&productId=<%=productId%>";
|
||||||
|
AsControl.OpenView(sUrl,sParam,'_self','');
|
||||||
|
}
|
||||||
|
function deleteRecord(){
|
||||||
|
var planstatus=getItemValue(0,getRow(0),'PLAN_STATUS');
|
||||||
|
if(confirm('确实要删除吗?')){
|
||||||
|
if(planstatus=='planstatus1' || planstatus=='planstatus2'){
|
||||||
|
alert("该费用已收款或部分收款,不允许删除!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(planstatus=='planstatus4' || planstatus=='planstatus5'){
|
||||||
|
alert("该费用已付款或部分付款,不允许删除!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(planstatus=='planstatus6'){
|
||||||
|
var id = getItemValue(0,getRow(0),'ID');
|
||||||
|
var sParam = "PlanId="+id+",CurUserID=<%=CurUser.getUserID()%>";
|
||||||
|
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","checkPayOutApplyPass",sParam);
|
||||||
|
if(returnValue=='fail'){
|
||||||
|
alert("该费用已申请通过,不允许删除!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(getItemValue(0,getRow(0),"plan_list")=="1"&&getItemValue(0,getRow(0),"FEE_TYPE")=="feetype10"){
|
||||||
|
alert("不能删除所有设备款");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
as_delete('myiframe0');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||||
|
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-05-12
|
||||||
|
Content:
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String flowunid = CurPage.getParameter("FlowUnid");//流程
|
||||||
|
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);
|
||||||
|
String projid=flow.getAttribute("proj_id").getString();
|
||||||
|
String contract_id=flow.getAttribute("contract_id").getString();
|
||||||
|
String ProductId=CurPage.getParameter("ProductId");//产品编号
|
||||||
|
String calType ="pay_process";
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
String compClientID = CurPage.getParameter("CompClientID");
|
||||||
|
String ishistory = CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
String taskno = CurPage.getParameter("TaskNo");
|
||||||
|
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCPaymentPlanListChange");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true"))
|
||||||
|
{
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcListArachiveShow");
|
||||||
|
}
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(10);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
String sButtons[][] =null;
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_edit"},
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sUrl = "/Accounting/LoanSimulation_change/LCRentChangeInfo.jsp";
|
||||||
|
var flowunid = getItemValue(0,getRow(0),'FLOWUNID');
|
||||||
|
var plannumber = getItemValue(0,getRow(0),'PAYMENT_NUMBER');
|
||||||
|
if(typeof(plannumber)=="undefined" || plannumber.length==0 ){
|
||||||
|
alert("请选择一条纪录!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sParam="FlowUnid="+flowunid+"&plannumber="+plannumber+"&RightType=<%=RightType%>&ProductId=<%=ProductId%>&calType=<%=calType%>&NodeNo=<%=nodeNo%>&TaskNo=<%=taskno%>";
|
||||||
|
AsControl.OpenView(sUrl,sParam,'_self','');
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
171
WebContent/Accounting/LoanSimulation_change/LCRentChangeInfo.jsp
Normal file
171
WebContent/Accounting/LoanSimulation_change/LCRentChangeInfo.jsp
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<%@page import="com.amarsoft.awe.control.model.Parameter"%>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ page import="com.tenwa.reckon.product.ASObjectWindowCalc" %>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-06-29
|
||||||
|
Content: 示例详情页面
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
String calType = CurPage.getParameter("calType");
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
String flowunid = CurPage.getParameter("FlowUnid");
|
||||||
|
String ProductId = CurPage.getParameter("ProductId");
|
||||||
|
String sRightType= CurPage.getParameter("RightType");
|
||||||
|
String taskno = CurPage.getParameter("TaskNo");
|
||||||
|
String settleMethod="";
|
||||||
|
String rentOrRate="";
|
||||||
|
if(plannumber==null){
|
||||||
|
BizObject condition=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
|
||||||
|
plannumber=condition.getAttribute("payment_number").getString();
|
||||||
|
settleMethod=condition.getAttribute("SETTLE_METHOD").getString();
|
||||||
|
rentOrRate=condition.getAttribute("RENT_OR_RATE").getString();
|
||||||
|
}else{
|
||||||
|
BizObject condition=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid and payment_number=:plannumber").setParameter("flowunid", flowunid).setParameter("plannumber", plannumber).getSingleResult(false);
|
||||||
|
settleMethod=condition.getAttribute("SETTLE_METHOD").getString();
|
||||||
|
rentOrRate=condition.getAttribute("RENT_OR_RATE").getString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String sTempletNo = "LCRentChangeInfo";//--模板号--
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
String groupHidden="";
|
||||||
|
if(!(settleMethod.equals("even_corpus")||(rentOrRate.equals("rate")&&!settleMethod.equals("even_subsection")&&!settleMethod.equals("irregular_rent")))){
|
||||||
|
doTemp.setRequired("START_LIST", false);
|
||||||
|
doTemp.setVisible("START_LIST", false);
|
||||||
|
doTemp.setRequired("ADJUST_LIST", false);
|
||||||
|
doTemp.setVisible("ADJUST_LIST", false);
|
||||||
|
doTemp.setRequired("PAYDAY_ADJUST", false);
|
||||||
|
doTemp.setVisible("PAYDAY_ADJUST", false);
|
||||||
|
doTemp.setRequired("YEAR_RATE", false);
|
||||||
|
doTemp.setVisible("YEAR_RATE", false);
|
||||||
|
groupHidden="0010,0020";
|
||||||
|
}
|
||||||
|
doTemp.setDefaultValue("flowunid", flowunid);
|
||||||
|
doTemp.setDefaultValue("payment_number", plannumber);
|
||||||
|
doTemp.setHtmlEvent("START_LIST","onchange","startListChange");
|
||||||
|
|
||||||
|
doTemp.appendJboWhere(" and payment_number='"+plannumber+"'");
|
||||||
|
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.onhirechange.RentPlanChangeShow");//如果是历史则新显示历史数据
|
||||||
|
}
|
||||||
|
List<BizObject> rents=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP","select * from O where flowunid='"+flowunid+"' and payment_number='"+plannumber+"' order by plan_list").getResultList(false);
|
||||||
|
if(rents.size()>0){
|
||||||
|
doTemp.setDefaultValue("YEAR_RATE",rents.get(rents.size()-1).getAttribute("YEAR_RATE").getString());
|
||||||
|
}
|
||||||
|
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
|
||||||
|
Parameter p=new Parameter("NodeNo",nodeNo+"_1");
|
||||||
|
Parameter p2=new Parameter("payment_number",plannumber);
|
||||||
|
Vector<Parameter> v=CurPage.parameterList;
|
||||||
|
v.add(p);
|
||||||
|
v.add(p2);
|
||||||
|
dwTemp.Style = "2";//freeform
|
||||||
|
//dwTemp.ReadOnly = "-2";//只读模式
|
||||||
|
if((null!=sRightType&&sRightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
dwTemp.ReadOnly = "-2";//只读模式
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
dwTemp.setGroupHidden(groupHidden);
|
||||||
|
dwTemp.setAttr("inputWidth","120");
|
||||||
|
dwTemp.setAttr("spanWidth","107");
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
String compClientID = request.getParameter("CompClientID");
|
||||||
|
|
||||||
|
dwTemp.replaceColumn("pay_condition", "<iframe type='iframe' id='pay_condition' name=\"pay_condition\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+"/Accounting/LoanSimulation_change/LoanBasicInfo.jsp?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+sRightType+"&calType="+calType+"&TaskNo="+taskno+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","租金变更","租金变更","saveRecord()","","","","btn_icon_rentchange"},
|
||||||
|
{"true","","Button","变更撤销","变更撤销","cancelChange()","","","","btn_icon_delete"}
|
||||||
|
};
|
||||||
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$("#START_LIST").keyup(function(){
|
||||||
|
var val = $("#START_LIST").val();
|
||||||
|
var ADJUST_LIST = $("#ADJUST_LIST").val();
|
||||||
|
if(val.indexOf("-")!=-1){
|
||||||
|
alert("此处不能输入负数!");
|
||||||
|
$("#START_LIST").val(val.replace("-",""));
|
||||||
|
}
|
||||||
|
if(typeof(ADJUST_LIST)!=undefined && ADJUST_LIST !="" ){
|
||||||
|
if(Number(ADJUST_LIST)<Number(val)){
|
||||||
|
alert("总期次不可以小于开始期次!");
|
||||||
|
setItemValue(0,0,"START_LIST","");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#ADJUST_LIST").change(function(){
|
||||||
|
var val = $("#ADJUST_LIST").val();
|
||||||
|
var START_LIST = $("#START_LIST").val();
|
||||||
|
if(val.indexOf("-")!=-1){
|
||||||
|
alert("此处不能输入负数!");
|
||||||
|
$("#ADJUST_LIST").val(val.replace("-",""));
|
||||||
|
}
|
||||||
|
if(typeof(START_LIST)!=undefined && START_LIST !="" ){
|
||||||
|
if(Number(val)<Number(START_LIST)){
|
||||||
|
alert("总期次不可以小于开始期次!");
|
||||||
|
setItemValue(0,0,"ADJUST_LIST","");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//保存数据
|
||||||
|
function saveRecord(sPostEvents)
|
||||||
|
{
|
||||||
|
//检查是否进行过变更
|
||||||
|
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","checkIsRentChange","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>");
|
||||||
|
if(result == 'true'){
|
||||||
|
as_save("myiframe0","run()");
|
||||||
|
}else{
|
||||||
|
alert('请先撤销变更,再进行变更操作!!!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancelChange(){
|
||||||
|
openDWDialog();
|
||||||
|
setTimeout(function(){
|
||||||
|
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","cancelRentChange","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>");
|
||||||
|
if(message == 'true'){
|
||||||
|
resetDWDialog("变更撤销成功!!!",true);
|
||||||
|
window.location.href=window.location.href;
|
||||||
|
}else{
|
||||||
|
resetDWDialog("未进行过租金计划变更的操作!请先进行租金计划变更!!!",true);
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
function run()
|
||||||
|
{
|
||||||
|
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runRentChange","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,productId=<%=ProductId%>,calType=pay_process");
|
||||||
|
window.location.href=window.location.href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function startListChange(){
|
||||||
|
var incomeNumber = document.getElementById('pay_condition').contentWindow.getItemValue(0,0,"INCOME_NUMBER");
|
||||||
|
var startList = getItemValue(0,getRow(),"START_LIST");
|
||||||
|
if(startList){
|
||||||
|
if(Number(startList) > Number(incomeNumber) || Number(startList) <= 0){
|
||||||
|
alert("输入期次范围错误,请检查后重新输入!!!");
|
||||||
|
setItemValue(0,0,"START_LIST","");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","findPlanDateByRentList","paymentnumber=<%=plannumber%>,startList="+startList);
|
||||||
|
if(result.result== 'true'){
|
||||||
|
setItemValue(0,0,"PAYDAY_ADJUST",result.message);
|
||||||
|
}else{
|
||||||
|
alert(result.message);
|
||||||
|
setItemValue(0,0,"START_LIST","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||||
|
/*
|
||||||
|
Author: undefined 2017-06-30
|
||||||
|
Content: 示例详情页面
|
||||||
|
History Log:
|
||||||
|
*/
|
||||||
|
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");//方案编号
|
||||||
|
String planlist=CurPage.getParameter("planlist");//期次
|
||||||
|
|
||||||
|
String sTempletNo = "LCRentPlanInfo";//--模板号--
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
doTemp.setDefaultValue("flowunid", flowunid);
|
||||||
|
doTemp.setDefaultValue("payment_number", plannumber);
|
||||||
|
doTemp.setDefaultValue("PLAN_LIST", planlist);
|
||||||
|
doTemp.setDefaultValue("plan_list", planlist);
|
||||||
|
doTemp.setHtmlEvent("CORPUS","onchange","calRentFina");
|
||||||
|
doTemp.setHtmlEvent("INTEREST","onchange","calRentFina");
|
||||||
|
doTemp.setHtmlEvent("CORPUS_BUSINESS","onchange","calRentBusiness");
|
||||||
|
doTemp.setHtmlEvent("INTEREST_BUSINESS","onchange","calRentBusiness");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||||
|
dwTemp.Style = "2";//freeform
|
||||||
|
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存所有修改","saveData()","","","",""},
|
||||||
|
{"true","","Button","返回","返回列表","goBack()","","","",""}
|
||||||
|
};
|
||||||
|
sButtonPosition = "south";
|
||||||
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function saveData(){
|
||||||
|
//判断财务本金和财务利息是否相同
|
||||||
|
var corpus = getItemValue(0,getRow(),"CORPUS");
|
||||||
|
var interest = getItemValue(0,getRow(),"INTEREST");
|
||||||
|
var bcorpus = getItemValue(0,getRow(),"CORPUS_BUSINESS");
|
||||||
|
var binterest = getItemValue(0,getRow(),"INTEREST_BUSINESS");
|
||||||
|
if(Number(corpus) + Number(interest) != Number(bcorpus) + Number(binterest)){
|
||||||
|
alert("财务本金和财务利息之和应与业务本金和业务利息之和相等,请验证后在执行保存操作!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
as_save("myiframe0","goBack()");
|
||||||
|
}
|
||||||
|
function goBack(){
|
||||||
|
var PrevUrl="/Accounting/LoanSimulation_change/RentPlanList.jsp";
|
||||||
|
var sparm="flowunid=<%=flowunid%>&plannumber=<%=plannumber%>";
|
||||||
|
AsControl.OpenView(PrevUrl,sparm,"_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function calRentFina(){
|
||||||
|
var corpus = getItemValue(0,getRow(),"CORPUS");
|
||||||
|
var interest = getItemValue(0,getRow(),"INTEREST");
|
||||||
|
setItemValue(0,0,"RENT",Number(corpus) + Number(interest));
|
||||||
|
}
|
||||||
|
|
||||||
|
function calRentBusiness(){
|
||||||
|
var corpus = getItemValue(0,getRow(),"CORPUS_BUSINESS");
|
||||||
|
var interest = getItemValue(0,getRow(),"INTEREST_BUSINESS");
|
||||||
|
setItemValue(0,0,"RENT",Number(corpus) + Number(interest));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
209
WebContent/Accounting/LoanSimulation_change/LoanBasicInfo.jsp
Normal file
209
WebContent/Accounting/LoanSimulation_change/LoanBasicInfo.jsp
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
<%@page import="com.amarsoft.awe.control.model.Parameter"%>
|
||||||
|
<%@page import="com.tenwa.reckon.product.ProductCondition"%>
|
||||||
|
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="com.amarsoft.awe.dw.ui.validator.ValidateRule" %>
|
||||||
|
<%@ page import="com.tenwa.reckon.product.ASObjectWindowCalc" %>
|
||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
String sTempletNo = "LoanSimulationBasicInfo_new";//--模板号--
|
||||||
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||||
|
String flowunid = CurPage.getParameter("FlowUnid");
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
String taskno = CurPage.getParameter("TaskNo");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcCondtionInfoArachiveShow");//如果是历史则新显示历史数据
|
||||||
|
}
|
||||||
|
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);
|
||||||
|
String productId=flow.getAttribute("productId").getString();
|
||||||
|
|
||||||
|
String calType ="pay_process";
|
||||||
|
String planCName="PAYMENT_NUMBER";
|
||||||
|
if(plannumber==null){
|
||||||
|
BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid and PAYMENT_NUMBER is not null").setParameter("flowunid", flowunid).getSingleResult(false);
|
||||||
|
if(condtion!=null){
|
||||||
|
plannumber=condtion.getAttribute(planCName).getString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String RightType= CurPage.getParameter("RightType");
|
||||||
|
|
||||||
|
Vector<ValidateRule> vali=new Vector<ValidateRule>();
|
||||||
|
|
||||||
|
//费用规则
|
||||||
|
ProductCondition pc=new ProductCondition();
|
||||||
|
String calcRules=pc.getProductRules(doTemp, productId,vali);
|
||||||
|
|
||||||
|
CurPage.getCurComp().setAttribute("RightType", null);
|
||||||
|
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
|
||||||
|
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
|
||||||
|
Parameter p=new Parameter("plannumber",plannumber);
|
||||||
|
Vector<Parameter> v=CurPage.parameterList;
|
||||||
|
v.add(p);
|
||||||
|
|
||||||
|
dwTemp.Style = "2";//freeform
|
||||||
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
dwTemp.ReadOnly = "-2";//只读模式
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
dwTemp.setAttr("inputWidth","120");
|
||||||
|
dwTemp.setAttr("spanWidth","107");
|
||||||
|
dwTemp.setAttr("showRatio", true);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
CurPage.getCurComp().setAttribute("RightType", RightType);
|
||||||
|
|
||||||
|
String compClientID = request.getParameter("CompClientID");
|
||||||
|
dwTemp.replaceColumn("condition_plan", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"600px\" frameborder=\"0\" src=\""+sWebRootPath+"/Accounting/LoanSimulation_change/condition_plan.jsp?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&planCName="+planCName+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+RightType+"&productId="+productId+"&calType="+calType+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||||
|
dwTemp.replaceColumn("even_subsection", "<iframe type='iframe' id='frame_even_break' name=\"frame_even_subsection\" width=\"100%\" height=\"300px\" frameborder=\"0\" src=\""+sWebRootPath+"/Accounting/LoanSimulation/subsection/LCCalcSubsectionList.jsp?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&planCName="+planCName+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+RightType+"&calType="+calType+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||||
|
dwTemp.replaceColumn("knowing_config", "<iframe type='iframe' id='frame_list_knowing' name=\"frame_list_knowing\" width=\"100%\" height=\"200px\" frameborder=\"0\" src=\""+sWebRootPath+"/Accounting/LoanSimulation/KnowConfigList.jsp?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&planCName="+planCName+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+RightType+"&calType="+calType+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||||
|
|
||||||
|
String sButtons[][] = {
|
||||||
|
{"true","","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||||
|
};
|
||||||
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var calcRules=eval("(<%=calcRules%>)");
|
||||||
|
$(function(){
|
||||||
|
document.getElementById('div_my0').innerHTML = '<div style="width:1160px;overflow: scroll;">'+document.getElementById('div_my0').innerHTML+'</div>';
|
||||||
|
changeSettleMethod();
|
||||||
|
initYearRate();
|
||||||
|
});
|
||||||
|
|
||||||
|
function initYearRate(){
|
||||||
|
var adjustList = parent.getItemValue(0,getRow(),"ADJUST_LIST");
|
||||||
|
if(!adjustList){
|
||||||
|
parent.setItemValue(0,0,"ADJUST_LIST",getItemValue(0,0,"INCOME_NUMBER"));
|
||||||
|
}
|
||||||
|
var yearRate_adjust = parent.getItemValue(0,getRow(),"YEAR_RATE");
|
||||||
|
if(!yearRate_adjust){
|
||||||
|
parent.setItemValue(0,0,"YEAR_RATE",getItemValue(0,0,"YEAR_RATE"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//租金推算方法
|
||||||
|
function rentOrRateChange(){
|
||||||
|
var rentOrRate ="<%=dwTemp.getData().get("RENT_OR_RATE")%>";//租金推算方式
|
||||||
|
document.all("A_Group_calc_config").style.display="none";
|
||||||
|
if(rentOrRate == 'knowing_rent'){//已知租金规则 只能固定利率
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>";
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/KnowConfigList.jsp",param,"frame_list_knowing");
|
||||||
|
}else if(rentOrRate== 'knowing_corpus'){//已知本金规则
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>";
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/KnowConfigList.jsp",param,"frame_list_knowing");
|
||||||
|
}else if(rentOrRate=='rent_period'){//已知租金表
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>";
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/reriod/LCCalcReriodList.jsp",param,"frame_list_knowing");
|
||||||
|
}else if(rentOrRate=='corpus_period'){//已知本金表
|
||||||
|
document.all("A_Group_calc_config").style.display="block";
|
||||||
|
var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>";
|
||||||
|
AsControl.OpenView("/Accounting/LoanSimulation/reriod/LCCalcReriodList.jsp",param,"frame_list_knowing");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//改变租金计算方式
|
||||||
|
function changeSettleMethod(){
|
||||||
|
var method="<%=dwTemp.getData().get("SETTLE_METHOD")%>";
|
||||||
|
//按计算方式 显示按钮 和分段测算录入页面
|
||||||
|
document.all("A_Group_even_subsection").style.display="none";
|
||||||
|
if(method=='even_subsection'){
|
||||||
|
document.all("A_Group_even_subsection").style.display="block";
|
||||||
|
}
|
||||||
|
rentOrRateChange();
|
||||||
|
//日期
|
||||||
|
//计划日期
|
||||||
|
var plan;
|
||||||
|
if(method=="even_subsection"||method=="irregular_rent"||method==""){
|
||||||
|
plan="";
|
||||||
|
}else{
|
||||||
|
plan=calcRules['method'][method]["date_proc"].split(",");
|
||||||
|
}
|
||||||
|
var planflag={};
|
||||||
|
for(var i=0;i<plan.length;i++){
|
||||||
|
if(plan[i]==1){
|
||||||
|
showItem(0,"FIRST_PLAN_DATE");
|
||||||
|
//setItemRequired(0,"FIRST_PLAN_DATE",true);
|
||||||
|
planflag["FIRST_PLAN_DATE"]=0;
|
||||||
|
}
|
||||||
|
if(plan[i]==4){
|
||||||
|
showItem(0,"SECOND_PLAN_DATE");
|
||||||
|
//setItemRequired(0,"SECOND_PLAN_DATE",true);
|
||||||
|
planflag["SECOND_PLAN_DATE"]=0;
|
||||||
|
}
|
||||||
|
if(plan[i]==2){
|
||||||
|
showItem(0,"LAST_PLAN_DATE")
|
||||||
|
//setItemRequired(0,"LAST_PLAN_DATE",true);
|
||||||
|
planflag["LAST_PLAN_DATE"]=0;
|
||||||
|
}
|
||||||
|
if(plan[i]==3){
|
||||||
|
showItem(0,"PLAN_DATE_HOILDAY")
|
||||||
|
//setItemRequired(0,"PLAN_DATE_HOILDAY",true);
|
||||||
|
planflag["PLAN_DATE_HOILDAY"]=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var plana=["PLAN_DATE_HOILDAY","SECOND_PLAN_DATE","LAST_PLAN_DATE","PLAN_DATE_HOILDAY"];
|
||||||
|
for(var i=0;i<plana.length;i++){
|
||||||
|
if(planflag[plana[i]]!=0){
|
||||||
|
hideItem(0,plana[i]);
|
||||||
|
//setItemRequired(0,plana[i],false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//计息日期
|
||||||
|
var interest;
|
||||||
|
if(method=="even_subsection"||method=="irregular_rent"||method==""){
|
||||||
|
interest="";
|
||||||
|
}else{
|
||||||
|
interest=calcRules['method'][method]["interest_date_proc"].split(",");
|
||||||
|
}
|
||||||
|
var interestflag={};
|
||||||
|
for(var i=0;i<interest.length;i++){
|
||||||
|
if(interest[i]==1){
|
||||||
|
showItem(0,"FIRST_INTEREST_DATE");
|
||||||
|
//setItemRequired(0,"FIRST_INTEREST_DATE",true);
|
||||||
|
interestflag["FIRST_INTEREST_DATE"]=0;
|
||||||
|
}
|
||||||
|
if(interest[i]==2){
|
||||||
|
showItem(0,"LAST_INTEREST_DATA")
|
||||||
|
//setItemRequired(0,"LAST_INTEREST_DATA",true);
|
||||||
|
interestflag["LAST_INTEREST_DATA"]=0;
|
||||||
|
}
|
||||||
|
if(interest[i]==3){
|
||||||
|
showItem(0,"INTEREST_DATE_HOLIDAY")
|
||||||
|
//setItemRequired(0,"INTEREST_DATE_HOLIDAY",true);
|
||||||
|
interestflag["INTEREST_DATE_HOLIDAY"]=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var interesta=["FIRST_INTEREST_DATE","LAST_INTEREST_DATA","INTEREST_DATE_HOLIDAY"];
|
||||||
|
for(var i=0;i<interesta.length;i++){
|
||||||
|
if(interestflag[interesta[i]]!=0){
|
||||||
|
hideItem(0,interesta[i]);
|
||||||
|
//setItemRequired(0,interesta[i],false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var isShowRate;
|
||||||
|
if(method=="even_subsection"||method=="irregular_rent"||method==""){
|
||||||
|
isShowRate="";
|
||||||
|
}else{
|
||||||
|
isShowRate=calcRules['method'][method]["isShowRate"];
|
||||||
|
}
|
||||||
|
if(isShowRate=="Y"){
|
||||||
|
showItem(0,"RATE");
|
||||||
|
showItem(0,"ADDITIONAL_RATE");
|
||||||
|
//setItemRequired(0,"RATE",true);
|
||||||
|
//setItemRequired(0,"ADDITIONAL_RATE",true);
|
||||||
|
}else{
|
||||||
|
hideItem(0,"RATE");
|
||||||
|
hideItem(0,"ADDITIONAL_RATE");
|
||||||
|
//setItemRequired(0,"RATE",false);
|
||||||
|
//setItemRequired(0,"ADDITIONAL_RATE",false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
117
WebContent/Accounting/LoanSimulation_change/RentPlanList.jsp
Normal file
117
WebContent/Accounting/LoanSimulation_change/RentPlanList.jsp
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<%@ page contentType="text/html; charset=GBK"%>
|
||||||
|
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||||
|
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||||
|
String plannumber=CurPage.getParameter("plannumber");//方案编号
|
||||||
|
String sRightType= CurPage.getParameter("RightType");;
|
||||||
|
String calType=CurPage.getParameter("calType");
|
||||||
|
String ishistory=CurPage.getParameter("IsHistory");
|
||||||
|
String nodeNo=CurPage.getParameter("NodeNo");
|
||||||
|
ASObjectModel doTemp = new ASObjectModel("LCRentPlanTempList");
|
||||||
|
doTemp.appendJboWhere(" and payment_number='"+plannumber+"'");
|
||||||
|
if(null!=ishistory&&ishistory.equals("true")){
|
||||||
|
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||||||
|
}
|
||||||
|
CurPage.setAttribute("modelno","rent");
|
||||||
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||||
|
dwTemp.Style="1"; //--设置为Grid风格--
|
||||||
|
dwTemp.ShowSummary="1"; //汇总
|
||||||
|
dwTemp.ReadOnly = "1"; //只读模式
|
||||||
|
dwTemp.setPageSize(100);
|
||||||
|
dwTemp.genHTMLObjectWindow(flowunid);
|
||||||
|
|
||||||
|
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||||
|
if((null!=sRightType&&sRightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||||||
|
isShowButton=false;
|
||||||
|
}else{
|
||||||
|
isShowButton=true;
|
||||||
|
}
|
||||||
|
String sButtons[][] =null;
|
||||||
|
|
||||||
|
sButtons=new String[][] {
|
||||||
|
{"true","","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||||
|
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_detail",""},
|
||||||
|
{"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
|
||||||
|
{"true","","Button","更新现金流","更新现金流","updateFlow()","","","","btn_icon_detail",""},
|
||||||
|
{"true","","Button","导入租金计划","导入租金计划","importRentPlan()","","","","btn_icon_detail",""},
|
||||||
|
{"true","","Button","模板下载","模板下载","downloadTemplate()","","","","btn_icon_set",""},
|
||||||
|
};
|
||||||
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function afterSearch(){
|
||||||
|
for(var i=0;i<getRowCount(0);i++){
|
||||||
|
var sPlanStatus = getItemValue(0,i,"planstatus");
|
||||||
|
if(typeof(sPlanStatus)==undefined || sPlanStatus==''){
|
||||||
|
setItemValue(0,i,'planstatus','未回笼');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function newRecord()
|
||||||
|
{
|
||||||
|
var count=getRowCount(0)+1;
|
||||||
|
var sUrl = "/Accounting/LoanSimulation_change/LCRentPlanInfo.jsp";
|
||||||
|
var sParam = "flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planlist="+count;
|
||||||
|
AsControl.OpenView(sUrl,sParam,"_self","");
|
||||||
|
}
|
||||||
|
function updateFlow(){
|
||||||
|
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateRentTax","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>");
|
||||||
|
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateCashFlow","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>");
|
||||||
|
alert("更新成功!");
|
||||||
|
reloadSelf();
|
||||||
|
//window.parent.parent.location.href = window.parent.parent.location.href;
|
||||||
|
}
|
||||||
|
function viewAndEdit(){
|
||||||
|
var sID = getItemValue(0,getRow(),"ID");
|
||||||
|
if(typeof(sID) == "undefined" || sID.length == 0 )
|
||||||
|
{
|
||||||
|
alert("请选择一条信息!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
var planStatus=getItemValue(0,getRow(0),'planstatus');
|
||||||
|
if(planStatus != '未回笼'){
|
||||||
|
alert('档期租金计划已回笼,不能修改!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var sUrl = "/Accounting/LoanSimulation_change/LCRentPlanInfo.jsp";
|
||||||
|
var sParam = "ID="+sID+"&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>";
|
||||||
|
var righttype="<%=sRightType%>";
|
||||||
|
if(righttype == "ReadOnly"){
|
||||||
|
sParam = sParam+"&RightType=<%=sRightType%>";
|
||||||
|
}
|
||||||
|
sParam = sParam+"&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>";
|
||||||
|
AsControl.OpenView(sUrl,sParam,"_self","");
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRecord(){
|
||||||
|
//判断当前期次是否已回笼,并且是不是最后一期
|
||||||
|
var count=getRowCount(0);
|
||||||
|
var rentList = getItemValue(0,getRow(0),'PLAN_LIST');
|
||||||
|
var planStatus=getItemValue(0,getRow(0),'planstatus');
|
||||||
|
if(Number(rentList) < count){
|
||||||
|
alert('请依次从最后一期开始删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(planStatus != '未回笼'){
|
||||||
|
alert('档期租金计划已回笼,不能删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirm('确实要删除吗?'))as_delete(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
function importRentPlan(){
|
||||||
|
var importCondition = {};//导入配置
|
||||||
|
importCondition["templateNo"] = "857eecfc7f7f48d5b01e5c7f696aeddf";//导入汽车的模板编号必填
|
||||||
|
//增加其他配置参数
|
||||||
|
importCondition["flowunid"] = "<%=flowunid%>";
|
||||||
|
importCondition["plannumber"] = "<%=plannumber%>";
|
||||||
|
var sUrl = "/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcel.jsp";
|
||||||
|
var sparam = JSON.stringify(importCondition).replace(/,/g,"@");//生成模板的参数据
|
||||||
|
AsDialog.PopView(sUrl,"importparam="+sparam,{width:"350px",height:"40px",title:"导入租金计划"},function(){reloadSelf();});
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadTemplate(){
|
||||||
|
var templateId="857eecfc7f7f48d5b01e5c7f696aeddf";
|
||||||
|
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||||
|
window.open(sWebRootPath+"/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>&sqlString=save@"+templateId, "downloadTemplate");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user