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