PurchasePay.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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_vendcode',
  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. dataIndex: 'pbd_amount',
  65. xtype: 'numbercolumn',
  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. xtype: 'numbercolumn',
  84. width: 110,
  85. summaryType: 'sum',
  86. renderer: function(v) {
  87. var arr = (v + '.').split('.');
  88. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  89. var format = '0,000.' + xr.join();
  90. return Ext.util.Format.number(v, format);
  91. },
  92. summaryRenderer: function(v) {
  93. var arr = (v + '.').split('.');
  94. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  95. var format = '0,000.' + xr.join();
  96. return Ext.util.Format.number(v, format);
  97. }
  98. }, {
  99. text: '应付余额',
  100. xtype: 'numbercolumn',
  101. dataIndex: 'pb_pbdamount',
  102. xtype: 'numbercolumn',
  103. width: 110,
  104. hidden:true
  105. }, {
  106. text: '付款比例%',
  107. //本次付款/采购金额*100%
  108. dataIndex: 'pb_payrate',
  109. xtype: 'numbercolumn',
  110. width: 110,
  111. renderer : function(v) {
  112. var arr = (v + '.').split('.');
  113. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  114. var format = '0.' + xr.join();
  115. return Ext.util.Format.number(v, format);
  116. }
  117. }, {
  118. text: '备注',
  119. dataIndex: 'pb_remark',
  120. width: 250
  121. }]
  122. });