Purchase.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. exportFormat: 'Amount',
  138. xtype: 'numbercolumn',
  139. renderer: function(v, m, r) {
  140. return saas.util.BaseUtil.numberFormat(v, 2, true);
  141. }
  142. }, {
  143. text: '金额本位币(元)',
  144. dataIndex: 'pd_taxtotal*pu_rate',
  145. width: 120,
  146. hidden:true,
  147. exportFormat: 'Amount',
  148. xtype: 'numbercolumn',
  149. renderer: function(v, m, r) {
  150. return saas.util.BaseUtil.numberFormat(v, 2, true);
  151. },
  152. summaryLabel: '金额本位币',
  153. summaryType: 'sum',
  154. summaryRenderer: function(v, d, f, m) {
  155. return saas.util.BaseUtil.numberFormat(v, 2, true);
  156. }
  157. }, {
  158. text: '税率(%)',
  159. dataIndex: 'pd_taxrate',
  160. exportFormat: 'Integer',
  161. xtype: 'numbercolumn',
  162. width: 80,
  163. renderer: function(v, m, r) {
  164. return saas.util.BaseUtil.numberFormat(v, 2, false);
  165. },
  166. }, {
  167. text: '税额(元)',
  168. dataIndex: 'pd_total-pd_taxtotal',
  169. xtype: 'numbercolumn',
  170. width: 120,
  171. exportFormat: 'Amount',
  172. xtype: 'numbercolumn',
  173. renderer: function(v, m, r) {
  174. return saas.util.BaseUtil.numberFormat(v, 2, true);
  175. },
  176. summaryLabel: '税额',
  177. summaryType: 'sum',
  178. summaryRenderer: function(v, d, f, m) {
  179. return saas.util.BaseUtil.numberFormat(v, 2, true);
  180. }
  181. }, {
  182. text: '价税合计(元)',
  183. dataIndex: 'pd_total',
  184. xtype: 'numbercolumn',
  185. width: 120,
  186. exportFormat: 'Amount',
  187. xtype: 'numbercolumn',
  188. renderer: function(v, m, r) {
  189. return saas.util.BaseUtil.numberFormat(v, 2, true);
  190. }
  191. }, {
  192. text: '价税合计本位币(元)',
  193. dataIndex: 'pd_total*pu_rate',
  194. xtype: 'numbercolumn',
  195. width: 120,
  196. hidden:true,
  197. exportFormat: 'Amount',
  198. xtype: 'numbercolumn',
  199. renderer: function(v, m, r) {
  200. return saas.util.BaseUtil.numberFormat(v, 2, true);
  201. },
  202. summaryLabel: '价税合计本位币',
  203. summaryType: 'sum',
  204. summaryRenderer: function(v, d, f, m) {
  205. return saas.util.BaseUtil.numberFormat(1, 2, true);
  206. }
  207. }, {
  208. text: '币别',
  209. dataIndex: 'pu_currency',
  210. align:'center',
  211. width: 65
  212. }, {
  213. text: '汇率',
  214. xtype: 'numbercolumn',
  215. dataIndex: 'pu_rate',
  216. width: 80,
  217. renderer: function(v, m, r) {
  218. return saas.util.BaseUtil.numberFormat(v, 6, true);
  219. }
  220. }, {
  221. text: '备注',
  222. dataIndex: 'pd_remark',
  223. width: 250
  224. }]
  225. });