Purchase.js 5.2 KB

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