2018-06-03 22:26:41 +08:00

81 lines
2.9 KiB
Plaintext

<%@ page contentType="text/html; charset=GBK"%><%@
include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*群组列表*/
//通过显示模版产生模型对象doTemp
ASObjectModel doTemp = new ASObjectModel("GroupList");
doTemp.setVisible("ACTION", true);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","","Button","新增","新增一个群组","newRecord()","","","",""},
{"true","","Button","详情","查看群组情况","viewAndEdit()","","","",""},
{"true","","Button","删除","删除该群组","deleteRecord()","","","",""}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
AsDialog.PopView("/AppConfig/GroupManage/GroupInfo.jsp","",{width:"600px",height:"450px",title:"新增群组"},function(sReturn){
//if (typeof(sReturn)!='undefined' && sReturn.length!=0) {
reloadSelf();
//}
});
}
function viewAndEdit(){
var sGroupID = getItemValue(0,getRow(),"ID_");
if (typeof(sGroupID)=="undefined" || sGroupID.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
AsDialog.PopView("/AppConfig/GroupManage/GroupInfo.jsp","ID_="+sGroupID,{width:"600px",height:"450px",title:"查看编辑群组"},function(sReturn){
if (typeof(sReturn)!='undefined' && sReturn.length!=0) {
reloadSelf();
}
});
}
function deleteRecord(){
var sGroupID = getItemValue(0,getRow(),"ID_");
if (typeof(sGroupID)=="undefined" || sGroupID.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
if(confirm(getMessageText("ALS70902"))){ //删除该群组的同时将删除该群组对应的权限,确定删除该群组吗?
as_delete("myiframe0");
}
}
function enable(){
var sRet = AsControl.RunJavaMethodTrans("com.amarsoft.app.lc.workflow.action.GroupManageAction","setEnable","id_=" + getItemValue(0,getRow(0),'id_'));
if(sRet=="success"){
alert("操作成功. ");
}else{
alert("操作失败! ");
}
reloadSelf();
}
function disable(){
var sRet = AsControl.RunJavaMethodTrans("com.amarsoft.app.lc.workflow.action.GroupManageAction","setDisable","id_=" + getItemValue(0,getRow(0),'id_'));
if(sRet=="success"){
alert("操作成功. ");
}else{
alert("操作失败! ");
}
reloadSelf();
}
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
getObj(0,i,"ACTION").innerHTML='<a href=# onclick="javascript:if(confirm(\'确认要更改当前群组吗?\'))enable()">启用</a> <a href=# onclick="javascript:if(confirm(\'确认要更改当前群组吗?\'))disable()">停用</a> ';
}
setColumnWidth(0,"ACTION",150);
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>