QueryPanel.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. labelWidth: 100,
  12. getCondition: function(value) {
  13. return ' (or_code like\'%' + value + '%\''
  14. +' or or_custcode like \'%'+value+'%\''
  15. +' or or_custname like \'%'+value+'%\''
  16. +' or or_bankcode like \'%'+value+'%\''
  17. +' or or_bankname like \'%'+value+'%\''
  18. +') ';
  19. }
  20. }, {
  21. xtype: 'condatefield',
  22. name: 'or_date',
  23. fieldLabel: '日期',
  24. columnWidth: 0.5,
  25. operation: 'between'
  26. } , {
  27. name: 'ord_type',
  28. fieldLabel: '收入类别',
  29. xtype : "remotecombo",
  30. columnWidth: 0.25,
  31. emptyText :'全部',
  32. storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
  33. hiddenBtn:true,//true 则会关闭新增按钮功能
  34. getCondition: function(value) {
  35. if(!value) {
  36. return '1=1';
  37. }else {
  38. return 'ord_type like \'%' + value + '%\'';
  39. }
  40. }
  41. }, {
  42. xtype: 'combobox',
  43. name: 'or_statuscode',
  44. fieldLabel: '状态',
  45. queryMode: 'local',
  46. displayField: 'or_status',
  47. valueField: 'or_statuscode',
  48. emptyText :'全部',
  49. columnWidth: 0.25,
  50. editable:false,
  51. store: Ext.create('Ext.data.ArrayStore', {
  52. fields: ['or_statuscode', 'or_status'],
  53. data: [
  54. ["ALL", "全部"],
  55. ["AUDITED", "已审核"],
  56. ["UNAUDITED", "未审核"]
  57. ]
  58. }),
  59. getCondition: function(value) {
  60. if(value == 'ALL') {
  61. return '1=1';
  62. }else {
  63. return 'or_statuscode=\'' + value + '\'';
  64. }
  65. }
  66. }],
  67. moreQueryFormItems: [],
  68. queryGridConfig: {
  69. idField: 'id',
  70. codeField: 'or_code',
  71. addTitle: '其它收入单',
  72. addXtype: 'money-othreceipts-formpanel',
  73. defaultCondition:'',
  74. baseVastUrl: '/api/money/othreceipts/',
  75. baseColumn: [{
  76. text: 'id',
  77. dataIndex: 'id',
  78. hidden:true
  79. }, {
  80. text: '单据编号',
  81. dataIndex: 'or_code',
  82. width: 150
  83. } ,{
  84. text: '日期',
  85. dataIndex: 'or_date',
  86. xtype: 'datecolumn',
  87. width: 110
  88. }, {
  89. text: '客户名称',
  90. dataIndex: 'or_custname',
  91. width: 250
  92. }, {
  93. text: '结算账户',
  94. dataIndex: 'or_bankname',
  95. width: 150
  96. }, {
  97. text: '收款金额',
  98. xtype: 'numbercolumn',
  99. dataIndex: 'or_amount',
  100. width: 110,
  101. renderer : function(v) {
  102. var arr = (v + '.').split('.');
  103. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  104. var format = '0,000.' + xr.join();
  105. return Ext.util.Format.number(v, format);
  106. }
  107. }, {
  108. text: '单据状态',
  109. dataIndex: 'or_status',
  110. width: 90
  111. }, {
  112. text: '录入人',
  113. dataIndex: 'creatorName',
  114. width: 110
  115. },{
  116. text: '审核人',
  117. dataIndex: 'or_auditman',
  118. width: 110
  119. }, {
  120. text: '备注',
  121. dataIndex: 'or_remark',
  122. width: 250
  123. }],
  124. relativeColumn: []
  125. }
  126. });