QueryPanel.js 4.3 KB

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