168 lines
6.3 KiB
Plaintext
168 lines
6.3 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@page import="com.tenwa.reckon.util.TbBeanTools"%>
|
||
<%@page import="com.tenwa.reckon.bean.TabCalBean"%>
|
||
<%@page import="com.amarsoft.are.jbo.BizObject"%>
|
||
<%@page import="com.amarsoft.are.jbo.JBOException"%>
|
||
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
|
||
<%@page import="jbo.prd.BUSINESS_TYPE"%>
|
||
<%@ 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");
|
||
//判断是传统还是汽车业务
|
||
BizObject bo = JBOFactory.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,"typeno=:productID")
|
||
.setParameter("productID", productId).getSingleResult(false);
|
||
String productType = (bo==null)?"":bo.getAttribute("attribute2").getString();
|
||
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;
|
||
var url="";
|
||
if("<%=productType%>"=="car_product"){
|
||
url="/Accounting/LoanSimulation/LoanBasicInfo.jsp";
|
||
}else {
|
||
url="/Accounting/LoanSimulation/LoanBasicInfoBusiness.jsp";
|
||
}
|
||
window.parent.parent.AsControl.OpenView(url,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"%> |