QueryPanel.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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: 'vendorDbfindTrigger',
  13. name: 'os_vendname',
  14. margin:'0 0 0 20',
  15. emptyText :'请输入供应商编号或名称'
  16. },{
  17. xtype: 'condatefield',
  18. name: 'os_date',
  19. columnWidth: 0.5,
  20. fieldLabel: '日期'
  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. return saas.util.BaseUtil.numberFormat(v, 2, true);
  121. }
  122. }, {
  123. text: '单据状态',
  124. align: 'center',
  125. dataIndex: 'os_status',
  126. width: 90
  127. }, {
  128. text: '备注',
  129. dataIndex: 'os_remark',
  130. width: 250
  131. }],
  132. relativeColumn: [{
  133. text: 'id',
  134. dataIndex: 'id',
  135. hidden:true,
  136. xtype: 'numbercolumn'
  137. }, {
  138. text: '单据编号',
  139. dataIndex: 'os_code',
  140. width: 150
  141. }, {
  142. text: '日期',
  143. dataIndex: 'os_date',
  144. xtype: 'datecolumn',
  145. width: 110
  146. }, {
  147. text: '供应商名称',
  148. dataIndex: 'os_vendname',
  149. width:250
  150. },{
  151. text: '结算账户',
  152. dataIndex: 'os_bankname',
  153. width: 150
  154. },{
  155. text: '付款金额(元)',
  156. xtype: 'numbercolumn',
  157. dataIndex: 'os_amount',
  158. width: 110,
  159. renderer : function(v) {
  160. return saas.util.BaseUtil.numberFormat(v, 2, true);
  161. }
  162. }, {
  163. text: '单据状态',
  164. align: 'center',
  165. dataIndex: 'os_status',
  166. width: 90
  167. }, {
  168. text: '支出类别',
  169. dataIndex: 'osd_type',
  170. width: 110
  171. }, {
  172. text: '明细金额(元)',
  173. xtype: 'numbercolumn',
  174. dataIndex: 'osd_nowbalance',
  175. width: 110,
  176. renderer : function(v) {
  177. return saas.util.BaseUtil.numberFormat(v, 2, true);
  178. },
  179. },{
  180. text: '备注',
  181. dataIndex: 'osd_remark',
  182. width: 250
  183. }]
  184. }
  185. });