QueryPanel.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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: 'employeeDbfindTrigger',
  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: 'employeeDbfindTrigger',
  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. baseColumn: [{
  95. text: 'id',
  96. dataIndex: 'id',
  97. hidden:true
  98. }, {
  99. text: '单据编号',
  100. dataIndex: 'or_code',
  101. width: 150
  102. } ,{
  103. text: '日期',
  104. dataIndex: 'or_date',
  105. xtype: 'datecolumn',
  106. width: 110
  107. }, {
  108. text: '客户名称',
  109. dataIndex: 'or_custname',
  110. width: 250
  111. }, {
  112. text: '结算账户',
  113. dataIndex: 'or_bankname',
  114. width: 150
  115. }, {
  116. text: '收款金额',
  117. xtype: 'numbercolumn',
  118. dataIndex: 'or_amount',
  119. width: 110,
  120. renderer : function(v) {
  121. var arr = (v + '.').split('.');
  122. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  123. var format = '0,000.' + xr.join();
  124. return Ext.util.Format.number(v, format);
  125. }
  126. }, {
  127. text: '单据状态',
  128. align: 'center',
  129. dataIndex: 'or_status',
  130. width: 90
  131. }, {
  132. text: '录入人',
  133. dataIndex: 'creatorName',
  134. width: 110
  135. },{
  136. text: '审核人',
  137. dataIndex: 'or_auditman',
  138. width: 110
  139. }, {
  140. text: '备注',
  141. dataIndex: 'or_remark',
  142. width: 250
  143. }],
  144. relativeColumn: [{
  145. text: 'id',
  146. dataIndex: 'id',
  147. hidden:true
  148. }, {
  149. text: '单据编号',
  150. dataIndex: 'or_code',
  151. width: 150
  152. } ,{
  153. text: '日期',
  154. dataIndex: 'or_date',
  155. xtype: 'datecolumn',
  156. width: 110
  157. }, {
  158. text: '客户名称',
  159. dataIndex: 'or_custname',
  160. width: 250
  161. }, {
  162. text: '结算账户',
  163. dataIndex: 'or_bankname',
  164. width: 150
  165. }, {
  166. text: '收款金额',
  167. xtype: 'numbercolumn',
  168. dataIndex: 'or_amount',
  169. width: 110,
  170. renderer : function(v) {
  171. var arr = (v + '.').split('.');
  172. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  173. var format = '0,000.' + xr.join();
  174. return Ext.util.Format.number(v, format);
  175. }
  176. }, {
  177. text: '单据状态',
  178. align: 'center',
  179. dataIndex: 'or_status',
  180. width: 90
  181. }, {
  182. text: '录入人',
  183. dataIndex: 'creatorName',
  184. width: 110
  185. },{
  186. text: '审核人',
  187. dataIndex: 'or_auditman',
  188. width: 110
  189. },{
  190. text: '收入类别',
  191. dataIndex: 'ord_type',
  192. width: 110
  193. } ,{
  194. text: '明细金额',
  195. dataIndex: 'ord_nowbalance',
  196. width: 110
  197. } ,{
  198. text: '备注',
  199. dataIndex: 'ord_remark',
  200. width: 250
  201. }]
  202. }
  203. });