var grid = {
bind: function (winSize) {
$(’#list’).datagrid({
url: actionURL,
toolbar: ‘#toolbar’,
title: “订单列表”,
iconCls: ‘icon icon-list’,
width: winSize.width,
height: winSize.height,
nowrap: false, //折行
rownumbers: true, //行号
striped: true, //隔行变色
idField: ‘KeyId’,//主键
singleSelect: true, //单选
frozenColumns: [[]],
条件行变色
rowStyler: function (value, row, index) {
if (row.deliveryDate == “” || row.deliveryDate == null || row.deliveryDate == undefined) {//用户手机提交的交货日期为空显示背景为粉红色
return ‘background-color:pink;color:blue;’;
} else {
if (row.FlowStatus==1) {
return ‘background-color:#ff9966;color:blue;’;
}
}
},
columns: [[//应为宽度不是很需要所以注释了宽度
{ title: '选择', field: 'ck', checkbox: true },//后加进去全选字段数据库里是没有的
//{ title: '系统编号', field: 'KeyId', sortable: true, width: '', hidden: false },
//{ title: '服务类型', field: 'ServiceType', sortable: true, width: '', hidden: false },
//{ title: '订单年份', field: 'OrderYear', sortable: true, width: '', hidden: false },
//{ title: '子订单个数', field: 'OrderInt', sortable: true, width: '', hidden: false },
{ title: '订单号', field: 'OrderID', sortable: true, width: '', hidden: false },
//{ title: '用户名', field: 'username', sortable: true, width: '', hidden: false },
{ title: '客户名称/印刷品名称', field: 'khmcANDyspmc', sortable: false, width: '300', hidden: false },
//{ title: '单位ID', field: 'comnameid', sortable: true, width: '', hidden: false },
//{ title: '单位简拼码', field: 'jpm', sortable: true, width: '', hidden: false },
//{ title: '联系人姓名', field: 'name', sortable: true, width: '', hidden: false },
{ title: '联系电话', field: 'tel', sortable: true, width: '', hidden: false },
//{ title: '地址', field: 'address', sortable: true, width: '', hidden: false },
//{ title: '备注', field: 'explain', sortable: true, width: '', hidden: false },
{ title: '下单日期', field: 'adddate', sortable: true, width: '', hidden: false },
{
title: '交货日期', field: 'deliveryDate', sortable: true,
width: '', hidden: false
},