1.产品关联公司

This commit is contained in:
zhangbb 2020-08-11 10:04:39 +08:00
parent 041506ef8f
commit adc8b45f91
6 changed files with 310 additions and 0 deletions

View File

@ -0,0 +1,127 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "关联信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%>
<%
String rightType = CurPage.getParameter("rightType");
if(rightType ==null)rightType="";
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
<%
String sTempletNo = "productToCompanyInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if(rightType.equals("ReadOnly")){
dwTemp.ReadOnly = "1";//只读模式
}
String id = CurPage.getAttribute("id");
dwTemp.genHTMLObjectWindow(id);
CurPage.getCurComp().setAttribute("RightType", rightType);
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] = {
{"true","All","Button","保存","保存","saveRecord()","","","","btn_icon_save"},
{"true","","Button","返回","返回列表页面","parent.AsDialog.ClosePage()","","","","btn_icon_return"}
};
sButtonPosition = "south";
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
<%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%>
<script type="text/javascript">
function selectProduct(){
var product_id = getItemValue(0, 0, "product_id");
//防止新增时候空指针
if(product_id==null||product_id==""){
product_id="1";
}
AsDialog.OpenSelector("selectProductCompany","product_id,"+product_id,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
var product_id = sReturn[0];
var product_name = sReturn[1];
setItemValue(0, 0, "product_id", product_id);
setItemValue(0, 0, "product_name", product_name);
},"请选择产品");
}
function saveRecord(){
as_save("myiframe0","parent.AsDialog.ClosePage()");
}
var province="";
// 选择省份
function selectProvinceCode(){
AsDialog.OpenSelector("selectProvinceCode","","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,"province",sReturn[1]);
setItemValue(0,0,"city","");
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,"city",sReturn[1]);
},"请选择地区",'');
}
}
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,106 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%>
<%
/*
Author:lzb 2017-05-12
Tester:
Content: 本方信息
Input Param:
Output param:
History Log:
*/
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "产品关联公司"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List02;Describe=定义变量,获取参数;]~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%>
<%
ASObjectModel doTemp = new ASObjectModel("productToCompanyList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow("");
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{"true","","Button","详情","详情","view()","","","","btn_icon_detail",""},
{"true","All","Button","修改","修改","edit()","","","","btn_icon_edit",""},
{"true","All","Button","删除","删除","as_delete(0)","","","","btn_icon_delete",""},
};
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%>
<script type="text/javascript">
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newRecord(){
var sUrl = "/Tenwa/Apzl/productCar/LmProductToCompanyInfo.jsp";
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=500px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
reloadSelf();
},"新增关联信息");
}
function edit(){
var sUrl = "/Tenwa/Apzl/productCar/LmProductToCompanyInfo.jsp";
var id = getItemValue(0,getRow(0),'id');
if(typeof(id)=="undefined" || id.length==0 ){
alert("请选择一条信息!");
return ;
}
AsDialog.PopView(sUrl,'id='+id,"resizable=yes;dialogWidth=500px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
reloadSelf();
},"修改关联信息");
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%>
<script type="text/javascript">
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -88,6 +88,7 @@
<attribute name="GPS_VENDOR" label="GPS供应商" type="STRING" length="32"/>
<attribute name="ManySubject" label="主体" type="STRING" length="32"/>
<attribute name="whether" label="是否活体检测" type="STRING" length="32"/>
<attribute name="licenseToSubject" label="车牌号对应主体" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -201,6 +202,24 @@
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_PRODUCTTOCOMPANY_INFO" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="32"/>
<attribute name="company_name" label="公司名称" type="STRING" length="20"/>
<attribute name="product_id" label="产品ID" type="STRING" length="32"/>
<attribute name="account" label="银行账户" type="STRING" length="20"/>
<attribute name="acc_number" label="银行账号" type="STRING" length="30"/>
<attribute name="bank_name" label="开户银行" type="STRING" length="30"/>
<attribute name="province" label="开户省份" type="STRING" length="20"/>
<attribute name="city" label="开户城市" type="STRING" length="20"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_productToCompany_info" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -41,6 +41,12 @@ public class SYSNameManager{
if(prd == null || "01".equals(prd.getString("Attribute1"))) return "";
return prd.getString("TypeName") ;
}
public static String getProductNameByProductID(String productID) throws Exception{
if(StringX.isEmpty(productID)) return "";
BusinessObject prd = ProductConfig.getProduct(productID);
if(prd == null ) return "";
return prd.getString("TypeName") ;
}
public static String getOrgNames(String orgIDs) throws Exception{
if(orgIDs == null || "".equals(orgIDs)) return "";

View File

@ -0,0 +1,48 @@
package jbo.prd;
import java.lang.String;
/**
* - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_PRODUCTTOCOMPANY_INFO{
/**
* <br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.prd.LB_PRODUCTTOCOMPANY_INFO";
/**
* ID STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 公司名称 STRING(20)<br>
*/
public static final String company_name = "company_name";
/**
* 产品ID STRING(32)<br>
*/
public static final String product_id = "product_id";
/**
* 银行账户 STRING(20)<br>
*/
public static final String account = "account";
/**
* 银行账号 STRING(30)<br>
*/
public static final String acc_number = "acc_number";
/**
* 开户银行 STRING(30)<br>
*/
public static final String bank_name = "bank_name";
/**
* 开户省份 STRING(20)<br>
*/
public static final String province = "province";
/**
* 开户城市 STRING(20)<br>
*/
public static final String city = "city";
}

View File

@ -137,4 +137,8 @@ public interface PRD_SPECIFIC_LIBRARY{
* 是否活体检测 STRING(32)<br>
*/
public static final String whether = "whether";
/**
* 车牌号对应主体 STRING(32)<br>
*/
public static final String licenseToSubject = "licenseToSubject";
}