戴余标 2 years ago
commit a2329555c4

@ -129,6 +129,7 @@ class Customer extends ApiCommon
$data['flow_id'] = $customerCheck['flow_id'];
$data['owner_user_id']=$customerCheck['user_id'];
$data['customer_check_id']=$customerCheck['customer_check_id'];
$data['apply_user_name']=db('admin_user')->where('id', $customerCheck['create_user_id'])->column("username");
}
return resultArray(['data' => $data]);
}

@ -219,6 +219,16 @@ class Index extends ApiCommon
$param['end_time'] = $param['end_time'] . ' 23:59:59';
}
$list = $businessModel->getFunnel($param);
$list['list'][] = [
"name" => "赢单",
"status_id" => "10000",
"status_name" => "赢单",
];
$list['list'][] = [
"name" => "输单",
"status_id" => "10001",
"status_name" => "输单",
];
return resultArray(['data' => $list]);
}
@ -702,7 +712,11 @@ class Index extends ApiCommon
$userInfo = $this->userInfo;
$param['user_id'] = $param['user_id'] ?: $userInfo['id'];
$indexModel = new IndexLogic;
if ($param['status_id'] == "10000" || $param['status_id'] == "10001") {
$data['funnel'] = $param['status_id'];
}
$data = $indexModel->businessList($param);
return resultArray(['data' => $data]);
}
@ -754,7 +768,8 @@ class Index extends ApiCommon
* 跟进详情
* @return \think\response\Json
*/
public function activityList(){
public function activityList()
{
$param = $this->param;
$userInfo = $this->userInfo;
$param['id'] = $userInfo['id'];

@ -52,6 +52,7 @@ class Business extends Common
$overdue = $request['overdue']; // 待办事项下需联系商机(逾期)
$businessIdArray = $request['businessIdArray']; // 待办事项提醒参数
$isMessage = !empty($request['isMessage']);
$funnelQuery = $request['funnel']; // 销售漏斗查询赢单输单
unset($request['scene_id']);
unset($request['search']);
unset($request['user_id']);
@ -142,6 +143,18 @@ class Business extends Common
};
}
}
// 销售漏斗处理
if (!empty($funnelQuery)){
unset($map['business.status_id']);
unset($map['business.is_end']);
switch ($funnelQuery){
case '10000':// 赢单
$map['business.is_end']=1;
case "10001":// 输单
$map['business.is_end']=2;
}
}
//联系人商机
if ($contacts_id) {

Loading…
Cancel
Save