PurchasePay.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. id: 'pu_vendcode',
  38. dataIndex: 'pu_vendcode',
  39. width: 150
  40. }, {
  41. text: '供应商名称',
  42. dataIndex: 'pu_vendname',
  43. width: 250
  44. }, {
  45. text: '录入人',
  46. dataIndex: 'creatorName',
  47. width: 110
  48. }, {
  49. text : "日期",
  50. dataIndex : "createTime",
  51. xtype:'datecolumn',
  52. width: 110
  53. }, {
  54. text: '来源单号',
  55. dataIndex: 'pbd_slcode',
  56. width: 150
  57. }, {
  58. text: '类型',
  59. dataIndex: 'pbd_slkind',
  60. width: 110
  61. }, {//∑求和
  62. text: '采购金额',
  63. xtype: 'numbercolumn',
  64. exportFormat: 'Amount',
  65. dataIndex: 'pbd_amount',
  66. width: 110,
  67. summaryType: 'sum',
  68. renderer: function(v) {
  69. var arr = (v + '.').split('.');
  70. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  71. var format = '0,000.' + xr.join('');
  72. return Ext.util.Format.number(v, format);
  73. },
  74. summaryRenderer: function(v) {
  75. var arr = (v + '.').split('.');
  76. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  77. var format = '0,000.' + xr.join('');
  78. return Ext.util.Format.number(v, format);
  79. }
  80. }, {//∑求和
  81. text: '本次付款',
  82. dataIndex: 'pbd_nowbalance',
  83. exportFormat: 'Amount',
  84. xtype: 'numbercolumn',
  85. width: 110,
  86. summaryType: 'sum',
  87. renderer: function(v) {
  88. var arr = (v + '.').split('.');
  89. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  90. var format = '0,000.' + xr.join('');
  91. return Ext.util.Format.number(v, format);
  92. },
  93. summaryRenderer: function(v) {
  94. var arr = (v + '.').split('.');
  95. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  96. var format = '0,000.' + xr.join('');
  97. return Ext.util.Format.number(v, format);
  98. }
  99. }, {
  100. text: '应付余额',
  101. xtype: 'numbercolumn',
  102. exportFormat: 'Amount',
  103. dataIndex: 'pb_pbdamount',
  104. width: 110,
  105. hidden:true
  106. }, {
  107. text: '付款比例%',
  108. //本次付款/采购金额*100%
  109. dataIndex: 'pb_payrate',
  110. xtype: 'numbercolumn',
  111. width: 110,
  112. renderer : function(v) {
  113. var arr = (v + '.').split('.');
  114. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  115. var format = '0.' + xr.join('');
  116. return Ext.util.Format.number(v, format);
  117. }
  118. }, {
  119. text: '备注',
  120. dataIndex: 'pb_remark',
  121. width: 250
  122. }]
  123. });