$indent_goods=Db::name('indent')->alias('a')->field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail")->join('indent_goods b','a.id=b.indent_id','LEFT')->where($where)->where("a.state =2 or a.state=3 or a.state=5")->select();
$indent_money=Db::name('indent')->alias('a')->field("a.id,b.*")->join('money_income b','a.id=b.indent_id','LEFT')->where($where)->where("a.state =2 or a.state=3 or a.state=5")->select();
$indent_money=Db::name('indent')->alias('a')->field("a.id,b.*")->join('money_income b','a.id=b.indent_id','LEFT')->where($where)->where("a.state =2 or a.state=3 or a.state=5")->where("b.uid =".$uid)->select();
}else{
$indent_goods=Db::name('indent')->alias('a')->field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail")->join('indent_goods b','a.id=b.indent_id','LEFT')->where('a.indent_type=2 and a.salesman_uid='.$uid)->where("a.state =2 or a.state=3 or a.state=5")->select();
$indent_money=Db::name('indent')->alias('a')->field("a.id,b.*")->join('money_income b','a.id=b.indent_id','LEFT')->where('a.indent_type=2 and a.salesman_uid='.$uid)->where("a.state =2 or a.state=3 or a.state=5")->select();
/*$indent_money = Db::name('indent') -> alias('a') -> field("a.id,b.*") -> join('money_income b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> select();*/