QueryPanel.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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: 'condatefield',
  13. name: 'vc_date',
  14. fieldLabel: '日期',
  15. columnWidth: 0.5,
  16. operation: 'between'
  17. }, {
  18. xtype: 'customerDbfindTrigger',
  19. name: 'vc_custname',
  20. fieldLabel: '客户',
  21. emptyText :'请输入客户编号或名称'
  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: 'employeeDbfindTrigger',
  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: 'employeeDbfindTrigger',
  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. baseColumn: [{
  78. text: 'id',
  79. dataIndex: 'id',
  80. width: 100,
  81. xtype: 'numbercolumn',
  82. hidden: true
  83. }, {
  84. text: '单据编号',
  85. dataIndex: 'vc_code',
  86. width: 180
  87. }, {
  88. text: '单据日期',
  89. dataIndex: 'vc_date',
  90. xtype: 'datecolumn',
  91. width: 100
  92. },{
  93. text: '审核状态',
  94. align: 'center',
  95. dataIndex: 'vc_status',
  96. width: 100
  97. },{
  98. text: '业务类型',
  99. dataIndex: 'vc_kind',
  100. width: 100
  101. }, {
  102. text: '客户编号',
  103. dataIndex: 'vc_custcode',
  104. hidden: true
  105. }, {
  106. text: '客户名称',
  107. dataIndex: 'vc_custname',
  108. width: 130
  109. }, {
  110. text: '供应商编号',
  111. dataIndex: 'vc_vendcode',
  112. hidden: true
  113. }, {
  114. text: '供应商名称',
  115. dataIndex: 'vc_vendname',
  116. width: 130
  117. }, {
  118. text: '核销金额',
  119. dataIndex: 'vc_amount1',
  120. xtype: 'numbercolumn',
  121. width: 100,
  122. renderer : function(v) {
  123. var arr = (v + '.').split('.');
  124. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  125. var format = '0,000.' + xr.join();
  126. return Ext.util.Format.number(v, format);
  127. }
  128. }]
  129. }
  130. });