QueryPanel.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. Ext.define('saas.view.money.verification.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'money-verification-querypanel',
  4. controller: 'money-verification-querypanel',
  5. viewModel: 'money-verification-querypanel',
  6. viewName: 'money-verification-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'vc_code',
  10. emptyText :'请输入单号或者供应商名或者客户名',
  11. style:{paddingLeft: '95px'},
  12. getCondition: function(value) {
  13. if(value == 'ALL') {
  14. return '1=1';
  15. }else {
  16. return ' (vc_code like\'%' + value + '%\' '
  17. +' or vc_vendcode like \'%'+value+'%\' '
  18. +' or vc_vendname like \'%'+value+'%\' '
  19. +' or vc_custname like \'%'+value+'%\' '
  20. +' or vc_custcode like \'%'+value+'%\') ';
  21. }
  22. }
  23. },{
  24. xtype: 'condatefield',
  25. name: 'vc_date',
  26. fieldLabel: '单据日期',
  27. columnWidth: 0.5,
  28. operation: 'between'
  29. },{
  30. xtype: 'combobox',
  31. name: 'vc_statuscode',
  32. fieldLabel: '审核状态',
  33. queryMode: 'local',
  34. displayField: 'name',
  35. valueField: 'value',
  36. emptyText :'全部',
  37. editable:false,
  38. store: Ext.create('Ext.data.ArrayStore', {
  39. fields: ['value', 'name'],
  40. data: [
  41. ["ALL", "全部"],
  42. ["AUDITED", "已审核"],
  43. ["UNAUDITED", "未审核"]
  44. ]
  45. }),
  46. getCondition: function(value) {
  47. if(value == 'ALL') {
  48. return '1=1';
  49. }else {
  50. return 'vc_statuscode=\'' + value + '\'';
  51. }
  52. }
  53. },{
  54. xtype: 'combobox',
  55. name: 'vc_kind',
  56. fieldLabel: '业务类型',
  57. queryMode: 'local',
  58. displayField: 'name',
  59. valueField: 'value',
  60. emptyText :'全部',
  61. editable:false,
  62. store: Ext.create('Ext.data.ArrayStore', {
  63. fields: ['value', 'name'],
  64. data: [
  65. ["ALL", "全部"],
  66. ["预收冲应收", "预收冲应收"],
  67. ["预付冲应付", "预付冲应付"],
  68. ["应收冲应付", "应收冲应付"],
  69. ["应收转应收", "应收转应收"],
  70. ["应付转应付", "应付转应付"]
  71. ]
  72. }),
  73. getCondition: function(value) {
  74. if(value == 'ALL') {
  75. return '1=1';
  76. }else {
  77. return 'vc_kind=\'' + value + '\'';
  78. }
  79. }
  80. }],
  81. moreQueryFormItems: [],
  82. queryGridConfig: {
  83. idField: 'id',
  84. codeField: 'vc_code',
  85. addTitle: '核销单',
  86. addXtype: 'money-verification-formpanel',
  87. defaultCondition:'',
  88. baseVastUrl: '/api/money/verification/',
  89. baseColumn: [{
  90. text: 'id',
  91. dataIndex: 'id',
  92. width: 100,
  93. xtype: 'numbercolumn',
  94. hidden: true
  95. }, {
  96. text: '单据编号',
  97. dataIndex: 'vc_code',
  98. width: 200
  99. }, {
  100. text: '审核状态',
  101. dataIndex: 'vc_status',
  102. width: 120
  103. }, {
  104. text: '业务类型',
  105. dataIndex: 'vc_kind',
  106. width: 200
  107. }, {
  108. text: '客户编号',
  109. dataIndex: 'vc_custcode',
  110. hidden: true
  111. }, {
  112. text: '客户名称',
  113. dataIndex: 'vc_custname',
  114. }, {
  115. text: '供应商名称',
  116. dataIndex: 'vc_vendcode'
  117. }, {
  118. text: '核销金额',
  119. dataIndex: 'vc_amount1',
  120. xtype: 'numbercolumn',
  121. width: 120,
  122. flex: 1,
  123. hidden: true
  124. }]
  125. }
  126. });