TotalRecDetail.js 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /**
  2. * 应收总账
  3. */
  4. Ext.define('saas.view.money.report.TotalRecDetail', {
  5. extend: 'saas.view.core.report.ReportPanel',
  6. xtype: 'monry-report-totalrecdetail',
  7. controller: 'money-report-totalrecdetail',
  8. viewModel: 'money-report-totalrecdetail',
  9. viewName: 'money-report-totalrecdetail',
  10. groupField: null,
  11. listUrl: '/api/money/report/custormonthdetails',
  12. // listUrl: 'http://192.168.253.139:8560/api/money/report/custormonthdetails',
  13. defaultCondition: null,
  14. reportTitle: '应收总账',
  15. QueryWidth: 0.35,
  16. allowPaging: false,
  17. searchItems: [{
  18. xtype: 'textfield',
  19. name: 'cm_custcode',
  20. emptyText: '客户编号/名称',
  21. columnWidth: 0.25,
  22. getCondition: function (v) {
  23. return "(upper(cm_custcode) like '%" + v.toUpperCase() + "%' or upper(cm_custname) like '%" + v.toUpperCase() + "%')";
  24. },
  25. }, {
  26. xtype: 'conmonthfield',
  27. fieldLabel: '期间',
  28. name: 'cm_yearmonth',
  29. columnWidth: 0.4
  30. }],
  31. reportColumns: [{
  32. text: '客户编号',
  33. dataIndex: 'cm_custcode',
  34. width: 200
  35. }, {
  36. text: '客户名称',
  37. dataIndex: 'cm_custname',
  38. width: 200,
  39. }, {
  40. text: '期初应收',
  41. dataIndex: 'cm_beginamount',
  42. xtype: 'numbercolumn',
  43. width: 150,
  44. renderer: function(v) {
  45. var arr = (v + '.').split('.');
  46. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  47. var format = '0,000.' + xr.join();
  48. return Ext.util.Format.number(v, format);
  49. }
  50. }, {
  51. text: '增加应收',
  52. xtype: 'numbercolumn',
  53. dataIndex: 'cm_nowamount',
  54. width: 150,
  55. renderer: function(v) {
  56. var arr = (v + '.').split('.');
  57. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  58. var format = '0,000.' + xr.join();
  59. return Ext.util.Format.number(v, format);
  60. }
  61. }, {
  62. text: '增加预收',
  63. xtype: 'numbercolumn',
  64. dataIndex: 'cm_nowpreamount',
  65. width: 150,
  66. renderer: function(v) {
  67. var arr = (v + '.').split('.');
  68. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  69. var format = '0,000.' + xr.join();
  70. return Ext.util.Format.number(v, format);
  71. }
  72. }, {
  73. text: '应收余额',
  74. dataIndex: 'cm_endamount',
  75. xtype: 'numbercolumn',
  76. width: 150,
  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. summaryType: 'sum',
  84. summaryRenderer: function(v) {
  85. var arr = (v + '.').split('.');
  86. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  87. var format = '0,000.' + xr.join();
  88. return Ext.util.Format.number(v, format);
  89. }
  90. }, {
  91. flex: 1
  92. }]
  93. });