RecDetail.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. Ext.define('saas.view.money.report.RecDetail', {
  2. extend: 'saas.view.core.report.ReportPanel',
  3. xtype: 'monry-report-recdetail',
  4. controller: 'money-report-recdetail',
  5. viewModel: 'money-report-recdetail',
  6. viewName: 'money-report-recdetail',
  7. groupField: 'pi_custname',
  8. listUrl: '/api/money/report/recDetail',
  9. defaultCondition: null,
  10. reportTitle: '应收账款明细',
  11. QueryWidth:0.25,
  12. //筛选:客户、日期(必填)
  13. searchItems: [ {
  14. xtype: 'customerDbfindTrigger',
  15. name: 'pi_custname',
  16. fieldLabel: '客户名称',
  17. columnWidth: 0.25
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'rb_date',
  21. fieldLabel: '单据日期',
  22. columnWidth: 0.5
  23. }],
  24. reportColumns: [
  25. {
  26. text: 'id',
  27. dataIndex: 'pi_id',
  28. hidden: true
  29. }, {
  30. text: '单号',
  31. dataIndex: 'pi_inoutno',
  32. width: 150
  33. }, {
  34. text: '客户编号',
  35. dataIndex: 'pi_custcode',
  36. width: 150
  37. }, {
  38. text: '客户名称',
  39. dataIndex: 'pi_custname',
  40. width: 200
  41. }, {
  42. text: '单据类型',
  43. dataIndex: 'pi_class',
  44. width: 110
  45. },{
  46. text: '业务员',
  47. dataIndex: 'pu_buyername',
  48. width: 110
  49. }, {
  50. text: '单据日期',
  51. dataIndex: 'rb_date',
  52. width: 110
  53. }, {
  54. text: '序号',
  55. dataIndex: 'pd_pdno',
  56. xtype: 'numbercolumn',
  57. width: 80
  58. },{
  59. text:'期初应收',
  60. dataIndex:'cu_beginaramount',
  61. xtype: 'numbercolumn',
  62. width: 110,
  63. renderer : function(v) {
  64. var arr = (v + '.').split('.');
  65. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  66. var format = '0,000.' + xr.join();
  67. return Ext.util.Format.number(v, format);
  68. },
  69. summaryType: 'sum',
  70. summaryRenderer: function(v) {
  71. var arr = (v + '.').split('.');
  72. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  73. var format = '0,000.' + xr.join();
  74. return Ext.util.Format.number(v, format);
  75. }
  76. },{
  77. text:'本期收款金额',
  78. xtype: 'numbercolumn',
  79. dataIndex:'rb_rdamount',
  80. xtype: 'numbercolumn',
  81. width: 110,
  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. summaryType: 'sum',
  89. summaryRenderer: function(v) {
  90. var arr = (v + '.').split('.');
  91. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  92. var format = '0,000.' + xr.join();
  93. return Ext.util.Format.number(v, format);
  94. }
  95. },{
  96. text: '应收余额',
  97. xtype: 'numbercolumn',
  98. dataIndex: 'mustpay',
  99. xtype: 'numbercolumn',
  100. width: 110,
  101. // renderer : function(v) {
  102. // var arr = (v + '.').split('.');
  103. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  104. // var format = '0,000.' + xr.join();
  105. // return Ext.util.Format.number(v, format);
  106. // },
  107. // summaryType: 'sum',
  108. // summaryRenderer: function(v) {
  109. // var arr = (v + '.').split('.');
  110. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  111. // var format = '0,000.' + xr.join();
  112. // return Ext.util.Format.number(v, format);
  113. // }
  114. }, {
  115. text: '应收日期',
  116. dataIndex: 'mustdate',
  117. xtype:'datecolumn',
  118. width: 110
  119. }, {
  120. text: '单据总金额',
  121. dataIndex: 'pi_total',
  122. xtype: 'numbercolumn',
  123. width: 110,
  124. summaryType: 'sum',
  125. summaryRenderer: function(v) {
  126. var arr = (v + '.').split('.');
  127. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  128. var format = '0,000.' + xr.join();
  129. return Ext.util.Format.number(v, format);
  130. }
  131. }, {
  132. text: '备注',
  133. dataIndex: 'pd_unit',
  134. width: 250
  135. }]
  136. });