Purchase.js 6.2 KB

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