QueryPanel.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. }, {
  12. xtype: 'customerDbfindTrigger',
  13. name: 'vc_custname',
  14. margin:'0 0 0 20',
  15. emptyText :'请输入客户编号或名称'
  16. },{
  17. xtype: 'condatefield',
  18. name: 'vc_date',
  19. fieldLabel: '日期',
  20. columnWidth: 0.5,
  21. operation: 'between'
  22. }, {
  23. xtype: 'vendorDbfindTrigger',
  24. name: 'vc_vendname',
  25. fieldLabel: '供应商',
  26. emptyText :'请输入供应商编号或名称'
  27. },{
  28. xtype: 'combobox',
  29. name: 'vc_statuscode',
  30. fieldLabel: '审核状态',
  31. queryMode: 'local',
  32. displayField: 'name',
  33. valueField: 'value',
  34. emptyText :'全部',
  35. editable:false,
  36. store: Ext.create('Ext.data.ArrayStore', {
  37. fields: ['value', 'name'],
  38. data: [
  39. ["ALL", "全部"],
  40. ["AUDITED", "已审核"],
  41. ["UNAUDITED", "未审核"]
  42. ]
  43. }),
  44. getCondition: function(value) {
  45. if(value == 'ALL') {
  46. return '1=1';
  47. }else {
  48. return 'vc_statuscode=\'' + value + '\'';
  49. }
  50. }
  51. }, {
  52. xtype: 'accountDbfindTrigger',
  53. name: 'creatorName',
  54. fieldLabel: '录入人',
  55. emptyText:'请输入账户名称或姓名',
  56. getCondition: function(value) {
  57. if(!value) {
  58. return '1=1';
  59. }else {
  60. return 'verification.creatorName like\'%' + value + '%\'';
  61. }
  62. }
  63. }, {
  64. xtype: 'accountDbfindTrigger',
  65. name: 'vc_auditman',
  66. fieldLabel: '审核人',
  67. emptyText:'请输入账户名称或姓名'
  68. }],
  69. moreQueryFormItems: [],
  70. queryGridConfig: {
  71. idField: 'vc_id',
  72. codeField: 'vc_code',
  73. addTitle: '核销单',
  74. addXtype: 'money-verification-formpanel',
  75. defaultCondition:'',
  76. baseVastUrl: '/api/money/verification/',
  77. caller: 'Verification',
  78. baseColumn: [{
  79. text: 'id',
  80. dataIndex: 'id',
  81. width: 100,
  82. xtype: 'numbercolumn',
  83. hidden: true
  84. }, {
  85. text: '单据编号',
  86. dataIndex: 'vc_code',
  87. width: 180
  88. }, {
  89. text: '单据日期',
  90. dataIndex: 'vc_date',
  91. xtype: 'datecolumn',
  92. width: 100
  93. },{
  94. text: '审核状态',
  95. align: 'center',
  96. dataIndex: 'vc_status',
  97. width: 80
  98. },{
  99. text: '业务类型',
  100. dataIndex: 'vc_kind',
  101. width: 100
  102. }, {
  103. text: '客户编号',
  104. dataIndex: 'vc_custcode',
  105. hidden: true
  106. }, {
  107. text: '客户名称',
  108. dataIndex: 'vc_custname',
  109. width: 200
  110. }, {
  111. text: '供应商编号',
  112. dataIndex: 'vc_vendcode',
  113. hidden: true
  114. }, {
  115. text: '供应商名称',
  116. dataIndex: 'vc_vendname',
  117. width: 200
  118. }, {
  119. text: '核销金额(元)',
  120. dataIndex: 'vc_amount1',
  121. xtype: 'numbercolumn',
  122. width: 100,
  123. renderer : function(v) {
  124. return saas.util.BaseUtil.numberFormat(v, 2, true);
  125. }
  126. }]
  127. }
  128. });