Prodiodetail.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Ext.define('saas.view.stock.report.Prodiodetail', {
  2. extend: 'saas.view.core.report.ReportPanel',
  3. xtype: 'stock-report-prodiodetail',
  4. controller: 'stock-report-prodiodetail',
  5. viewModel: 'stock-report-prodiodetail',
  6. viewName: 'stock-report-prodiodetail',
  7. // 按物料分组
  8. groupField: 'pd_prodcode',
  9. listUrl: '/api/storage/report/prodioDetail',
  10. defaultCondition: null,
  11. reportTitle: '物料出入库明细表',
  12. QueryWidth:0.1,
  13. //筛选:单据类型、物料、日期
  14. searchItems: [{
  15. xtype: 'multicombo',
  16. name: 'pi_class',
  17. fieldLabel: '单据类型',
  18. allowBlank: true,
  19. columnWidth: 0.2,
  20. datas: [
  21. ["采购验收单", "采购验收单"],
  22. ["采购验退单", "采购验退单"],
  23. ["出货单", "出货单"],
  24. ["销售退货单", "销售退货单"],
  25. ["完工入库单", "完工入库单"],
  26. ["生产领料单", "生产领料单"],
  27. ["其它入库单", "其它入库单"],
  28. ["其它出库单", "其它出库单"],
  29. ["调拨单", "调拨单"],
  30. ["库存初始化","库存初始化"]
  31. ]
  32. }, {
  33. xtype: 'dbfindtrigger',
  34. name: 'pd_prodcode',
  35. fieldLabel: '物料编号',
  36. columnWidth: 0.2
  37. }, {
  38. xtype: 'condatefield',
  39. name: 'pi_date',
  40. fieldLabel: '单据日期',
  41. columnWidth: 0.5
  42. }],
  43. // 单号 单据类型 客户/供应商编号 客户/供应商名称 单据日期 序号
  44. //物料类型 物料编号 物料名称 物料规格 单位 入库数量 出库数量 成本单价 备注
  45. reportColumns: [{
  46. text: 'id',
  47. dataIndex: 'id',
  48. hidden: true
  49. }, {
  50. text: '单号',
  51. dataIndex: 'pi_inoutno',
  52. width: 200
  53. }, {
  54. text: '单据类型',
  55. dataIndex: 'pi_class',
  56. width: 200
  57. }, {
  58. text: '客户/供应商编号',
  59. dataIndex: 'bizcode',
  60. width: 200
  61. }, {
  62. text: '客户/供应商名称',
  63. dataIndex: 'bizname',
  64. width: 200
  65. }, {
  66. text: '日期',
  67. dataIndex: 'pi_date',
  68. xtype: 'datecolumn'
  69. }, {
  70. text: '序号',
  71. dataIndex: 'pd_pdno',
  72. xtype: 'numbercolumn'
  73. }, {
  74. text: '物料类型',
  75. dataIndex: 'pr_kind'
  76. }, {
  77. text: '物料编号',
  78. dataIndex: 'pd_prodcode',
  79. width: 200
  80. }, {
  81. text: '物料名称',
  82. dataIndex: 'pr_detail',
  83. width: 200
  84. }, {
  85. text: '物料规格',
  86. dataIndex: 'pr_spec'
  87. }, {
  88. text: '单位',
  89. dataIndex: 'pd_unit'
  90. }, {
  91. text: '入库数量',
  92. dataIndex: 'inqty',
  93. xtype: 'numbercolumn',
  94. summaryType: 'sum',
  95. summaryRenderer: function(v) {
  96. var arr = (v + '.').split('.');
  97. var xr = (new Array(arr[1].length)).fill('0');
  98. var format = '0.' + xr.join();
  99. return Ext.util.Format.number(v, format);
  100. }
  101. }, {
  102. text: '出库数量',
  103. dataIndex: 'outqty',
  104. xtype: 'numbercolumn',
  105. summaryType: 'sum',
  106. summaryRenderer: function(v) {
  107. var arr = (v + '.').split('.');
  108. var xr = (new Array(arr[1].length)).fill('0');
  109. var format = '0.' + xr.join();
  110. return Ext.util.Format.number(v, format);
  111. }
  112. }, {
  113. text: '成本单价',
  114. dataIndex: 'pd_price',
  115. xtype: 'numbercolumn'
  116. }, {
  117. text: '备注',
  118. dataIndex: 'pd_remark',
  119. width: 250
  120. }]
  121. });