You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
170 lines
4.9 KiB
170 lines
4.9 KiB
1 month ago
|
<%@page import="org.wdk.module.auth.mount.bean.BaseSessionUser"%>
|
||
|
<%@page import="org.wdk.WDK"%>
|
||
|
<%@page import="org.wdk.module.auth.source.bean.TokenBean"%>
|
||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
<%
|
||
|
String path = request.getContextPath();
|
||
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||
|
BaseSessionUser su = WDK.getSessionUser(request, response);
|
||
|
if(null==su){
|
||
|
su = new BaseSessionUser();
|
||
|
}
|
||
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
||
|
String RSS_ROOT = WDK_ROOT +"/"+WDKConstant.Theme+"/"+WDKCore.THEME;
|
||
|
String commonURL = "/"+RSS_ROOT+"/module/public/common.jsp";
|
||
|
%>
|
||
|
<!DOCTYPE html>
|
||
|
<%@page import="org.wdk.WDKConstant"%>
|
||
|
<%@page import="org.wdk.WDKCore"%>
|
||
|
<html>
|
||
|
|
||
|
<head>
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<jsp:include page='<%=commonURL %>'></jsp:include>
|
||
|
<script type="text/javascript" src="<%=RSS_ROOT%>/core/js/wdk.js"></script>
|
||
|
<title>grid字段管理</title>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
<% if(null==su){%>
|
||
|
$.timeout();
|
||
|
<%}%>
|
||
|
|
||
|
var URLParams;
|
||
|
var _gridcode = "wdk.module.sys.gridfieldgrid";
|
||
|
var _gridid = $.getUUID();
|
||
|
var _mgcode = '';
|
||
|
window.onload = function(){
|
||
|
_mgcode = $.getURLParam('mgcode');
|
||
|
$.grid({
|
||
|
id:_gridid
|
||
|
,containerid:'layout_grid'
|
||
|
,gridcode:_gridcode
|
||
|
,fit: true
|
||
|
,remoteSort:false
|
||
|
,pagination:true //分页控件
|
||
|
,rownumbers:true
|
||
|
,url:'wdk?action=wdk.public&method=gridfield_load&ajaxparam='+new Date().getTime()
|
||
|
,queryParams:{mgcode:_mgcode}
|
||
|
,idField:'fieldcode'
|
||
|
,editor:[
|
||
|
{
|
||
|
field : 'fieldcode',
|
||
|
editor : {
|
||
|
type : 'text'
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field : 'fieldname',
|
||
|
editor : {
|
||
|
type : 'text'
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field:"width",
|
||
|
editor:{
|
||
|
type : 'text'
|
||
|
}
|
||
|
|
||
|
},
|
||
|
{
|
||
|
field:"align",
|
||
|
editor:{
|
||
|
type:"inputpop",
|
||
|
options:{
|
||
|
gridid:_gridid,
|
||
|
field:'align',
|
||
|
url:'<%=WDK_ROOT%>/module/public/grid_format_align.jsp',
|
||
|
gridcode:'wdk.module.public.gridformataligngrid',
|
||
|
title:'对齐方式',
|
||
|
width:300,
|
||
|
height:400
|
||
|
//callback:'_callback_inputpop_align'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
},
|
||
|
{
|
||
|
field : 'ishidden',
|
||
|
editor : {
|
||
|
type : 'checkbox',
|
||
|
options : {on:'是',off:''}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field : 'isfrozen',
|
||
|
editor : {
|
||
|
type : 'checkbox',
|
||
|
options : {on:'是',off:''}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field:"ordercode",
|
||
|
editor:{
|
||
|
type : 'text'
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field:"parentid",
|
||
|
editor:{
|
||
|
type : 'text'
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
});
|
||
|
|
||
|
};
|
||
|
//新增一行
|
||
|
function _append(){
|
||
|
$.grid_editor_append({id:_gridid});
|
||
|
}
|
||
|
//删除一行
|
||
|
function _remove(){
|
||
|
$.grid_editor_remove({id:_gridid});
|
||
|
}
|
||
|
//结束编辑
|
||
|
function _ending(){
|
||
|
$.grid_editor_ending({id:_gridid});
|
||
|
}
|
||
|
//撤销修改
|
||
|
function _reject(){
|
||
|
$.grid_editor_reject({id:_gridid});
|
||
|
}
|
||
|
|
||
|
//保存提交
|
||
|
function _save(){
|
||
|
var jrows = $.grid_getData({id:_gridid});
|
||
|
//保存提交
|
||
|
var _data = {
|
||
|
jrows:$.json2str(jrows),
|
||
|
mgcode:_mgcode
|
||
|
};
|
||
|
$.cuajax({
|
||
|
url: 'wdk?action=wdk.public&method=gridfield_save&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:_data,
|
||
|
success:function(result) {
|
||
|
var jres = $.str2json(result);
|
||
|
alert(jres.desc);
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body class="easyui-layout" data-options="fit:true" style="padding:0px;margin:0px;">
|
||
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:1px solid #ddd;" >
|
||
|
|
||
|
</div>
|
||
|
<div id="layout_grid_toolbar" data-options="region:'north',border:false,collapsed:false" style="height:30px;overflow:hidden;border:1px solid #ddd;text-align:left;" >
|
||
|
<!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="_append()">新增字段</a>-->
|
||
|
<!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="_remove()">删除字段</a>-->
|
||
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" onclick="_ending()">完成操作</a>
|
||
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" onclick="_reject()">撤销修改</a>
|
||
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="_save()">保存提交</a>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|