This commit is contained in:
linxiaoping 2018-06-24 23:47:18 +08:00
parent 39ce2e0457
commit 1ce83c1abf
5 changed files with 77 additions and 8 deletions

View File

@ -9,7 +9,8 @@
String sPrevUrl = CurPage.getParameter("ID");
String ProjectName = CurPage.getParameter("ProjectName");
/* if(sPrevUrl == null) sPrevUrl = ""; */
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", sFlowUnid).getSingleResult(false);
String DISTRIBUTOR_NO=flow.getAttribute("Flow_Key").getString();
String sTempletNo = "DDepositReturn_TempInfo";//--Ä£°åºÅ--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
/* doTemp.setColTips("", "²âÊÔ"); */
@ -45,8 +46,11 @@
AsControl.OpenView("/DealerDeposit/DDepositReturn_TempList.jsp", "FlowUnid="+sFlowUnid,"_self","");
}
function selectBalance(){
AsControl.RunJavaMethod(ClassName,MethodName, Args);
//var distributor_id = getItemValue(0,getRow(),'distributor_id');
//var CAUTION_MONEY = getItemValue(0,getRow(),'CAUTION_MONEY');
var sReturn=AsControl.RunJavaMethodTrans("com.tenwa.flow.action.comm.SelectBalance","runs","distributor_no=<%=DISTRIBUTOR_NO%>");<%-- "distributor_no=<%=DISTRIBUTOR_NO%>" --%>/* +"&CAUTION_MONEY="+CAUTION_MONEY */
setItemValue(0,0,"ACCOUNT_BALANCE",sReturn);
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -27,7 +27,6 @@
<script type="text/javascript">
var sFlowUnid = "<%=sFlowUnid%>";
setItemValue(0,0,"MONEY_TYPE","±£Ö¤½ðÊÕ¿î");
setItemValue(0,0,"MONEY_TYPE","ÊÕ¿î");
setItemValue(0,0,"DISTRIBUTOR_ID","<%=DISTRIBUTOR_NO%>");
setItemValue(0,0,"PAYER","<%=CurPage.getParameter("ProjectName")%>");
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");

View File

@ -69,7 +69,7 @@ function teamingSuspend(){
return;
}
if(confirm("È·¶¨ºÏͬÔÝÍ£?")){
if(confirm("È·¶¨ºÏ×÷ÔÝÍ£?")){
var result = AsControl.RunJavaMethodTrans("com.tenwa.customer.distributor.DeleteDistributor","setDistributorStatusS","id="+id+",distributor_status="+distributor_status);
alert("暂停成功");
reloadSelf();
@ -92,7 +92,7 @@ function teamingStop(){
//AsDebug.showMessage("提示:","该经销商已是合同终止,不能修改!", "", "", true);
return;
}
if(confirm("È·¶¨ºÏͬÖÕÖ¹?")){
if(confirm("È·¶¨ºÏ×÷ÖÕÖ¹?")){
var result = AsControl.RunJavaMethodTrans("com.tenwa.customer.distributor.DeleteDistributor","setDistributorStatusE","id="+id+",distributor_status="+distributor_status);
alert("终止成功");
reloadSelf();

View File

@ -49,9 +49,9 @@
String sButtons[][] =null;
sButtons=new String[][]{
{"true","All","Button","新增","新增","newRecord()","","","",""},
/* {"true","All","Button","新增","新增","newRecord()","","","",""},
{"true","All","Button","ÐÞ¸Ä","ÐÞ¸Ä","viewAndEdit()","","","","btn_icon_edit"},
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""}, */
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>

View File

@ -0,0 +1,66 @@
package com.tenwa.flow.action.comm;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
public class SelectBalance {
private String distributor_no;
private String CAUTION_MONEY;
public String getDistributor_no() {
return distributor_no;
}
public void setDistributor_no(String distributor_no) {
this.distributor_no = distributor_no;
}
public String getCAUTION_MONEY() {
return CAUTION_MONEY;
}
public void setCAUTION_MONEY(String cAUTION_MONEY) {
CAUTION_MONEY = cAUTION_MONEY;
}
public String runs(JBOTransaction tx) throws Exception{
Transaction scql=Transaction.createTransaction(tx);
String money="";
Map<String,String> params= new HashMap<String,String>();
params.put("distributor_id", distributor_no);
String sql="SELECT O.distributor_id,SUM(CASE WHEN O.money_type='ÊÕ¿î' THEN O.caution_money ELSE -O.caution_money END) AS money "
+ "FROM D_DEPOSITCHARGE_INFO O WHERE "
+ "O.distributor_id=:distributor_id GROUP BY O.distributor_id";
List<Map<String,String>> getSql = DataOperatorUtil.getDataBySql(scql, sql, params);
//if(aaa.size()>0){
money=getSql.get(0).get("money");
//}
return money;
/*BizObjectManager ddi = JBOFactory.getBizObjectManager(D_DEPOSITCHARGE_INFO.CLASS_NAME,tx);
BizObject dd = ddi.createQuery("select * from O where distributor_id=:distributorid").setParameter("distributor_id", distributor_no).getSingleResult(false);
String money = dd.getAttribute("caution_money").toString();
Integer mon=new Integer(money);
BizObjectManager ddi2 = JBOFactory.getBizObjectManager(D_DEPOSITRETURN_INFO.CLASS_NAME,tx);
BizObject dd2 = ddi2.createQuery("select caution_money from O where distributor_id=:distributorid").setParameter("distributor_id", distributor_no).getSingleResult(false);
String money2 = dd2.getAttribute("caution_money").toString();
Integer mon2=new Integer(money2);
double m = mon-mon2;
return "m="+m;*/
}
}