var cmGoodsFee = new Ext.grid.ColumnModel([rmGoodsFee, {
header : "id",
tooltip : "id",
dataIndex : 'id',
id : 'id',
width : 80,
align : 'center',
hidden : true
}, {
header : "计费类型",
tooltip : "计费类型",
dataIndex : 'chargAccName',
id : 'chargAccCode',
width : 120,
sortable : true,
// summaryType : 'count',
hideable : false
// summaryRenderer : function(v, params,
// data) {
// return ((v == 0 || v > 1) ? '( 合计)' :
// '(合计)');
// }
} , {
header : "付款方向",
tooltip : "付款方向",
dataIndex : 'chargingDirection',
id : 'chargingDirection',
width : 120,
sortable : true
}, {
header : "金额",
tooltip : "金额",
dataIndex : 'feeAmount',
id : 'feeAmount',
width : 150,
align : 'center',
sortable : true,
// summaryType : 'sum',
editor : new Ext.form.NumberField({
style : 'text-align:left',
decimalPrecision : 4,
allowNegative : false, // 不能为负数
maxValue : 999999999,
maxText : '最大不超过999,999,999!'
})
}]);
// var summary = new Ext.ux.grid.GridSummary();
wayBillsDetailGridFee = new Ext.grid.EditorGridPanel({
collapsible : false,
clicksToEdit : 1,
animCollapse : false,
stripeRows : true,
store : wayBillDetailStoreFee,
cm : cmGoodsFee,
height : Ext.getBody().getHeight() - 175,
frame : true,
loadMask : true,// 载入遮罩动画
columnLines : true,
autoShow : false,
viewConfig : {
forceFit : false
},
clicksToEdit : 1,
listeners : {
cellclick : function(grid, rowIndex, columnIndex, e) {
var record = grid.getStore().getAt(rowIndex);
if (record.get('chargAccName') == '长途运费' && columnIndex == 4) {
return false;
} else {
return true;
}
}
}
// plugins : summary
});