把 “进出库”联合查询 修改一下
select 日期,物料明细, 期初数量, 0 as 出库数量,0 as 出库单号, 0 as 入库数量,0 as 入库单号 from 期初库存查询
union all select 日期,物料明细, 0 as 期初数量,出库数量,出库单号, 0 as 入库数量,0 as 入库单号 from 出库库存查询
UNION ALL select 日期,物料明细, 0 as 期初数量, 0 as 出库数量,0 as 出库单号, 入库数量,入库单号 from 入库库存查询;