QueryPanel.js 4.3 KB

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