QueryPanel.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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: 150
  83. }, {
  84. text: '日期',
  85. dataIndex: 'pb_date',
  86. xtype: 'datecolumn',
  87. width: 110
  88. }, {
  89. text: '供应商名称',
  90. dataIndex: 'pb_vendname',
  91. width: 250,
  92. }, {
  93. text: '单据状态',
  94. dataIndex: 'pb_status',
  95. width: 90
  96. }, {
  97. text: '付款人',
  98. dataIndex: 'pb_manname',
  99. width: 110
  100. }, {
  101. text: '备注',
  102. dataIndex: 'pb_remark',
  103. width: 250
  104. }],
  105. relativeColumn: [{
  106. text: 'id',
  107. dataIndex: 'id',
  108. width: 0,
  109. xtype: 'numbercolumn',
  110. hidden: true
  111. }, {
  112. text: '付款单号',
  113. dataIndex: 'pb_code',
  114. width: 150
  115. }, {
  116. text: '日期',
  117. dataIndex: 'pb_date',
  118. xtype: 'datecolumn',
  119. width: 110
  120. }, {
  121. text: '供应商名称',
  122. dataIndex: 'pb_vendname',
  123. width: 250,
  124. }, {
  125. text: '单据状态',
  126. dataIndex: 'pb_status',
  127. width: 90
  128. }, {
  129. text: '付款人',
  130. dataIndex: 'pb_manname',
  131. width: 110
  132. },{
  133. text: '资金账户',
  134. dataIndex: 'pd_bankname',
  135. width: 110
  136. },{
  137. text: '付款金额',
  138. xtype: 'numbercolumn',
  139. dataIndex: 'pd_amount',
  140. width: 120,
  141. renderer: function (v) {
  142. var arr = (v + '.').split('.');
  143. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  144. var format = '0,000.' + xr.join();
  145. return Ext.util.Format.number(v, format);
  146. },
  147. } ,{
  148. text: '结算方式',
  149. dataIndex: 'pd_paymethod',
  150. width: 250
  151. },{
  152. text: '结算号',
  153. dataIndex: 'pd_paycode',
  154. width: 250
  155. },{
  156. text: '备注',
  157. dataIndex: 'pd_remark',
  158. width: 250
  159. }]
  160. }
  161. });