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_vendcode', groupHeaderTpl: '供应商名称: {[values.rows[0].data.pu_vendname]}', listUrl: '/api/purchase/report/purchasePay', defaultCondition: null, reportTitle: '采购付款一览表', QueryWidth:0.25, searchItems: [ { xtype: 'vendorDbfindTrigger', name: 'pu_vendname', fieldLabel: '供应商名称', columnWidth: 0.25 }, { xtype: 'condatefield', name: 'createTime', fieldLabel: '单据日期', columnWidth: 0.5 }], reportColumns: [ { text: 'id', dataIndex: 'pb_id', hidden: true }, { text: '付款单号', dataIndex: 'pb_code', width: 150 }, { text: '供应商编号', id: 'pu_vendcode', dataIndex: 'pu_vendcode', width: 150 }, { text: '供应商名称', dataIndex: 'pu_vendname', width: 250 }, { text: '录入人', dataIndex: 'creatorName', width: 110 }, { text : "日期", dataIndex : "createTime", xtype:'datecolumn', width: 110 }, { text: '来源单号', dataIndex: 'pbd_slcode', width: 150 }, { text: '类型', dataIndex: 'pbd_slkind', width: 110 }, {//∑求和 text: '采购金额', xtype: 'numbercolumn', dataIndex: 'pbd_amount', xtype: 'numbercolumn', width: 110, summaryType: 'sum', 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); }, 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: 'pbd_nowbalance', xtype: 'numbercolumn', width: 110, summaryType: 'sum', 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); }, 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: 'pb_pbdamount', xtype: 'numbercolumn', width: 110, hidden:true }, { text: '付款比例%', //本次付款/采购金额*100% dataIndex: 'pb_payrate', 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.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '备注', dataIndex: 'pb_remark', width: 250 }] });