diff --git a/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp b/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp index a94e55868..b7172ef7e 100644 --- a/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp +++ b/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp @@ -106,6 +106,8 @@ function teamingSuspend(){ function teamingStop(){ var id = getItemValue(0,getRow(0),'ID'); var distributor_status = getItemValue(0,getRow(0),'distributor_status'); + var DISTRIBUTOR_NO = getItemValue(0,getRow(0),'DISTRIBUTOR_NO'); + var BELONGORG = getItemValue(0,getRow(0),'ORGID'); if(typeof(id)=="undefined" || id.length==0 ){ alert("请选择一条数据!"); return ; @@ -121,7 +123,7 @@ function teamingStop(){ return; } if(confirm("确定合作终止?")){ - var result = AsControl.RunJavaMethodTrans("com.tenwa.customer.distributor.DeleteDistributor","setDistributorStatusE","id="+id+",distributor_status="+distributor_status); + var result = AsControl.RunJavaMethodTrans("com.tenwa.customer.distributor.DeleteDistributor","setDistributorStatusE","id="+id+",distributor_status="+distributor_status+",orgid="+BELONGORG); alert("终止成功"); reloadSelf(); } diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp index 25d9b4d58..2925b876c 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp @@ -87,6 +87,43 @@ return true; } } --%> + + function checktel(){ + var LINKMAN_TEL = getItemValue(0,getRow(0),"LINKMAN_TEL"); + var phone = /^[1][3,4,5,7,8][0-9]{9}$/; + if(phone.test(LINKMAN_TEL)){ + setErrorTips("LINKMAN_TEL",""); + return true; + }else{ + setErrorTips("LINKMAN_TEL","电话格式不正确!"); + //alert("手机号格式不正确!"); + return false; + } + } + function checkphone(){ + var DISTRIBUTOR_TEL = getItemValue(0,getRow(0),"DISTRIBUTOR_TEL"); + var phone = /^[1][3,4,5,7,8][0-9]{9}$/; + if(phone.test(DISTRIBUTOR_TEL)){ + setErrorTips("DISTRIBUTOR_TEL",""); + return true; + }else{ + setErrorTips("DISTRIBUTOR_TEL","电话格式不正确!"); + //alert("电话号格式不正确!"); + return false; + } + } + function telnumber(){ + var DEALER_PHONE = getItemValue(0,getRow(0),"DEALER_PHONE"); + var phone = /^[1][3,4,5,7,8][0-9]{9}$/; + if(phone.test(DEALER_PHONE)){ + setErrorTips("DEALER_PHONE",""); + return true; + }else{ + setErrorTips("DEALER_PHONE","电话格式不正确!"); + //alert("电话号格式不正确!"); + return false; + } + } function save() { var result = false; var distributor_coding = getItemValue(0,0,'DISTRIBUTOR_CODING'); @@ -95,6 +132,18 @@ }else{ result = Uniquenesscheck(); } + var TelResult = checktel(); + if(TelResult==false){ + return; + } + var Tel = checkphone(); + if(Tel==false){ + return; + } + var phone = telnumber(); + if(phone==false){ + return; + } var result1 = Checkfield(); //if(result==true){ if(result==true && result1==true){ diff --git a/src_tenwa/com/tenwa/customer/distributor/DeleteDistributor.java b/src_tenwa/com/tenwa/customer/distributor/DeleteDistributor.java index 1e7d2224b..cc32ca400 100644 --- a/src_tenwa/com/tenwa/customer/distributor/DeleteDistributor.java +++ b/src_tenwa/com/tenwa/customer/distributor/DeleteDistributor.java @@ -15,6 +15,7 @@ import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_CHANGE; import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_CHANGE; import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP; +import jbo.awe.USER_INFO; import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; import com.tenwa.comm.exception.RecordNotFoundException; @@ -35,6 +36,26 @@ public class DeleteDistributor { private String userId; private String F_I_TYPE; private String DISTRIBUTOR_STATUS; + private String belongorg; + private String orgid; + + + public String getOrgid() { + return orgid; + } + + public void setOrgid(String orgid) { + this.orgid = orgid; + } + + public String getBelongorg() { + return belongorg; + } + + public void setBelongorg(String belongorg) { + this.belongorg = belongorg; + } + public String getF_I_TYPE() { return F_I_TYPE; @@ -76,6 +97,7 @@ public class DeleteDistributor { this.id = id; } + /*public String deleteDistributor(JBOTransaction tx) throws Exception{ Map searchCondtion = new HashMap(); searchCondtion.put("distributor_id",this.getId()); @@ -119,7 +141,7 @@ public class DeleteDistributor { int incount = boq.executeUpdate(); deleteDistributor(tx); }*/ - + public String deleteDistributor(JBOTransaction tx) throws Exception{ Map searchCondtion = new HashMap(); searchCondtion.put("distributor_id",this.getId()); @@ -201,8 +223,10 @@ public class DeleteDistributor { searchCondition.put("id",getId()); BizObjectManager bom = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME, tx); BizObjectQuery boq = bom.createQuery("UPDATE O SET DISTRIBUTOR_STATUS = :DISTRIBUTOR_STATUS WHERE ID = :ID").setParameter("DISTRIBUTOR_STATUS", "distributor_status06").setParameter("ID", getId()); - int incount = boq.executeUpdate(); - //ChannelSubmitAction.submitChannelApply(getUserId(),getId(), "DistributorApprovalFlow", "id="+getId()); + boq.executeUpdate(); + BizObjectManager org = JBOFactory.getBizObjectManager(USER_INFO.CLASS_NAME, tx); + BizObjectQuery or = org.createQuery("UPDATE O SET status='2' WHERE belongorg = :belongorg").setParameter("belongorg", orgid); + or.executeUpdate(); } public String SelectGroup(JBOTransaction tx) throws Exception {