QueryPanel.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. Ext.define('saas.view.money.recBalance.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'money-recbalance-querypanel',
  4. controller: 'money-recbalance-querypanel',
  5. viewModel: 'money-recbalance-querypanel',
  6. viewName: 'money-recbalance-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'rb_code',
  10. emptyText :'请输入单号或客户',
  11. getCondition: function(value) {
  12. if(value == 'ALL') {
  13. return '1=1';
  14. }else {
  15. return ' (rb_code like\'%' + value + '%\' '
  16. +' or rb_custcode like \'%'+value+'%\' '
  17. +' or rb_custname like \'%'+value+'%\') ';
  18. }
  19. }
  20. },{
  21. xtype: 'bandinfoDbfindTrigger',
  22. name: 'rd_bankname',
  23. fieldLabel: '资金账户',
  24. showDetail: true
  25. },{
  26. xtype: 'condatefield',
  27. name: 'rb_date',
  28. fieldLabel: '日期',
  29. columnWidth: 0.5,
  30. operation: 'between'
  31. },{
  32. xtype: 'combobox',
  33. name: 'rb_statuscode',
  34. fieldLabel: '状态',
  35. queryMode: 'local',
  36. displayField: 'name',
  37. valueField: 'value',
  38. emptyText :'全部',
  39. editable:false,
  40. store: Ext.create('Ext.data.ArrayStore', {
  41. fields: ['value', 'name'],
  42. data: [
  43. ["ALL", "全部"],
  44. ["AUDITED", "已审核"],
  45. ["UNAUDITED", "未审核"]
  46. ]
  47. }),
  48. getCondition: function(value) {
  49. if(value == 'ALL') {
  50. return '1=1';
  51. }else {
  52. return 'rb_statuscode=\'' + value + '\'';
  53. }
  54. }
  55. }],
  56. moreQueryFormItems: [],
  57. queryGridConfig: {
  58. idField: 'id',
  59. codeField: 'rb_code',
  60. addTitle: '收款单',
  61. addXtype: 'money-recbalance-formpanel',
  62. defaultCondition:'',
  63. baseVastUrl: '/api/money/recbalance/',
  64. baseColumn: [{
  65. text: 'id',
  66. dataIndex: 'id',
  67. width: 100,
  68. xtype: 'numbercolumn',
  69. hidden: true
  70. }, {
  71. text: '收款单号',
  72. dataIndex: 'rb_code',
  73. width: 130
  74. }, {
  75. text: '日期',
  76. dataIndex: 'rb_date',
  77. xtype: 'datecolumn',
  78. width: 100
  79. }, {
  80. text: '客户名称',
  81. dataIndex: 'rb_custname',
  82. width: 180,
  83. }, {
  84. text: '单据状态',
  85. dataIndex: 'rb_status',
  86. width: 80
  87. }, {
  88. text: '收款人',
  89. dataIndex: 'rb_manname',
  90. width: 110
  91. }, {
  92. text: '备注',
  93. dataIndex: 'rb_remark',
  94. width: 250
  95. }],
  96. relativeColumn:[{
  97. text: 'id',
  98. dataIndex: 'id',
  99. width: 100,
  100. xtype: 'numbercolumn',
  101. hidden: true
  102. }, {
  103. text: '收款单号',
  104. dataIndex: 'rb_code',
  105. width: 130
  106. }, {
  107. text: '日期',
  108. dataIndex: 'rb_date',
  109. xtype: 'datecolumn',
  110. width: 100
  111. }, {
  112. text: '单据状态',
  113. dataIndex: 'rb_status',
  114. width: 80
  115. }, {
  116. text: '客户名称',
  117. dataIndex: 'rb_custname',
  118. width: 180,
  119. },{
  120. text: '收款人',
  121. dataIndex: 'rb_manname',
  122. width: 100
  123. },{
  124. text: '资金账户',
  125. dataIndex: 'rd_bankname',
  126. width: 100
  127. },{
  128. text: '收款金额',
  129. xtype: 'numbercolumn',
  130. dataIndex: 'rd_amount',
  131. width: 100,
  132. renderer : function(v) {
  133. var arr = (v + '.').split('.');
  134. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  135. var format = '0,000.' + xr.join();
  136. return Ext.util.Format.number(v, format);
  137. }
  138. }, {
  139. text: '结算方式',
  140. dataIndex: 'rd_paymethod',
  141. width: 90
  142. }, {
  143. text: '结算号',
  144. dataIndex: 'rd_paycode',
  145. width: 90
  146. },{
  147. text: '备注',
  148. dataIndex: 'rb_remark',
  149. width: 250
  150. }]
  151. }
  152. });