经销商子公司

This commit is contained in:
amarsoft 2018-10-09 20:40:10 +08:00
parent b4027eae59
commit 5d68ec3945
3 changed files with 263 additions and 0 deletions

View File

@ -0,0 +1,106 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2017-10-11
Content:
History Log:
*/
String id = CurPage.getParameter("id");//账号id
String sflowunid = CurPage.getParameter("flowunid");
String flowunid=CurPage.getParameter("ObjectNo");
String rightType=CurPage.getParameter("RightType");
if(id == null) id="";
String sTempletNo = "distributor_subsidiary_temp_info"; //模板号
// if(sTempletNo == null) sTempletNo = "LDistributorAccountInfo";
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String DISTRIBUTOR_NO=flow!=null?flow.getAttribute("proj_id").getString():"";
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setDefaultValue("FLOWUNID", flowunid);
//doTemp.setDefaultValue("DISTRIBUTOR_ID", DISTRIBUTOR_NO);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="2"; //--设置为Grid风格--
if("ReadOnly".equals(rightType)){
dwTemp.ReadOnly = "1"; //只读模式
//doTemp.setColInnerBtEvent("provinceInfo", "");
//doTemp.setColInnerBtEvent("district", "");
}
dwTemp.genHTMLObjectWindow(id);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存所有修改","save()","","","","btn_icon_save"},
{"true","","Button","返回","返回","returnList()","","","","btn_icon_return"}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function save(){
<%-- setItemValue(0,0,"sPara","<%=sflowunid%>"); --%>
<%-- var partner = getItemValue(0,getRow(0),"IS_MAIN");
if(partner=="Y"){
var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.AccountInfoManage","CheckPartnerInfo","flowunid=<%=flowunid%>,id=<%=id%>");
if(result=="1"){
alert("主账户已存在!");
return;
}
} --%>
as_save(0,"returnList()");
}
function returnList(){
AsDialog.ClosePage();
}
function selectProvinceCode(){
AsDialog.OpenSelector("selectDistributorSubsidiary","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
// alert(sReturn[1]);
//setItemValue(0,0,"provinceInfo",sReturn[1]);
//setItemValue(0,0,"district","");
province=sReturn[0];
//setCertType();
},"请选择省份",'');
}
// 选择市区
function selectCityCode(){
//alert("参数:"+province);
if(province=="" || province==null){
alert("请先选择省份。");
return;
}else{
AsDialog.OpenSelector("selectCityCode","province,"+province,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
// alert(sReturn[1]);
setItemValue(0,0,"district",sReturn[1]);
},"请选择地区",'');
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,96 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2017-10-11
Content:
History Log:
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String sFlowName = CurPage.getParameter("applyType");//获取流程名称
String PhaseNo = CurPage.getParameter("PhaseNo");
String ishistory=CurPage.getParameter("IsHistory");
String RightType=CurPage.getParameter("RightType");
String disno="";
List<BizObject> nolist=JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT").createQuery("select di.distributor_no from O ,jbo.app.tenwa.customer.DISTRIBUTOR_INFO di where di.id=O.proj_id and flow_unid=:flowunid")
.setParameter("flowunid",sFlowUnid).getResultList(false);
if(nolist.size()>0){
disno=nolist.get(0).getAttribute("distributor_no").getString();
}
if(sFlowUnid == null) sFlowUnid="";
String sTempletNo = CurPage.getParameter("TempletNo");//模板号
if(sTempletNo == null) sTempletNo = "distributor_susidiary_temp_list";
if("DealerDepositReturnApply".equals(sFlowName)||"DealerDepositChargeApply".equals(sFlowName)){
sTempletNo = "LDistributorAccountListS";
sFlowUnid=disno;
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
//dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow(sFlowUnid);
String temp = "true";
if("0020".equals(PhaseNo)){
temp="false";
};
String sButtons[][] =null;
if("DealerDepositReturnApply".equals(sFlowName)||"DealerDepositChargeApply".equals(sFlowName)){
sButtons=new String[][] {
/* {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
{"true","All","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
{"true","All","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, */
};
}else{
sButtons=new String[][] {
{temp,"All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{temp,"","Button","修改","修改","viewAndEdit()","","","","btn_icon_detail",""},
{temp,"","Button","详情","查看/修改详情","view()","","","","btn_icon_detail"},
//{"true","All","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
{temp,"All","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
};
}
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorSubsidiaryInfo.jsp";
var sPara ="flowunid=<%=sFlowUnid%>";
/* AsControl.OpenView(sUrl,'','_self',''); */
AsDialog.PopView(sUrl,sPara,"dialogWidth=900px;dialogHeight=200px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){
reloadSelf();
},"新增");
}
//修改
function viewAndEdit(){
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorSubsidiaryInfo.jsp";
var sPara = getItemValue(0,getRow(0),'id');
<%-- var flowunid ="flowunid=<%=sFlowUnid%>"; --%>
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsDialog.PopView(sUrl,"id="+sPara+"&flowunid="+"<%=sFlowUnid%>","dialogWidth=900px;dialogHeight=200px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){
reloadSelf();
},"修改");
}
function view(){
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorSubsidiaryInfo.jsp";
var sPara = getItemValue(0,getRow(0),'id');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsDialog.PopView(sUrl,"id="+sPara+"&flowunid="+"<%=sFlowUnid%>"+"&RightType=ReadOnly","dialogWidth=900px;dialogHeight=200px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){
reloadSelf();
},"详情");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -3014,5 +3014,66 @@
</managerProperties>
</manager>
</class>
<class name="DISTRIBUTOR_SUBSIDIARY_TEMP" label="" keyAttributes="id">
<attributes>
<attribute name="id" label="id" type="STRING" length="100"/>
<attribute name="distributor_id" label="经销商编号" type="STRING" length="100"/>
<attribute name="comp_no" label="子公司编号" type="STRING" length="200"/>
<attribute name="comp_name" label="子公司名称" type="STRING" length="100"/>
<attribute name="LEASE_REGISTER_ADDR" label="注册地址" type="STRING" length="200"/>
<attribute name="LEASE_ADDR" label="通讯地址" type="STRING" length="200"/>
<attribute name="LEASE_PERSON" label="法定代表人" type="STRING" length="32"/>
<attribute name="LEASE_POSTCODE" label="邮政编码" type="STRING" length="32"/>
<attribute name="LEASE_CONSIGNER" label="委托代理人" type="STRING" length="100"/>
<attribute name="LEASE_LINKMAN" label="联系人" type="STRING" length="32"/>
<attribute name="LEASE_TEL" label="电话" type="STRING" length="50"/>
<attribute name="LEASE_FAX" label="传真" type="STRING" length="50"/>
<attribute name="LEASE_EMAIL" label="电子邮件" type="STRING" length="50"/>
<attribute name="is_mian" label="是否主题公司" type="STRING" length="50"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="distributor_subsidiary_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="DISTRIBUTOR_SUBSIDIARY" label="" keyAttributes="id">
<attributes>
<attribute name="id" label="id" type="STRING" length="100"/>
<attribute name="distributor_id" label="经销商编号" type="STRING" length="100"/>
<attribute name="comp_no" label="子公司编号" type="STRING" length="200"/>
<attribute name="comp_name" label="子公司名称" type="STRING" length="100"/>
<attribute name="LEASE_REGISTER_ADDR" label="注册地址" type="STRING" length="200"/>
<attribute name="LEASE_ADDR" label="通讯地址" type="STRING" length="200"/>
<attribute name="LEASE_PERSON" label="法定代表人" type="STRING" length="32"/>
<attribute name="LEASE_POSTCODE" label="邮政编码" type="STRING" length="32"/>
<attribute name="LEASE_CONSIGNER" label="委托代理人" type="STRING" length="100"/>
<attribute name="LEASE_LINKMAN" label="联系人" type="STRING" length="32"/>
<attribute name="LEASE_TEL" label="电话" type="STRING" length="50"/>
<attribute name="LEASE_FAX" label="传真" type="STRING" length="50"/>
<attribute name="LEASE_EMAIL" label="电子邮件" type="STRING" length="50"/>
<attribute name="is_mian" label="是否主题公司" type="STRING" length="50"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="distributor_subsidiary" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>