QueryPanel.js 4.7 KB

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