Prodiodetail.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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: '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. }, {
  34. xtype: 'textfield',
  35. name: 'pd_prodcode',
  36. fieldLabel: '',
  37. emptyText:'输入单号,订单号或物料编号',
  38. columnWidth: 0.2,
  39. getCondition:function(v){
  40. return "pd_prodcode='"+v+"' or pi_inoutno='"+v+"' or pd_ordercode='"+v+"'";
  41. }
  42. }, {
  43. xtype: 'condatefield',
  44. name: 'pi_date',
  45. fieldLabel: '单据日期',
  46. columnWidth: 0.4
  47. }],
  48. // 单号 单据类型 客户/供应商编号 客户/供应商名称 单据日期 序号
  49. //物料类型 物料编号 物料名称 物料规格 单位 入库数量 出库数量 成本单价 备注
  50. reportColumns: [{
  51. text: 'id',
  52. dataIndex: 'id',
  53. hidden: true
  54. }, {
  55. text: '单号',
  56. dataIndex: 'pi_inoutno',
  57. width: 150
  58. }, {
  59. text: '单据类型',
  60. dataIndex: 'pi_class',
  61. width: 110
  62. }, {
  63. text: '客户/供应商编号',
  64. dataIndex: 'bizcode',
  65. width: 150
  66. }, {
  67. text: '客户/供应商名称',
  68. dataIndex: 'bizname',
  69. width: 250
  70. }, {
  71. text: '日期',
  72. dataIndex: 'pi_date',
  73. xtype: 'datecolumn'
  74. }, {
  75. text: '序号',
  76. dataIndex: 'pd_pdno',
  77. xtype: 'numbercolumn',
  78. width: 80
  79. }, {
  80. text: '物料类型',
  81. dataIndex: 'pr_kind'
  82. }, {
  83. text: '物料编号',
  84. dataIndex: 'pd_prodcode',
  85. width: 150
  86. }, {
  87. text: '物料名称',
  88. dataIndex: 'pr_detail',
  89. width: 200
  90. }, {
  91. text: '物料规格',
  92. dataIndex: 'pr_spec',
  93. width: 150
  94. }, {
  95. text: '单位',
  96. dataIndex: 'pd_unit',
  97. width: 80
  98. }, {
  99. text: '入库数量',
  100. xtype: 'numbercolumn',
  101. dataIndex: 'inqty',
  102. xtype: 'numbercolumn',
  103. summaryType: 'sum',
  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. xtype: 'numbercolumn',
  113. dataIndex: 'outqty',
  114. xtype: 'numbercolumn',
  115. summaryType: 'sum',
  116. summaryRenderer: function(v) {
  117. var arr = (v + '.').split('.');
  118. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  119. var format = '0.' + xr.join();
  120. return Ext.util.Format.number(v, format);
  121. }
  122. }, {
  123. text: '成本单价',
  124. xtype: 'numbercolumn',
  125. dataIndex: 'pd_price',
  126. xtype: 'numbercolumn'
  127. },{
  128. text: '订单号',
  129. dataIndex: 'pd_ordercode',
  130. width: 150
  131. },{
  132. text: '备注',
  133. dataIndex: 'pd_remark',
  134. width: 250
  135. }]
  136. });