QueryPanel.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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: 'multicombo',
  39. name: 'rb_statuscode',
  40. fieldLabel: '审核状态',
  41. datas: [
  42. ["ALL", "全部"],
  43. ["AUDITED", "已审核"],
  44. ["UNAUDITED", "未审核"]
  45. ],
  46. getCondition: function(value) {
  47. if(value == 'ALL') {
  48. return '1=1';
  49. }else {
  50. return 'rb_statuscode=\'' + value + '\'';
  51. }
  52. }
  53. }],
  54. moreQueryFormItems: [],
  55. queryGridConfig: {
  56. idField: 'id',
  57. codeField: 'rb_code',
  58. addTitle: '收款单',
  59. addXtype: 'money-recbalance-formpanel',
  60. defaultCondition:'',
  61. baseVastUrl: '/api/money/recbalance/',
  62. // baseVastUrl: 'http://192.168.253.35:8880/recbalance/',
  63. baseColumn: [{
  64. text: 'id',
  65. dataIndex: 'id',
  66. width: 100,
  67. xtype: 'numbercolumn',
  68. hidden: true
  69. }, {
  70. text: '单据编号',
  71. dataIndex: 'rb_code',
  72. width: 200
  73. }, {
  74. text: '审核状态',
  75. dataIndex: 'rb_status',
  76. width: 120
  77. }, {
  78. text: '单据日期',
  79. dataIndex: 'rb_date',
  80. xtype: 'datecolumn',
  81. width: 200
  82. }, {
  83. text: '客户编号',
  84. dataIndex: 'rb_custcode',
  85. hidden: true
  86. }, {
  87. text: '客户名称',
  88. dataIndex: 'rb_custname',
  89. }, {
  90. text: '收款人',
  91. dataIndex: 'rb_manname',
  92. width: 120,
  93. }, {
  94. text: '资金账户',
  95. dataIndex: 'rd_bankname',
  96. width: 120,
  97. },{
  98. text: '收款金额',
  99. xtype: 'numbercolumn',
  100. dataIndex: 'rd_amount',
  101. width: 120,
  102. renderer : function(v) {
  103. var arr = (v + '.').split('.');
  104. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  105. var format = '0,000.' + xr.join();
  106. return Ext.util.Format.number(v, format);
  107. },
  108. }, {
  109. text: '结算方式',
  110. dataIndex: 'rd_paymethod',
  111. width: 120,
  112. },{
  113. text: '结算号',
  114. dataIndex: 'rd_paycode',
  115. width: 120,
  116. },{
  117. text: '备注',
  118. dataIndex: 'rd_remark',
  119. width: 120,
  120. },{
  121. text: '收款总额',
  122. dataIndex: 'rb_rdamount',
  123. xtype: 'numbercolumn',
  124. width: 120,
  125. renderer : function(v) {
  126. var arr = (v + '.').split('.');
  127. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  128. var format = '0,000.' + xr.join();
  129. return Ext.util.Format.number(v, format);
  130. },
  131. },{
  132. text: '源单编号',
  133. dataIndex: 'rbd_slcode',
  134. width: 0
  135. },{
  136. text: '业务类别',
  137. dataIndex: 'rbd_slkind',
  138. width: 0
  139. },{
  140. text: '单据日期',
  141. dataIndex: 'rbd_sldate',
  142. xtype: 'datecolumn',
  143. width: 0
  144. },{
  145. text: '单据金额',
  146. dataIndex: 'rbd_amount',
  147. xtype: 'numbercolumn',
  148. width: 0
  149. },{
  150. text: '本次核销金额',
  151. dataIndex: 'rbd_nowbalance',
  152. xtype: 'numbercolumn',
  153. width: 0
  154. },
  155. ]
  156. },
  157. // override
  158. getQueryMode: function() {
  159. return 'MAIN';
  160. }
  161. });