QueryPanel.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. Ext.define('saas.view.money.othreceipts.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'money-othreceipts-querypanel',
  4. controller: 'money-othreceipts-querypanel',
  5. viewModel: 'money-othreceipts-querypanel',
  6. viewName: 'money-othreceipts-querypanel',
  7. initComponent: function () {
  8. Ext.apply(this, {
  9. queryFormItems: [{
  10. xtype: 'textfield',
  11. name: 'or_code',
  12. emptyText: '请输入单号'
  13. }, {
  14. xtype: "customerDbfindTrigger",
  15. name: "or_custname",
  16. margin: '0 0 0 20',
  17. emptyText: '请输入客户编号或名称'
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'or_date',
  21. fieldLabel: '日期',
  22. columnWidth: 0.5,
  23. operation: 'between'
  24. }, {
  25. name: 'ord_type',
  26. fieldLabel: '收入类别',
  27. xtype: "remotecombo",
  28. columnWidth: 0.25,
  29. emptyText: '全部',
  30. showDetail: true,
  31. storeUrl: '/api/document/fundinouttype/getCombo?condition=收入',
  32. hiddenBtn: true, //true 则会关闭新增按钮功能
  33. getCondition: function (value) {
  34. if (!value) {
  35. return '1=1';
  36. } else {
  37. return 'ord_type like \'%' + value + '%\'';
  38. }
  39. }
  40. }, {
  41. xtype: "bandinfoDbfindTrigger",
  42. name: "or_bankname",
  43. fieldLabel: "账户名称",
  44. emptyText: '请输入账户编号或名称'
  45. }, {
  46. xtype: 'combobox',
  47. name: 'or_statuscode',
  48. fieldLabel: '单据状态',
  49. queryMode: 'local',
  50. displayField: 'or_status',
  51. valueField: 'or_statuscode',
  52. emptyText: '全部',
  53. columnWidth: 0.25,
  54. editable: false,
  55. store: Ext.create('Ext.data.ArrayStore', {
  56. fields: ['or_statuscode', 'or_status'],
  57. data: [
  58. ["ALL", "全部"],
  59. ["AUDITED", "已审核"],
  60. ["UNAUDITED", "未审核"]
  61. ]
  62. }),
  63. getCondition: function (value) {
  64. if (value == 'ALL') {
  65. return '1=1';
  66. } else {
  67. return 'or_statuscode=\'' + value + '\'';
  68. }
  69. }
  70. }, {
  71. xtype: 'accountDbfindTrigger',
  72. name: 'creatorName',
  73. fieldLabel: '录入人',
  74. emptyText: '请输入账户名称或姓名',
  75. getCondition: function (value) {
  76. if (!value) {
  77. return '1=1';
  78. } else {
  79. return 'othreceipts.creatorName like\'%' + value + '%\'';
  80. }
  81. }
  82. }, {
  83. xtype: 'accountDbfindTrigger',
  84. name: 'or_auditman',
  85. fieldLabel: '审核人',
  86. emptyText: '请输入账户名称或姓名'
  87. }],
  88. moreQueryFormItems: [],
  89. queryGridConfig: {
  90. idField: 'id',
  91. codeField: 'or_code',
  92. addTitle: '其它收入单',
  93. addXtype: 'money-othreceipts-formpanel',
  94. defaultCondition: '',
  95. baseVastUrl: '/api/money/othreceipts/',
  96. caller: 'OthReceipts',
  97. baseColumn: [{
  98. text: 'id',
  99. dataIndex: 'id',
  100. hidden: true
  101. }, {
  102. text: '单据编号',
  103. dataIndex: 'or_code',
  104. width: 150
  105. }, {
  106. text: '日期',
  107. dataIndex: 'or_date',
  108. xtype: 'datecolumn',
  109. width: 110
  110. }, {
  111. text: '客户名称',
  112. dataIndex: 'or_custname',
  113. width: 200
  114. }, {
  115. text: '结算账户',
  116. dataIndex: 'or_bankname',
  117. width: 150
  118. }, {
  119. text: '收款金额(元)',
  120. xtype: 'numbercolumn',
  121. dataIndex: 'or_amount',
  122. width: 110,
  123. renderer: function(v, m, r) {
  124. return saas.util.BaseUtil.numberFormat(v, 2, true);
  125. }
  126. }, {
  127. text: '币别',
  128. dataIndex: 'or_currency',
  129. align:'center',
  130. width: 65
  131. } ,{
  132. text: '汇率',
  133. dataIndex: 'or_rate',
  134. xtype: 'numbercolumn',
  135. width: 80,
  136. renderer: function(v, m, r) {
  137. return saas.util.BaseUtil.numberFormat(v, 6, false);
  138. },
  139. } ,{
  140. text: '单据状态',
  141. align: 'center',
  142. dataIndex: 'or_status',
  143. width: 90
  144. }, {
  145. text: '备注',
  146. dataIndex: 'or_remark',
  147. width: 250
  148. }],
  149. relativeColumn: [{
  150. text: 'id',
  151. dataIndex: 'id',
  152. hidden: true
  153. }, {
  154. text: '单据编号',
  155. dataIndex: 'or_code',
  156. width: 150
  157. }, {
  158. text: '日期',
  159. dataIndex: 'or_date',
  160. xtype: 'datecolumn',
  161. width: 110
  162. }, {
  163. text: '客户名称',
  164. dataIndex: 'or_custname',
  165. width: 200
  166. }, {
  167. text: '结算账户',
  168. dataIndex: 'or_bankname',
  169. width: 150
  170. }, {
  171. text: '收款金额(元)',
  172. xtype: 'numbercolumn',
  173. dataIndex: 'or_amount',
  174. width: 110,
  175. renderer: function(v, m, r) {
  176. return saas.util.BaseUtil.numberFormat(v, 2, true);
  177. }
  178. }, {
  179. text: '币别',
  180. dataIndex: 'or_currency',
  181. align:'center',
  182. width: 65
  183. } ,{
  184. text: '汇率',
  185. dataIndex: 'or_rate',
  186. xtype: 'numbercolumn',
  187. width: 80,
  188. renderer: function(v, m, r) {
  189. return saas.util.BaseUtil.numberFormat(v, 6, false);
  190. },
  191. } ,{
  192. text: '单据状态',
  193. align: 'center',
  194. dataIndex: 'or_status',
  195. width: 90
  196. }, {
  197. text: '收入类别',
  198. dataIndex: 'ord_type',
  199. width: 110
  200. }, {
  201. text: '明细金额(元)',
  202. xtype: 'numbercolumn',
  203. dataIndex: 'ord_nowbalance',
  204. width: 110,
  205. renderer: function(v, m, r) {
  206. return saas.util.BaseUtil.numberFormat(v, 2, true);
  207. },
  208. }, {
  209. text: '备注',
  210. dataIndex: 'ord_remark',
  211. width: 250
  212. }]
  213. }
  214. });
  215. this.callParent(arguments);
  216. },
  217. });