ProfitDetail.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /**
  2. * 毛利润分析表
  3. */
  4. Ext.define('saas.view.money.report.ProfitDetail', {
  5. extend: 'saas.view.core.report.ReportPanel',
  6. xtype: 'monry-report-profitdetail',
  7. controller: 'money-report-profitdetail',
  8. viewModel: 'money-report-profitdetail',
  9. viewName: 'money-report-profitdetail',
  10. groupField: null,
  11. listUrl: '/api/money/report/profitdetails',
  12. defaultCondition: null,
  13. reportTitle: '毛利润分析表',
  14. QueryWidth: 0.2,
  15. searchItems: [{
  16. xtype: 'customerDbfindTrigger',
  17. name: 'pi_custname',
  18. emptyText: '客户',
  19. columnWidth: 0.15,
  20. dbfinds:[
  21. {
  22. from:'cu_name',to:'pi_custname'
  23. }]
  24. }, {
  25. xtype : "remotecombo",
  26. storeUrl:'/api/document/customerkind/getCombo',
  27. name : "cu_type",
  28. emptyText : "客户类型",
  29. columnWidth: 0.15,
  30. hiddenBtn:true
  31. }, {
  32. xtype: 'condatefield',
  33. name: 'pi_date',
  34. fieldLabel: '日期',
  35. columnWidth: 0.5
  36. }],
  37. reportColumns: [
  38. {
  39. text: '客户',
  40. dataIndex: 'pi_custname',
  41. width: 200,
  42. },{
  43. text: '客户类型',
  44. dataIndex: 'cu_type',
  45. width: 200,
  46. }, {
  47. text: '业务员',
  48. dataIndex: 'cu_sellername',
  49. width: 200,
  50. }, {
  51. text: '销售总额',
  52. dataIndex: 'saamount',
  53. width: 150,
  54. renderer : function(v) {
  55. var arr = (v + '.').split('.');
  56. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  57. var format = '0,000.' + xr.join();
  58. return Ext.util.Format.number(v, format);
  59. },
  60. summaryType: 'sum',
  61. summaryRenderer: function(v) {
  62. var arr = (v + '.').split('.');
  63. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  64. var format = '0,000.' + xr.join();
  65. return Ext.util.Format.number(v, format);
  66. }
  67. }, {
  68. text: '不含税金额',
  69. dataIndex: 'netamount',
  70. width: 150
  71. }, {
  72. text: '成本金额',
  73. dataIndex: 'costamount',
  74. width: 150
  75. }, {
  76. text: '毛利润',
  77. dataIndex: 'profit',
  78. width: 150,
  79. renderer : function(v) {
  80. var arr = (v + '.').split('.');
  81. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  82. var format = '0,000.' + xr.join();
  83. return Ext.util.Format.number(v, format);
  84. },
  85. summaryType: 'sum',
  86. summaryRenderer: 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. }, {
  93. text: '毛利率',
  94. dataIndex: 'profitpresent',
  95. width: 150
  96. }]
  97. });