QueryPanel.js 3.8 KB

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