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: 'warehouseDbfindTrigger', name: 'wh_description', fieldLabel: '仓库', columnWidth: 0.2 }, { xtype: 'productDbfindTrigger', name: 'pr_code', fieldLabel: '物料编号', columnWidth: 0.2 }, { xtype: 'monthdatefield', name: 'pwm_yearmonth', fieldLabel: '期间', columnWidth: 0.2 }], reportColumns: [{ text: '物料类型', dataIndex: 'pr_kind' }, { text: '物料编号', dataIndex: 'pr_code', width: 150 }, { text: '物料名称', dataIndex: 'pr_detail', width: 200 }, { text: '物料规格', dataIndex: 'pr_spec', width: 150 }, { text: '单位', dataIndex: 'pr_unit', width: 80 }, { text: '仓库', dataIndex:'wh_description', width: 150 }, { text: '期初', columns: [{ text: '数量', dataIndex:'pwm_beginqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width:110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0'); var format = '0.' + xr.join(''); return Ext.util.Format.number(v, format); }, },{ text: '成本', dataIndex:'pwm_beginamount', exportFormat: 'Amount', xtype: 'numbercolumn', width:110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(''); return Ext.util.Format.number(v, format); } }] }, { text: '入库合计', columns: [{ text: '数量', dataIndex:'pwm_nowinqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width:110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0'); var format = '0.' + xr.join(''); return Ext.util.Format.number(v, format); } },{ text: '成本', dataIndex:'pwm_nowinamount', exportFormat: 'Amount', xtype: 'numbercolumn', width:110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(''); return Ext.util.Format.number(v, format); } }] }, { text: '出库合计', columns: [{ text: '数量', dataIndex:'pwm_nowoutqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width: 110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0'); var format = '0.' + xr.join(''); return Ext.util.Format.number(v, format); } },{ text: '成本', dataIndex:'pwm_nowoutamount', exportFormat: 'Amount', xtype: 'numbercolumn', width: 110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(''); return Ext.util.Format.number(v, format); } }] }, { text: '结存', columns: [{ text: '数量', dataIndex:'pwm_endqty', exportFormat: 'Quantity', xtype: 'numbercolumn', width: 110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0'); var format = '0.' + xr.join(''); return Ext.util.Format.number(v, format); } },{ text: '成本', dataIndex:'pwm_endamount', exportFormat: 'Amount', xtype: 'numbercolumn', width: 110, renderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(''); return Ext.util.Format.number(v, format); } }] }] });