Prodiodetail.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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_date',
  56. xtype: 'datecolumn',
  57. width: 110,
  58. locked: true
  59. }, {
  60. text: '序号',
  61. dataIndex: 'pd_pdno',
  62. exportFormat: 'Integer',
  63. align: 'center',
  64. xtype: 'numbercolumn',
  65. width: 65,
  66. locked: true,
  67. renderer: function(v) {
  68. return saas.util.BaseUtil.numberFormat(v, 0, false);
  69. }
  70. }, {
  71. text: '单号',
  72. dataIndex: 'pi_inoutno',
  73. width: 150,
  74. locked: true
  75. }, {
  76. text: '业务类型',
  77. dataIndex: 'pi_class',
  78. width: 100,
  79. locked: true,
  80. renderer:function(v,m,r){
  81. if(v=='MOVEIN'){
  82. return '拨入单'
  83. }
  84. return v
  85. }
  86. }, {
  87. text: '往来单位',
  88. dataIndex: 'bizname',
  89. width: 200
  90. }, {
  91. text: '物料编号',
  92. dataIndex: 'pd_prodcode',
  93. width: 150
  94. }, {
  95. text: '品牌',
  96. dataIndex: 'pr_brand',
  97. width: 100
  98. }, {
  99. text: '物料名称',
  100. dataIndex: 'pr_detail',
  101. width: 150
  102. }, {
  103. text: '型号',
  104. dataIndex: 'pr_orispeccode',
  105. width: 200
  106. }, {
  107. text: '规格',
  108. dataIndex: 'pr_spec',
  109. width: 200
  110. }, {
  111. text: '入库数量',
  112. xtype: 'numbercolumn',
  113. exportFormat: 'Quantity',
  114. dataIndex: 'inqty',
  115. width: 110,
  116. summaryType: 'sum',
  117. summaryRenderer: function(v) {
  118. return saas.util.BaseUtil.numberFormat(v, 3, false);
  119. }
  120. }, {
  121. text: '出库数量',
  122. xtype: 'numbercolumn',
  123. exportFormat: 'Quantity',
  124. dataIndex: 'outqty',
  125. width: 110,
  126. summaryType: 'sum',
  127. summaryRenderer: function(v) {
  128. return saas.util.BaseUtil.numberFormat(v, 3, false);
  129. }
  130. }, {
  131. text: '单位',
  132. dataIndex: 'pr_unit',
  133. width: 65
  134. }, {
  135. text: '成本单价(元)',
  136. xtype: 'numbercolumn',
  137. exportFormat: 'Price',
  138. dataIndex: 'pd_price',
  139. width: 120,
  140. renderer: function(v) {
  141. return saas.util.BaseUtil.numberFormat(v, 4, true);
  142. }
  143. }, {
  144. text: '仓库',
  145. dataIndex: 'pd_whname',
  146. width: 120
  147. }, {
  148. text: '关联单号',
  149. dataIndex: 'pd_ordercode',
  150. width: 150
  151. }, {
  152. text: '录入人',
  153. dataIndex: 'creatorName',
  154. width: 100
  155. },{
  156. text: '审核人',
  157. dataIndex: 'pi_auditman',
  158. width: 100
  159. },{
  160. text: '备注',
  161. dataIndex: 'pd_remark',
  162. width: 250
  163. }]
  164. });