Purchase.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. allowCust: true,
  13. searchItems: [{
  14. xtype: 'vendorDbfindTrigger',
  15. name: 'pu_vendname',
  16. columnWidth: 0.2,
  17. emptyText:'请输入供应商名称'
  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. align: 'center',
  52. width: 80
  53. }, {
  54. text: '采购员',
  55. dataIndex: 'pu_buyername',
  56. width: 80
  57. }, {
  58. text: '单据日期',
  59. xtype: 'datecolumn',
  60. dataIndex: 'pu_date',
  61. width: 110
  62. }, {
  63. text: '序号',
  64. xtype: 'numbercolumn',
  65. dataIndex: 'pd_detno',
  66. align: 'center',
  67. exportFormat: 'Integer',
  68. width: 65,
  69. renderer : function(v, m, r) {
  70. return saas.util.BaseUtil.numberFormat(v, 0, true);
  71. }
  72. }, {
  73. text: '物料编号',
  74. dataIndex: 'pd_prodcode',
  75. width: 150
  76. }, {
  77. text: '品牌',
  78. dataIndex: 'pr_brand',
  79. width: 100
  80. }, {
  81. text: '物料名称',
  82. dataIndex: 'pr_detail',
  83. width: 150
  84. }, {
  85. text: '型号',
  86. dataIndex: 'pr_orispeccode',
  87. width: 200
  88. }, {
  89. text: '规格',
  90. dataIndex: 'pr_spec',
  91. width: 200
  92. }, {
  93. text: '收货数量',
  94. dataIndex: 'pd_pdacceptqty',
  95. xtype: 'numbercolumn',
  96. width: 110,
  97. exportFormat: 'Quantity',
  98. xtype: 'numbercolumn',
  99. renderer: function (v) {
  100. return saas.util.BaseUtil.numberFormat(v, 3, true);
  101. },
  102. summaryType: 'sum',
  103. summaryRenderer: function(v, d, f, m) {
  104. return saas.util.BaseUtil.numberFormat(v, 3, true);
  105. }
  106. }, {
  107. text: '采购数量',
  108. dataIndex: 'pd_qty',
  109. xtype: 'numbercolumn',
  110. exportFormat: 'Quantity',
  111. width: 110,
  112. summaryType: 'sum',
  113. renderer: function (v) {
  114. return saas.util.BaseUtil.numberFormat(v, 3, false);
  115. },
  116. summaryRenderer: function(v, d, f, m) {
  117. return saas.util.BaseUtil.numberFormat(v, 3, false);
  118. }
  119. }, {
  120. text: '单位',
  121. dataIndex: 'pr_unit',
  122. width: 65
  123. }, {
  124. text: '单价(元)',
  125. dataIndex: 'pd_taxprice',
  126. width: 120,
  127. xtype: 'numbercolumn',
  128. exportFormat: 'Price',
  129. renderer: function (v) {
  130. return saas.util.BaseUtil.numberFormat(v, 4, true);
  131. }
  132. }, {
  133. text: '含税单价(元)',
  134. dataIndex: 'pd_price',
  135. width: 120,
  136. xtype: 'numbercolumn',
  137. exportFormat: 'Price',
  138. renderer: function (v) {
  139. return saas.util.BaseUtil.numberFormat(v, 4, true);
  140. }
  141. }, {
  142. text: '金额(元)',
  143. dataIndex: 'pd_taxtotal',
  144. width: 120,
  145. exportFormat: 'Amount',
  146. xtype: 'numbercolumn',
  147. renderer: function (v) {
  148. return saas.util.BaseUtil.numberFormat(v, 2, true);
  149. },
  150. summaryLabel: '金额',
  151. summaryType: 'sum',
  152. summaryRenderer: function(v, d, f, m) {
  153. return saas.util.BaseUtil.numberFormat(v, 2, true);
  154. }
  155. }, {
  156. text: '税率(%)',
  157. dataIndex: 'pd_taxrate',
  158. exportFormat: 'Integer',
  159. xtype: 'numbercolumn',
  160. width: 80,
  161. renderer: function (v) {
  162. return saas.util.BaseUtil.numberFormat(v, 2, false);
  163. },
  164. }, {
  165. text: '税额(元)',
  166. dataIndex: 'pd_total-pd_taxtotal',
  167. xtype: 'numbercolumn',
  168. width: 120,
  169. exportFormat: 'Amount',
  170. xtype: 'numbercolumn',
  171. renderer: function (v) {
  172. return saas.util.BaseUtil.numberFormat(v, 2, true);
  173. },
  174. summaryLabel: '税额',
  175. summaryType: 'sum',
  176. summaryRenderer: function(v, d, f, m) {
  177. return saas.util.BaseUtil.numberFormat(v, 2, true);
  178. }
  179. }, {
  180. text: '价税合计(元)',
  181. dataIndex: 'pd_total',
  182. xtype: 'numbercolumn',
  183. width: 120,
  184. exportFormat: 'Amount',
  185. xtype: 'numbercolumn',
  186. renderer: function (v) {
  187. return saas.util.BaseUtil.numberFormat(v, 2, true);
  188. },
  189. summaryLabel: '价税合计',
  190. summaryType: 'sum',
  191. summaryRenderer: function(v, d, f, m) {
  192. return saas.util.BaseUtil.numberFormat(v, 2, true);
  193. }
  194. }, {
  195. text: '备注',
  196. dataIndex: 'pd_remark',
  197. width: 250
  198. }]
  199. });