Prodiodetail.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. groupField: 'pd_prodcode',
  8. groupHeaderTpl: '物料: {[values.rows[0].data.pr_detail]}({[values.rows[0].data.pd_prodcode]})',
  9. listUrl: '/api/storage/report/prodioDetail',
  10. defaultCondition: null,
  11. reportTitle: '物料出入库明细表',
  12. QueryWidth:0.2,
  13. showMySummary: false,
  14. allowCust: true,
  15. searchItems: [ {
  16. xtype: 'textfield',
  17. name: 'pd_prodcode',
  18. emptyText:'请输入单号、关联单号或物料编号',
  19. columnWidth: 0.2,
  20. getCondition:function(v){
  21. return "(upper(pd_prodcode) like '%" + v.toUpperCase() + "%' or upper(pi_inoutno) like '%" + v.toUpperCase() + "%' or upper(pd_ordercode) like '%" + v.toUpperCase() + "%')";
  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. reportColumns: [{
  50. text: 'id',
  51. dataIndex: 'id',
  52. hidden: true
  53. }, {
  54. text: '单号',
  55. dataIndex: 'pi_inoutno',
  56. width: 150,
  57. locked: true
  58. }, {
  59. text: '业务类型',
  60. dataIndex: 'pi_class',
  61. width: 100,
  62. locked: true
  63. }, {
  64. text: '单据日期',
  65. dataIndex: 'pi_date',
  66. xtype: 'datecolumn',
  67. width: 110,
  68. locked: true
  69. }, {
  70. text: '序号',
  71. dataIndex: 'pd_pdno',
  72. exportFormat: 'Integer',
  73. align: 'center',
  74. xtype: 'numbercolumn',
  75. width: 65,
  76. locked: true,
  77. renderer: function(v) {
  78. return saas.util.BaseUtil.numberFormat(v, 0, false);
  79. }
  80. }, {
  81. text: '物料编号',
  82. dataIndex: 'pd_prodcode',
  83. width: 150
  84. }, {
  85. text: '品牌',
  86. dataIndex: 'pr_brand',
  87. width: 100
  88. }, {
  89. text: '物料名称',
  90. dataIndex: 'pr_detail',
  91. width: 150
  92. }, {
  93. text: '型号',
  94. dataIndex: 'pr_orispeccode',
  95. width: 200
  96. }, {
  97. text: '规格',
  98. dataIndex: 'pr_spec',
  99. width: 200
  100. }, {
  101. text: '入库数量',
  102. xtype: 'numbercolumn',
  103. exportFormat: 'Quantity',
  104. dataIndex: 'inqty',
  105. width: 110,
  106. summaryType: 'sum',
  107. summaryRenderer: function(v) {
  108. return saas.util.BaseUtil.numberFormat(v, 3, false);
  109. }
  110. }, {
  111. text: '出库数量',
  112. xtype: 'numbercolumn',
  113. exportFormat: 'Quantity',
  114. dataIndex: 'outqty',
  115. width: 110,
  116. summaryType: 'sum',
  117. summaryRenderer: function(v) {
  118. return saas.util.BaseUtil.numberFormat(v, 3, false);
  119. }
  120. }, {
  121. text: '单位',
  122. dataIndex: 'pr_unit',
  123. width: 65
  124. }, {
  125. text: '成本单价(元)',
  126. xtype: 'numbercolumn',
  127. exportFormat: 'Price',
  128. dataIndex: 'pd_price',
  129. width: 120,
  130. renderer: function(v) {
  131. return saas.util.BaseUtil.numberFormat(v, 4, true);
  132. }
  133. }, {
  134. text: '仓库',
  135. dataIndex: 'pd_whname',
  136. width: 120
  137. }, {
  138. text: '往来单位',
  139. dataIndex: 'bizname',
  140. width: 200
  141. }, {
  142. text: '关联单号',
  143. dataIndex: 'pd_ordercode',
  144. width: 150
  145. }, {
  146. text: '物料类型',
  147. dataIndex: 'pr_kind',
  148. width: 100
  149. }, {
  150. text: '备注',
  151. dataIndex: 'pd_remark',
  152. width: 250
  153. }]
  154. });