添加担保信息

This commit is contained in:
tangfutang 2018-06-19 08:59:19 +08:00
parent 6e90ec32d7
commit 2044dd8a51
4 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,45 @@
<%@page import="com.tenwa.reckon.util.UUIDUtil"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-06-18
Content: 示例详情页面
History Log:
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");
String sPrevUrl = CurPage.getParameter("PrevUrl");
String RightType= CurPage.getParameter("RightType");
String id = CurPage.getParameter("ID");
String userOrgId = CurUser.getOrgID();
String userId = CurUser.getUserID();
String customerid = UUIDUtil.getUUID();
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "GuarantorInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setDefaultValue("CUSTOMERID", customerid);
doTemp.setDefaultValue("flowunid", sFlowUnid);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(id);
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","save()","","","",""},
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"},
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function save(){
as_save(0,"goBack()");
}
function goBack(){
//要跳转的url
var url="/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitList.jsp";
var sparam="FlowUnid="+getItemValue(0,0,"flowunid")+"&RightType="+'<%=RightType%>';
AsControl.OpenView(url,sparam,"_self","");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,75 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String sTempletNo = CurPage.getParameter("TempletNo");//模板号
String taskno=CurPage.getParameter("TaskNo");
String sProjectId = CurPage.getParameter("ProjectId");
String RightType= CurPage.getParameter("RightType");
String action= CurPage.getParameter("action");
if("queryContract".equals(action)){
RightType = "ReadOnly";
}
ASObjectModel doTemp = new ASObjectModel("GuarantorList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow(sFlowUnid);
String sButtons[][] =null;
if(null!=RightType&&RightType.equals("ReadOnly")){
sButtons=new String[][] {
{"true","","Button","详情","详情","viewAndEdit2()","","","","btn_icon_edit"}
};
} else{
sButtons=new String[][]{
{"true","","Button","新增","新增","newRecord()","","","","btn_icon_add"},
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
{"true","","Button","删除","删除","do_delete()","","","","btn_icon_delete"}
};
}
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<style type="text/css">
#Left_TD_myiframe0 {
width: 30%;
/* overflow: hidden; */
};
#Right_TD_myiframe0 {
width: 70%;
/* overflow: hidden; */
}
</style>
<script type="text/javascript">
function newRecord(){
var sUrl = "Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp";
var sparam = 'FlowUnid='+'<%=sFlowUnid%>'+"&ListTempletNo="+"<%=sTempletNo%>&TaskNo=<%=taskno%>";//流程编号
AsControl.OpenView(sUrl,sparam,"_self","");
}
function viewAndEdit(){
var ID = getItemValue(0,getRow(0),'ID');
var sUrl = "Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp";
var sparam = 'ID='+ID;
AsControl.OpenView(sUrl,sparam,"_self","");
}
function viewAndEdit2(){
var ID = getItemValue(0,getRow(0),'ID');
if(null != ID && ID.length < 0 ){
alert("请选择一条数据!!!");
};
var sUrl = "Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp";
var sparam ='ID='+ID+'&RightType=ReadOnly'+'&Action=view';
AsControl.OpenView(sUrl,sparam,"_self","");
}
function do_delete(){
var guaranteeType = getItemValue(0,getRow(0),'ASSURE_METHOD');
if("GuaranteeType7"==guaranteeType){
AsDebug.showMessage('提醒:','该记录属于渠道端担保不可修改','','',true);
return;
}
if(confirm("是否确定要删除?")){
as_delete(0);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -92,6 +92,7 @@ public class LBGuaranteeUnitHandler01 extends CommonHandler{
boCAT.setAttributeValue("fulladdress", bo.getAttribute("fulladdress"));
boCAT.setAttributeValue("flowunid", bo.getAttribute("FLOWUNID"));
bomCAT.saveObject(boCAT);
tx.commit();
}
@Override
@ -124,6 +125,7 @@ public class LBGuaranteeUnitHandler01 extends CommonHandler{
boCAT.setAttributeValue("zipcode", bo.getAttribute("zipcode"));
boCAT.setAttributeValue("fulladdress", bo.getAttribute("fulladdress"));
bomCAT.saveObject(boCAT);
tx.commit();
}
}

View File

@ -0,0 +1,27 @@
package com.tenwa.flow.comm.handler;
import jbo.app.tenwa.customer.CUSTOMER_INFO;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
public class LBGuarantorPerUnitHandler extends CommonHandler{
@Override
protected void afterInsert(JBOTransaction tx, BizObject bo)
throws Exception {
String customerid = bo.getAttribute("customerid").getString();
BizObjectManager mci = JBOFactory.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME, tx);
BizObject ci = mci.newObject();
ci.setAttributeValue("customerid", customerid);
ci.setAttributeValue("customername", "µ£±£ÈË");
ci.setAttributeValue("customertype", "02");
mci.saveObject(ci);
tx.commit();
}
}