通过配置flow_mode处理审批中根据角色动态显示审批中页签,所以还原改页面

This commit is contained in:
jianghongdong 2018-08-13 15:03:29 +08:00
parent 759b4807b5
commit 6f7f6e2a82

View File

@ -3,40 +3,27 @@
<%@page import="java.util.Date"%>
<%@page import="com.amarsoft.awe.control.model.Parameter" %>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%>
<%/*~BEGIN~¿É±à¼­Çø~[Editable=true;CodeAreaID=List00;Describe=×¢ÊÍÇø;]~*/%>
<%
/*
Content: 流程申请页面
Content: Á÷³ÌÉêÇëÒ³Ãæ
*/
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
<%/*~BEGIN~¿É±à¼­Çø~[Editable=true;CodeAreaID=List01;Describe=¶¨ÒåÒ³ÃæÊôÐÔ;]~*/%>
<%
String PG_TITLE = "流程对象管理"; // 浏览器窗口标题 <title> PG_TITLE </title>
String PG_TITLE = "Á÷³Ì¶ÔÏó¹ÜÀí"; // ä¯ÀÀÆ÷´°¿Ú±êÌâ <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Describe=其它操作;]~*/%>
<%/*~BEGIN~¿É±à¼­Çø~[Describe=ÆäËü²Ù×÷;]~*/%>
<%
//KKK here update of is before check user in the other -- by K
boolean bFlag = false;
List<String> roles = CurUser.getRoleTable();
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
distributorRole = distributorRole == null ? "" : distributorRole;
for(String role : roles) {
if(distributorRole.indexOf(role) != -1) {
bFlag = true;
break;
}
}
//KKK 2.setVisible not show object -- by K
String sApplyType = CurPage.getParameter("ApplyType");
String sPhaseType = CurPage.getParameter("PhaseType");
if(sApplyType == null) sApplyType = "";
if(sPhaseType == null) sPhaseType = "";
//根据申请类型applyType、阶段类型phaseType 得到申请主树图申请按钮申请列表显示模板申请列表where条件等。
//¸ù¾ÝÉêÇëÀàÐÍapplyType¡¢½×¶ÎÀàÐÍphaseType µÃµ½ÉêÇëÖ÷Ê÷ͼ£¬ÉêÇë°´Å¥£¬ÉêÇëÁбíÏÔʾģ°å£¬ÉêÇëÁбíwhereÌõ¼þµÈ¡£
ApplyManager applyManager = new ApplyManager(sApplyType,sPhaseType,CurUser);
ASObjectModel doTemp = new ASObjectModel(applyManager.getDono());
doTemp.setLockCount(2);
@ -48,29 +35,22 @@
doTemp.setVisible("flow_key", false);
doTemp.setVisible("CONTRACT_NO", true);
}
//setVisible show Or show don't
if(!("1010".equals(sPhaseType)) && bFlag) {
doTemp.setVisible("ACTION", false);
}
//doTemp.appendJboWhere(applyManager.getWhereClause()+" order by objectNo desc ");
doTemp.appendJboWhere(applyManager.getWhereClause());
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //设置为Grid风格
//dwTemp.MultiSelect = true;//允许多选
dwTemp.ReadOnly = "1";//编辑模式
dwTemp.Style="1"; //ÉèÖÃΪGrid·ç¸ñ
//dwTemp.MultiSelect = true;//ÔÊÐí¶àÑ¡
dwTemp.ReadOnly = "1";//±à¼­Ä£Ê½
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = applyManager.getButtonArr();
//vivotab
//control distributor(temporary)
List<String[]> buttonLists = Arrays.asList(sButtons);
buttonLists = new ArrayList<String[]>(buttonLists);
int num1 = 0;
boolean flag1 = false;
boolean flag1 = false;
int num2 = 0;
boolean flag2 = false;
int num3 = 0;
boolean flag3 = false;
for(int i = 0; i < sButtons.length; i ++) {
for(int j = 0; j < sButtons[i].length; j ++) {
if("viewFlowGraph()".equals(sButtons[i][j])) {
@ -82,17 +62,10 @@
num2 = i;
flag2 = true;
break;
}
//jingXiaoShang power limit by K 2018/08/11
if(!("1010".equals(sPhaseType)) && "viewTab()".equals(sButtons[i][j])) {
num3 = i;
flag3 = true;
break;
}
}
}
//KKK this code look top top top
/* boolean bFlag = false;
boolean bFlag = false;
List<String> roles = CurUser.getRoleTable();
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
distributorRole = distributorRole == null ? "" : distributorRole;
@ -101,7 +74,7 @@
bFlag = true;
break;
}
} */
}
if(bFlag) {
if(flag1) {
String[] removeB1 = buttonLists.get(num1);
@ -111,10 +84,6 @@
String[] removeB2 = buttonLists.get(num2);
buttonLists.remove(removeB2);
}
if(flag3) {//jingXiaoShang power limit by K 2018/08/11
String[] removeB3 = buttonLists.get(num3);
buttonLists.remove(removeB3);
}
}
sButtons = new String[buttonLists.size()][];
for(int i = 0; i < buttonLists.size(); i ++) {