QueryPanel.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. dataIndex: 'os_status',
  120. width: 90
  121. },{
  122. text: '录入人',
  123. dataIndex: 'creatorName',
  124. width: 110
  125. }, {
  126. text: '审核人',
  127. dataIndex: 'os_auditman',
  128. width: 110
  129. }, {
  130. text: '备注',
  131. dataIndex: 'os_remark',
  132. width: 250
  133. }],
  134. relativeColumn: [{
  135. text: 'id',
  136. dataIndex: 'id',
  137. hidden:true,
  138. xtype: 'numbercolumn'
  139. }, {
  140. text: '单据编号',
  141. dataIndex: 'os_code',
  142. width: 150
  143. }, {
  144. text: '日期',
  145. dataIndex: 'os_date',
  146. xtype: 'datecolumn',
  147. width: 110
  148. }, {
  149. text: '供应商名称',
  150. dataIndex: 'os_vendname',
  151. width:250
  152. },{
  153. text: '结算账户',
  154. dataIndex: 'os_bankname',
  155. width: 150
  156. },{
  157. text: '付款金额',
  158. dataIndex: 'os_amount',
  159. width: 110,
  160. renderer : function(v) {
  161. var arr = (v + '.').split('.');
  162. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  163. var format = '0,000.' + xr.join();
  164. return Ext.util.Format.number(v, format);
  165. }
  166. }, {
  167. text: '单据状态',
  168. dataIndex: 'os_status',
  169. width: 90
  170. },{
  171. text: '录入人',
  172. dataIndex: 'creatorName',
  173. width: 110
  174. }, {
  175. text: '审核人',
  176. dataIndex: 'os_auditman',
  177. width: 110
  178. }, {
  179. text: '支出类别',
  180. dataIndex: 'osd_type',
  181. width: 110
  182. }, {
  183. text: '明细金额',
  184. dataIndex: 'osd_nowbalance',
  185. width: 110
  186. },{
  187. text: '备注',
  188. dataIndex: 'osd_remark',
  189. width: 250
  190. }]
  191. }
  192. });