PurchasePay.js 3.5 KB

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