Ext.define('saas.view.purchase.report.PurchasePay', { extend: 'saas.view.core.report.ReportPanel', xtype: 'purchase-report-purchasepay', controller: 'purchase-report-purchasepay', viewModel: 'purchase-report-purchasepay', viewName: 'purchase-report-purchasepay', //按供应商分组 付款金额合计 groupField: 'pu_vendname', listUrl: '/api/money/paybalance/list', defaultCondition: null, reportTitle: '采购付款一览表', searchItems: [{ xtype: 'dbfindtrigger', name: 'pu_vendcode', fieldLabel: '供应商编号' }, { xtype: 'textfield', name: 'pu_vendname', fieldLabel: '供应商名称' }, { xtype: 'condatefield', name: 'pu_date', fieldLabel: '单据日期', columnWidth: 0.5 }], reportColumns: [ { text: 'id', dataIndex: 'pb_id', hidden: true }, { text: '付款单号', dataIndex: 'pb_code', width: 200 }, { text: '供应商编号', dataIndex: 'pu_vendcode', width: 200 }, { text: '供应商名称', dataIndex: 'pu_vendname', width: 200 }, { text: '录入人', dataIndex: 'pb_recorder', width: 200 }, { text : "日期", dataIndex : "pb_recorddate", xtype:'datecolumn' }, { text: '来源单号', dataIndex: 'pbd_slcode', width: 200 }, { text: '类型', dataIndex: 'pbd_slkind', width: 200 }, {//∑求和 text: '采购金额', dataIndex: 'pbd_amount', width: 200, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(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)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); } }, {//∑求和 text: '本次付款', dataIndex: 'pbd_nowbalance', width: 200, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(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)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '应付余额', dataIndex: 'pb_pbdamount', width: 200, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); }, }, { text: '付款比例', //本次付款/采购金额*100% dataIndex: 'pb_payrate', width: 200 }, { text: '备注', dataIndex: 'pd_remark', width: 200 }] });