QueryPanel.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. Ext.define('saas.view.money.othspendings.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'money-othspendings-querypanel',
  4. controller: 'money-othspendings-querypanel',
  5. viewModel: 'money-othspendings-querypanel',
  6. viewName: 'money-othspendings-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'os_id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. columnWidth: 0,
  13. getCondition: function(value) {
  14. return 'os_id=' + value;
  15. }
  16. },{
  17. xtype: 'textfield',
  18. name: 'os_code',
  19. fieldLabel: '单号/客户/账号',
  20. emptyText:'请输入单号/客户/账号',
  21. labelWidth: 100,
  22. getCondition: function(value) {
  23. if(value == 'ALL') {
  24. return '1=1';
  25. }else {
  26. return ' (os_code like\'%' + value + '%\''
  27. +' or os_vendcode like \'%'+value+'%\''
  28. +' or os_vendname like \'%'+value+'%\''
  29. +' or os_bankcode like \'%'+value+'%\''
  30. +' or os_bankname like \'%'+value+'%\''
  31. +') ';
  32. }
  33. }
  34. },{
  35. xtype: 'condatefield',
  36. name: 'os_date',
  37. columnWidth: 0.5,
  38. fieldLabel: '日期'
  39. },{
  40. name: 'ord_type',
  41. fieldLabel: '支出类别',
  42. xtype : "remotecombo",
  43. emptyText :'全部',
  44. storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
  45. hiddenBtn:true,//true 则会关闭新增按钮功能
  46. getCondition: function(value) {
  47. if(!value) {
  48. return '1=1';
  49. }else {
  50. return 'ord_type like \'%' + value + '%\'';
  51. }
  52. }
  53. },{
  54. xtype: 'combobox',
  55. name: 'os_statuscode',
  56. fieldLabel: '状态',
  57. queryMode: 'local',
  58. displayField: 'os_status',
  59. valueField: 'os_statuscode',
  60. emptyText :'全部',
  61. editable:false,
  62. store: Ext.create('Ext.data.ArrayStore', {
  63. fields: ['os_statuscode', 'os_status'],
  64. data: [
  65. ["ALL", "全部"],
  66. ["AUDITED", "已审核"],
  67. ["UNAUDITED", "未审核"]
  68. ]
  69. }),
  70. getCondition: function(value) {
  71. if(value == 'ALL') {
  72. return '1=1';
  73. }else {
  74. return 'os_statuscode=\'' + value + '\'';
  75. }
  76. }
  77. }],
  78. moreQueryFormItems: [],
  79. queryGridConfig: {
  80. idField: 'id',
  81. codeField: 'os_code',
  82. addTitle: '其它支出单',
  83. addXtype: 'money-othspendings-formpanel',
  84. defaultCondition:'',
  85. baseVastUrl: '/api/money/othspendings/',
  86. baseColumn: [{
  87. text: 'id',
  88. dataIndex: 'id',
  89. hidden:true,
  90. xtype: 'numbercolumn'
  91. }, {
  92. text: '单据编号',
  93. dataIndex: 'os_code',
  94. width: 150
  95. }, {
  96. text: '日期',
  97. dataIndex: 'os_date',
  98. xtype: 'datecolumn',
  99. width: 110
  100. },{
  101. text: '审核状态',
  102. dataIndex: 'os_status',
  103. width: 90
  104. }, {
  105. text: '供应商',
  106. dataIndex: 'os_vendname',
  107. width:250
  108. },{
  109. text: '结算账户',
  110. dataIndex: 'os_bankname',
  111. width: 150
  112. },{
  113. text: '付款金额',
  114. dataIndex: 'os_amount',
  115. width: 110,
  116. renderer : function(v) {
  117. var arr = (v + '.').split('.');
  118. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  119. var format = '0,000.' + xr.join();
  120. return Ext.util.Format.number(v, format);
  121. }
  122. }, {
  123. text: '单据状态',
  124. dataIndex: 'os_status',
  125. width: 90
  126. },{
  127. text: '录入人',
  128. dataIndex: 'creatorName',
  129. width: 110
  130. }, {
  131. text: '审核人',
  132. dataIndex: 'os_auditman',
  133. width: 110
  134. }, {
  135. text: '备注',
  136. dataIndex: 'os_remark',
  137. width: 250
  138. }],
  139. relativeColumn: []
  140. }
  141. });