QueryPanel.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. align: 'center',
  86. dataIndex: 'rb_status',
  87. width: 80
  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: 130
  107. }, {
  108. text: '日期',
  109. dataIndex: 'rb_date',
  110. xtype: 'datecolumn',
  111. width: 100
  112. }, {
  113. text: '单据状态',
  114. align: 'center',
  115. dataIndex: 'rb_status',
  116. width: 80
  117. }, {
  118. text: '客户名称',
  119. dataIndex: 'rb_custname',
  120. width: 180,
  121. },{
  122. text: '收款人',
  123. dataIndex: 'rb_manname',
  124. width: 100
  125. },{
  126. text: '资金账户',
  127. dataIndex: 'rd_bankname',
  128. width: 100
  129. },{
  130. text: '收款金额',
  131. xtype: 'numbercolumn',
  132. dataIndex: 'rd_amount',
  133. width: 100,
  134. renderer : function(v) {
  135. var arr = (v + '.').split('.');
  136. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  137. var format = '0,000.' + xr.join();
  138. return Ext.util.Format.number(v, format);
  139. }
  140. }, {
  141. text: '结算方式',
  142. dataIndex: 'rd_paymethod',
  143. width: 90
  144. }, {
  145. text: '结算号',
  146. dataIndex: 'rd_paycode',
  147. width: 90
  148. },{
  149. text: '备注',
  150. dataIndex: 'rb_remark',
  151. width: 250
  152. }]
  153. }
  154. });