大神帮看看啊,使用easyui中的datagrid请求后台数据已经响应了,页面上数据却显示不出来

纯洁的大白 2018-02-23 10:50:34
前台:
$("#grid").datagrid({
fit : true,
border : true,
rownumbers : true,
striped : true,
toolbar : [ {
id : 'diaodu',
text : '人工调度',
iconCls : 'icon-edit',
handler : function() {
// 弹出窗口
$("#diaoduWindow").window('open');
}
} ],
url : "${pageContext.request.contextPath}/notice_listNoStaffNoticeBill.action",
columns : [ [ {
field : 'id',
title : '编号',
width : 100
}, {
field : 'delegater',
title : '联系人',
width : 100
}, {
field : 'telephone',
title : '电话',
width : 100
}, {
field : 'pickaddress',
title : '取件地址',
width : 100
}, {
field : 'product',
title : '商品名称',
width : 100
}, {
field : 'pickdate',
title : '取件日期',
width : 100,
formatter : function(data, row, index) {
return data.replace("T", " ");
}
} ] ]
});
后台:
public String listNoStaffNoticeBill() throws IOException{

List<Noticebill> list = noticeService.findNoStaffNoticeBill();

String[] excludes = new String[]{"workbills","user","staff","customerId",
"customerName","arrivecity","num","weight","volume","remark","ordertype"};

this.writeList2Json(list, excludes);

return null;
}

通过开发者工具可以看到响应回来的数据

响应载荷哪里是
[{"delegater":"Lucy","id":"4028854f61c03bc10161c0489afc0000","pickaddress":"容县中学","pickdate":{"date":1,"day":4,"hours":0,"minutes":0,"month":1,"nanos":0,"seconds":0,"time":1517414400000,"timezoneOffset":-480,"year":118},"product":"电脑","telephone":"1"}]
...全文
920 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
纯洁的大白 2018-02-23
  • 打赏
  • 举报
回复
好了,解决了,得到我想要的效果了,感谢大神的帮助
纯洁的大白 2018-02-23
  • 打赏
  • 举报
回复
真是耶,不过要返回一个正常的日期怎么弄?
  • 打赏
  • 举报
回复
pickdate的formatter有问题,pickdate是json对象,没有replace方法,出错了。自己想清楚pickdate要取{"date":1,"day":4,"hours":0,"minutes":0,"month":1,"nanos":0,"seconds":0,"time":1517414400000,"timezoneOffset":-480,"year":118}这个json对象里面的什么字段值 { field : 'pickdate', title : '取件日期', width : 100, formatter : function(data, row, index) { return data.year//返回年份,或者自己整 } }

Web开发学习资料推荐
easyui datagrid fitColumns:true失效解决办法
easyui datebox设置日期范围
大家好,又见面了!EasyUI又更新了,这次更新内容还是不少的,具体内容请参考下面的更新说明,官方的更新说明还少了1条,我给补上了。 jQuery EasyUI 1.3.5版本更新内容: Bug(修复) searchbox:修复“searcher”函数提供的“name”参数值错误的问题; combo:修复“isValid”方法无法返回布尔值的问题; combo:修复点击页面某一个combo组件的下拉列表时触发的“onHidePanel”事件会导致页面上其他combo组件的下拉列表被关闭的问题; combogrid:修复某些从combo组件继承来的方法无法使用的问题。 Improvement(改进) datagrid:改进检查行时候的性能; menu:允许追加菜单分隔符; menu:新增“hideOnUnHover”属性用于在鼠标离开菜单的时候指示是否需要隐藏菜单; slider:新增“clear”和“reset”方法; tabs:新增“unselect”方法、“onUnselect”事件; tabs:新增“selected”属性,用于指定的默认打开的面板; tabs:Tab Panel(Tab页)新增“collapsible”属性,用于设置是否允许摺叠面板; tabs:新增“showHeader”属性、“showHeader”方法和“hideHeader”方法; combobox:允许“disabled”属性禁用下拉列表选项; tree:改进数据加载时候的性能; pagination:新增“layout”属性,用于自定义控件的样式布局; accordion:新增“unselect”方法、“onUnselect”事件; accordion:新增“select”和“multiple”属性; accordion:新增“getSelections”方法; datebox:新增“sharedCalendar”属性,允许多个datebox控件共享使用同一个calendar控件。 datebox:新增“buttons”属性,用于自定义日历下方的按钮。 (译者注:该点更新内容官方更新公告上没有注明,具体内容和用法请看datebox的API。) 历史版本: - jQuery EasyUI 1.3.4 离线API简体文版 http://download.csdn.net/detail/richie696/6302785 - jQuery EasyUI 1.3.4 离线API简体文版 http://download.csdn.net/detail/richie696/5363933

87,992

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧