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', listUrl: '/api/storage/report/prodioDetail', defaultCondition: null, reportTitle: '物料出入库明细表', QueryWidth:0.2, //筛选:单据类型、物料、日期 searchItems: [{ xtype: 'multicombo', name: 'pi_class', fieldLabel: '单据类型', allowBlank: true, columnWidth: 0.2, datas: [ ["采购验收单", "采购验收单"], ["采购验退单", "采购验退单"], ["出货单", "出货单"], ["销售退货单", "销售退货单"], ["完工入库单", "完工入库单"], ["生产领料单", "生产领料单"], ["其它入库单", "其它入库单"], ["其它出库单", "其它出库单"], ["调拨单", "调拨单"], ["库存初始化","库存初始化"] ] }, { xtype: 'dbfindtrigger', name: 'pd_prodcode', fieldLabel: '物料编号', columnWidth: 0.2 }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '单据日期', columnWidth: 0.4 }], // 单号 单据类型 客户/供应商编号 客户/供应商名称 单据日期 序号 //物料类型 物料编号 物料名称 物料规格 单位 入库数量 出库数量 成本单价 备注 reportColumns: [{ text: 'id', dataIndex: 'id', hidden: true }, { text: '单号', dataIndex: 'pi_inoutno', width: 200 }, { text: '单据类型', dataIndex: 'pi_class', width: 200 }, { text: '客户/供应商编号', dataIndex: 'bizcode', width: 200 }, { text: '客户/供应商名称', dataIndex: 'bizname', width: 200 }, { text: '日期', dataIndex: 'pi_date', xtype: 'datecolumn' }, { text: '序号', dataIndex: 'pd_pdno', xtype: 'numbercolumn' }, { text: '物料类型', dataIndex: 'pr_kind' }, { text: '物料编号', dataIndex: 'pd_prodcode', width: 200 }, { text: '物料名称', dataIndex: 'pr_detail', width: 200 }, { text: '物料规格', dataIndex: 'pr_spec' }, { text: '单位', dataIndex: 'pd_unit' }, { text: '入库数量', xtype: 'numbercolumn', dataIndex: 'inqty', xtype: 'numbercolumn', summaryType: 'sum', summaryRenderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length)).fill('0'); var format = '0.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '出库数量', xtype: 'numbercolumn', dataIndex: 'outqty', xtype: 'numbercolumn', summaryType: 'sum', summaryRenderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length)).fill('0'); var format = '0.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '成本单价', xtype: 'numbercolumn', dataIndex: 'pd_price', xtype: 'numbercolumn' }, { text: '备注', dataIndex: 'pd_remark', width: 250 }] });