QueryPanel.js 6.9 KB

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