Ext.define('saas.view.money.report.RecDetail', { extend: 'saas.view.core.report.ReportPanel', xtype: 'monry-report-recdetail', controller: 'money-report-recdetail', viewModel: 'money-report-recdetail', viewName: 'money-report-recdetail', groupField: 'pi_custname', listUrl: '/api/money/report/recDetail', defaultCondition: null, reportTitle: '应收账款明细', QueryWidth:0.25, //筛选:客户、日期(必填) searchItems: [ { xtype: 'customerDbfindTrigger', name: 'pi_custname', fieldLabel: '客户名称', columnWidth: 0.25 }, { xtype: 'condatefield', name: 'rb_date', fieldLabel: '单据日期', columnWidth: 0.5 }], reportColumns: [ { text: 'id', dataIndex: 'pi_id', hidden: true }, { text: '单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '客户编号', dataIndex: 'pi_custcode', width: 150 }, { text: '客户名称', dataIndex: 'pi_custname', width: 200 }, { text: '单据类型', dataIndex: 'pi_class', width: 110 },{ text: '业务员', dataIndex: 'pu_buyername', width: 110 }, { text: '单据日期', dataIndex: 'rb_date', width: 110 }, { text: '序号', dataIndex: 'pd_pdno', xtype: 'numbercolumn', width: 80 },{ text:'期初应收', dataIndex:'cu_beginaramount', xtype: 'numbercolumn', width: 110, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); }, summaryType: 'sum', summaryRenderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); } },{ text:'本期收款金额', xtype: 'numbercolumn', dataIndex:'rb_rdamount', xtype: 'numbercolumn', width: 110, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); }, summaryType: 'sum', summaryRenderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); } },{ text: '应收余额', xtype: 'numbercolumn', dataIndex: 'mustpay', xtype: 'numbercolumn', width: 110, // renderer : function(v) { // var arr = (v + '.').split('.'); // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); // var format = '0,000.' + xr.join(); // return Ext.util.Format.number(v, format); // }, // summaryType: 'sum', // summaryRenderer: function(v) { // var arr = (v + '.').split('.'); // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); // var format = '0,000.' + xr.join(); // return Ext.util.Format.number(v, format); // } }, { text: '应收日期', dataIndex: 'mustdate', xtype:'datecolumn', width: 110 }, { text: '单据总金额', dataIndex: 'pi_total', xtype: 'numbercolumn', width: 110, summaryType: 'sum', summaryRenderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '备注', dataIndex: 'pd_unit', width: 250 }] });