QueryPanel.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. initComponent: function () {
  8. Ext.apply(this, {
  9. queryFormItems: [{
  10. xtype: 'textfield',
  11. name: 'vc_code',
  12. emptyText: '请输入单号'
  13. }, {
  14. xtype: 'customerDbfindTrigger',
  15. name: 'vc_custname',
  16. margin: '0 0 0 20',
  17. emptyText: '请输入客户编号或名称'
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'vc_date',
  21. fieldLabel: '日期',
  22. columnWidth: 0.5,
  23. operation: 'between'
  24. }, {
  25. xtype: 'vendorDbfindTrigger',
  26. name: 'vc_vendname',
  27. fieldLabel: '供应商',
  28. emptyText: '请输入供应商编号或名称'
  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: 'accountDbfindTrigger',
  55. name: 'creatorName',
  56. fieldLabel: '录入人',
  57. emptyText: '请输入账户名称或姓名',
  58. getCondition: function (value) {
  59. if (!value) {
  60. return '1=1';
  61. } else {
  62. return 'verification.creatorName like\'%' + value + '%\'';
  63. }
  64. }
  65. }, {
  66. xtype: 'accountDbfindTrigger',
  67. name: 'vc_auditman',
  68. fieldLabel: '审核人',
  69. emptyText: '请输入账户名称或姓名'
  70. }],
  71. moreQueryFormItems: [],
  72. queryGridConfig: {
  73. idField: 'vc_id',
  74. codeField: 'vc_code',
  75. addTitle: '核销单',
  76. addXtype: 'money-verification-formpanel',
  77. defaultCondition: '',
  78. baseVastUrl: '/api/money/verification/',
  79. caller: 'Verification',
  80. baseColumn: [{
  81. text: 'id',
  82. dataIndex: 'id',
  83. width: 100,
  84. xtype: 'numbercolumn',
  85. hidden: true
  86. }, {
  87. text: '单据编号',
  88. dataIndex: 'vc_code',
  89. width: 180
  90. }, {
  91. text: '单据日期',
  92. dataIndex: 'vc_date',
  93. xtype: 'datecolumn',
  94. width: 100
  95. }, {
  96. text: '审核状态',
  97. align: 'center',
  98. dataIndex: 'vc_status',
  99. width: 80
  100. }, {
  101. text: '业务类型',
  102. dataIndex: 'vc_kind',
  103. width: 100
  104. }, {
  105. text: '客户编号',
  106. dataIndex: 'vc_custcode',
  107. hidden: true
  108. }, {
  109. text: '客户名称',
  110. dataIndex: 'vc_custname',
  111. width: 200
  112. }, {
  113. text: '供应商编号',
  114. dataIndex: 'vc_vendcode',
  115. hidden: true
  116. }, {
  117. text: '供应商名称',
  118. dataIndex: 'vc_vendname',
  119. width: 200
  120. }, {
  121. text: '核销金额(元)',
  122. dataIndex: 'vc_amount1',
  123. xtype: 'numbercolumn',
  124. width: 110,
  125. renderer: function(v, m, r) {
  126. return saas.util.BaseUtil.numberFormat(v, 2, true);
  127. }
  128. }]
  129. }
  130. });
  131. this.callParent(arguments);
  132. },
  133. });