行变色

7 篇文章 0 订阅

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
                 
            },
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值