标签:ESS 消费 stat color field formatter for mat fun
$(function(){ $("#RepaymentInfoTab").datagrid({ view: detailview, detailFormatter:function(index,row){ return ‘<div style="padding:2px"><table id="ddv-‘ + index + ‘"></table></div>‘; }, onExpandRow:function(index,row){ var repaymentNum = row.repaymentNum; $(‘#ddv-‘+index).datagrid({ url:‘getSaleInfoData?repaymentNum=‘ + repaymentNum, fitColumns:true, singleSelect:true, height:‘auto‘, columns:[[ {field:‘salesNum1‘,title:‘计划消费流水‘,width:20}, {field:‘salesMoney1‘,title:‘计划消费金额‘,width:20}, {field:‘difference1‘,title:‘差额(消费-还款)‘,width:20}, {field:‘status1‘,title:‘计划消费状态‘,width:20,formatter:function(value){ if (value == 1) {return ‘<span style=\"color:red\">初始化</span>‘; } if (value == 2) {return ‘<span style=\"color:blue\">消费完成</span>‘; } if (value == 3) {return ‘<span style=\"color:blue\">遗弃</span>‘; } }}, {field:‘transNo1‘,title:‘交易流水号‘,width:20}, {field:‘sendDate1‘,title:‘交易时间‘,width:20}, {field:‘creaetetime1‘,title:‘添加时间‘,width:20}, ]], onResize:function(){ $(‘#RepaymentInfoTab‘).datagrid(‘fixDetailRowHeight‘,index); }, onLoadSuccess:function(){ setTimeout(function(){ $(‘#RepaymentInfoTab‘).datagrid(‘fixDetailRowHeight‘,index); },0); } }); $(‘#RepaymentInfoTab‘).datagrid(‘fixDetailRowHeight‘,index); } }) })
标签:ESS 消费 stat color field formatter for mat fun
原文地址:https://www.cnblogs.com/bchange/p/9494857.html