产品配置经销商
This commit is contained in:
parent
816cfad21f
commit
fb06ecc273
@ -7,11 +7,11 @@
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("LM_DISTRIBUTOR_TO_PRODUCT");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
String distributorId = CurPage.getParameter("DISTRIBUTOR_ID");
|
||||
String typeno = CurPage.getParameter("TYPENO");
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(distributorId);
|
||||
dwTemp.genHTMLObjectWindow(typeno);
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
@ -20,17 +20,15 @@
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var Return = "<%=CurUser.getUserID()%>@~<%=CurUser.getOrgID()%>@~<%=StringFunction.getTodayNow()%>@~<%=distributorId%>@~";
|
||||
AsDialog.OpenSelector("DistributeProductList","distributorid,<%=distributorId%>","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
function newRecord(){
|
||||
var Return = "<%=CurUser.getUserID()%>@~<%=CurUser.getOrgID()%>@~<%=StringFunction.getTodayNow()%>@~<%=typeno%>@~";
|
||||
AsDialog.OpenSelector("DistributeProductList","typeno,<%=typeno%>","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
//alert(sReturn);
|
||||
Return =Return+sReturn;
|
||||
sParams = "CarBrandId="+Return;
|
||||
//alert(sParams);
|
||||
/*
|
||||
CarBrandId=admin@~
|
||||
8009002@~
|
||||
@ -44,7 +42,7 @@
|
||||
}
|
||||
reloadSelf();
|
||||
},"请选择产品");
|
||||
}
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "";
|
||||
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||
include file="/IncludeBegin.jsp"%><%
|
||||
/*
|
||||
页面说明: 示例上下联动框架页面
|
||||
*/
|
||||
String distributorId = CurPage.getParameter("distributorId");
|
||||
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
|
||||
<script type="text/javascript">
|
||||
mytoptd.height=150;
|
||||
OpenList();
|
||||
OpenInfo();
|
||||
function OpenList(){
|
||||
AsControl.OpenView("/Tenwa/Apzl/PortalToCarType/LmDistributorInfo.jsp","distributorId=<%=distributorId%>","rightup");
|
||||
}
|
||||
|
||||
function OpenInfo(){
|
||||
AsControl.OpenView("/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp", "DISTRIBUTOR_ID=<%=distributorId%>", "rightdown");
|
||||
}
|
||||
</script>
|
||||
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||
include file="/IncludeBegin.jsp"%><%
|
||||
/*
|
||||
页面说明: 示例上下联动框架页面
|
||||
*/
|
||||
String TYPENO = CurPage.getParameter("TYPENO");
|
||||
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
|
||||
<script type="text/javascript">
|
||||
mytoptd.height=300;
|
||||
OpenList();
|
||||
OpenInfo();
|
||||
function OpenList(){
|
||||
AsControl.OpenView("/Tenwa/Apzl/productCar/LmProductCarInfo.jsp","","rightup");
|
||||
}
|
||||
|
||||
function OpenInfo(){
|
||||
AsControl.OpenView("/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp","TYPENO=<%=TYPENO%>", "rightdown");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
@ -5,36 +5,55 @@
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("LM_DISTRIBUTOR_LIST");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
String PG_TITLE ="汽车产品列表";
|
||||
String TYPENO= CurPage.getParameter("TYPENO");
|
||||
ASObjectModel doTemp = new ASObjectModel("LmProductCarList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.genHTMLObjectWindow(TYPENO);
|
||||
|
||||
//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",""},
|
||||
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
//{"true","","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 = "";
|
||||
var sUrl = "/Tenwa/Apzl/productCar/LmProductCarInfo.jsp";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Apzl/productCar/LmProductUpAndDown.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'TYPENO');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'TYPENO=' +sPara ,'_self','');
|
||||
}
|
||||
function afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
if(getObj(0,i,"EDIT")!=null){
|
||||
getObj(0,i,"EDIT").innerHTML='<a class="box" style="text-align:center;" onclick="showCar(\''+getItemValue(0,i,"ID")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">     编辑</font></ a>';
|
||||
if(getObj(0,i,"action")!=null){
|
||||
getObj(0,i,"action").innerHTML='<a class="box" style="text-align:center;" onclick="showCar(\''+getItemValue(0,i,"TYPENO")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">     编辑</font></ a>';
|
||||
}
|
||||
};
|
||||
}
|
||||
function showCar(id){
|
||||
function showCar(TYPENO){
|
||||
var sUrl="/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp";
|
||||
var param="distributorId="+id;
|
||||
AsDialog.PopView(sUrl,param,"dialogWidth=800px;dialogHeight=480px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"配置产品");
|
||||
var sPara = "TYPENO="+TYPENO;
|
||||
AsDialog.PopView(sUrl,sPara,"dialogWidth=1200px;dialogHeight=800px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"配置车辆");
|
||||
}
|
||||
/*
|
||||
function mySelectRow(){
|
||||
var TYPENO = getItemValue(0,getRow(0),"TYPENO");
|
||||
parent.OpenInfo(TYPENO);
|
||||
//list 页面同步info页面的联动传至单击事件
|
||||
}
|
||||
*/
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -132,25 +132,25 @@ public String getCarBrandId() {
|
||||
String updateUserID = params[0];
|
||||
String updateOrgId = params[1];
|
||||
String updateTime = params[2];
|
||||
String distributorId = params[3];
|
||||
String productid=params[4];
|
||||
String typeno = params[3];
|
||||
//String productid=params[4];
|
||||
int lle=0;
|
||||
BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
|
||||
BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and PRODUCT_ID=:PRODUCT_ID")
|
||||
.setParameter("DISTRIBUTOR_ID", distributorId).setParameter("PRODUCT_ID",productid).getSingleResult(false);
|
||||
if(obcheck!=null){
|
||||
return "error";
|
||||
}
|
||||
int i;
|
||||
try{
|
||||
for(i=4;i<params.length;i++){
|
||||
BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
|
||||
for(i=3;i<params.length;i++){
|
||||
String brandid = params[i];
|
||||
BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and PRODUCT_ID=:PRODUCT_ID")
|
||||
.setParameter("DISTRIBUTOR_ID", brandid).setParameter("PRODUCT_ID",typeno).getSingleResult(false);
|
||||
if(obcheck!=null){
|
||||
return "error";
|
||||
}
|
||||
String PortalToCarId=UUID.randomUUID().toString().replaceAll("-", "");
|
||||
String brandid = params[i];
|
||||
BizObjectManager Lmpc = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
|
||||
BizObject NewLmpc = Lmpc.newObject();
|
||||
NewLmpc.setAttributeValue("id", PortalToCarId);
|
||||
NewLmpc.setAttributeValue("product_id", brandid);
|
||||
NewLmpc.setAttributeValue("distributor_id", distributorId);
|
||||
NewLmpc.setAttributeValue("product_id", typeno);
|
||||
NewLmpc.setAttributeValue("distributor_id", brandid);
|
||||
NewLmpc.setAttributeValue("inputUserID", updateUserID);
|
||||
NewLmpc.setAttributeValue("inputOrgId", updateOrgId);
|
||||
NewLmpc.setAttributeValue("inputTime", updateTime);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user