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 @@ -
+
+ +
+ +
+
+
diff --git a/app/view/task/index.html b/app/view/task/index.html index 599de9d..23a64d8 100644 --- a/app/view/task/index.html +++ b/app/view/task/index.html @@ -52,6 +52,12 @@ 日 +
+ +
+ +
+
diff --git a/extend/service/CarInfoHandle.php b/extend/service/CarInfoHandle.php index 8f94859..8117017 100644 --- a/extend/service/CarInfoHandle.php +++ b/extend/service/CarInfoHandle.php @@ -51,6 +51,9 @@ class CarInfoHandle if (isset($data['price2']) && $data['price2'] != '') { $where[] = ['car_info_t.purchase_price', '<=', $data['price2'] * 10000]; } + if (isset($params['tag']) && $params['tag'] != '') { + $where[] = ['car_info_t.tag', '=', $params['tag']]; + } if (isset($data['empty_phone_check']) && $data['empty_phone_check'] == 'yes') { $where[] = ['car_phone', '<>', '']; } @@ -569,6 +572,7 @@ class CarInfoHandle 'engine_no' => trim(trim($worksheet->getCellByColumnAndRow(8, $row)->getValue(), '"')), 'factory_model' => trim(trim($worksheet->getCellByColumnAndRow(9, $row)->getValue(), '"')), 'purchase_price' => trim(trim($worksheet->getCellByColumnAndRow(10, $row)->getValue(), '"')), + 'tag' => trim(trim($worksheet->getCellByColumnAndRow(11, $row)->getValue(), '"')), 'source' => $id, 'create_timestamp' => $now, 'update_timestamp' => $now diff --git a/public/static/tpl.xlsx b/public/static/tpl.xlsx index 09dd339..0e1cce9 100644 Binary files a/public/static/tpl.xlsx and b/public/static/tpl.xlsx differ