QueryPanel.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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: 'or_remark',
  135. width: 250
  136. }],
  137. relativeColumn: [{
  138. text: 'id',
  139. dataIndex: 'id',
  140. hidden:true
  141. }, {
  142. text: '单据编号',
  143. dataIndex: 'or_code',
  144. width: 150
  145. } ,{
  146. text: '日期',
  147. dataIndex: 'or_date',
  148. xtype: 'datecolumn',
  149. width: 110
  150. }, {
  151. text: '客户名称',
  152. dataIndex: 'or_custname',
  153. width: 250
  154. }, {
  155. text: '结算账户',
  156. dataIndex: 'or_bankname',
  157. width: 150
  158. }, {
  159. text: '收款金额(元)',
  160. xtype: 'numbercolumn',
  161. dataIndex: 'or_amount',
  162. width: 110,
  163. renderer : function(v) {
  164. var arr = (v + '.').split('.');
  165. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  166. var format = '0,000.' + xr.join('');
  167. return Ext.util.Format.number(v, format);
  168. }
  169. }, {
  170. text: '单据状态',
  171. align: 'center',
  172. dataIndex: 'or_status',
  173. width: 90
  174. },{
  175. text: '收入类别',
  176. dataIndex: 'ord_type',
  177. width: 110
  178. } ,{
  179. text: '明细金额(元)',
  180. dataIndex: 'ord_nowbalance',
  181. width: 110
  182. } ,{
  183. text: '备注',
  184. dataIndex: 'ord_remark',
  185. width: 250
  186. }]
  187. }
  188. });