OtherIODetail.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /**
  2. * 其他收支明细表
  3. */
  4. Ext.define('saas.view.money.report.OtherIODetail', {
  5. extend: 'saas.view.core.report.ReportPanel',
  6. xtype: 'monry-report-otheriodetail',
  7. controller: 'money-report-otheriodetail',
  8. viewModel: 'money-report-otheriodetail',
  9. viewName: 'money-report-otheriodetail',
  10. groupField: 'bl_bankname',
  11. groupHeaderTpl: '资金账户: {[values.rows[0].data.bl_bankname]}',
  12. listUrl: '/api/money/report/otheriodetail',
  13. defaultCondition: null,
  14. reportTitle: '其他收支明细表',
  15. QueryWidth: 0.2,
  16. searchItems: [{
  17. xtype: 'bandinfoDbfindTrigger',
  18. name: 'bl_bankname',
  19. emptyText: '资金账户',
  20. columnWidth: 0.15,
  21. dbfinds:[
  22. {
  23. from:'bk_bankname',to:'bl_bankname'
  24. }]
  25. }, {
  26. // xtype : "remotecombo",
  27. // storeUrl:'/api/document/customerkind/getCombo',
  28. // name : "bl_kind",
  29. // emptyText : "收支类别",
  30. // columnWidth: 0.25,
  31. // hiddenBtn:true,
  32. xtype: 'combobox',
  33. name: 'bl_kind',
  34. queryMode: 'local',
  35. displayField: 'display',
  36. valueField: 'value',
  37. emptyText : '收支类别',
  38. editable:false,
  39. columnWidth: 0.15,
  40. store: Ext.create('Ext.data.ArrayStore', {
  41. fields: ['value', 'display'],
  42. data: [
  43. ["ALL", "全部"],
  44. ["其他支出单", "其他支出单"],
  45. ["其他收入单", "其他收入单"]
  46. ]
  47. }),
  48. getCondition: function(value) {
  49. if(value == 'ALL'||value == null) {
  50. return '1=1';
  51. }else {
  52. return 'bl_kind=\'' + value + '\'';
  53. }
  54. }
  55. }, {
  56. xtype: 'condatefield',
  57. name: 'bl_date',
  58. fieldLabel: '日期',
  59. columnWidth: 0.5
  60. }],
  61. reportColumns: [{
  62. text: '日期',
  63. dataIndex: 'bl_date',
  64. width: 110
  65. }, {
  66. text: '单据编号',
  67. dataIndex: 'bl_code',
  68. width: 150,
  69. }, {
  70. text: '收支类别',
  71. dataIndex: 'bl_kind',
  72. width: 100,
  73. }, {
  74. text: '资金账户',
  75. dataIndex: 'bl_bankname',
  76. width: 150
  77. }, {
  78. text: '收入',
  79. dataIndex: 'bl_income',
  80. exportFormat: 'Amount',
  81. width: 120,
  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. dataIndex: 'bl_spending',
  98. exportFormat: 'Amount',
  99. width: 120,
  100. renderer : function(v) {
  101. var arr = (v + '.').split('.');
  102. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  103. var format = '0,000.' + xr.join('');
  104. return Ext.util.Format.number(v, format);
  105. },
  106. summaryType: 'sum',
  107. summaryRenderer: function(v) {
  108. var arr = (v + '.').split('.');
  109. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  110. var format = '0,000.' + xr.join('');
  111. return Ext.util.Format.number(v, format);
  112. }
  113. }, {
  114. text: '往来单位',
  115. dataIndex: 'bl_assname',
  116. width: 200,
  117. }, {
  118. text: '备注',
  119. dataIndex: 'bl_remark',
  120. width: 250
  121. }]
  122. });