保证金收取问题及字段改变事件

This commit is contained in:
liuz 2018-07-14 10:04:27 +08:00
parent e484f8052e
commit 405253d140
7 changed files with 84 additions and 8 deletions

View File

@ -7,18 +7,27 @@
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");
String ProjectName = CurPage.getParameter("ProjectName");
String type = CurPage.getParameter("PhaseNo");
ASObjectModel doTemp = new ASObjectModel("DDepositReturn_TempList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow(sFlowUnid);
String falg = "true";
if("0020".equals(type)){
falg ="false";
}
//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)","","","","btn_icon_delete",""},
{falg,"All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{falg,"","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
{falg,"","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
// {"","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
// {"","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
// {"","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">

View File

@ -8,6 +8,7 @@
History Log:
*/
String id = UUIDUtil.getUUID();
//String sFlowUnid = CurPage.getParameter("FlowUnid");
String userId = CurPage.getUserId();
ASObjectModel doTemp = new ASObjectModel("CustomerDistributorList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
@ -27,6 +28,16 @@
<script type="text/javascript">
function teaming(){
var id = getItemValue(0,getRow(0),'ID');
//debugger;
//alert(id);
var result = AsControl.RunJavaMethodTrans("com.tenwa.customer.distributor.DeleteDistributor","SelectGroup","id="+id);
//var distributor_type=sReturn[3];
if(result=="false"){
alert("集团外的经销商需激活后再收取保证金!");
return;
}
var id = getItemValue(0,getRow(0),'ID');
var distributor_status = getItemValue(0,getRow(0),'distributor_status');
if(typeof(id)=="undefined" || id.length==0 ){

View File

@ -87,6 +87,7 @@
sReturn = sReturn.split("@");
// alert(sReturn[1]);
setItemValue(0,0,"provinceInfo",sReturn[1]);
setItemValue(0,0,"district","");
province=sReturn[0];
setCertType();
},"请选择省份",'');

View File

@ -58,19 +58,48 @@
return false;
}
}
//校验经销商编号是否唯一
function Uniquenesscheck(){
var DISTRIBUTOR_CODING = getItemValue(0,0,'DISTRIBUTOR_CODING');
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","distributor_basic","DISTRIBUTOR_CODING="+DISTRIBUTOR_CODING);
if("false" ==sReturnInfo){
alert("经销商编码已存在,请重新输入!!!");
return false;
}else{
return true;
}
}
<%-- $(function(){
if("<%=PhaseNo%>"=="0020"){
setItemRequired(0, "RETAIL_OPEN_DATE", true);
$("#RETAIL_OPEN_DATE")
}
}) --%>
function save(){
var result = Checkfield();
if(result==true){
as_save(0,"saveproj_name()");
function save() {
var result = false;
var distributor_coding = getItemValue(0,0,'DISTRIBUTOR_CODING');
if("0020"=="<%=PhaseNo%>"&&distributor_coding!=""){
result=true;
}else{
result = Uniquenesscheck();
}
// result = Uniquenesscheck();
var result1 = Checkfield();
//if(result==true){
if(result==true && result1==true){
as_save("0","saveproj_name()");
}
}
function saveproj_name(){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businesspply.CustomerInfoManage","saveDistributorInfo","flowunid=<%=sFlowUnid%>");
@ -153,6 +182,8 @@
// alert(sReturn[1]);
setItemValue(0,0,"provinces",sReturn[1]);
province=sReturn[0];
setItemValue(0,0,"DISTRIBUTOR_ADDRESSNAME","");
setItemValue(0,0,"DISTRIBUTOR_ADDRESS","");
setCertType();
},"ÇëÑ¡ÔñÊ¡·Ý",'');
}

View File

@ -117,6 +117,8 @@ function saveproj_name(){
sReturn = sReturn.split("@");
// alert(sReturn[1]);
setItemValue(0,0,"provinces",sReturn[1]);
setItemValue(0,0,"DISTRIBUTOR_ADDRESSNAME","");
setItemValue(0,0,"DISTRIBUTOR_ADDRESS","");
province=sReturn[0];
setCertType();
},"请选择省份",'');

View File

@ -130,6 +130,8 @@ function saveproj_name(){
sReturn = sReturn.split("@");
// alert(sReturn[1]);
setItemValue(0,0,"provinces",sReturn[1]);
setItemValue(0,0,"DISTRIBUTOR_ADDRESSNAME","");
setItemValue(0,0,"DISTRIBUTOR_ADDRESS","");
province=sReturn[0];
setCertType();
},"请选择省份",'');

View File

@ -3,6 +3,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.app.tenwa.customer.DISTRIBUTOR_GROUP_RELATION;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import jbo.com.tenwa.entity.comm.own.COUNTRY_DISTRICT_INFO;
import com.amarsoft.are.jbo.BizObject;
@ -16,6 +17,15 @@ public class CustomerGroupCompanyController {
private String id = "";
private String group_name = "";
private String group_no = "";
private String DISTRIBUTOR_CODING = "";
public String getDISTRIBUTOR_CODING() {
return DISTRIBUTOR_CODING;
}
public void setDISTRIBUTOR_CODING(String dISTRIBUTOR_CODING) {
DISTRIBUTOR_CODING = dISTRIBUTOR_CODING;
}
public String getGroup_name() {
return group_name;
@ -137,6 +147,16 @@ public class CustomerGroupCompanyController {
}
}
public String distributor_basic(JBOTransaction tx) throws Exception{
BizObjectManager dgcm = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME);
BizObject dgc = dgcm.createQuery("DISTRIBUTOR_CODING=:DISTRIBUTOR_CODING").setParameter("DISTRIBUTOR_CODING", DISTRIBUTOR_CODING).getSingleResult(false);
if(dgc == null){
return "true";
}else{
return "false";
}
}
public String getNewId(JBOTransaction tx) throws Exception{
String id="";
BizObjectManager dgcm = JBOFactory.getBizObjectManager(DISTRIBUTOR_GROUP_COMPANY.CLASS_NAME);