diff --git a/WebContent/Tenwa/platform/PfTaskAllocationRoleInfo.jsp b/WebContent/Tenwa/platform/PfTaskAllocationRoleInfo.jsp new file mode 100644 index 000000000..b1f864a4d --- /dev/null +++ b/WebContent/Tenwa/platform/PfTaskAllocationRoleInfo.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% + /* + Author: undefined 2019-10-11 + Content: 示例详情页面 + History Log: + */ + + String roleid = CurPage.getParameter("roleid"); + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = "/Tenwa/platform/PfTaskAllocationRoleList.jsp"; + + String sTempletNo = "PfTaskAllocationRoleInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + if(roleid!=null) + doTemp.setVisible("ROLENAME",false); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + //dwTemp.ReadOnly = "-2";//只读模式 + dwTemp.genHTMLObjectWindow(roleid); + + String sButtons[][] = { + {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""}, + {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + }; + sButtonPosition = "south"; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/platform/PfTaskAllocationRoleList.jsp b/WebContent/Tenwa/platform/PfTaskAllocationRoleList.jsp new file mode 100644 index 000000000..5682984ff --- /dev/null +++ b/WebContent/Tenwa/platform/PfTaskAllocationRoleList.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2019-10-11 + Content: + History Log: + */ + ASObjectModel doTemp = new ASObjectModel("PfTaskAllocationRoleList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(""); + + //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","角色下用户","角色下用户","viewUser()","","","","btn_icon_detail",""}, + {"true","","Button","删除","删除","deleteRole()","","","","btn_icon_delete",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/platform/PfTaskAllocationUserInfo.jsp b/WebContent/Tenwa/platform/PfTaskAllocationUserInfo.jsp new file mode 100644 index 000000000..461a80414 --- /dev/null +++ b/WebContent/Tenwa/platform/PfTaskAllocationUserInfo.jsp @@ -0,0 +1,60 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% + /* + Author: undefined 2019-10-11 + Content: 示例详情页面 + History Log: + */ + String sPrevUrl = CurPage.getParameter("PrevUrl"); + String roleid = CurPage.getParameter("roleid"); + String id = CurPage.getParameter("id"); + System.out.println(roleid); + System.out.println(id); + String sTempletNo = "PfTaskAllocationUserInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + if(id!=null) + doTemp.setVisible("USERNAME",false); + if(sPrevUrl == null) sPrevUrl = "/Tenwa/platform/PfTaskAllocationUserList.jsp"; + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + //dwTemp.ReadOnly = "-2";//只读模式 + dwTemp.genHTMLObjectWindow(id); + + String sButtons[][] = { + {"true","All","Button","保存","保存所有修改","saveUser()","","","",""}, + {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + }; + sButtonPosition = "south"; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/platform/PfTaskAllocationUserList.jsp b/WebContent/Tenwa/platform/PfTaskAllocationUserList.jsp new file mode 100644 index 000000000..363a1056a --- /dev/null +++ b/WebContent/Tenwa/platform/PfTaskAllocationUserList.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2019-10-11 + Content: + History Log: + */ + String sPrevUrl = CurPage.getParameter("PrevUrl"); + String roleid = CurPage.getParameter("roleid"); + if(sPrevUrl == null) sPrevUrl = "/Tenwa/platform/PfTaskAllocationRoleList.jsp"; + ASObjectModel doTemp = new ASObjectModel("PfTaskAllocationUserList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(roleid); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}, + {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, + {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, + {"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_tenwa/com/tenwa/platform/controller/PfTaskAllocationRoleDelete.java b/src_tenwa/com/tenwa/platform/controller/PfTaskAllocationRoleDelete.java new file mode 100644 index 000000000..f1650c4ce --- /dev/null +++ b/src_tenwa/com/tenwa/platform/controller/PfTaskAllocationRoleDelete.java @@ -0,0 +1,26 @@ +package com.tenwa.platform.controller; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; + +public class PfTaskAllocationRoleDelete { + + private String roleid; + + public String getRoleid() { + return roleid; + } + + public void setRoleid(String roleid) { + this.roleid = roleid; + } + + public String deleteRole(JBOTransaction tx) throws Exception{ + Transaction Sqlca = null; + Sqlca = Transaction.createTransaction(tx); + Sqlca.executeSQL(new SqlObject("delete from pf_task_allocation_role where ROLEID='"+roleid+"'")); + Sqlca.executeSQL(new SqlObject("delete from pf_task_allocation_user where ROLEID='"+roleid+"'")); + return "角色删除成功!"; + } +}