QueryPanel.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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: 'hidden',
  9. name: 'rb_id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. getCondition: function(value) {
  13. return 'rb_id=' + value;
  14. }
  15. }, {
  16. xtype: 'textfield',
  17. name: 'rb_code',
  18. fieldLabel: '单据编号',
  19. }, {
  20. xtype: 'dbfindtrigger',
  21. name: 'rb_custname',
  22. fieldLabel: '客户名',
  23. }, {
  24. xtype: 'textfield',
  25. name: 'rb_manname',
  26. fieldLabel: '收款人',
  27. },{
  28. xtype: 'textfield',
  29. name: 'rd_bankname',
  30. fieldLabel: '资金账户',
  31. }, {
  32. xtype: 'condatefield',
  33. name: 'rb_date',
  34. fieldLabel: '单据日期',
  35. columnWidth: 0.5,
  36. operation: 'between'
  37. },{
  38. xtype: 'combobox',
  39. name: 'rb_statuscode',
  40. fieldLabel: '审核状态',
  41. queryMode: 'local',
  42. displayField: 'name',
  43. valueField: 'value',
  44. emptyText :'全部',
  45. editable:false,
  46. store: Ext.create('Ext.data.ArrayStore', {
  47. fields: ['value', 'name'],
  48. data: [
  49. ["ALL", "全部"],
  50. ["AUDITED", "已审核"],
  51. ["UNAUDITED", "未审核"]
  52. ]
  53. }),
  54. getCondition: function(value) {
  55. if(value == 'ALL') {
  56. return '1=1';
  57. }else {
  58. return 'rb_statuscode=\'' + value + '\'';
  59. }
  60. }
  61. }],
  62. moreQueryFormItems: [],
  63. queryGridConfig: {
  64. idField: 'id',
  65. codeField: 'rb_code',
  66. addTitle: '收款单',
  67. addXtype: 'money-recbalance-formpanel',
  68. defaultCondition:'',
  69. baseVastUrl: '/api/money/recbalance/',
  70. // baseVastUrl: 'http://192.168.253.35:8880/recbalance/',
  71. baseColumn: [{
  72. text: 'id',
  73. dataIndex: 'id',
  74. width: 100,
  75. xtype: 'numbercolumn',
  76. hidden: true
  77. }, {
  78. text: '单据编号',
  79. dataIndex: 'rb_code',
  80. width: 200
  81. }, {
  82. text: '审核状态',
  83. dataIndex: 'rb_status',
  84. width: 120
  85. }, {
  86. text: '单据日期',
  87. dataIndex: 'rb_date',
  88. xtype: 'datecolumn',
  89. width: 200
  90. }, {
  91. text: '客户编号',
  92. dataIndex: 'rb_custcode',
  93. hidden: true
  94. }, {
  95. text: '客户名称',
  96. dataIndex: 'rb_custname',
  97. }, {
  98. text: '收款人',
  99. dataIndex: 'rb_manname',
  100. width: 120,
  101. }, {
  102. text: '资金账户',
  103. dataIndex: 'rd_bankname',
  104. width: 120,
  105. },{
  106. text: '收款金额',
  107. xtype: 'numbercolumn',
  108. dataIndex: 'rd_amount',
  109. width: 120,
  110. renderer : function(v) {
  111. var arr = (v + '.').split('.');
  112. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  113. var format = '0,000.' + xr.join();
  114. return Ext.util.Format.number(v, format);
  115. },
  116. }, {
  117. text: '结算方式',
  118. dataIndex: 'rd_paymethod',
  119. width: 120,
  120. },{
  121. text: '结算号',
  122. dataIndex: 'rd_paycode',
  123. width: 120,
  124. },{
  125. text: '备注',
  126. dataIndex: 'rd_remark',
  127. width: 120,
  128. },{
  129. text: '收款总额',
  130. dataIndex: 'rb_rdamount',
  131. xtype: 'numbercolumn',
  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: 'rbd_slcode',
  142. width: 0
  143. },{
  144. text: '业务类别',
  145. dataIndex: 'rbd_slkind',
  146. width: 0
  147. },{
  148. text: '单据日期',
  149. dataIndex: 'rbd_sldate',
  150. xtype: 'datecolumn',
  151. width: 0
  152. },{
  153. text: '单据金额',
  154. dataIndex: 'rbd_amount',
  155. xtype: 'numbercolumn',
  156. width: 0
  157. },{
  158. text: '本次核销金额',
  159. dataIndex: 'rbd_nowbalance',
  160. xtype: 'numbercolumn',
  161. width: 0
  162. },
  163. ]
  164. },
  165. // override
  166. getQueryMode: function() {
  167. return 'MAIN';
  168. }
  169. });