QueryPanel.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. queryFormItems: [ {
  8. xtype: 'textfield',
  9. name: 'or_code',
  10. emptyText:'请输入单号'
  11. }, {
  12. xtype: 'condatefield',
  13. name: 'or_date',
  14. fieldLabel: '日期',
  15. columnWidth: 0.5,
  16. operation: 'between'
  17. }, {
  18. xtype : "customerDbfindTrigger",
  19. name : "or_custname",
  20. fieldLabel : "客户",
  21. emptyText:'请输入客户编号或名称'
  22. }, {
  23. name: 'ord_type',
  24. fieldLabel: '收入类别',
  25. xtype : "remotecombo",
  26. columnWidth: 0.25,
  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 'ord_type like \'%' + value + '%\'';
  36. }
  37. }
  38. }, {
  39. xtype : "bandinfoDbfindTrigger",
  40. name : "or_bankname",
  41. fieldLabel : "账户名称",
  42. emptyText:'请输入账户编号或名称'
  43. }, {
  44. xtype: 'combobox',
  45. name: 'or_statuscode',
  46. fieldLabel: '单据状态',
  47. queryMode: 'local',
  48. displayField: 'or_status',
  49. valueField: 'or_statuscode',
  50. emptyText :'全部',
  51. columnWidth: 0.25,
  52. editable:false,
  53. store: Ext.create('Ext.data.ArrayStore', {
  54. fields: ['or_statuscode', 'or_status'],
  55. data: [
  56. ["ALL", "全部"],
  57. ["AUDITED", "已审核"],
  58. ["UNAUDITED", "未审核"]
  59. ]
  60. }),
  61. getCondition: function(value) {
  62. if(value == 'ALL') {
  63. return '1=1';
  64. }else {
  65. return 'or_statuscode=\'' + value + '\'';
  66. }
  67. }
  68. }, {
  69. xtype: 'accountDbfindTrigger',
  70. name: 'creatorName',
  71. fieldLabel: '录入人',
  72. emptyText:'请输入账户名称或姓名',
  73. getCondition: function(value) {
  74. if(!value) {
  75. return '1=1';
  76. }else {
  77. return 'othreceipts.creatorName like\'%' + value + '%\'';
  78. }
  79. }
  80. }, {
  81. xtype: 'accountDbfindTrigger',
  82. name: 'or_auditman',
  83. fieldLabel: '审核人',
  84. emptyText:'请输入账户名称或姓名'
  85. }],
  86. moreQueryFormItems: [],
  87. queryGridConfig: {
  88. idField: 'id',
  89. codeField: 'or_code',
  90. addTitle: '其它收入单',
  91. addXtype: 'money-othreceipts-formpanel',
  92. defaultCondition:'',
  93. baseVastUrl: '/api/money/othreceipts/',
  94. caller:'OthReceipts',
  95. baseColumn: [{
  96. text: 'id',
  97. dataIndex: 'id',
  98. hidden:true
  99. }, {
  100. text: '单据编号',
  101. dataIndex: 'or_code',
  102. width: 150
  103. } ,{
  104. text: '日期',
  105. dataIndex: 'or_date',
  106. xtype: 'datecolumn',
  107. width: 110
  108. }, {
  109. text: '客户名称',
  110. dataIndex: 'or_custname',
  111. width: 250
  112. }, {
  113. text: '结算账户',
  114. dataIndex: 'or_bankname',
  115. width: 150
  116. }, {
  117. text: '收款金额',
  118. xtype: 'numbercolumn',
  119. dataIndex: 'or_amount',
  120. width: 110,
  121. renderer : function(v) {
  122. var arr = (v + '.').split('.');
  123. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  124. var format = '0,000.' + xr.join('');
  125. return Ext.util.Format.number(v, format);
  126. }
  127. }, {
  128. text: '单据状态',
  129. align: 'center',
  130. dataIndex: 'or_status',
  131. width: 90
  132. }, {
  133. text: '录入人',
  134. dataIndex: 'creatorName',
  135. width: 110
  136. },{
  137. text: '审核人',
  138. dataIndex: 'or_auditman',
  139. width: 110
  140. }, {
  141. text: '备注',
  142. dataIndex: 'or_remark',
  143. width: 250
  144. }],
  145. relativeColumn: [{
  146. text: 'id',
  147. dataIndex: 'id',
  148. hidden:true
  149. }, {
  150. text: '单据编号',
  151. dataIndex: 'or_code',
  152. width: 150
  153. } ,{
  154. text: '日期',
  155. dataIndex: 'or_date',
  156. xtype: 'datecolumn',
  157. width: 110
  158. }, {
  159. text: '客户名称',
  160. dataIndex: 'or_custname',
  161. width: 250
  162. }, {
  163. text: '结算账户',
  164. dataIndex: 'or_bankname',
  165. width: 150
  166. }, {
  167. text: '收款金额',
  168. xtype: 'numbercolumn',
  169. dataIndex: 'or_amount',
  170. width: 110,
  171. renderer : function(v) {
  172. var arr = (v + '.').split('.');
  173. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  174. var format = '0,000.' + xr.join('');
  175. return Ext.util.Format.number(v, format);
  176. }
  177. }, {
  178. text: '单据状态',
  179. align: 'center',
  180. dataIndex: 'or_status',
  181. width: 90
  182. }, {
  183. text: '录入人',
  184. dataIndex: 'creatorName',
  185. width: 110
  186. },{
  187. text: '审核人',
  188. dataIndex: 'or_auditman',
  189. width: 110
  190. },{
  191. text: '收入类别',
  192. dataIndex: 'ord_type',
  193. width: 110
  194. } ,{
  195. text: '明细金额',
  196. dataIndex: 'ord_nowbalance',
  197. width: 110
  198. } ,{
  199. text: '备注',
  200. dataIndex: 'ord_remark',
  201. width: 250
  202. }]
  203. }
  204. });