| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- Ext.define('saas.view.money.report.PayDetail', {
- extend: 'saas.view.core.report.ReportPanel',
- xtype: 'monry-report-paydetail',
- controller: 'money-report-paydetail',
- viewModel: 'money-report-paydetail',
- viewName: 'money-report-paydetail',
- groupField:'pd_vendname',
- groupHeaderTpl: '供应商名称: {[values.rows[0].data.pd_vendname]}',
- listUrl: '/api/money/report/payDetail',
- defaultCondition: null,
- reportTitle: '应付账款明细表',
- QueryWidth:0.25,
- allowPaging: false,
- //筛选:供应商、日期(必填)
- searchItems: [ {
- xtype: 'vendorDbfindTrigger',
- name: 'pd_vendname',
- fieldLabel: '供应商名称',
- columnWidth: 0.25
- }, {
- xtype: 'conmonthfield',
- name: 'pd_ym',
- fieldLabel: '期间',
- columnWidth: 0.5
- }],
- reportColumns: [{
- text: '单据日期',
- xtype: 'datecolumn',
- dataIndex: 'pd_date',
- width: 110
- }, {
- text: '单号',
- dataIndex: 'pd_code',
- width: 150
- }, {
- text: '业务类型',
- dataIndex: 'pd_kind',
- width: 100
- },{
- text: '采购员',
- dataIndex: 'pd_buyername',
- width: 80
- },{
- text: '增加应付',
- xtype: 'numbercolumn',
- exportFormat: 'Amount',
- dataIndex: 'pd_addpay',
- width: 120,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: '增加预付',
- xtype: 'numbercolumn',
- exportFormat: 'Amount',
- dataIndex: 'pd_addpre',
- width: 120,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: '应付余额(元)',
- xtype: 'numbercolumn',
- exportFormat: 'Amount',
- dataIndex: 'pd_remain',
- width: 120,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- },
- summaryType: 'customize_last',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- },
- mySummaryRenderer: function(grid, column, datas) {
- var store = grid.store,
- dataIndex = column.dataIndex,
- groupField = store.getGroupField(),
- count = datas.length,
- data = datas,
- lasts = {},
- keys = [],
- arr = [];
- for(var i = 0; i < count; i++) {
- var d = data[i];
- var n = Number(d[dataIndex]);
- var v = isNaN(n) ? 0 : n;
- var gv = d[groupField];
- lasts[gv] = v;
- }
- keys = Ext.Object.getAllKeys(lasts);
- arr = keys.map(function(key) {
- return lasts[key];
- });
- return Ext.Array.sum(arr);
- }
- }, {
- dataIndex: '',
- flex: 1
- }]
- });
|