QueryPanel.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. dataIndex: 'os_currency',
  127. width: 120
  128. } ,{
  129. text: '汇率(%)',
  130. dataIndex: 'os_rate',
  131. xtype: 'numbercolumn',
  132. width: 120,
  133. renderer: function(v, m, r) {
  134. return saas.util.BaseUtil.numberFormat(v, 6, false);
  135. },
  136. } ,{
  137. text: '单据状态',
  138. align: 'center',
  139. dataIndex: 'os_status',
  140. width: 90
  141. }, {
  142. text: '备注',
  143. dataIndex: 'os_remark',
  144. width: 250
  145. }],
  146. relativeColumn: [{
  147. text: 'id',
  148. dataIndex: 'id',
  149. hidden: true,
  150. xtype: 'numbercolumn'
  151. }, {
  152. text: '单据编号',
  153. dataIndex: 'os_code',
  154. width: 150
  155. }, {
  156. text: '日期',
  157. dataIndex: 'os_date',
  158. xtype: 'datecolumn',
  159. width: 110
  160. }, {
  161. text: '供应商名称',
  162. dataIndex: 'os_vendname',
  163. width: 200
  164. }, {
  165. text: '结算账户',
  166. dataIndex: 'os_bankname',
  167. width: 150
  168. }, {
  169. text: '付款金额(元)',
  170. xtype: 'numbercolumn',
  171. dataIndex: 'os_amount',
  172. width: 110,
  173. renderer: function(v, m, r) {
  174. return saas.util.BaseUtil.numberFormat(v, 2, true);
  175. }
  176. }, {
  177. text: '币别',
  178. dataIndex: 'os_currency',
  179. width: 120
  180. } ,{
  181. text: '汇率(%)',
  182. dataIndex: 'os_rate',
  183. xtype: 'numbercolumn',
  184. width: 120,
  185. renderer: function(v, m, r) {
  186. return saas.util.BaseUtil.numberFormat(v, 6, false);
  187. },
  188. } ,{
  189. text: '单据状态',
  190. align: 'center',
  191. dataIndex: 'os_status',
  192. width: 90
  193. }, {
  194. text: '支出类别',
  195. dataIndex: 'osd_type',
  196. width: 110
  197. }, {
  198. text: '明细金额(元)',
  199. xtype: 'numbercolumn',
  200. dataIndex: 'osd_nowbalance',
  201. width: 110,
  202. renderer: function(v, m, r) {
  203. return saas.util.BaseUtil.numberFormat(v, 2, true);
  204. },
  205. }, {
  206. text: '备注',
  207. dataIndex: 'osd_remark',
  208. width: 250
  209. }]
  210. }
  211. });
  212. this.callParent(arguments);
  213. },
  214. });