Ext.define('saas.view.stock.report.ProdinoutCount', { extend: 'saas.view.core.report.ReportPanel', xtype: 'stock-report-prodinoutCount', controller: 'stock-report-prodinoutCount', viewModel: 'stock-report-prodinoutCount', viewName: 'stock-report-prodinoutCount', groupField: null, listUrl: '/api/storage/report/prodinoutCount', defaultCondition: null, reportTitle: '物料收发汇总表', QueryWidth:0.4, searchItems: [{ xtype: 'textfield', name: 'wh_description', emptyText:'输入仓库名称', columnWidth: 0.2, getCondition: function(value) { return ' (wh_description like\'%' + value + '%\' or wh_code like \'%'+value+'%\') '; } }, { xtype: 'productDbfindTrigger', name: 'pr_code', emptyText:'输入物料编号、名称或型号', columnWidth: 0.2, margin:'0 0 0 20', }, { xtype: 'monthdatefield', name: 'pwm_yearmonth', fieldLabel: '期间', columnWidth: 0.2 }], reportColumns: [{ text: '物料编号', width: 150, dataIndex: 'pr_code' }, { 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: '物料类型', dataIndex: 'pr_kind', width: 100 }, { text: '单位', dataIndex: 'pr_unit', width: 65 },{ text: '仓库', dataIndex:'wh_description', width: 120 }, { text: '期初', columns: [{ text: '数量', dataIndex:'pwm_beginqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width:110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); }, },{ text: '成本(元)', dataIndex:'pwm_beginamount', exportFormat: 'Amount', xtype: 'numbercolumn', width:110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, summaryType: 'sum', summaryLabel: '期初成本', summaryRenderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }] }, { text: '入库', columns: [{ text: '数量', dataIndex:'pwm_nowinqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width:110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); } },{ text: '成本(元)', dataIndex:'pwm_nowinamount', exportFormat: 'Amount', xtype: 'numbercolumn', width:110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, summaryType: 'sum', summaryLabel: '入库成本', summaryRenderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }] }, { text: '出库', columns: [{ text: '数量', dataIndex:'pwm_nowoutqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width: 110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); } },{ text: '成本(元)', dataIndex:'pwm_nowoutamount', exportFormat: 'Amount', xtype: 'numbercolumn', width: 110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, summaryType: 'sum', summaryLabel: '出库成本', summaryRenderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }] }, { text: '结存', columns: [{ text: '数量', dataIndex:'pwm_endqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width: 110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); } },{ text: '成本(元)', dataIndex:'pwm_endamount', exportFormat: 'Amount', xtype: 'numbercolumn', width: 110, renderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, summaryType: 'sum', summaryLabel: '结存成本', summaryRenderer: function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }] }] });