PurchasePay.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. Ext.define('saas.view.purchase.report.PurchasePay', {
  2. extend: 'saas.view.core.report.ReportPanel',
  3. xtype: 'purchase-report-purchasepay',
  4. controller: 'purchase-report-purchasepay',
  5. viewModel: 'purchase-report-purchasepay',
  6. viewName: 'purchase-report-purchasepay',
  7. //按供应商分组 付款金额合计
  8. groupField: 'pu_vendname',
  9. groupHeaderTpl: '供应商名称: {[values.rows[0].data.pu_vendname]}',
  10. listUrl: '/api/purchase/report/purchasePay',
  11. defaultCondition: null,
  12. reportTitle: '采购付款一览表',
  13. QueryWidth:0.25,
  14. searchItems: [
  15. {
  16. xtype: 'vendorDbfindTrigger',
  17. name: 'pu_vendname',
  18. fieldLabel: '供应商名称',
  19. columnWidth: 0.25
  20. }, {
  21. xtype: 'condatefield',
  22. name: 'createTime',
  23. fieldLabel: '单据日期',
  24. columnWidth: 0.5
  25. }],
  26. reportColumns: [
  27. {
  28. text: 'id',
  29. dataIndex: 'pb_id',
  30. hidden: true
  31. }, {
  32. text: '付款单号',
  33. dataIndex: 'pb_code',
  34. width: 150
  35. }, {
  36. text: '供应商名称',
  37. dataIndex: 'pu_vendname',
  38. width: 250
  39. }, {
  40. text : "日期",
  41. dataIndex : "createTime",
  42. xtype:'datecolumn',
  43. width: 110
  44. }, {
  45. text: '来源单号',
  46. dataIndex: 'pbd_slcode',
  47. width: 150
  48. }, {
  49. text: '类型',
  50. dataIndex: 'pbd_slkind',
  51. width: 110
  52. }, {//∑求和
  53. text: '采购金额',
  54. xtype: 'numbercolumn',
  55. exportFormat: 'Amount',
  56. dataIndex: 'pbd_amount',
  57. width: 110,
  58. renderer: function(v) {
  59. var arr = (v + '.').split('.');
  60. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  61. var format = '0,000.' + xr.join('');
  62. return Ext.util.Format.number(v, format);
  63. },
  64. // summaryRenderer: function(v) {
  65. // var arr = (v + '.').split('.');
  66. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  67. // var format = '0,000.' + xr.join('');
  68. // return Ext.util.Format.number(v, format);
  69. // }
  70. }, {//∑求和
  71. text: '本次付款',
  72. dataIndex: 'pbd_nowbalance',
  73. exportFormat: 'Amount',
  74. xtype: 'numbercolumn',
  75. width: 110,
  76. summaryType: 'sum',
  77. renderer: function(v) {
  78. var arr = (v + '.').split('.');
  79. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  80. var format = '0,000.' + xr.join('');
  81. return Ext.util.Format.number(v, format);
  82. },
  83. summaryRenderer: function(v) {
  84. var arr = (v + '.').split('.');
  85. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  86. var format = '0,000.' + xr.join('');
  87. return Ext.util.Format.number(v, format);
  88. }
  89. }, {
  90. text: '应付余额',
  91. xtype: 'numbercolumn',
  92. exportFormat: 'Amount',
  93. dataIndex: 'pb_pbdamount',
  94. width: 110,
  95. hidden:true
  96. }, {
  97. text: '付款比例%',
  98. //本次付款/采购金额*100%
  99. dataIndex: 'pb_payrate',
  100. xtype: 'numbercolumn',
  101. width: 110,
  102. renderer : function(v) {
  103. var arr = (v + '.').split('.');
  104. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  105. var format = '0.' + xr.join('');
  106. return Ext.util.Format.number(v, format);
  107. }
  108. }, {
  109. text: '备注',
  110. dataIndex: 'pb_remark',
  111. width: 250
  112. }]
  113. });