Purchase.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. Ext.define('saas.view.purchase.report.Purchase', {
  2. extend: 'saas.view.core.report.ReportPanel',
  3. xtype: 'purchase-report-purchase',
  4. controller: 'purchase-report-purchase',
  5. viewModel: 'purchase-report-purchase',
  6. viewName: 'purchase-report-purchase',
  7. groupField: null,
  8. listUrl: '/api/purchase/purchase/list',
  9. defaultCondition: null,
  10. reportTitle: '采购明细报表',
  11. QueryWidth:0.1,
  12. //筛选:供应商、日期(必填)、业务状态
  13. searchItems: [ {
  14. xtype: 'dbfindtrigger',
  15. name: 'pu_vendname',
  16. fieldLabel: '供应商名称',
  17. columnWidth: 0.2
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'pu_date',
  21. fieldLabel: '单据日期',
  22. columnWidth: 0.5
  23. }, {
  24. xtype: 'multicombo',
  25. name: 'pu_acceptstatuscode',
  26. fieldLabel: '业务状态',
  27. columnWidth: 0.2,
  28. datas: [
  29. ["TURNIN", "已入库"],
  30. ["UNTURNIN", "未入库"],
  31. ["PART2IN", "部分入库"],
  32. ["CLOSE", "已关闭"]
  33. ]
  34. }],
  35. reportColumns: [
  36. {
  37. text: 'id',
  38. dataIndex: 'pu_id',
  39. hidden: true
  40. }, {
  41. text: '采购单号',
  42. dataIndex: 'pu_code',
  43. width: 200
  44. }, {
  45. text: '供应商编号',
  46. dataIndex: 'pu_vendcode',
  47. width: 200
  48. }, {
  49. text: '供应商名称',
  50. dataIndex: 'pu_vendname',
  51. width: 200
  52. }, {
  53. text: '业务状态',
  54. dataIndex: 'pu_acceptstatus'
  55. }, {
  56. text: '采购员',
  57. dataIndex: 'pu_buyername'
  58. }, {
  59. text: '单据日期',
  60. xtype: 'datecolumn',
  61. dataIndex: 'pu_date'
  62. }, {
  63. text: '序号',
  64. dataIndex: 'pd_detno',
  65. xtype: 'numbercolumn'
  66. }, {
  67. text: '物料编号',
  68. dataIndex: 'pd_prodcode'
  69. }, {
  70. text: '物料名称',
  71. dataIndex: 'pr_detail',
  72. renderer: function (v, m, r) {
  73. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  74. }
  75. }, {
  76. text: '物料规格',
  77. dataIndex: 'pr_spec',
  78. renderer: function (v, m, r) {
  79. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  80. }
  81. }, {
  82. text: '品牌',
  83. dataIndex: 'pr_brand',
  84. renderer: function (v, m, r) {
  85. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  86. }
  87. }, {
  88. text: '单位',
  89. dataIndex: 'pr_unit',
  90. renderer: function (v, m, r) {
  91. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  92. }
  93. }, {
  94. text: '采购数量',
  95. dataIndex: 'pd_qty',
  96. xtype: 'numbercolumn',
  97. summaryType: 'sum',
  98. summaryRenderer: function(v) {
  99. var arr = (v + '.').split('.');
  100. var xr = (new Array(arr[1].length)).fill('0');
  101. var format = '0.' + xr.join();
  102. return Ext.util.Format.number(v, format);
  103. }
  104. }, {
  105. text: '单价',
  106. dataIndex: 'pd_price',
  107. xtype: 'numbercolumn'
  108. }, {
  109. text: '税率',
  110. dataIndex: 'pd_taxrate',
  111. xtype: 'numbercolumn'
  112. }, {
  113. text: '金额',
  114. dataIndex: 'pd_total',
  115. xtype: 'numbercolumn',
  116. summaryType: 'sum',
  117. summaryRenderer: function(v) {
  118. var arr = (v + '.').split('.');
  119. var xr = (new Array(arr[1].length)).fill('0');
  120. var format = '0.' + xr.join();
  121. return Ext.util.Format.number(v, format);
  122. }
  123. }, {
  124. text: '不含税单价',
  125. dataIndex: 'pd_taxprice',
  126. xtype: 'numbercolumn'
  127. }, {
  128. text: '不含税金额',
  129. dataIndex: 'pd_taxtotal',
  130. xtype: 'numbercolumn'
  131. }, {
  132. text: '收货数量',
  133. dataIndex: 'pd_acceptqty',
  134. xtype: 'numbercolumn'
  135. }, {
  136. text: '收货金额',
  137. dataIndex: 'pd_accepttotal',
  138. xtype: 'numbercolumn'
  139. }, {
  140. text: '备注'
  141. }]
  142. });