easyui grid 列格式化

<table id="list" class="easyui-datagrid"
						url="loadReceivablesRecord.do"  pagination="true" pagesize="20"
						rownumbers="true" singleSelect="true" fit="true">
						<thead>
							<tr>
								<th field="mr_Date" >收款日期</th>
								<th field="ap_No" width="100" >评估单号</th>
								<th field="ab_No">事故单号</th>
								<th field="ap_CarNum" width="130" align="center">车牌号码</th>
								<th field="mr_User" width="160">收款人</th>
								<th field="mr_Money" width="120"  align="right">金额</th>
								<th field="method" width="120"  formatter="formatMethod">收款方式</th>
								<th field="mr_BranchName" width="120"  >收款网点</th>
							</tr>
						</thead>
					</table>

 //格式
			 function formatMethod(value, row, index) {
			     if (value == 1){
				     return '现金';
				 } else {
					 return '银行';
				 }
			 }

你可能感兴趣的:(easyui)