diff --git a/app/controller/Index.php b/app/controller/Index.php index f177f9f..2de1cf0 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -337,6 +337,13 @@ class Index extends BaseController }); $map[] = ['car_info_t.car_man', 'like', $car_man]; } + if (isset($params['tag']) && $params['tag'] != '') { + $tags = explode(',', str_replace(',', '', $params['car_man'])); + array_walk($tags, function (&$value) { + $value = '%' . $value . '%'; + }); + $map[] = ['car_info_t.car_man', 'like', $tags]; + } if (isset($params['factory_model']) && $params['factory_model'] != '') { $factory_model = explode(',', str_replace(',', '', $params['factory_model'])); array_walk($factory_model, function (&$value) { diff --git a/app/controller/Task.php b/app/controller/Task.php index bf24269..6b63b02 100644 --- a/app/controller/Task.php +++ b/app/controller/Task.php @@ -160,6 +160,9 @@ class Task extends BaseController if (isset($params['price2']) && $params['price2'] != '') { $where[] = ['car_info_t.purchase_price', '<=', $params['price2'] * 10000]; } + if (isset($params['tag']) && $params['tag'] != '') { + $where[] = ['car_info_t.tag', '=', $params['tag']]; + } if(isset($params['empty_phone_check']) && $params['empty_phone_check'] == 'yes'){ $where[] = ['car_phone', '<>', '']; } @@ -621,7 +624,7 @@ class Task extends BaseController $highestColumn = $sheet->getHighestColumn(); // e.g 'F' $title = $sheet->rangeToArray("A1:{$highestColumn}1")[0]; - $tpl_title = ['税号', '初登日期', '车主', '证件号', '电话号码', '车架号', '车牌号', '发动机号', '车型', '新车购置价']; + $tpl_title = ['税号', '初登日期', '车主', '证件号', '电话号码', '车架号', '车牌号', '发动机号', '车型', '新车购置价', '自定义标签']; // $tpl_title = ['区域', '购车日期', '客户姓名', '证件号码', '联系方式', '车架号', '车牌号', '发动机号', '品牌型号', '新车购置价', '保险公司', '商业止保日期', '交强止保日期', '被保险人', '被保险人证件号']; if (count(array_diff($tpl_title, $title)) > 0) { return false; diff --git a/app/view/index/index.html b/app/view/index/index.html index 4eb54b9..69264c6 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -156,7 +156,14 @@ -