Commit 36b333d1 authored by zhuwei's avatar zhuwei

评价列表-修改

parent ff53bb59
......@@ -12,10 +12,20 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\model\AAgents;
use app\model\AgentsVisitors;
use app\model\ASuperviseModel;
use app\model\SSupervision;
class Supervise extends Basic
{
protected $aSuperviseModel;
public function __construct($request = null)
{
parent::__construct($request);
$this->aSuperviseModel = new ASuperviseModel();
}
/**
* 监督执行
*
......@@ -174,4 +184,66 @@ class Supervise extends Basic
return $this->response($data['status'], $data['msg'], $data['data']);
}
/**
* 监督执行列表
* User: 朱伟
* Date: 2018/6/15
* Time: 13:10:33
*/
public function superviseList(){
$result = '';
$params = $this->params;
// $checkResult = $this->validate($params, "VerifyValidate.select");
// if (true !== $checkResult) {
// //return $this->response("101", $checkResult);
// }
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
//搜索条件 start
//1.上传时间
if (!empty($params['create_time_start']) && !empty($params['create_time_end'])) {
$where['a.create_time'] = ['between time', [$params['create_time_start']. ' 00:00:00', $params['create_time_end'] . ' 23:59:59']];
}
//2.部门
if (!empty($params['district_id'])) {
$where['b.district_id'] = $params['district_id'];
}
//3.门店名称
if (!empty($params['store_id'])) {
$where['b.store_id'] = $params['store_id'];
}
//4.提交人手机号
if (!empty($params['phone'])) {
$where['b.phone'] = ['LIKE','%'.$params['phone'].'%'];
}
//5.跟进内容
if (!empty($params['remark'])) {
$where['a.remark'] = ['LIKE','%'.$params['remark'].'%'];
}
//搜索条件 end
$fields_evaluate = 'a.create_time,a.agent_name,a.address,a.img as supervise_img,a.remark,b.name,b.phone,c.store_name';
$data['list'] = $this->aSuperviseModel->findSuperviseList($pageNo, $pageSize, 'a.id desc', $fields_evaluate, $where);
$data['total'] = $this->aSuperviseModel->findSuperviseListCount($fields_evaluate, $where);
foreach ($data['list'] as $k=>$v) {
$data['list'][$k]['supervise_img'] = CK_IMG_URL .'images/supervise/' . $v['supervise_img'];
}
//var_dump($result);
//return $result;
return $this->response(200, 'success', $data);
}
}
\ No newline at end of file
......@@ -57,8 +57,8 @@ class Evaluation extends Basic
$where['c.store_id'] = $params['store_id'];
}
//4.姓名
if (!empty($params['user_name'])) {
$where['b.user_name'] = ['LIKE','%'.$params['user_name'].'%'];
if (!empty($params['user_nick'])) {
$where['b.user_nick'] = ['LIKE','%'.$params['user_nick'].'%'];
}
//5.手机号
if (!empty($params['user_phone'])) {
......
......@@ -469,6 +469,9 @@ Route::group('broker', [
'returnSearchCondition' => [ 'api_broker/User/returnSearchCondition', [ 'method' => 'get' ] ], //客户搜索条件
'searchUser' => [ 'api_broker/User/searchUser', [ 'method' => 'get|post' ] ], //客户搜索
'superviseList' => [ 'api_broker/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-15
]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment