diff --git a/WebContent/Tenwa/Apzl/DistributorToArea/DistributorCustomerGroupCompanyRegister.jsp b/WebContent/Tenwa/Apzl/DistributorToArea/DistributorCustomerGroupCompanyRegister.jsp
new file mode 100644
index 000000000..3b24b41b0
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/DistributorToArea/DistributorCustomerGroupCompanyRegister.jsp
@@ -0,0 +1,31 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
+ String sTempletNo = "DistrictInfoRegister";//--模板号--
+ ASObjectModel doTemp = new ASObjectModel(sTempletNo);
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
+ dwTemp.Style = "2";//freeform
+ dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
+
+ String sButtons[][] = {
+ {"true","All","Button","确定","注册区域信息","saveRecord()","","","","btn_icon_submit"},
+ {"true","All","Button","取消","取消","goBack()","","","","btn_icon_close"},
+ };
+ sButtonPosition = "south";
+%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/DistributorToArea/LmDistributorList.jsp b/WebContent/Tenwa/Apzl/DistributorToArea/LmDistributorList.jsp
new file mode 100644
index 000000000..43a07a9fe
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/DistributorToArea/LmDistributorList.jsp
@@ -0,0 +1,37 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2018-06-06
+ Content:
+ History Log:
+ */
+ ASObjectModel doTemp = new ASObjectModel("COUNTRY_DISTRICT_INFO");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1"; //只读模式
+ dwTemp.setPageSize(10);
+ dwTemp.genHTMLObjectWindow("");
+
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ {"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"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/DistributorToArea/LmDistributorToproductList.jsp b/WebContent/Tenwa/Apzl/DistributorToArea/LmDistributorToproductList.jsp
new file mode 100644
index 000000000..1f35b5853
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/DistributorToArea/LmDistributorToproductList.jsp
@@ -0,0 +1,65 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2018-06-06
+ Content:
+ History Log:
+ */
+ ASObjectModel doTemp = new ASObjectModel("DISTRICT_DISTRIBUTOR_RELATION");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ String districtcode = CurPage.getParameter("district_code");
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1"; //只读模式
+ dwTemp.setPageSize(10);
+ dwTemp.genHTMLObjectWindow(districtcode);
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
+ {"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
+ {"true","","Button","删除","删除","asDelete()","","","","btn_icon_delete",""},
+ };
+%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/DistributorToArea/LmProductCarInfo.jsp b/WebContent/Tenwa/Apzl/DistributorToArea/LmProductCarInfo.jsp
new file mode 100644
index 000000000..14f0ec036
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/DistributorToArea/LmProductCarInfo.jsp
@@ -0,0 +1,32 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
+ /*
+ Author: undefined 2018-06-06
+ Content: 示例详情页面
+ History Log:
+ */
+ String sPrevUrl = CurPage.getParameter("PrevUrl");
+ if(sPrevUrl == null) sPrevUrl = "";
+
+ String sTempletNo = "LmDistrictInfo";//--模板号--
+ ASObjectModel doTemp = new ASObjectModel(sTempletNo);
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
+ dwTemp.Style = "2";//freeform
+ dwTemp.ReadOnly = "1";//只读模式
+ dwTemp.genHTMLObjectWindow(CurPage.getParameter("district_code"));
+
+ String sButtons[][] = {
+ //{"true","All","Button","保存","保存所有修改","save()","","","",""},
+ //{"true","All","Button","返回","返回列表","returnList()","","","",""}
+ };
+ sButtonPosition = "south";
+%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/DistributorToArea/LmProductDistributorCar.jsp b/WebContent/Tenwa/Apzl/DistributorToArea/LmProductDistributorCar.jsp
new file mode 100644
index 000000000..6a8928cef
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/DistributorToArea/LmProductDistributorCar.jsp
@@ -0,0 +1,21 @@
+<%@ page contentType="text/html; charset=GBK"%><%@
+ include file="/IncludeBegin.jsp"%><%
+/*
+ 页面说明: 示例上下联动框架页面
+ */
+ String districtno = CurPage.getParameter("districtno");
+%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
+
+<%@ include file="/IncludeEnd.jsp"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp b/WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp
index 98127eee0..e8145c7f6 100644
--- a/WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp
+++ b/WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp
@@ -38,10 +38,10 @@
*/
var sReturnInfo = RunJavaMethodTrans("com.tenwa.apzl.saveunioncar.saveUnionCarUtil","saveLmDistributorToProduct",sParams);
if(sReturnInfo=="error"){
- alert("该产品已绑定!");
+ alert("该经销商已绑定!");
}
reloadSelf();
- },"请选择产品");
+ },"请选择经销商");
}
function viewAndEdit(){
var sUrl = "";
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml
index 7857b93e8..015f26ebe 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml
@@ -224,6 +224,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java b/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java
index f1f0bc286..328c77935 100644
--- a/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java
+++ b/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java
@@ -6,6 +6,7 @@ import java.util.UUID;
import jbo.app.tenwa.customer.LM_DISTRIBUTOR_TO_CAR;
import jbo.app.tenwa.customer.LM_DISTRIBUTOR_TO_PRODUCT;
import jbo.app.tenwa.customer.LM_PORTAL_TO_CAR;
+import jbo.com.tenwa.entity.comm.own.DISTRICT_DISTRIBUTOR_RELATION;
import jbo.com.tenwa.limit.LA_LIMIT_ELEMENT;
import com.amarsoft.are.jbo.BizObject;
@@ -168,6 +169,52 @@ public String getCarBrandId() {
}
return "error";
}
+ public String saveLmDistributorToDistrict(JBOTransaction tx)throws Exception {
+ /*
+ CarBrandId=admin@~
+ 8009002@~
+ 2018/06/12 15:03:50@~
+ 7c7624a558594bff8387ca6949982b21@~
+ 00303ba448074b0792bd465dd2359b7c@
+ */
+ String[] params = CarBrandId.split("@~");
+ String DISTRICT_CODE = params[0];
+ //String DISTRICT_NAME = params[1];
+ //String DISTRIBUTOR_ID = params[1];
+ //String DISTRIBUTOR_NO = params[3];
+ //String DISTRIBUTOR_NAME = params[4];
+ //String productid=params[4];
+ int lle=0;
+ int i;
+ try{
+ BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(DISTRICT_DISTRIBUTOR_RELATION.CLASS_NAME,tx);
+ for(i=1;i=0){
+ return "success";
+ }
+ return "error";
+ }
/**
* 删除经销商车型关联表的关联
* @param tx
@@ -184,6 +231,11 @@ public String getCarBrandId() {
Lmpc.createQuery("delete from o where id = :id").setParameter("id",unionId).executeUpdate();
return "success";
}
+ public String deleteLmDistributorToDistrict(JBOTransaction tx)throws Exception {
+ BizObjectManager Lmpc = JBOFactory.getBizObjectManager(DISTRICT_DISTRIBUTOR_RELATION.CLASS_NAME,tx);
+ Lmpc.createQuery("delete from o where id = :id").setParameter("id",unionId).executeUpdate();
+ return "success";
+ }
/**
* 删除渠道机构车型关联表的关联
* @param tx
diff --git a/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java b/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java
index ccb02c7ed..5376ec558 100644
--- a/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java
+++ b/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java
@@ -2,6 +2,7 @@ package com.tenwa.customer.controller.group;
import jbo.app.tenwa.customer.CUSTOMER_GROUP_COMPANY;
import jbo.app.tenwa.customer.DISTRIBUTOR_GROUP_COMPANY;
+import jbo.com.tenwa.entity.comm.own.COUNTRY_DISTRICT_INFO;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
@@ -91,4 +92,16 @@ public class CustomerGroupCompanyController {
return "false";
}
}
+
+ public String checkCode(JBOTransaction tx)throws Exception{
+ BizObjectManager bom = JBOFactory.getBizObjectManager(COUNTRY_DISTRICT_INFO.CLASS_NAME);
+ tx.join(bom);
+ //查询该区域编号是否已存在
+ BizObject CUSTOMER_GROUP_COMPANY = bom.createQuery("district_code=:district_code").setParameter("district_code",group_name).getSingleResult(false);
+ if(CUSTOMER_GROUP_COMPANY != null){
+ return "false";
+ }else{
+ return "success";
+ }
+ }
}
\ No newline at end of file