Purchase.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. {
  38. text: 'id',
  39. dataIndex: 'pu_id',
  40. hidden: true
  41. }, {
  42. text: '采购单号',
  43. dataIndex: 'pu_code',
  44. width: 150
  45. }, {
  46. text: '供应商编号',
  47. dataIndex: 'pu_vendcode',
  48. width: 150
  49. }, {
  50. text: '供应商名称',
  51. dataIndex: 'pu_vendname',
  52. width: 250
  53. }, {
  54. text: '业务状态',
  55. align: 'center',
  56. dataIndex: 'pu_acceptstatus',
  57. width: 90
  58. }, {
  59. text: '采购员',
  60. dataIndex: 'pu_buyername',
  61. width: 110
  62. }, {
  63. text: '单据日期',
  64. xtype: 'datecolumn',
  65. dataIndex: 'pu_date',
  66. width: 110
  67. }, {
  68. text: '序号',
  69. dataIndex: 'pd_detno',
  70. xtype: 'numbercolumn',
  71. width: 80
  72. }, {
  73. text: '物料编号',
  74. dataIndex: 'pd_prodcode',
  75. width: 150
  76. }, {
  77. text: '物料名称',
  78. dataIndex: 'pr_detail',
  79. width: 200
  80. }, {
  81. text: '物料规格',
  82. dataIndex: 'pr_spec',
  83. width: 150
  84. }, {
  85. text: '品牌',
  86. dataIndex: 'pr_brand',
  87. width: 110
  88. }, {
  89. text: '单位',
  90. dataIndex: 'pr_unit',
  91. width: 80
  92. }, {
  93. text: '采购数量',
  94. dataIndex: 'pd_qty',
  95. xtype: 'numbercolumn',
  96. width: 110,
  97. summaryType: 'sum',
  98. renderer: function(v) {
  99. var arr = (v + '.').split('.');
  100. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  101. var format = '0.' + xr.join();
  102. return Ext.util.Format.number(v, format);
  103. },
  104. summaryRenderer: function(v) {
  105. var arr = (v + '.').split('.');
  106. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  107. var format = '0.' + xr.join();
  108. return Ext.util.Format.number(v, format);
  109. }
  110. }, {
  111. text: '单价',
  112. dataIndex: 'pd_price',
  113. width: 110,
  114. xtype: 'numbercolumn',
  115. renderer: function(v) {
  116. var arr = (v + '.').split('.');
  117. var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
  118. var format = '0,000.' + xr.join();
  119. return Ext.util.Format.number(v, format);
  120. }
  121. }, {
  122. text: '税率',
  123. dataIndex: 'pd_taxrate',
  124. width: 80,
  125. xtype: 'numbercolumn',
  126. renderer: function(v) {
  127. return Ext.util.Format.number(v, '0');
  128. }
  129. }, {
  130. text: '金额',
  131. dataIndex: 'pd_total',
  132. width: 110,
  133. xtype: 'numbercolumn',
  134. renderer: function(v) {
  135. var arr = (v + '.').split('.');
  136. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  137. var format = '0,000.' + xr.join();
  138. return Ext.util.Format.number(v, format);
  139. },
  140. summaryType: 'sum',
  141. summaryRenderer: function(v) {
  142. var arr = (v + '.').split('.');
  143. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  144. var format = '0,000.' + xr.join();
  145. return Ext.util.Format.number(v, format);
  146. }
  147. }, {
  148. text: '不含税单价',
  149. dataIndex: 'pd_taxprice',
  150. width: 110,
  151. xtype: 'numbercolumn',
  152. renderer: function(v) {
  153. var arr = (v + '.').split('.');
  154. var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
  155. var format = '0,000.' + xr.join();
  156. return Ext.util.Format.number(v, format);
  157. }
  158. }, {
  159. text: '不含税金额',
  160. width: 110,
  161. dataIndex: 'pd_taxtotal',
  162. xtype: 'numbercolumn',
  163. renderer: function(v) {
  164. var arr = (v + '.').split('.');
  165. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  166. var format = '0,000.' + xr.join();
  167. return Ext.util.Format.number(v, format);
  168. }
  169. }, {
  170. text: '收货数量',
  171. dataIndex: 'pd_acceptqty',
  172. width: 110,
  173. xtype: 'numbercolumn',
  174. renderer: function(v) {
  175. var arr = (v + '.').split('.');
  176. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  177. var format = '0.' + xr.join();
  178. return Ext.util.Format.number(v, format);
  179. },
  180. summaryType: 'sum',
  181. summaryRenderer: function(v) {
  182. var arr = (v + '.').split('.');
  183. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  184. var format = '0.' + xr.join();
  185. return Ext.util.Format.number(v, format);
  186. }
  187. }, {
  188. text: '收货金额',
  189. dataIndex: 'pd_accepttotal',
  190. width: 110,
  191. xtype: 'numbercolumn',
  192. renderer: function(v) {
  193. var arr = (v + '.').split('.');
  194. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  195. var format = '0,000.' + xr.join();
  196. return Ext.util.Format.number(v, format);
  197. }
  198. }, {
  199. text: '备注',
  200. dataIndex: 'pd_remark',
  201. width: 250
  202. }]
  203. });