QueryPanel.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. Ext.define('saas.view.money.othspendings.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'money-othspendings-querypanel',
  4. controller: 'money-othspendings-querypanel',
  5. viewModel: 'money-othspendings-querypanel',
  6. viewName: 'money-othspendings-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'os_id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. columnWidth: 0,
  13. getCondition: function(value) {
  14. return 'os_id=' + value;
  15. }
  16. },{
  17. xtype: 'textfield',
  18. name: 'os_code',
  19. emptyText:'请输入单号或供应商或账号',
  20. getCondition: function(value) {
  21. if(value == 'ALL') {
  22. return '1=1';
  23. }else {
  24. return ' (os_code like\'%' + value + '%\''
  25. +' or os_vendcode like \'%'+value+'%\''
  26. +' or os_vendname like \'%'+value+'%\''
  27. +' or os_bankcode like \'%'+value+'%\''
  28. +' or os_bankname like \'%'+value+'%\''
  29. +') ';
  30. }
  31. }
  32. },{
  33. xtype: 'condatefield',
  34. name: 'os_date',
  35. columnWidth: 0.5,
  36. fieldLabel: '日期'
  37. },{
  38. name: 'osd_type',
  39. fieldLabel: '支出类别',
  40. xtype : "remotecombo",
  41. emptyText :'全部',
  42. showDetail: true,
  43. storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
  44. hiddenBtn:true,//true 则会关闭新增按钮功能
  45. getCondition: function(value) {
  46. if(!value) {
  47. return '1=1';
  48. }else {
  49. return 'osd_type like \'%' + value + '%\'';
  50. }
  51. }
  52. },{
  53. xtype: 'combobox',
  54. name: 'os_statuscode',
  55. fieldLabel: '状态',
  56. queryMode: 'local',
  57. displayField: 'os_status',
  58. valueField: 'os_statuscode',
  59. emptyText :'全部',
  60. editable:false,
  61. store: Ext.create('Ext.data.ArrayStore', {
  62. fields: ['os_statuscode', 'os_status'],
  63. data: [
  64. ["ALL", "全部"],
  65. ["AUDITED", "已审核"],
  66. ["UNAUDITED", "未审核"]
  67. ]
  68. }),
  69. getCondition: function(value) {
  70. if(value == 'ALL') {
  71. return '1=1';
  72. }else {
  73. return 'os_statuscode=\'' + value + '\'';
  74. }
  75. }
  76. }],
  77. moreQueryFormItems: [],
  78. queryGridConfig: {
  79. idField: 'id',
  80. codeField: 'os_code',
  81. addTitle: '其它支出单',
  82. addXtype: 'money-othspendings-formpanel',
  83. defaultCondition:'',
  84. baseVastUrl: '/api/money/othspendings/',
  85. baseColumn: [{
  86. text: 'id',
  87. dataIndex: 'id',
  88. hidden:true,
  89. xtype: 'numbercolumn'
  90. }, {
  91. text: '单据编号',
  92. dataIndex: 'os_code',
  93. width: 150
  94. }, {
  95. text: '日期',
  96. dataIndex: 'os_date',
  97. xtype: 'datecolumn',
  98. width: 110
  99. }, {
  100. text: '供应商名称',
  101. dataIndex: 'os_vendname',
  102. width:250
  103. },{
  104. text: '结算账户',
  105. dataIndex: 'os_bankname',
  106. width: 150
  107. },{
  108. text: '付款金额',
  109. dataIndex: 'os_amount',
  110. width: 110,
  111. renderer : function(v) {
  112. var arr = (v + '.').split('.');
  113. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  114. var format = '0,000.' + xr.join();
  115. return Ext.util.Format.number(v, format);
  116. }
  117. }, {
  118. text: '单据状态',
  119. align: 'center',
  120. dataIndex: 'os_status',
  121. width: 90
  122. },{
  123. text: '录入人',
  124. dataIndex: 'creatorName',
  125. width: 110
  126. }, {
  127. text: '审核人',
  128. dataIndex: 'os_auditman',
  129. width: 110
  130. }, {
  131. text: '备注',
  132. dataIndex: 'os_remark',
  133. width: 250
  134. }],
  135. relativeColumn: [{
  136. text: 'id',
  137. dataIndex: 'id',
  138. hidden:true,
  139. xtype: 'numbercolumn'
  140. }, {
  141. text: '单据编号',
  142. dataIndex: 'os_code',
  143. width: 150
  144. }, {
  145. text: '日期',
  146. dataIndex: 'os_date',
  147. xtype: 'datecolumn',
  148. width: 110
  149. }, {
  150. text: '供应商名称',
  151. dataIndex: 'os_vendname',
  152. width:250
  153. },{
  154. text: '结算账户',
  155. dataIndex: 'os_bankname',
  156. width: 150
  157. },{
  158. text: '付款金额',
  159. dataIndex: 'os_amount',
  160. width: 110,
  161. renderer : function(v) {
  162. var arr = (v + '.').split('.');
  163. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  164. var format = '0,000.' + xr.join();
  165. return Ext.util.Format.number(v, format);
  166. }
  167. }, {
  168. text: '单据状态',
  169. align: 'center',
  170. dataIndex: 'os_status',
  171. width: 90
  172. },{
  173. text: '录入人',
  174. dataIndex: 'creatorName',
  175. width: 110
  176. }, {
  177. text: '审核人',
  178. dataIndex: 'os_auditman',
  179. width: 110
  180. }, {
  181. text: '支出类别',
  182. dataIndex: 'osd_type',
  183. width: 110
  184. }, {
  185. text: '明细金额',
  186. dataIndex: 'osd_nowbalance',
  187. width: 110
  188. },{
  189. text: '备注',
  190. dataIndex: 'osd_remark',
  191. width: 250
  192. }]
  193. }
  194. });