QueryPanel.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. xtype: 'textfield',
  69. name: 'creatorName',
  70. fieldLabel: '录入人'
  71. }],
  72. moreQueryFormItems: [],
  73. queryGridConfig: {
  74. idField: 'id',
  75. codeField: 'os_code',
  76. addTitle: '其它支出单',
  77. addXtype: 'money-othspendings-formpanel',
  78. defaultCondition:'',
  79. baseVastUrl: '/api/money/othspendings/',
  80. // baseVastUrl: 'http://192.168.253.35:8880/othspendings/',
  81. baseColumn: [{
  82. text: 'id',
  83. dataIndex: 'id',
  84. width: 0,
  85. xtype: 'numbercolumn'
  86. }, {
  87. text: '单据编号',
  88. dataIndex: 'os_code',
  89. width: 200
  90. }, {
  91. text: '单据日期',
  92. dataIndex: 'os_date',
  93. xtype: 'datecolumn',
  94. width: 200
  95. },{
  96. text: '审核状态',
  97. dataIndex: 'os_status',
  98. width: 120
  99. }, {
  100. text: '供应商',
  101. dataIndex: 'os_vendname',
  102. width: 120
  103. },{
  104. text: '结算账户',
  105. dataIndex: 'os_bankname',
  106. width: 120
  107. },{
  108. text: '付款金额',
  109. dataIndex: 'os_amount',
  110. width: 120
  111. },{
  112. text: '录入人',
  113. dataIndex: 'os_recorder',
  114. width: 120
  115. }, {
  116. text: '支出类别',
  117. dataIndex: 'osd_type',
  118. width: 200
  119. }, {
  120. text: '金额',
  121. dataIndex: 'osd_nowbalance',
  122. xtype: 'numbercolumn',
  123. width: 120,
  124. renderer : function(v) {
  125. var arr = (v + '.').split('.');
  126. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  127. var format = '0,000.' + xr.join();
  128. return Ext.util.Format.number(v, format);
  129. }
  130. }, {
  131. text: '备注',
  132. dataIndex: 'osd_remark',
  133. width: 120
  134. },{
  135. text: '金额',
  136. xtype: 'numbercolumn',
  137. dataIndex: 'os_amount',
  138. width: 0,
  139. renderer : function(v) {
  140. var arr = (v + '.').split('.');
  141. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  142. var format = '0,000.' + xr.join();
  143. return Ext.util.Format.number(v, format);
  144. },
  145. }, {
  146. text: '备注',
  147. dataIndex: 'os_remark',
  148. width: 0
  149. }],
  150. relativeColumn: []
  151. }
  152. });