From 0acb007d5a318dd97030d9a2fea9637d783977d2 Mon Sep 17 00:00:00 2001 From: liuz Date: Fri, 29 Jun 2018 10:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CLMSDistributorList.jsp | 11 +++++- .../com/tenwa/flow/CopyInfoTempToFormal2.java | 36 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 calc/com/tenwa/flow/CopyInfoTempToFormal2.java diff --git a/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp b/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp index 652bc4c54..5bcad9b5d 100644 --- a/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp +++ b/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp @@ -68,7 +68,16 @@ function teamingSuspend(){ //AsDebug.showMessage("提示:","该状态不能进行合作中操作!", "", "", true); return; } - + if(distributor_status=='distributor_status05'){ + alert("提示:该状态已为合同暂停状态!"); + //AsDebug.showMessage("提示:","该状态不能进行合作中操作!", "", "", true); + return; + } + if(distributor_status=='distributor_status06'){ + alert("提示:该状态为合同终止状态,不能在改变!"); + //AsDebug.showMessage("提示:","该状态不能进行合作中操作!", "", "", true); + return; + } if(confirm("确定合作暂停?")){ var result = AsControl.RunJavaMethodTrans("com.tenwa.customer.distributor.DeleteDistributor","setDistributorStatusS","id="+id+",distributor_status="+distributor_status); alert("暂停成功"); diff --git a/calc/com/tenwa/flow/CopyInfoTempToFormal2.java b/calc/com/tenwa/flow/CopyInfoTempToFormal2.java new file mode 100644 index 000000000..fae032508 --- /dev/null +++ b/calc/com/tenwa/flow/CopyInfoTempToFormal2.java @@ -0,0 +1,36 @@ +package com.tenwa.flow; + +import java.util.HashMap; +import java.util.Map; + +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP; + +import com.amarsoft.app.util.ASOrgObject; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.Transaction; +import com.amarsoft.context.ASUser; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.lease.flow.project.businessapply.DistributorCompare; + +public class CopyInfoTempToFormal2 extends BaseBussiness{ + + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + MapfromCondtion=new HashMap(); + fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString()); + String id = this.getAttribute("ProjectId").toString(); + BizObjectManager dit = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca); + BizObject bo=dit.createQuery("id=:id").setParameter("id", id).getSingleResult(false); + bo.getAttribute("distributor_status").setValue("distributor_status06"); + dit.saveObject(bo); + String sMessage="true"; + return sMessage; + } + +}