QueryPanel.js 4.6 KB

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