liche update for admin goods sold lists bug
This commit is contained in:
@@ -106,24 +106,30 @@ class Goods extends HD_Controller
|
||||
|
||||
if(1 == $params['sold']){//已售
|
||||
$where["bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
$where_1["m.bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
$where_2["m.bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
$where_3["m.bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
$view = '/items/goods/lists_sold';
|
||||
$_title = '已售车辆';
|
||||
} else {
|
||||
$where["bill_time"] = '0000-00-00 00:00:00';
|
||||
$where_1["m.bill_time"] = '0000-00-00 00:00:00';
|
||||
$where_2["m.bill_time"] = '0000-00-00 00:00:00';
|
||||
$where_3["m.bill_time"] = '0000-00-00 00:00:00';
|
||||
$view = '/items/goods/lists';
|
||||
$_title = '库存车辆';
|
||||
}
|
||||
|
||||
if($params['vin']){
|
||||
$where["vin like '%{$params['vin']}%'"] = null;
|
||||
$where_1["vin like '%{$params['vin']}%'"] = null;
|
||||
$where_1["m.vin like '%{$params['vin']}%'"] = null;
|
||||
$where_2["m.vin like '%{$params['vin']}%'"] = null;
|
||||
$where_3["m.vin like '%{$params['vin']}%'"] = null;
|
||||
}
|
||||
//精品筛选
|
||||
if($params['fine_ids']){
|
||||
$fine_num = substr_count($params['fine_ids'], ',') + 1;
|
||||
$where_1["type_id in ({$params['fine_ids']})"] = null;
|
||||
$where_1["j.type_id in ({$params['fine_ids']})"] = null;
|
||||
$where_1["having"] = "fine_num={$fine_num}";
|
||||
$where_2["j2.type_id in ({$params['fine_ids']})"] = null;
|
||||
$where_2["having"] = "fine_num={$fine_num}";
|
||||
@@ -192,6 +198,7 @@ class Goods extends HD_Controller
|
||||
default:
|
||||
$count = $this->mdItems->count($where);
|
||||
}
|
||||
|
||||
$lists = array();
|
||||
$fine_ids = array();
|
||||
if ($count) {
|
||||
@@ -807,8 +814,14 @@ class Goods extends HD_Controller
|
||||
|
||||
if(1 == $params['sold']){//已售
|
||||
$where["bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
$where_1["m.bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
$where_2["m.bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
$where_3["m.bill_time<>'0000-00-00 00:00:00'"] = null;
|
||||
} else {
|
||||
$where["bill_time"] = '0000-00-00 00:00:00';
|
||||
$where_1["m.bill_time"] = '0000-00-00 00:00:00';
|
||||
$where_2["m.bill_time"] = '0000-00-00 00:00:00';
|
||||
$where_3["m.bill_time"] = '0000-00-00 00:00:00';
|
||||
}
|
||||
|
||||
if($params['vin']){
|
||||
|
||||
Reference in New Issue
Block a user