配置河北银行排队机业务分组信息,可新增、修改、删除、查询业务分组。每个业务分组可包含多个业务类型。涉及到的数据库为:iqs_hb
1、查询部分:
涉及到的表为:q_businesstypegroup
INSTANCEID | GROUPNAME | GROUPTYPEK |
分组ID | 分组名称 | 分组类型K值 |
当点击分组配置时跳转时跳转 bussinessGroupQuery.action
// 展示分组页面
@Action(value = "bussinessGroupQuery", results = { @Result(location = "/WEB-INF/jsp/bussiness/bussinessGroupQuery.jsp") })
public String showQueue() {
log.debug("====================显示业务分组页面bussinessGroupQuery展示====================");
return SUCCESS;
}
// 查询分组页面数据
@Action(value = "ajaxBusinessGrooupQuery", results = { @Result(type = "json", params = {
"root", "json", "contentType", "text/html" }) })
public String ajaxBusinessGrooupQuery() {
log.debug("====================查询业务分组页面ajaxBussinessGrooupQuery====================");
VO args = new VO();
try {
args.setAttr("page", String.valueOf(page));
args.setAttr("rows", String.valueOf(rows));
VO rst = SV.g("bussiness.Bussinessgroupquery", args);
if (RESULT_SUCCESS.equals(rst.getAttr("result"))) {
VOList vl = (VOList) rst.getObj("volist");
List ls = Toolkit.volist2List(vl);
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("total", rst.getAttr("total_num"));
map.put("rows", ls);
json = JSONObject.fromObject(map);
}
} catch (Exception e) {
log.debug(
"====================查询业务分组信息页面ajaxBusinessGrooupQuery异常:",
e);
}
log.debug("====================离开查询业务分组信息页面ajaxBusinessGrooupQuery====================");
return SUCCESS;
}
bussinessGroupQuery.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<html lang='zh-CN' xml:lang='zh-CN' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>业务分组管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=basePath%>css/login.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css"
href="<%=basePath%>js/easyui/themes/default/easyui.css"></link>
<link rel="stylesheet" type="text/css"
href="<%=basePath%>js/easyui/themes/icon.css"></link>
<link rel="stylesheet"
href="<%=basePath%>js/ztree/zTreeStyle/zTreeStyle.css" type="text/css"></link>
<script type="text/javascript" src="<%=basePath%>js/jquery-1.8.0.min.js"></script>
<script type="text/javascript"
src="<%=basePath%>js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript"
src="<%=basePath%>js/ztree/jquery.ztree.core-3.5.min.js"></script>
<style type="text/css">
<!--
ul.ztree {
margin-top: 10px;
margin-bottom: 10px;
border: 1px solid #617775;
background: #f0f6e4;
width: 220px;
height: 90%;
overflow-y: scroll;
overflow-x: auto;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="height: 100%">
<tr>
<td width="17" valign="top" background="../images/mail_leftbg.gif">
<img src="../images/left-top-right.gif" width="17" height="29px" />
</td>
<td valign="top" background="../images/content-bg.gif">
<table width="100%" height="29px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
<tr>
<td height="29px">
<div class="titlebt">业务分组信息</div>
</td>
</tr>
</table>
</td>
<td width="16px" valign="top" background="../images/mail_rightbg.gif">
<img src="../images/nav-right-bg.gif" width="16" height="29" />
</td>
</tr>
<tr>
<td valign="middle" background="../images/mail_leftbg.gif"></td>
<td valign="top" bgcolor="#F7F8F9" style="height: 100%">
<table border="0" align="center" cellpadding="0" style="height: 100%;width: 100%;" cellspacing="0" >
<tr style="height: 100%">
<td colspan="4" style="height: 100%">
<table border="0" align="left" cellpadding="0" style="height: 100%;width: 100%;" cellspacing="0" >
<tr>
<td style="height: 100%;width:100%;padding-left: 10px;vertical-align: top;">
<div id="panel" class="easyui-panel" style="width:100%;height:100%;" data-options="border:false,closable:false,fit:true">
<dir id="result_list">
<table id="resultitem_list"></table>
</dir>
<div id="toolbar">
<div align="right">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" οnclick="add()">新增</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" οnclick="modify()">修改</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" οnclick="drop()">删除</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" οnclick="config()">业务类型配置</a>
</div>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr height="50px">
<td width="2%"> </td>
<td width="51%" class="left_txt">
<img src="../images/icon-mail2.gif" width="16" height="11"></img>
客户服务邮箱:info@kakasys.com</br>
<img src="../images/icon-phone.gif" width="17" height="14"></img>
官方网站:http://www.kakasys.com
</td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
<td background="../images/mail_rightbg.gif"></td>
</tr>
<tr>
<td valign="bottom" background="../images/mail_leftbg.gif">
<img src="../images/buttom_left2.gif" width="17" height="17px"></img>
</td>
<td background="../images/buttom_bgs.gif">
<img src="../images/buttom_bgs.gif" width="17" height="17"></img>
</td>
<td valign="bottom" background="../images/mail_rightbg.gif">
<img src="../images/buttom_right2.gif" width="16" height="17" ></img>
</td>
</tr>
</table>
<div id="dlg"></div>
<script type="text/javascript">
$.messager.defaults = { ok: "确定", cancel: "取消" };
$(function() {
//浏览器手动改变大后,panel自动匹配,改小无变化
$(window).resize(function() {
$('#panel').panel('resize');
});
});
function closeDlg(){
$('#dlg').dialog('close');
}
function add(){
$('#dlg').dialog({
title: '新增业务分组信息',
width: 420,
height: 200,
closed: false,
cache: false,
href: 'bussinessGroupAdd.do',
modal: true
});
}
function modify() {
var row = $('#result_list').datagrid('getSelected');
//alert("GROUPTYPEKDES:"+row.GROUPTYPEKDES);
if (row) {
$('#dlg').dialog({
title : '修改',
width : 420,
height : 200,
closed : false,
cache : false,
href: 'modifyBussinessGroup.do?instanceid='+row.INSTANCEID+'&groupName='+row.GROUPNAME+'&groupTypeKDes='+row.GROUPTYPEKDES+'&groupTypeK='+row.GROUPTYPEK,
modal : true
});
}else{
$.messager.alert('警告','请选择修改项!');
}
}
function drop() {
var row = $('#result_list').datagrid('getSelected');
//alert(row.INSTANCEID);
if (row) {
$.messager.confirm('提示', '你确定删除该信息?', function(r) {
if (r) {
$.post('ajaxOnDeleteBussinessGroup.do', {
instanceid : row.INSTANCEID
}, function(result) {
if (result.success) {
$('#result_list').datagrid('reload');
} else {
$.messager.show({ // show error message
title : 'Error',
msg : result.errorMsg
});
}
}, 'json');
}
});
}else{
$.messager.alert('警告','请选择删除项!');
}
}
function config(){
var row = $('#result_list').datagrid('getSelected');
//alert(row.INSTANCEID+row.GROUPNAME+row.GROUPTYPEKDES);
if(row){
$('#dlg').dialog({
title : '分组业务配置',
width : 800,
height : 470,
closed : false,
cache : false,
href: 'bussinessGroupConfig.do?instanceid='+row.INSTANCEID+'&groupName='+row.GROUPNAME+'&groupTypeKDes='+row.GROUPTYPEKDES,
modal : true
});
}else{
$.messager.alert('警告','请选择配置项!');
}
}
function reload() {
$('#result_list').datagrid({
});
}
$('#result_list').datagrid({
url:'ajaxBusinessGrooupQuery.do',
//loadData: {},
title: '查询结果',
loadMsg:'数据加载中,请稍候...',
width: 1070,
height: 390,
fitColumns: true,
nowrap:true,
striped:true,
rownumbers:true,
showFooter:false,
singleSelect:true,
remoteSort:false,
pagination:true,
//pageNumber:1,
//pageSize:20,
toolbar:"#toolbar",
fit:true,
columns : [ [
{
field : 'INSTANCEID',
title : '分组编号',
width : 100,
align : 'center',
hidden : 'true',
sortable : true
} ,{
field : 'GROUPNAME',
title : '分组名称',
width : 100,
align : 'center',
sortable : true
},{
field : 'GROUPTYPEK',
title : '分组业务类型K',
width : 100,
align : 'center',
hidden: 'true',
sortable : true
}, {
field : 'GROUPTYPEKDES',
title : '分组业务类型',
width : 100,
align : 'center',
sortable : true
}] ]
});
</script>
</body>
</html>
该jsp通过ajax技术展示数据:
<span style="white-space:pre"> </span><dir id="result_list">
<table id="resultitem_list"></table>
</dir>
$('#result_list').datagrid({
url:'ajaxBusinessGrooupQuery.do',
//loadData: {},
title: '查询结果',
loadMsg:'数据加载中,请稍候...',
width: 1070,
height: 390,
fitColumns: true,
nowrap:true,
striped:true,
rownumbers:true,
showFooter:false,
singleSelect:true,
remoteSort:false,
pagination:true,
//pageNumber:1,
//pageSize:20,
toolbar:"#toolbar",
fit:true,
columns : [ [
{
field : 'INSTANCEID',
title : '分组编号',
width : 100,
align : 'center',
hidden : 'true',
sortable : true
} ,{
field : 'GROUPNAME',
title : '分组名称',
width : 100,
align : 'center',
sortable : true
},{
field : 'GROUPTYPEK',
title : '分组业务类型K',
width : 100,
align : 'center',
hidden: 'true',
sortable : true
}, {
field : 'GROUPTYPEKDES',
title : '分组业务类型',
width : 100,
align : 'center',
sortable : true
}] ]
})
对应: