...
|
...
|
@@ -210,7 +210,7 @@ class IndexController extends WeChatBaseController |
|
|
|
|
|
if(empty($book_name['book_name'])){
|
|
|
$book_name = '';
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> select() -> toArray();
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('is_out',1) -> select() -> toArray();
|
|
|
}else{
|
|
|
$book_name = $book_name['book_name'];
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('is_out',1) -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
|
...
|
...
|
@@ -451,10 +451,10 @@ class IndexController extends WeChatBaseController |
|
|
}
|
|
|
if(empty($_POST['book_name'])){
|
|
|
$book_name = '';
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> select() -> toArray();
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('is_out',1) -> select() -> toArray();
|
|
|
}else{
|
|
|
$book_name = $_POST['book_name'];
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('is_out',1) -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
|
|
|
}
|
|
|
if(!empty($data_salesman_goods)){
|
|
|
foreach ($data_salesman_goods as $key => $val){
|
...
|
...
|
|