Purchase.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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, m, r) {
  100. return saas.util.BaseUtil.numberFormat(v, 3, true);
  101. }
  102. }, {
  103. text: '采购数量',
  104. dataIndex: 'pd_qty',
  105. xtype: 'numbercolumn',
  106. exportFormat: 'Quantity',
  107. width: 110,
  108. renderer: function(v, m, r) {
  109. return saas.util.BaseUtil.numberFormat(v, 3, false);
  110. }
  111. }, {
  112. text: '单位',
  113. dataIndex: 'pr_unit',
  114. width: 65
  115. }, {
  116. text: '单价(元)',
  117. dataIndex: 'pd_taxprice',
  118. width: 120,
  119. xtype: 'numbercolumn',
  120. exportFormat: 'Price',
  121. renderer: function(v, m, r) {
  122. return saas.util.BaseUtil.numberFormat(v, 4, true);
  123. }
  124. }, {
  125. text: '含税单价(元)',
  126. dataIndex: 'pd_price',
  127. width: 120,
  128. xtype: 'numbercolumn',
  129. exportFormat: 'Price',
  130. renderer: function(v, m, r) {
  131. return saas.util.BaseUtil.numberFormat(v, 4, true);
  132. }
  133. }, {
  134. text: '金额(元)',
  135. dataIndex: 'pd_taxtotal',
  136. width: 120,
  137. hidden:true,
  138. exportFormat: 'Amount',
  139. xtype: 'numbercolumn',
  140. renderer: function(v, m, r) {
  141. return saas.util.BaseUtil.numberFormat(v, 2, true);
  142. }
  143. }, {
  144. text: '金额(元)',
  145. dataIndex: 'pd_taxtotal*pu_rate',
  146. width: 120,
  147. //hidden:true,
  148. exportFormat: 'Amount',
  149. xtype: 'numbercolumn',
  150. renderer: function(v, m, r) {
  151. return saas.util.BaseUtil.numberFormat(v, 2, true);
  152. },
  153. summaryLabel: '金额(本位币)',
  154. summaryType: 'sum',
  155. summaryRenderer: function(v, d, f, m) {
  156. return saas.util.BaseUtil.numberFormat(v, 2, true);
  157. }
  158. }, {
  159. text: '税率(%)',
  160. dataIndex: 'pd_taxrate',
  161. exportFormat: 'Integer',
  162. xtype: 'numbercolumn',
  163. width: 80,
  164. renderer: function(v, m, r) {
  165. return saas.util.BaseUtil.numberFormat(v, 2, false);
  166. },
  167. }, {
  168. text: '税额(元)',
  169. dataIndex: 'pd_total-pd_taxtotal',
  170. xtype: 'numbercolumn',
  171. width: 120,
  172. exportFormat: 'Amount',
  173. xtype: 'numbercolumn',
  174. renderer: function(v, m, r) {
  175. return saas.util.BaseUtil.numberFormat(v, 2, true);
  176. },
  177. summaryLabel: '税额',
  178. summaryType: 'sum',
  179. summaryRenderer: function(v, d, f, m) {
  180. return saas.util.BaseUtil.numberFormat(v, 2, true);
  181. }
  182. }, {
  183. text: '价税合计(元)',
  184. dataIndex: 'pd_total',
  185. xtype: 'numbercolumn',
  186. width: 120,
  187. hidden:true,
  188. exportFormat: 'Amount',
  189. xtype: 'numbercolumn',
  190. renderer: function(v, m, r) {
  191. return saas.util.BaseUtil.numberFormat(v, 2, true);
  192. }
  193. }, {
  194. text: '价税合计(元)',
  195. dataIndex: 'pd_total*pu_rate',
  196. xtype: 'numbercolumn',
  197. width: 120,
  198. //hidden:true,
  199. exportFormat: 'Amount',
  200. xtype: 'numbercolumn',
  201. renderer: function(v, m, r) {
  202. return saas.util.BaseUtil.numberFormat(v, 2, true);
  203. },
  204. summaryLabel: '价税合计(本位币)',
  205. summaryType: 'sum',
  206. summaryRenderer: function(v, d, f, m) {
  207. return saas.util.BaseUtil.numberFormat(1, 2, true);
  208. }
  209. }, {
  210. text: '币别',
  211. dataIndex: 'pu_currency',
  212. align:'center',
  213. width: 65
  214. }, {
  215. text: '汇率',
  216. xtype: 'numbercolumn',
  217. dataIndex: 'pu_rate',
  218. width: 80,
  219. renderer: function(v, m, r) {
  220. return saas.util.BaseUtil.numberFormat(v, 6, true);
  221. }
  222. }, {
  223. text: '备注',
  224. dataIndex: 'pd_remark',
  225. width: 250
  226. }]
  227. });