QueryPanel.js 3.8 KB

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