Prodiodetail.js 4.4 KB

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