QueryPanel.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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: 'hidden',
  9. name: 'or_id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. columnWidth: 0
  13. }, {
  14. xtype : 'hidden',
  15. name : 'or_custid',
  16. fieldLabel : '客户ID'
  17. }, {
  18. xtype: 'textfield',
  19. name: 'or_code',
  20. fieldLabel: '单据编号',
  21. }, {
  22. xtype: 'hidden',
  23. name: 'or_custcode',
  24. fieldLabel: '客户编号'
  25. }, {
  26. xtype: 'dbfindtrigger',
  27. name: 'or_custname',
  28. fieldLabel: '客户名称',
  29. }, {
  30. xtype: 'textfield',
  31. name: 'or_recorder',
  32. fieldLabel: '制单人'
  33. },{
  34. xtype: 'textfield',
  35. name: 'or_auditman',
  36. fieldLabel: '审核人'
  37. }, {
  38. xtype: 'dbfindtrigger',
  39. name: 'or_bankname',
  40. fieldLabel: '结算账户'
  41. }, {
  42. xtype: 'condatefield',
  43. name: 'or_date',
  44. fieldLabel: '单据日期',
  45. columnWidth: 0.5,
  46. operation: 'between'
  47. },{
  48. xtype: 'combobox',
  49. name: 'or_statuscode',
  50. fieldLabel: '审核状态',
  51. queryMode: 'local',
  52. displayField: 'or_status',
  53. valueField: 'or_statuscode',
  54. emptyText :'全部',
  55. editable:false,
  56. store: Ext.create('Ext.data.ArrayStore', {
  57. fields: ['or_statuscode', 'or_status'],
  58. data: [
  59. ["ALL", "全部"],
  60. ["AUDITED", "已审核"],
  61. ["UNAUDITED", "未审核"]
  62. ]
  63. }),
  64. getCondition: function(value) {
  65. if(value == 'ALL') {
  66. return '1=1';
  67. }else {
  68. return 'or_statuscode=\'' + value + '\'';
  69. }
  70. }
  71. }, {
  72. name: 'ord_type',
  73. fieldLabel: '收入类别',
  74. xtype : "remotecombo",
  75. storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
  76. },{
  77. xtype: 'textfield',
  78. name: 'creatorName',
  79. fieldLabel: '录入人'
  80. }],
  81. moreQueryFormItems: [],
  82. queryGridConfig: {
  83. idField: 'id',
  84. codeField: 'or_code',
  85. addTitle: '其它收入单',
  86. addXtype: 'money-othreceipts-formpanel',
  87. defaultCondition:'',
  88. baseVastUrl: '/api/money/othreceipts/',
  89. baseColumn: [{
  90. text: 'id',
  91. dataIndex: 'id',
  92. width: 0,
  93. xtype: 'numbercolumn'
  94. }, {
  95. text: '单据编号',
  96. dataIndex: 'or_code',
  97. width: 200
  98. },{
  99. text: '单据日期',
  100. dataIndex: 'or_date',
  101. xtype: 'datecolumn',
  102. width: 200
  103. }, {
  104. text: '审核状态',
  105. dataIndex: 'or_status',
  106. width: 120
  107. }, {
  108. text: '客户名称',
  109. dataIndex: 'or_custname',
  110. width: 120
  111. }, {
  112. text: '结算账户',
  113. dataIndex: 'or_bankname',
  114. width: 120
  115. },{
  116. text: '收款金额',
  117. xtype: 'numbercolumn',
  118. dataIndex: 'or_amount',
  119. width: 120,
  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. dataIndex: 'or_recorder',
  129. width: 120
  130. },{
  131. text: '审核人',
  132. dataIndex: 'or_auditman',
  133. width: 120
  134. }, {
  135. text: '收入类别',
  136. dataIndex: 'ord_type',
  137. width: 120
  138. }, {
  139. text: '明细金额',
  140. xtype: 'numbercolumn',
  141. dataIndex: 'ord_nowbalance',
  142. width: 120,
  143. renderer : function(v) {
  144. var arr = (v + '.').split('.');
  145. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  146. var format = '0,000.' + xr.join();
  147. return Ext.util.Format.number(v, format);
  148. }
  149. }, {
  150. text: '备注',
  151. dataIndex: 'ord_remark',
  152. width: 250
  153. }],
  154. relativeColumn: []
  155. }
  156. });