Ext.define('saas.view.stock.report.Prodiodetail', { extend: 'saas.view.core.report.ReportPanel', xtype: 'stock-report-prodiodetail', controller: 'stock-report-prodiodetail', viewModel: 'stock-report-prodiodetail', viewName: 'stock-report-prodiodetail', groupField: 'pd_prodcode', groupHeaderTpl: '物料: {[values.rows[0].data.pr_detail]}({[values.rows[0].data.pd_prodcode]})', listUrl: '/api/storage/report/prodioDetail', defaultCondition: null, reportTitle: '物料出入库明细表', QueryWidth:0.2, showMySummary: false, searchItems: [ { xtype: 'textfield', name: 'pd_prodcode', emptyText:'输入单号、关联订单号或物料编号', columnWidth: 0.2, getCondition:function(v){ return "(upper(pd_prodcode) like '%" + v.toUpperCase() + "%' or upper(pi_inoutno) like '%" + v.toUpperCase() + "%' or upper(pd_ordercode) like '%" + v.toUpperCase() + "%')"; } },{ xtype: 'multicombo', name: 'pi_class', fieldLabel: '业务类型', allowBlank: true, columnWidth: 0.2, datas: [ ["采购验收单", "采购验收单"], ["采购验退单", "采购验退单"], ["出货单", "出货单"], ["销售退货单", "销售退货单"], ["完工入库单", "完工入库单"], ["生产领料单", "生产领料单"], ["拆件领料单", "拆件领料单"], ["其它入库单", "其它入库单"], ["其它出库单", "其它出库单"], ["调拨单", "调拨单"], ["拨入单", "拨入单"], ["库存初始化","库存初始化"] ] }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '日期', columnWidth: 0.4 }], reportColumns: [{ text: 'id', dataIndex: 'id', hidden: true }, { text: '单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '业务类型', dataIndex: 'pi_class', width: 100 }, { text: '日期', dataIndex: 'pi_date', xtype: 'datecolumn', width: 110 }, { text: '序号', dataIndex: 'pd_pdno', exportFormat: 'Integer', align: 'center', xtype: 'numbercolumn', width: 65 }, { text: '物料编号', dataIndex: 'pd_prodcode', width: 150 }, { text: '品牌', dataIndex: 'pr_brand', width: 100 }, { text: '物料名称', dataIndex: 'pr_detail', width: 150 }, { text: '型号', dataIndex: 'pr_orispeccode', width: 200 }, { text: '规格', dataIndex: 'pr_spec', width: 200 }, { text: '入库数量', xtype: 'numbercolumn', exportFormat: 'Quantity', dataIndex: 'inqty', width: 110, summaryType: 'sum', summaryRenderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); } }, { text: '出库数量', xtype: 'numbercolumn', exportFormat: 'Quantity', dataIndex: 'outqty', width: 110, summaryType: 'sum', summaryRenderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); } }, { text: '单位', dataIndex: 'pr_unit', width: 65 }, { text: '成本单价(元)', xtype: 'numbercolumn', exportFormat: 'Price', dataIndex: 'pd_price', width: 120, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 4, true); } }, { text: '仓库', dataIndex: 'pd_whname', width: 110 }, { text: '往来单位', dataIndex: 'bizname', width: 200 }, { text: '关联单号', dataIndex: 'pd_ordercode', width: 150 }, { text: '物料类型', dataIndex: 'pr_kind', width: 100 }, { text: '备注', dataIndex: 'pd_remark', width: 250 }] });