TotalRecDetail.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. width: 150
  43. }, {
  44. text: '增加应收',
  45. xtype: 'numbercolumn',
  46. dataIndex: 'cm_nowamount',
  47. width: 150
  48. }, {
  49. text: '增加预收',
  50. xtype: 'numbercolumn',
  51. dataIndex: 'cm_nowpreamount',
  52. width: 150
  53. }, {
  54. text: '应收余额',
  55. dataIndex: 'cm_endamount',
  56. xtype: 'numbercolumn',
  57. width: 150,
  58. renderer : function(v) {
  59. var arr = (v + '.').split('.');
  60. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  61. var format = '0,000.' + xr.join();
  62. return Ext.util.Format.number(v, format);
  63. },
  64. summaryType: 'sum',
  65. summaryRenderer: function(v) {
  66. var arr = (v + '.').split('.');
  67. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  68. var format = '0,000.' + xr.join();
  69. return Ext.util.Format.number(v, format);
  70. }
  71. }, {
  72. flex: 1
  73. }]
  74. });