Purchase.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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/report/purchaseDetail',
  9. defaultCondition: null,
  10. reportTitle: '采购明细报表',
  11. QueryWidth: 0.2,
  12. //筛选:供应商、日期(必填)、业务状态
  13. searchItems: [{
  14. xtype: 'vendorDbfindTrigger',
  15. name: 'pu_vendname',
  16. fieldLabel: '供应商名称',
  17. columnWidth: 0.2
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'pu_date',
  21. fieldLabel: '单据日期',
  22. columnWidth: 0.4
  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. reportModel: 'saas.model.report.Purchase',
  36. reportColumns: [{
  37. text: 'id',
  38. dataIndex: 'pu_id',
  39. hidden: true
  40. }, {
  41. text: '采购单号',
  42. dataIndex: 'pu_code',
  43. width: 150
  44. }, {
  45. text: '供应商名称',
  46. dataIndex: 'pu_vendname',
  47. width: 200
  48. }, {
  49. text: '业务状态',
  50. dataIndex: 'pu_acceptstatus',
  51. width: 80
  52. }, {
  53. text: '采购员',
  54. dataIndex: 'pu_buyername',
  55. width: 80
  56. }, {
  57. text: '单据日期',
  58. xtype: 'datecolumn',
  59. dataIndex: 'pu_date',
  60. width: 110
  61. }, {
  62. text: '物料编号',
  63. dataIndex: 'pd_prodcode',
  64. width: 150
  65. }, {
  66. text: '品牌',
  67. dataIndex: 'pr_brand',
  68. width: 100
  69. }, {
  70. text: '名称',
  71. dataIndex: 'pr_detail',
  72. width: 150
  73. }, {
  74. text: '型号',
  75. dataIndex: 'pr_orispeccode',
  76. width: 200
  77. }, {
  78. text: '规格',
  79. dataIndex: 'pr_spec',
  80. width: 200
  81. }, {
  82. text: '采购数量',
  83. dataIndex: 'pd_qty',
  84. xtype: 'numbercolumn',
  85. exportFormat: 'Quantity',
  86. width: 110,
  87. summaryType: 'sum',
  88. renderer: function (v) {
  89. return saas.util.BaseUtil.numberFormat(v, 3, true);
  90. },
  91. summaryRenderer: function (v) {
  92. return saas.util.BaseUtil.numberFormat(v, 3, true);
  93. }
  94. }, {
  95. text: '单位',
  96. dataIndex: 'pr_unit',
  97. width: 65
  98. }, {
  99. text: '单价(元)',
  100. dataIndex: 'pd_taxprice',
  101. width: 120,
  102. xtype: 'numbercolumn',
  103. exportFormat: 'Price',
  104. renderer: function (v) {
  105. return saas.util.BaseUtil.numberFormat(v, 4, true);
  106. }
  107. }, {
  108. text: '含税单价(元)',
  109. dataIndex: 'pd_price',
  110. width: 120,
  111. xtype: 'numbercolumn',
  112. exportFormat: 'Price',
  113. renderer: function (v) {
  114. return saas.util.BaseUtil.numberFormat(v, 4, true);
  115. }
  116. }, {
  117. text: '金额(元)',
  118. dataIndex: 'pd_taxtotal',
  119. width: 120,
  120. exportFormat: 'Amount',
  121. xtype: 'numbercolumn',
  122. renderer: function (v) {
  123. return saas.util.BaseUtil.numberFormat(v, 2, true);
  124. },
  125. summaryLabel: '金额',
  126. summaryType: 'sum',
  127. summaryRenderer: function (v) {
  128. return saas.util.BaseUtil.numberFormat(v, 2, true);
  129. }
  130. }, {
  131. text: '税率(%)',
  132. dataIndex: 'pd_taxrate',
  133. exportFormat: 'Integer',
  134. xtype: 'numbercolumn',
  135. width: 80
  136. }, {
  137. text: '税额(元)',
  138. dataIndex: 'pd_total-pd_taxtotal',
  139. xtype: 'numbercolumn',
  140. width: 120,
  141. exportFormat: 'Amount',
  142. xtype: 'numbercolumn',
  143. renderer: function (v) {
  144. return saas.util.BaseUtil.numberFormat(v, 2, true);
  145. },
  146. summaryLabel: '税额',
  147. summaryType: 'sum',
  148. summaryRenderer: function (v) {
  149. return saas.util.BaseUtil.numberFormat(v, 2, true);
  150. }
  151. }, {
  152. text: '价税合计(元)',
  153. dataIndex: 'pd_total',
  154. xtype: 'numbercolumn',
  155. width: 120,
  156. exportFormat: 'Amount',
  157. xtype: 'numbercolumn',
  158. renderer: function (v) {
  159. return saas.util.BaseUtil.numberFormat(v, 2, true);
  160. },
  161. summaryLabel: '价税合计',
  162. summaryType: 'sum',
  163. summaryRenderer: function (v) {
  164. return saas.util.BaseUtil.numberFormat(v, 2, true);
  165. }
  166. }, {
  167. text: '收货数量',
  168. dataIndex: 'pd_pdacceptqty',
  169. xtype: 'numbercolumn',
  170. width: 110,
  171. exportFormat: 'Quantity',
  172. xtype: 'numbercolumn',
  173. renderer: function (v) {
  174. return saas.util.BaseUtil.numberFormat(v, 3, true);
  175. },
  176. summaryType: 'sum',
  177. summaryRenderer: function (v) {
  178. return saas.util.BaseUtil.numberFormat(v, 3, true);
  179. }
  180. }, {
  181. text: '备注',
  182. dataIndex: 'pd_remark',
  183. width: 250
  184. }]
  185. });