QueryPanel.js 5.9 KB

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