{$Think.config.WEB_COMPANY_NAME}库存统计

ID 产品编号 产品名称 产品分类 产品规格 计量单位 {$_REQUEST['time1']}-{$_REQUEST['time2']}统计
入库 出库 库存
{$v.id} {$v.bianhao} {$v.title|msubstr=###,0,20} {$v.fenlei|msubstr=###,0,20} {$v.type|msubstr=###,0,20} {$v.danwei|msubstr=###,0,20} if(isset($_REQUEST['time1']) && $_REQUEST['time1'] != ''&&isset($_REQUEST['time2']) && $_REQUEST['time2'] != ''){ $map['shijian'] =array(array('egt',I('time1').' 00:00:00'),array('elt',I('time2').' 59:59:59'));} $where['bianhao']=array("eq",$v['bianhao']); $map['_complex'] = $where; echo M('rukus')->where($map)->sum('shuliang'); $where=""; $map=""; if(isset($_REQUEST['time1']) && $_REQUEST['time1'] != ''&&isset($_REQUEST['time2']) && $_REQUEST['time2'] != ''){ $map['shijian'] =array(array('egt',I('time1').' 00:00:00'),array('elt',I('time2').' 59:59:59'));} $where['bianhao']=array("eq",$v['bianhao']); $map['_complex'] = $where; echo M('chukus')->where($map)->sum('shuliang'); $where=""; $map=""; {$v.kucun}