1 Star 1 Fork 1

gujiejing / WEBWMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
datagridExample.js 55.68 KB
一键复制 编辑 原始数据 按行查看 历史
gujiejing 提交于 2018-04-04 11:43 . qqqqqqqqqqwwwwwwwwwwwwwwssssssssssss
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391
<!--
<th data-options="field:'detail',width:30,align:'center',formatter:eventDetail">详细</th>
function eventDetail(val,row,index){
return '<img src="<%=request.getContextPath() %>/itsm/image/btn_search.png" width="20" height="20" onclick="queryDialog('+index+')"/>';
}
//页面详情函数
function queryDialog(index){
var detailRow = $('#eventDatagrid').datagrid('getRows')[index];
$("#operateDialog").dialog({
href : '<%=request.getContextPath()%>/incident/event_initEventDetail.action',
closed : false,
title : '详细信息',
padding: '10px',
closable : false,
modal : true,
width:'750px',
height:'500px',
//查询表单的数据初始化
queryParams:{
"eventInfoVO.id":detailRow.id
}
});
}
-->
EasyUI学习笔记---Datagrid真分页
EasyUI Datagrid组件在我看来功能还是很强大的在我使用过程中遇到分页请求的问题困扰了一天才解决下面我就把我遇到的问题分享一下
//datagrid数据表格渲染
$("#dg").datagrid({
loader: function(param, success, error) {
var pageNumber = param.page;
var pageSize = param.rows;
$.ajax({
type: "get",
url: url,
dataType: 'jsonp',
data: "pageNum=" + pageNumber + "&pageSize=" + pageSize,
success: function(data) {
if(data.code == 0) {
var arr = data.result.content;
$("#dg").datagrid('loadData', { total: data.result.page.totalRecord, rows: arr })
}
},
error: function() {
error.apply(this, arguments);
}
});
}
})
传入的参数有param, success, error可选
这里我主要用到了paramparam有param.page页码和param.rows每页显示行数两个属性由于页面载入之后就要进行查询所以这个参数是必须的
遇到的第一个问题是跨域这个在之前的文章有些过这里就不赘述了
其次就是请求回的数据怎么渲染到表格中由于是真分页所以每次查询的数据只是当前页面的数据并不是所有的数据但是页脚显示数据总数必须是所有数据这样才能就行分页
最后通过查看资料发现loadData方法可以传入一个json格式的数据$("#dg").datagrid('loadData', { total: data.result.page.totalRecord, rows: arr })这样就解决了数据渲染分页请求的问题
由于我启用了loadMsg属性即在请求后台数据的时候会显示正在加载的状态但是请求成功之后此状态并未隐藏最后通过设置
onLoadSuccess: function(data) {
//查询成功是隐藏正在加载状态。
$(this).datagrid("loaded");
}
在数据加载成功之后隐藏正在加载状态
点击下一页进行查询
//点击下一页
$('#dg').datagrid('getPager').pagination({
//刷新按钮执行的操作
onBeforeRefresh: function() {},
onSelectPage: function(pageNumber, pageSize) {
$("#dg").datagrid('loading'); //显示加载信息
$.ajax({
type: "get",
url: url,
dataType: 'jsonp',
data: "pageNum=" + pageNumber + "&pageSize=" + pageSize ,
success: function(data) {
if(data.code == 0) {
//数据返回成功后填充到表格中
var arr = data.result.content;
$("#dg").datagrid('loadData', { total: data.result.page.totalRecord, rows: arr })
}
},
error: function() {
error.apply(this, arguments);
}
})
}
});
//这里的rows page是自动的 不用去写 直接获得就能得到当前的数据 rows是pagesize page是第几页  
//只要代码写的没问题,easyui下面的分页插件中,比如选择每页显示多少行和上一页、下一页事件是自动触发的。
//page和rows也是esyui每次自动传到后台的,不需要自己手写
int rows = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
int page = Request["page"] == null ? 1 : int.Parse(Request["page"]);
List<VehicleModel> lst = new List<VehicleModel>();
var array = Fquery.ToArray();
for (int i = (page - 1) * rows; i < page * rows && i < array.Length; i++)
{
lst.Add(array[i]);
}
//最重要的是在后台取数据放在json中要添加个参数total来存放数据的总行数,如果没有这个参数则不能分页
int total = array.Length;
var result = new { total = total, rows = lst };
return Json(result);
<div id="tb" style="padding: 2px; height: auto">
<div>
@*<a href="javascript:void(0)" onclick="cre('@Url.Action("VeCreate")')" class="easyui-linkbutton" iconcls="icon-add" plain="true">添加</a>*@
<a href="javascript:void(0)" onclick="mod('@Url.Action("VeEdit")')" class="easyui-linkbutton" iconcls="icon-edit" plain="true">修改</a>
<a href="javascript:void(0)" onclick="del('@Url.Action("VeDelete")')" class="easyui-linkbutton" iconcls="icon-remove" plain="true">删除</a>
<a id="btnSel" href="javascript:void(0)" onclick="sel()" class="easyui-linkbutton" iconcls="icon-search" plain="true">查询</a>
</div>
</div>
<table id="dgVehicle" class="easyui-datagrid" data-options="singleSelect:true,toolbar:'#tb',fit:true,fitColumns:true" title="车辆信息"
rownumbers="true" pagination="true" url="@Url.Action("VehicleData")">
<thead>
<tr>
<th data-options="field:'strVehicleModel'">
车辆型号
</th>
<th data-options="field:'strBatchNo'">
车辆批次
</th>
<th data-options="field:'strVIN'">
VIN码
</th>
<th data-options="field:'strEngineModel'">
发动机型号
</th>
<th data-options="field:'strEngineNo'">
发动机编号
</th>
<th data-options="field:'strEngineMaker'">
发动机制造商
</th>
<th data-options="field:'strEngineLineage'">
发动机系族
</th>
<th data-options="field:'strEngineAddress'">
发动机生产厂地址
</th>
<th data-options="field:'strBrand'">
发动机厂牌
</th>
<th data-options="field:'strStatus'">
状态
</th>
</tr>
</thead>
</table>
$(function (){
var p = $('#dgVehicle').datagrid().datagrid('getPager');
p.pagination({
pageSize: 20,
pageList:[10,20,30,40,50],
beforePageText: '',
afterPageText:'共{pages}页',
displayMsg: '当前显示 {from} 到 {to} ,共{total}记录'
//onBeforeRefresh: function () {
// alert('before refresh');
//},
//onRefresh: function (pageNumber, pageSize) {
// alert(pageNumber);
// alert(pageSize);
//},
//onChangePageSize: function () {
// alert('pagesize changed');
//},
//onSelectPage: function (pageNumber, pageSize) {
// alert(pageNumber);
// alert(pageSize);
//}
});
var pager = $('#tt').datagrid('getPager'); // get the pager of datagrid
pager.pagination({
showPageList:false,
buttons:[{
iconCls:'icon-search',
handler:function(){
alert('search');
}
},{
iconCls:'icon-add',
handler:function(){
alert('add');
}
},{
iconCls:'icon-edit',
handler:function(){
alert('edit');
}
}],
onBeforeRefresh:function(){
alert('before refresh');
return true;
}
});
<table id="tt" title="Load Data" class="easyui-datagrid" style="width:550px;height:250px"
url="data/datagrid_data.json"
iconCls="icon-save" pagination="true">
<thead>
<tr>
<th field="itemid" width="80">Item ID</th>
<th field="productid" width="80">Product ID</th>
<th field="listprice" width="80" align="right">List Price</th>
<th field="unitcost" width="80" align="right">Unit Cost</th>
<th field="attr1" width="100">Attribute</th>
<th field="status" width="60" align="center">Stauts</th>
</tr>
</thead>
</table>
$('#dg_query').datagrid({
toolbar:toolbar,
loadMsg:'数据加载中....',
columns:[[
{field:'ckSelect',title:'选择',width:50,checkbox:true},
{field:'WBSH',title:'发货方',width:120,align:'left', sortable:true},
{field:'APPLY_TIME',title:'申请时间',width:70,align:'left', sortable:true},
{field:'WBWAYBILLID',title:'确认号',width:120,align:'left', sortable:true},
{field:'WBAPPSTATE',title:'WBAPPSTATE',hidden:true},
{field:'APL_STAT',title:'申请状态',width:60,align:'left', sortable:true},
{field:'WBCHKSTATE',title:'WBCHKSTATE',hidden:true},
{field:'CHK_STAT',title:'确认状态',width:60,align:'left', sortable:true, styler:cellStyler},
{field:'WBUPLSTATE',title:'WBUPLSTATE',hidden:true},
{field:'UPL_STAT',title:'上传标记',width:60,align:'left', sortable:true},
{field:'WBCHKUPLST',title:'WBCHKUPLST',hidden:true},
{field:'UPLCHK_STAT',title:'保函<br/>审核状态',width:60,align:'left', sortable:true, styler:cellStyler},
{field:'HAVE_DAY',title:'有效期<br/>天数还有',width:70,align:'left', sortable:true},
{field:'BEG_TIME',title:'有效期<br/>起始时间',width:70,align:'left', sortable:true},
{field:'END_TIME',title:'有效期<br/>结束时间',width:70,align:'left', sortable:true},
{field:'WBLDNM',title:'起运港口',width:70,align:'left', sortable:true},
{field:'POD_PORT',title:'卸货港口',width:120,align:'left', sortable:true},
{field:'WBCONTRACT',title:'合约号',width:70,align:'left', sortable:true},
{field:'WBIVLD',title:'WBIVLD',hidden:true},
{field:'DEL_STAT',title:'是否删除',width:70,align:'left', sortable:true},
{field:'WBKEY',title:'WBKEY',hidden:true}
]],
border: true,
nowrap: false,
fit: true,
fitColumns: false,
//striped: true,
singleSelect: true,
remoteSort: false,
rownumbers: true,
pagination: true,
pageSize: 10,
pageList: [10,20,50,100,200],
loadFilter: pagerFilter,
rowStyler: function(index, row) {
if ($.trim(row.WBIVLD) != '') {
return 'color:#ff0000';
} else if ($.trim(row.WBCHKSTATE) == 'C' && $.trim(row.WBCHKUPLST) == 'C') {
return 'background-color:#c4e1ff';
}
}
});
function cellStyler(value, row, index) {
if ($.trim(value) == '已拒绝') {
return 'color:#ff0000';
}
}
//分页功能
function pagerFilter(data) {
if (typeof data.length == 'number' && typeof data.splice == 'function') {
data = {
total: data.length,
rows: data
}
}
var dg = $(this);
var opts = dg.datagrid('options');
var pager = dg.datagrid('getPager');
pager.pagination({
onSelectPage: function (pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh', {
pageNumber: pageNum,
pageSize: pageSize
});
dg.datagrid('loadData', data);
}
});
if (!data.originalRows) {
if(data.rows)
data.originalRows = (data.rows);
else if(data.data && data.data.rows)
data.originalRows = (data.data.rows);
else
data.originalRows = [];
}
var start = (opts.pageNumber - 1) * parseInt(opts.pageSize);
var end = start + parseInt(opts.pageSize);
data.rows = (data.originalRows.slice(start, end));
return data;
}
通过 $.fn.pagination.defaults 重写默认的 defaults
分页pagination允许用户通过翻页导航数据它支持页面导航和页面长度选择的可配置选项用户可以在分页的右侧添加自定义按钮来增强功能
依赖
linkbutton
用法
通过标记创建分页pagination)。
<div id="pp" class="easyui-pagination" style="background:#efefef;border:1px solid #ccc;"
data-options="total:2000,pageSize:10">
</div>
使用 javascript 创建分页pagination)。
<div id="pp" style="background:#efefef;border:1px solid #ccc;"></div>
$('#pp').pagination({
total:2000,
pageSize:10
});
让我们通过面板panel和分页pagination插件创建 ajax 分页pagination)。当用户选择一个新的页面时面板panel将显示指定页面的相应内容
<div id="content" class="easyui-panel" style="height:200px"
data-options="href:'show_content.php?page=1'">
</div>
<div class="easyui-pagination" style="border:1px solid #ccc;"
data-options="
total: 2000,
pageSize: 10,
onSelectPage: function(pageNumber, pageSize){
$('#content').panel('refresh', 'show_content.php?page='+pageNumber);
}">
</div>
顶部的面板panel默认显示第一个页面的内容当用户导航页面时'onSelectPage' 事件将被触发该事件为内容面板panel调用 'refresh' 方法来加载带有一个新的 URL 参数的新页面内容
属性
名称 类型 描述 默认值
total number 记录总数应该在创建分页pagination时设置 1
pageSize number 页面尺寸。(每页显示的最大记录数 10
pageNumber number 创建分页pagination时显示的页码 1
pageList array 用户能改变页面尺寸pageList 属性定义了能改成多大的尺寸
代码实例
$('#pp').pagination({
pageList: [10,20,50,100]
});
[10,20,30,50]
loading boolean 定义数据是否正在加载 false
buttons array,selector 定义自定义按钮可能的值
1数组每个按钮包含两个属性
iconClsCSS class它将显示一个背景图片
handler当按钮被点击时的处理函数
2选择器指示按钮
按钮可通过标记声明
<div class="easyui-pagination" style="border:1px solid #ccc" data-options="
total: 114,
buttons: [{
iconCls:'icon-add',
handler:function(){alert('add')}
},'-',{
iconCls:'icon-save',
handler:function(){alert('save')}
}]">
</div>
按钮也可以使用 javascript 创建
$('#pp').pagination({
total: 114,
buttons: [{
iconCls:'icon-add',
handler:function(){alert('add')}
},'-',{
iconCls:'icon-save',
handler:function(){alert('save')}
}]
});
null
layout array 分页布局定义该属性自版本 1.3.5 起可用
布局项目包括一个或多个下列值
1list页面尺寸列表
2sep页面按钮分割
3first第一个按钮
4prev前一个按钮
5next后一个按钮
6last最后一个按钮
7efresh刷新按钮
8manual允许输入域页码的手动页码输入框
9links页码链接
代码实例
$('#pp').pagination({
layout:['first','links','last']
});
links number 链接数量只有当 'links' 项包含在 'layout' 中时才是有效的该属性自版本 1.3.5 起可用 10
showPageList boolean 定义是否显示页面列表 true
showRefresh boolean 定义是否显示刷新按钮 true
beforePageText string input 组件之前显示 label Page
afterPageText string input 组件之后显示 label of {pages}
displayMsg string Display a page information. 显示 {from} to {to} of {total} 页面信息
事件
名称 参数 描述
onSelectPage pageNumber, pageSize 当用户选择新的页面时触发回调函数包含两个参数
pageNumber新的页码
pageSize新的页面尺寸
代码实例
$('#pp').pagination({
onSelectPage:function(pageNumber, pageSize){
$(this).pagination('loading');
alert('pageNumber:'+pageNumber+',pageSize:'+pageSize);
$(this).pagination('loaded');
}
});
onBeforeRefresh pageNumber, pageSize 刷新按钮点击之前触发返回 false 就取消刷新动作
onRefresh pageNumber, pageSize 刷新之后触发
onChangePageSize pageSize 当用户改变页面尺寸时触发
方法
名称 参数 描述
options none 返回选项options对象
loading none 把分页pagination变成正在加载loading状态
loaded none 把分页pagination变成加载完成loaded状态
refresh options 刷新并显示分页信息该方法自版本 1.3 起可用
代码实例
$('#pp').pagination('refresh'); // 刷新分页栏信息
$('#pp').pagination('refresh',{ // 改变选项,并刷新分页栏信息
total: 114,
pageNumber: 6
});
select page 选择一个新页面页面索引从 1 开始该方法从版本 1.3 起可用
代码实例
$('#pp').pagination('select'); // 刷新当前页面
$('#pp').pagination('select', 2); // 选择第二页
$('#datagrid').datagrid({
url : '<%=request.getContextPath()%>/incident/incident_queryIncidentInfo.action',
idField : 'wsdId',
toolbar : '#toolbar',
pageList : [10,20,30,40,50],
pagination : true,
rownumbers : true,
fitColumns : true,
singleSelect:true,
fit : true,
nowrap : true,
multiSort : true,
border : false,
striped : true,
queryParams:{
menuCode:theCurrentPageMenuCode
}
});
$('#datagrid').datagrid({
onSelect: function(rowIndex,rowData){
var status = rowData.incidentStatusShow;
if(status == "等待提交"){
//编辑、删除、提交、维护可用,关闭,挂起
$("#edit").removeAttr("disabled");
$("#edit").css("background-color","#56B3EE");
$("#del").removeAttr("disabled");
$("#del").css("background-color","#56B3EE");
$("#submit").removeAttr("disabled");
$("#submit").css("background-color","#56B3EE");
$("#fp").attr("disabled","disabled");
$("#fp").css("background-color","gray");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").attr("disabled","disabled");
$("#handle").css("background-color","gray");
$("#close").attr("disabled","disabled");
$("#close").css("background-color","gray");
$("#gq").removeAttr("disabled");
$("#gq").css("background-color","#56B3EE");
$("#cq").attr("disabled","disabled");
$("#cq").css("background-color","gray");
$("#wh").removeAttr("disabled");
$("#wh").css("background-color","#56B3EE");
$("#stop").removeAttr("disabled");
$("#stop").css("background-color","#56B3EE");
}
if(status == "等待处理"){
//新增,维护,分配可用,关闭,挂起
$("#edit").attr("disabled","disabled");
$("#edit").css("background-color","gray");
$("#del").attr("disabled","disabled");
$("#del").css("background-color","gray");
$("#submit").attr("disabled","disabled");
$("#submit").css("background-color","gray");
$("#fp").removeAttr("disabled");
$("#fp").css("background-color","#56B3EE");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").removeAttr("disabled");
$("#handle").css("background-color","#56B3EE");
$("#close").attr("disabled","disabled");
$("#close").css("background-color","gray");
$("#gq").removeAttr("disabled");
$("#gq").css("background-color","#56B3EE");
$("#cq").attr("disabled","disabled");
$("#cq").css("background-color","gray");
$("#wh").removeAttr("disabled");
$("#wh").css("background-color","#56B3EE");
$("#stop").removeAttr("disabled");
$("#stop").css("background-color","#56B3EE");
}
if(status == "已挂起"){
//新增,处理,关闭,重启,维护
$("#edit").attr("disabled","disabled");
$("#edit").css("background-color","gray");
$("#del").attr("disabled","disabled");
$("#del").css("background-color","gray");
$("#submit").attr("disabled","disabled");
$("#submit").css("background-color","gray");
$("#fp").attr("disabled","disabled");
$("#fp").css("background-color","gray");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").attr("disabled","disabled");
$("#handle").css("background-color","gray");
$("#close").attr("disabled","disabled");
$("#close").css("background-color","gray");
$("#gq").attr("disabled","disabled");
$("#gq").css("background-color","gray");
$("#cq").removeAttr("disabled");
$("#cq").css("background-color","#56B3EE");
$("#wh").removeAttr("disabled");
$("#wh").css("background-color","#56B3EE");
$("#stop").removeAttr("disabled");
$("#stop").css("background-color","#56B3EE");
}
if(status == "已重启"){
//新增,关闭,维护,提交
$("#edit").removeAttr("disabled");
$("#edit").css("background-color","#56B3EE");
$("#del").removeAttr("disabled");
$("#del").css("background-color","#56B3EE");
$("#submit").removeAttr("disabled");
$("#submit").css("background-color","#56B3EE");
$("#fp").attr("disabled","disabled");
$("#fp").css("background-color","gray");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").attr("disabled","disabled");
$("#handle").css("background-color","gray");
$("#close").attr("disabled","disabled");
$("#close").css("background-color","gray");
$("#gq").attr("disabled","disabled");
$("#gq").css("background-color","gray");
$("#cq").attr("disabled","disabled");
$("#cq").css("background-color","gray");
$("#wh").removeAttr("disabled");
$("#wh").css("background-color","#56B3EE");
$("#stop").removeAttr("disabled");
$("#stop").css("background-color","#56B3EE");
}
if(status == "已关闭"){
//新增,维护
$("#edit").attr("disabled","disabled");
$("#edit").css("background-color","gray");
$("#del").attr("disabled","disabled");
$("#del").css("background-color","gray");
$("#submit").attr("disabled","disabled");
$("#submit").css("background-color","gray");
$("#fp").attr("disabled","disabled");
$("#fp").css("background-color","gray");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").attr("disabled","disabled");
$("#handle").css("background-color","gray");
$("#close").attr("disabled","disabled");
$("#close").css("background-color","gray");
$("#gq").attr("disabled","disabled");
$("#gq").css("background-color","gray");
$("#cq").attr("disabled","disabled");
$("#cq").css("background-color","gray");
$("#wh").removeAttr("disabled");
$("#wh").css("background-color","#56B3EE");
$("#stop").removeAttr("disabled");
$("#stop").css("background-color","#56B3EE");
}
if(status == "负责人打回"){
$("#edit").attr("disabled","disabled");
$("#edit").css("background-color","gray");
$("#del").attr("disabled","disabled");
$("#del").css("background-color","gray");
$("#submit").attr("disabled","disabled");
$("#submit").css("background-color","gray");
$("#fp").removeAttr("disabled");
$("#fp").css("background-color","#56B3EE");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").removeAttr("disabled");
$("#handle").css("background-color","#56B3EE");
$("#close").attr("disabled","disabled");
$("#close").css("background-color","gray");
$("#gq").removeAttr("disabled");
$("#gq").css("background-color","#56B3EE");
$("#cq").attr("disabled","disabled");
$("#cq").css("background-color","gray");
$("#wh").removeAttr("disabled");
$("#wh").css("background-color","#56B3EE");
$("#stop").removeAttr("disabled");
$("#stop").css("background-color","#56B3EE");
}
if(status == "已处理"){
//新增,维护,关闭,挂起
$("#edit").attr("disabled","disabled");
$("#edit").css("background-color","gray");
$("#del").attr("disabled","disabled");
$("#del").css("background-color","gray");
$("#submit").attr("disabled","disabled");
$("#submit").css("background-color","gray");
$("#fp").attr("disabled","disabled");
$("#fp").css("background-color","gray");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").attr("disabled","disabled");
$("#handle").css("background-color","gray");
$("#close").removeAttr("disabled");
$("#close").css("background-color","#56B3EE");
$("#gq").removeAttr("disabled");
$("#gq").css("background-color","#56B3EE");
$("#cq").attr("disabled","disabled");
$("#cq").css("background-color","gray");
$("#wh").removeAttr("disabled");
$("#wh").css("background-color","#56B3EE");
$("#stop").removeAttr("disabled");
$("#stop").css("background-color","#56B3EE");
}
if(status == "异常中止"){
$("#edit").attr("disabled","disabled");
$("#edit").css("background-color","gray");
$("#del").attr("disabled","disabled");
$("#del").css("background-color","gray");
$("#submit").attr("disabled","disabled");
$("#submit").css("background-color","gray");
$("#fp").attr("disabled","disabled");
$("#fp").css("background-color","gray");
$("#receive").attr("disabled","disabled");
$("#receive").css("background-color","gray");
$("#refuse").attr("disabled","disabled");
$("#refuse").css("background-color","gray");
$("#handle").attr("disabled","disabled");
$("#handle").css("background-color","gray");
$("#close").attr("disabled","disabled");
$("#close").css("background-color","gray");
$("#gq").attr("disabled","disabled");
$("#gq").css("background-color","gray");
$("#cq").attr("disabled","disabled");
$("#cq").css("background-color","gray");
$("#wh").attr("disabled","disabled");
$("#wh").css("background-color","gray");
$("#stop").attr("disabled","disabled");
$("#stop").css("background-color","gray");
}
}
});
var sel = $('#datagrid').datagrid('getSelections');
$("#datagrid").datagrid("reload");
$("#datagrid").datagrid("unselectAll");
var fireSafeRow = $('#datagrid').datagrid('getRows')[index];
$('#datagrid').datagrid({
url : '<%=request.getContextPath()%>/incident/incident_queryIncidentInfosByCondition.action',
idField : 'wsdId',
toolbar : '#toolbar',
pageList : [10,20,30,40,50],
pagination : true,
rownumbers : true,
fitColumns : true,
fit : true,
nowrap : true,
multiSort : true,
border : true,
striped : true,
queryParams :
{
condition : con,
menuCode:theCurrentPageMenuCode
} ,
onClickRow : function(index,row){
},
rowStyler: function(index,row){
if (index%2==1){
//return 'background-color:#efefef;';
}
}
});
<table id="datagrid"><!-- 数据列表区域 -->
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<th data-options="field:'incidentName',width:20,align:'center'">事件</th>
<th data-options="field:'incidentUrgencyShow',width:10,align:'center'">紧急度</th>
<th data-options="field:'incidentPriorityShow',width:10,align:'center'">优先度</th>
<th data-options="field:'incidentAppTime',width:20,align:'center'">申报时间</th>
<th data-options="field:'appStaffName',width:15,align:'center'">申报人</th>
<th data-options="field:'manager',width:15,align:'center'">负责人</th>
<th data-options="field:'incidentStatusShow',width:10,align:'center'">事件状态</th>
<th data-options="field:'sss',width:10,align:'center',formatter: formatOper">详情</th>
<th data-options="field:'sss1',width:10,align:'center',formatter: formatOper1">超时标志</th>
</tr>
</thead>
</table><!-- end 数据列表区域 -->
<div id="toolbar" class="gridHeader" style="background-color: white;">
<table style="width:100%;">
<tr style="height: 40px;">
<!-- <td class="gridToolbarTdLeft">
如果特殊情况需要在数据展示区的表头显示文字可以写在这里
</td> -->
<td class="gridToolbarTdLeft">
<wsd:button type="button" styleClass="btn-classname btn-add-img" value="新增" onclick="myAdd()" style="function:sjgl,ADD"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-edit-img" value="编辑" onclick="edit()" style="function:sjgl,MODIFY"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-del-img" value="删除" onclick="del()" style="function:sjgl,DELETE"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-tijiao-img" value="提交" onclick="mySubmit()" style="function:sjgl,SUBMIT"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-fp-img" value="分配" onclick="myfp()" style="display: none;function:sjgl,DISTRIBUTION"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-receive-img" value="接受" onclick="receive()" style="display: none;function:sjgl,ACCEPT"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-refuse-img" value="拒绝" onclick="refuse()" style="display: none;function:sjgl,REFUSED"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-handle-img" value="处理" onclick="myHandle()" style="function:sjgl,HANDLED"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-close-img" value="确认" onclick="myConfirm()" style="function:sjgl,CONFIRM"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-hang-img" value="挂起" onclick="hangIncident()" style="function:sjgl,UP"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-cq-img" value="重启" onclick="restartIncident()" style="function:sjgl,RESTART"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-close-img" value="中止" onclick="stopIncident()" style="function:sjgl,SUSPEND"></wsd:button>
<wsd:button type="button" styleClass="btn-classname btn-wh-img" value="维护" onclick="maintain()" style="display:none;function:sjgl,MAINTENANCE"></wsd:button>
<wsd:button type="button" styleClass="btn-classname-long btn-wh-img" value="关联信息" onclick="glxx()" style="function:sjgl,CORRELATION"></wsd:button>
<wsd:button type="button" styleClass="btn-classname-long btn-refuse-img" value="生成问题" onclick="createProblem()" style="function:sjgl,GENERATES"></wsd:button>
<input type="button" id="" class="btn-classname-long btn-refuse-img" value="发起变更" onclick="createChange()">
<!-- <input type="button" id="add" class="btn-classname btn-add-img" value="新增" onclick="myAdd()">
<input type="button" id="edit" class="btn-classname btn-edit-img" value="编辑" onclick="edit()">
<input type="button" id="del" class="btn-classname btn-del-img" value="删除" onclick="del()">
<input type="button" id="submit" class="btn-classname btn-tijiao-img" value="提交" onclick="mySubmit()">
<input type="button" id="fp" class="btn-classname btn-fp-img" value="分配" onclick="myfp()" style="display: none">
<input type="button" id="receive" class="btn-classname btn-receive-img" value="接受" onclick="receive()" style="display: none">
<input type="button" id="refuse" class="btn-classname btn-refuse-img" value="拒绝" onclick="refuse()" style="display: none">
<input type="button" id="handle" class="btn-classname btn-handle-img" value="处理" onclick="myHandle()">
<input type="button" id="close" class="btn-classname btn-close-img" value="确认" onclick="myConfirm()">
<input type="button" id="gq" class="btn-classname btn-hang-img" value="挂起" onclick="hangIncident()">
<input type="button" id="cq" class="btn-classname btn-cq-img" value="重启" onclick="restartIncident()">
<input type="button" id="stop" class="btn-classname btn-close-img" value="中止" onclick="stopIncident()">
<input type="button" id="wh" class="btn-classname btn-wh-img" value="维护" onclick="maintain()" style="display: none">
<input type="button" id="" class="btn-classname-long btn-wh-img" value="关联信息" onclick="glxx()">
<input type="button" id="" class="btn-classname-long btn-refuse-img" value="生成问题" onclick="createProblem()">
<input type="button" id="" class="btn-classname-long btn-refuse-img" value="发起变更" onclick="createChange()">
<input type="button" id="" class="btn-classname-long btn-refuse-img" value="生成问题" onclick="createProblem()"> -->
<div style="float: right">
<div class="input-container" style="width: 200px;">
<input type="text" name="" class="input-input" style="width: 160px;" id="query"/>
<a class="input-btn-search" onclick="query()"></a>
</div>
</div>
</td>
</tr>
</table>
</div><!-- end数据列表表头区域 -->
$('#eventDatagrid').datagrid({
url : '${pageContext.request.contextPath}/incident/event_findEventInfoList.action',
method : 'post',
pageSize : 50,
pagination : true,
rownumbers : true,
multiSort : true,
singleSelect:true,
striped : true,
bodyCls:'sideBorder',
queryParams :{
'theCurrentPageMenuCode' :menuCode,
'isInit':'true',
'remindType':remindType
},
onClickRow: function(index, row){
document.getElementById("btnfla").style.display="none";
document.getElementById("btnflh").style.display="none";
document.getElementById("btnasl").style.display="none";
document.getElementById("btnsla").style.display="none";
document.getElementById("btnslh").style.display="none";
document.getElementById("btnhs").style.display="none";
document.getElementById("btnhs1").style.display="none";
document.getElementById("btnqr").style.display="none";
document.getElementById("btnrtf").style.display="none";
document.getElementById("btnatc").style.display="none";
document.getElementById("btnchange").style.display="none";
$.ajax({
url: '<%=request.getContextPath() %>/incident/event_isMember.action',
data: {
'theCurrentPageMenuCode': menuCode,
'eventInfoVO.id':row.id
},
dataType: 'text',
method: 'post',
cache: false,
success: function (res) {
var r = eval('(' + res + ')');
if(r==true){
document.getElementById("btnchange").style.display = "";
// 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题 转问题
}else{
document.getElementById("btnchange").style.display = "none";
}
}
});
$.ajax({
url: '<%=request.getContextPath() %>/incident/event_isDutyMan.action',
data: {
'theCurrentPageMenuCode': menuCode,
'eventInfoVO.id':row.id
},
dataType: 'text',
method: 'post',
cache: false,
success: function (res) {
console.log('res');
console.log(res);
var r = eval('(' + res + ')');
console.log('r1');
console.log(r);
if (r) {
document.getElementById("btnhangup").style.display = "";
document.getElementById("btnhangdown").style.display = "";
document.getElementById("btnrts").style.display = "";
document.getElementById("btnhangupdetail").style.display = "";
}else{
document.getElementById("btnhangup").style.display = "none";
document.getElementById("btnhangdown").style.display = "none";
document.getElementById("btnrts").style.display = "none";
document.getElementById("btnhangupdetail").style.display = "none";
}
}
});
$("#eventResolveDatagrid").datagrid({
url : '${pageContext.request.contextPath}/incident/event_findEventResolveInfoListByEventId.action',
method : 'post',
pageSize : 10,
pagination : true,
rownumbers : true,
multiSort : true,
singleSelect:true,
striped : true,
bodyCls:'sideBorder',
queryParams :{
'eventInfoVO.id' :row.id
},
onClickRow: function(index, row1){
$.ajax({
url: '<%=request.getContextPath() %>/incident/event_isMyEvent.action',
data: {
// 'eventInfoVO.id': row.id
'eventResolveInfoVO.id':row1.id
},
dataType: 'text',
method: 'post',
cache: false,
success: function (res) {
var r = eval('(' + res + ')');
if(r.status){
$.ajax({
url: '<%=request.getContextPath() %>/incident/event_getMemberLevel.action',
data: {
'theCurrentPageMenuCode': menuCode
},
dataType: 'text',
method: 'post',
cache: false,
success: function (res) {
$.ajax({
url: '<%=request.getContextPath() %>/incident/event_isMyFrontEvent.action',
data: {
'eventResolveInfoVO.id':row1.id
},
dataType: 'text',
method: 'post',
cache: false,
success: function (res) {
var r = eval('(' + res + ')');
console.log('r2');
console.log(r);
if(r){
front=true;
if(row1.status==2||row1.status==3
||row1.status==4||row1.status==9||row1.status==13){
document.getElementById("btnfla").style.display="";
document.getElementById("btnflh").style.display="";
document.getElementById("btnasl").style.display="";
document.getElementById("btnqr").style.display="";
document.getElementById("btnhs1").style.display="";
}
}
else{
document.getElementById("btnfla").style.display="none";
document.getElementById("btnflh").style.display="none";
document.getElementById("btnqr").style.display="none";
document.getElementById("btnasl").style.display="none";
document.getElementById("btnhs1").style.display="none";
}
}
});
$.ajax({
url: '<%=request.getContextPath() %>/incident/event_isMySecondEvent.action',
data: {
'eventResolveInfoVO.id':row1.id
},
dataType: 'text',
method: 'post',
cache: false,
success: function (res) {
var r = eval('(' + res + ')');
console.log('r3');
console.log(r);
if(r){
second=true;
if((row1.status==6||row1.status==7
||row1.status==8)){
document.getElementById("btnsla").style.display="";
document.getElementById("btnslh").style.display="";
document.getElementById("btnhs").style.display="";
document.getElementById("btnrtf").style.display="";
document.getElementById("btnatc").style.display="";
}
}else{
document.getElementById("btnsla").style.display="none";
document.getElementById("btnslh").style.display="none";
document.getElementById("btnhs").style.display="none";
document.getElementById("btnrtf").style.display="none";
document.getElementById("btnatc").style.display="none";
}
}
});
}
});
}else{
document.getElementById("btnfla").style.display="none";
document.getElementById("btnflh").style.display="none";
document.getElementById("btnasl").style.display="none";
document.getElementById("btnhs").style.display="none";
document.getElementById("btnhs1").style.display="none";
document.getElementById("btnsla").style.display="none";
document.getElementById("btnslh").style.display="none";
document.getElementById("btnqr").style.display="none";
document.getElementById("btnrtf").style.display="none";
document.getElementById("btnatc").style.display="none";
}
}
});
}
});
}
});
$("#eventResolveDatagrid").datagrid('loadData',{ 'total': 0,'rows':''});
$("#eventDatagrid").datagrid("reload");
var sel = $('#eventDatagrid').datagrid('getSelected');
$('#eventDatagrid').datagrid('reload',{
isQuery:"true",
'eventQueryVO.eventNo':eventNo,
'eventQueryVO.declarantName':queryDeclarantName,
'eventQueryVO.declarantNo':queryDeclarantNo,
'eventQueryVO.department' : queryDeptCode,
'eventQueryVO.mainEvent' : queryMainEvent,
'eventQueryVO.subEvent' : querySubEvent,
'eventQueryVO.application' : queryApplication,
'eventQueryVO.priorityLevel' : queryPriority,
'eventQueryVO.title':title,
'eventQueryVO.status':queryStatus,
'eventQueryVO.declareTimeBefore':queryDStartDate,
'eventQueryVO.declareTimeAfter':queryDEndDate,
'eventQueryVO.closeTimeBefore':queryEStartDate,
'eventQueryVO.closeTimeAfter':queryEEndDate,
'eventQueryVO.secondlineMember':secondlineMember,
'eventQueryVO.frontlineMember':frontlineMember,
'eventQueryVO.remindType':queryRemindType,
'menuCode' : menuCode//当前页面的菜单代码
}).datagrid('unselectAll');
$('#eventResolveDatagrid').datagrid('reload');
var detailRow = $('#eventDatagrid').datagrid('getRows')[index];
$('#eventDatagrid').datagrid('reload');
var sel1 = $('#eventDatagrid').datagrid('getSelected');
<table id="eventDatagrid" style="border: #DCDCDC 1px solid;margin: auto;" data-options="idField : 'id',
rownumbers : true,
fitColumns : true,
fit : true,
nowrap : true,
multiSort : true,
border : true,
striped : true,
bodyCls:'sideBorder'">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<th data-options="field:'id',hidden:true"/>
<th data-options="field:'majorStatus',width:40,align:'center',formatter:emergencyMarker">重大标识</th>
<th data-options="field:'timeoutState',width:40,align:'center',formatter:timeoutMarker">超时标识</th>
<th data-options="field:'eventNo',width:60,align:'center'">事件编号</th>
<th data-options="field:'title',width:70,align:'center'">标题</th>
<!-- <th data-options="field:'mainEventName',width:50,align:'center'">事件分类</th>
<th data-options="field:'subEventName',width:50,align:'center'">事件子类</th> -->
<th data-options="field:'declarantName',width:50,align:'center'">事件申报人</th>
<!-- <th data-options="field:'location',width:100,align:'center'">发生地点</th> -->
<th data-options="field:'priorityLevel',width:50,align:'center',formatter:priorityFormatter">优先级</th>
<th data-options="field:'declareTimeStr',width:80,align:'center'">申报时间</th>
<th data-options="field:'status',width:50,align:'center',formatter:statusFormatter">状态</th>
<th data-options="field:'detail',width:30,align:'center',formatter:eventDetail">详细</th>
</tr>
</thead>
</table>
$('#changeDatagrid').datagrid({
url : '${pageContext.request.contextPath}/change/change_findChangeInfoList.action',
method : 'post',
pageSize : 10,
pagination : true,
rownumbers : true,
multiSort : true,
singleSelect:true,
striped : true,
bodyCls:'sideBorder',
queryParams :{
'theCurrentPageMenuCode' :menuCode,
'changeQueryVO.remindType':remindType
},onClickRow: function(index, row) {
//console.log("index-=>"+index);
//console.log("row-=>"+row.id)
//console.log(row);
$.ajax({
url: '<%=request.getContextPath() %>/change/change_isMySecondLineMember.action',
data: {
'theCurrentPageMenuCode': menuCode,
'changeInfoVO.id': row.id
},
dataType: 'text',
method: 'post',
cache: false,
async:false,
success: function (res) {
var r = eval('(' + res + ')');
//console.log(r);
console.log("row.changeStatus");
console.log(row.changeStatus);
console.log("r");
console.log(r);
if (r) {
if(row.changeStatus==1||row.changeStatus==10){
document.getElementById("btnmodify").style.display = "";
document.getElementById("btndelete").style.display = "";
document.getElementById("btn_change_assign").style.display = "";
document.getElementById("btn_change_annul").style.display = "none";
} else {
document.getElementById("btnmodify").style.display = "none";
document.getElementById("btndelete").style.display = "none";
document.getElementById("btn_change_assign").style.display = "none";
document.getElementById("btn_change_annul").style.display = "none";
}
} else {
document.getElementById("btnmodify").style.display = "none";
document.getElementById("btndelete").style.display = "none";
document.getElementById("btn_change_assign").style.display = "none";
document.getElementById("btn_change_annul").style.display = "none";
}
}
});
//判断
$.ajax({
url: '<%=request.getContextPath() %>/change/change_isMyDutyMan.action',
data: {
'theCurrentPageMenuCode': menuCode,
'changeInfoVO.id': row.id
},
dataType: 'text',
method: 'post',
cache: false,
async:false,
success: function (res) {
var r = eval('(' + res + ')');
if (r==true) {
if(row.changeStatus==2||row.changeStatus==8||row.changeStatus==11){
document.getElementById("btn_manager_approve").style.display = "";
}
else{
document.getElementById("btn_manager_approve").style.display = "none";
}
if(row.changeStatus==7){
document.getElementById("btn_check").style.display = "";
}
else{
document.getElementById("btn_check").style.display = "none";
}
} else {
document.getElementById("btn_manager_approve").style.display = "none";
document.getElementById("btn_check").style.display = "none";
}
}
});
//判断 流程管理员
$.ajax({
url:'<%=request.getContextPath() %>/change/change_isMyAdmin.action',
data:{
},
dataType:'text',
method:'post',
cache:false,
async:false,
success:function(res){
var r = eval("("+res+")")
if(r==true){
if(row.changeStatus==8||row.changeStatus==12){
document.getElementById("btn_close").style.display = "";
}
else{
document.getElementById("btn_close").style.display = "none";
}
if(row.changeStatus==3){
document.getElementById("btn_authorize").style.display = "";
}
else{
document.getElementById("btn_authorize").style.display = "none";
}
} else {
document.getElementById("btn_authorize").style.display = "none";
document.getElementById("btn_close").style.display = "none";
}
}
});
$.ajax({
url: '<%=request.getContextPath() %>/change/change_isMyKLeader.action',
data: {
'theCurrentPageMenuCode': menuCode,
'changeInfoVO.id': row.id
},
dataType: 'text',
method: 'post',
cache: false,
async:false,
success: function (res) {
var r = eval('(' + res + ')');
if (r==true) {
if(row.changeStatus==4){
document.getElementById("btn_examine_k").style.display = "";
}
else{
document.getElementById("btn_examine_k").style.display = "none";
}
} else {
document.getElementById("btn_examine_k").style.display = "none";
}
}
});
$.ajax({
url: '<%=request.getContextPath() %>/change/change_isMyCLeader.action',
data: {
'theCurrentPageMenuCode': menuCode,
'changeInfoVO.id': row.id
},
dataType: 'text',
method: 'post',
cache: false,
async:false,
success: function (res) {
var r = eval('(' + res + ')');
if (r==true) {
if(row.changeStatus==5){
document.getElementById("btn_examine_c").style.display = "";
}
else{
document.getElementById("btn_examine_c").style.display = "none";
}
} else {
document.getElementById("btn_examine_c").style.display = "none";
}
}
});
$.ajax({
url:'<%=request.getContextPath() %>/change/change_isMyDeploy.action',
data:{
},
dataType:'text',
method:'post',
cache:false,
async:false,
success:function(res){
var r = eval("("+res+")")
if (r==true) {
if(row.changeStatus==6){
document.getElementById("btn_deploy").style.display = "";
document.getElementById("btn_deploy_cancel").style.display="";
}
else{
document.getElementById("btn_deploy").style.display = "none";
document.getElementById("btn_deploy_cancel").style.display="none";
}
} else {
document.getElementById("btn_deploy").style.display = "none";
document.getElementById("btn_deploy_cancel").style.display="none";
}
}
});
}
});
var sel = $('#changeDatagrid').datagrid('getSelected');
$('#changeDatagrid').datagrid('reload',{
'changeQueryVO.infoCode':qInfoCode,
'changeQueryVO.declareNo':queryDeclareNo,
'changeQueryVO.changeObject':queryChangeObject,
'changeQueryVO.dStartTimeStr':queryChangeDStartTimeStr,
'changeQueryVO.dEndTimeStr':queryChangeDEndTimeStr,
'changeQueryVO.changeType':queryChangeType,
'changeQueryVO.changeResult':queryChangeResult,
'changeQueryVO.mainChange':queryMainChange,
'changeQueryVO.subChange':querySubChange,
'changeQueryVO.changeStatus':queryChangeStatus,
'changeQueryVO.deployResult':queryDeployResult,
'changeQueryVO.deployCloseStartTimeStr':queryDeployCloseStartTime,
'changeQueryVO.deployCloseEndTimeStr':queryDeployCloseEndTime,
'changeQueryVO.changeCloseStartTimeStr':queryChangeCloseStartTime,
'changeQueryVO.changeCloseEndTimeStr':queryChangeCloseEndTime,
'changeQueryVO.changeCheckResult':queryChangeCheckResult,
'changeQueryVO.remindType':queryRemindType,
'menuCode' : menuCode//当前页面的菜单代码
}).datagrid('unselectAll');
$('#changeDatagrid').datagrid('reload');
var detailRow = $('#changeDatagrid').datagrid('getRows')[index];
<table id="changeDatagrid" data-options="idField : 'id',
rownumbers : true,
fitColumns : true,
fit : true,
nowrap : true,
multiSort : true,
border : true,
striped : true,
bodyCls:'sideBorder'">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<th data-options="field:'id',hidden:true"/>
<th data-options="field:'infoCode',width:70,align:'center'">变更单编号</th>
<th data-options="field:'changeObject',width:50,align:'center',formatter:changeObjectDetail">变更对象</th>
<th data-options="field:'changeType',width:50,align:'center'">变更类型</th>
<!-- <th data-options="field:'mainChange',width:70,align:'center'">变更分类</th>
<th data-options="field:'subChange',width:50,align:'center'">变更子类</th> -->
<th data-options="field:'deployResult',width:50,align:'center',formatter:resultFormatter">发布结果</th>
<th data-options="field:'checkResult',width:50,align:'center',formatter:resultFormatter">变更结果</th>
<th data-options="field:'deployCloseTimeStr',width:60,align:'center'">发布关闭时间</th>
<th data-options="field:'expectTimeStr',width:60,align:'center'">期望完成时间</th>
<th data-options="field:'changeStatus',width:50,align:'center',formatter:statusFormatter">变更单状态</th>
<th data-options="field:'detail',width:30,align:'center',formatter:changeDetail">详细</th>
</tr>
</thead>
</table>
PHP
1
https://gitee.com/laotou99_admin/WEBWMS.git
git@gitee.com:laotou99_admin/WEBWMS.git
laotou99_admin
WEBWMS
WEBWMS
master

搜索帮助