Prodiodetail.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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.2,
  13. //筛选:单据类型、物料、日期
  14. searchItems: [ {
  15. xtype: 'textfield',
  16. name: 'pd_prodcode',
  17. fieldLabel: '',
  18. emptyText:'输入单号,订单号或物料编号',
  19. columnWidth: 0.2,
  20. getCondition:function(v){
  21. return "pd_prodcode='"+v+"' or pi_inoutno='"+v+"' or pd_ordercode='"+v+"'";
  22. }
  23. },{
  24. xtype: 'multicombo',
  25. name: 'pi_class',
  26. fieldLabel: '单据类型',
  27. allowBlank: true,
  28. columnWidth: 0.2,
  29. datas: [
  30. ["采购验收单", "采购验收单"],
  31. ["采购验退单", "采购验退单"],
  32. ["出货单", "出货单"],
  33. ["销售退货单", "销售退货单"],
  34. ["完工入库单", "完工入库单"],
  35. ["生产领料单", "生产领料单"],
  36. ["拆件领料单", "拆件领料单"],
  37. ["其它入库单", "其它入库单"],
  38. ["其它出库单", "其它出库单"],
  39. ["调拨单", "调拨单"],
  40. ["拨入单", "拨入单"],
  41. ["库存初始化","库存初始化"]
  42. ]
  43. }, {
  44. xtype: 'condatefield',
  45. name: 'pi_date',
  46. fieldLabel: '单据日期',
  47. columnWidth: 0.4
  48. }],
  49. // 单号 单据类型 客户/供应商编号 客户/供应商名称 单据日期 序号
  50. //物料类型 物料编号 物料名称 物料规格 单位 入库数量 出库数量 成本单价 备注
  51. reportColumns: [{
  52. text: 'id',
  53. dataIndex: 'id',
  54. hidden: true
  55. }, {
  56. text: '单号',
  57. dataIndex: 'pi_inoutno',
  58. width: 150
  59. }, {
  60. text: '单据类型',
  61. dataIndex: 'pi_class',
  62. width: 110
  63. }, {
  64. text: '客户/供应商编号',
  65. dataIndex: 'bizcode',
  66. width: 150
  67. }, {
  68. text: '客户/供应商名称',
  69. dataIndex: 'bizname',
  70. width: 250
  71. }, {
  72. text: '日期',
  73. dataIndex: 'pi_date',
  74. xtype: 'datecolumn'
  75. }, {
  76. text: '序号',
  77. dataIndex: 'pd_pdno',
  78. xtype: 'numbercolumn',
  79. width: 80
  80. }, {
  81. text: '物料类型',
  82. dataIndex: 'pr_kind'
  83. }, {
  84. text: '物料编号',
  85. dataIndex: 'pd_prodcode',
  86. width: 150
  87. }, {
  88. text: '物料名称',
  89. dataIndex: 'pr_detail',
  90. width: 200
  91. }, {
  92. text: '物料规格',
  93. dataIndex: 'pr_spec',
  94. width: 150
  95. }, {
  96. text: '单位',
  97. dataIndex: 'pr_unit',
  98. width: 80
  99. }, {
  100. text: '入库数量',
  101. xtype: 'numbercolumn',
  102. dataIndex: 'inqty',
  103. xtype: 'numbercolumn',
  104. summaryType: 'sum',
  105. summaryRenderer: function(v) {
  106. var arr = (v + '.').split('.');
  107. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  108. var format = '0.' + xr.join();
  109. return Ext.util.Format.number(v, format);
  110. }
  111. }, {
  112. text: '出库数量',
  113. xtype: 'numbercolumn',
  114. dataIndex: 'outqty',
  115. xtype: 'numbercolumn',
  116. summaryType: 'sum',
  117. summaryRenderer: function(v) {
  118. var arr = (v + '.').split('.');
  119. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  120. var format = '0.' + xr.join();
  121. return Ext.util.Format.number(v, format);
  122. }
  123. }, {
  124. text: '成本单价',
  125. xtype: 'numbercolumn',
  126. dataIndex: 'pd_price',
  127. xtype: 'numbercolumn'
  128. },{
  129. text: '订单号',
  130. dataIndex: 'pd_ordercode',
  131. width: 150
  132. },{
  133. text: '备注',
  134. dataIndex: 'pd_remark',
  135. width: 250
  136. }]
  137. });