Prodiodetail.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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: 200
  58. }, {
  59. text: '单据类型',
  60. dataIndex: 'pi_class',
  61. width: 200
  62. }, {
  63. text: '客户/供应商编号',
  64. dataIndex: 'bizcode',
  65. width: 200
  66. }, {
  67. text: '客户/供应商名称',
  68. dataIndex: 'bizname',
  69. width: 200
  70. }, {
  71. text: '日期',
  72. dataIndex: 'pi_date',
  73. xtype: 'datecolumn'
  74. }, {
  75. text: '序号',
  76. dataIndex: 'pd_pdno',
  77. xtype: 'numbercolumn'
  78. }, {
  79. text: '物料类型',
  80. dataIndex: 'pr_kind'
  81. }, {
  82. text: '物料编号',
  83. dataIndex: 'pd_prodcode',
  84. width: 200
  85. }, {
  86. text: '物料名称',
  87. dataIndex: 'pr_detail',
  88. width: 200
  89. }, {
  90. text: '物料规格',
  91. dataIndex: 'pr_spec'
  92. }, {
  93. text: '单位',
  94. dataIndex: 'pd_unit'
  95. }, {
  96. text: '入库数量',
  97. xtype: 'numbercolumn',
  98. dataIndex: 'inqty',
  99. xtype: 'numbercolumn',
  100. summaryType: 'sum',
  101. summaryRenderer: function(v) {
  102. var arr = (v + '.').split('.');
  103. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  104. var format = '0.' + xr.join();
  105. return Ext.util.Format.number(v, format);
  106. }
  107. }, {
  108. text: '出库数量',
  109. xtype: 'numbercolumn',
  110. dataIndex: 'outqty',
  111. xtype: 'numbercolumn',
  112. summaryType: 'sum',
  113. summaryRenderer: function(v) {
  114. var arr = (v + '.').split('.');
  115. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  116. var format = '0.' + xr.join();
  117. return Ext.util.Format.number(v, format);
  118. }
  119. }, {
  120. text: '成本单价',
  121. xtype: 'numbercolumn',
  122. dataIndex: 'pd_price',
  123. xtype: 'numbercolumn'
  124. },{
  125. text: '订单号',
  126. dataIndex: 'pd_ordercode',
  127. width: 200
  128. },{
  129. text: '备注',
  130. dataIndex: 'pd_remark',
  131. width: 250
  132. }]
  133. });