QueryPanel.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. xtype: 'numbercolumn',
  117. dataIndex: 'os_amount',
  118. width: 110,
  119. renderer : function(v) {
  120. var arr = (v + '.').split('.');
  121. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  122. var format = '0,000.' + xr.join('');
  123. return Ext.util.Format.number(v, format);
  124. }
  125. }, {
  126. text: '单据状态',
  127. align: 'center',
  128. dataIndex: 'os_status',
  129. width: 90
  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. xtype: 'numbercolumn',
  160. dataIndex: 'os_amount',
  161. width: 110,
  162. renderer : function(v) {
  163. var arr = (v + '.').split('.');
  164. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  165. var format = '0,000.' + xr.join('');
  166. return Ext.util.Format.number(v, format);
  167. }
  168. }, {
  169. text: '单据状态',
  170. align: 'center',
  171. dataIndex: 'os_status',
  172. width: 90
  173. }, {
  174. text: '支出类别',
  175. dataIndex: 'osd_type',
  176. width: 110
  177. }, {
  178. text: '明细金额(元)',
  179. xtype: 'numbercolumn',
  180. dataIndex: 'osd_nowbalance',
  181. width: 110
  182. },{
  183. text: '备注',
  184. dataIndex: 'osd_remark',
  185. width: 250
  186. }]
  187. }
  188. });