diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorAccountInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorAccountInfo.jsp index da6f7826b..a6f887a96 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorAccountInfo.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorAccountInfo.jsp @@ -8,7 +8,7 @@ String id = CurPage.getParameter("id");//账号id String sflowunid = CurPage.getParameter("flowunid"); String flowunid=CurPage.getParameter("ObjectNo"); - String righttrpe=CurPage.getParameter("RightType"); + String rightType=CurPage.getParameter("RightType"); if(id == null) id=""; String sTempletNo = "LDistributorAccountInfo"; //模板号 // if(sTempletNo == null) sTempletNo = "LDistributorAccountInfo"; @@ -21,15 +21,15 @@ doTemp.setDefaultValue("DISTRIBUTOR_ID", DISTRIBUTOR_NO); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="2"; //--设置为Grid风格-- - /* if("ReadOnly".equals(rightType)){ + if("ReadOnly".equals(rightType)){ dwTemp.ReadOnly = "1"; //只读模式 - } */ + } dwTemp.genHTMLObjectWindow(id); //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 String sButtons[][] = { - {"ReadOnly".equals(righttrpe)?"false":"true","","Button","保存","保存所有修改","save()","","","","btn_icon_save"}, + {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存所有修改","save()","","","","btn_icon_save"}, {"true","","Button","返回","返回","returnList()","","","","btn_icon_return"} }; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> @@ -37,9 +37,8 @@ function save(){ setItemValue(0,0,"sPara","<%=sflowunid%>"); var partner = getItemValue(0,getRow(0),"IS_MAIN"); - if(partner=="Y"){ - var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.AccountInfoManage","CheckPartnerInfo","flowunid=<%=flowunid%>"); + var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.AccountInfoManage","CheckPartnerInfo","flowunid=<%=flowunid%>,id=<%=id%>"); if(result=="1"){ alert("主账户已存在!"); return; diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorAccountList.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorAccountList.jsp index 7c7d814b2..8147918a3 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorAccountList.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorAccountList.jsp @@ -21,7 +21,8 @@ //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","All","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit",""}, + {"true","","Button","详情","详情","view()","","","","btn_icon_detail",""}, {"true","All","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""}, }; %><%@include file="/Frame/resources/include/ui/include_list.jspf"%> @@ -34,6 +35,19 @@ reloadSelf(); },"新增"); } + function view(){ + var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorAccountInfo.jsp"; + var sPara = getItemValue(0,getRow(0),'id'); + <%-- var sPara ="flowunid=<%=sFlowUnid%>"; --%> + if(typeof(sPara)=="undefined" || sPara.length==0 ){ + alert("参数不能为空!"); + return ; + } + AsDialog.PopView(sUrl,"id="+sPara+"&flowunid="+"<%=sFlowUnid%>"+"&RightType=ReadOnly","dialogWidth=800px;dialogHeight=200px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){ + reloadSelf(); + },"详情"); + } + function viewAndEdit(){ var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorAccountInfo.jsp"; var sPara = getItemValue(0,getRow(0),'id'); @@ -42,8 +56,8 @@ alert("参数不能为空!"); return ; } - AsDialog.PopView(sUrl,"id="+sPara+"&flowunid="+"<%=sFlowUnid%>","dialogWidth=800px;dialogHeight=200px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){ - reloadSelf(); + AsDialog.PopView(sUrl,"id="+sPara+"&flowunid="+"<%=sFlowUnid%>","dialogWidth=800px;dialogHeight=200px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){ + reloadSelf(); },"详情"); } diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/AccountInfoManage.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/AccountInfoManage.java index f0e00b9dd..974d2156b 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/AccountInfoManage.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/AccountInfoManage.java @@ -43,21 +43,28 @@ public class AccountInfoManage { if(bos==null){ return "2"; } + boolean res= false; Map partners = new HashMap(); for(BizObject bo:bos){ String partner = bo .getAttribute("IS_MAIN").toString(); - partners.put(partner, partner); + //partners.put(partner, partner); + if("Y".equals(partner)){ + if(!(bo.getAttribute("ID").toString().equals(id))){ + res = true; + break; + } + } } + /*Set set = partners.keySet(); - Set set = partners.keySet(); - - boolean res = set.contains("Y"); + boolean res = set.contains("Y");*/ if(res==true){ return "1"; }else{ return "2"; } + } public String getFlowunid() {