Commit 223cb1a5 authored by zhuwei's avatar zhuwei

1

parent 3807ec35
...@@ -994,7 +994,7 @@ class OrderLogService ...@@ -994,7 +994,7 @@ class OrderLogService
} }
//跟进 //跟进
$field_follow_up = "a.id,a.agent_id,a.agent_name,a.user_status,a.user_type,a.decision_maker,a.industry_type,a.area_requirement,a.price_requirement,a.province,a.city, $field_follow_up = "a.id,a.agent_id,a.agent_name,a.user_type,a.decision_maker,a.industry_type,a.area_requirement,a.price_requirement,a.province,a.city,
a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name"; a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name";
$followUpLogData = $followUpLogModel->getFollowUpByOrderId($field_follow_up, $reportParams); $followUpLogData = $followUpLogModel->getFollowUpByOrderId($field_follow_up, $reportParams);
......
...@@ -13,6 +13,7 @@ use app\model\ACollectUser; ...@@ -13,6 +13,7 @@ use app\model\ACollectUser;
use app\model\ASite; use app\model\ASite;
use app\model\GOperatingRecords; use app\model\GOperatingRecords;
use app\model\OReportModel; use app\model\OReportModel;
use app\model\ULabels;
use app\model\UPhoneFollowUp; use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary; use app\model\UPhoneFollowUpTemporary;
use app\model\Users; use app\model\Users;
...@@ -209,26 +210,38 @@ class UserLogService ...@@ -209,26 +210,38 @@ class UserLogService
public function phoneFollowUpNew($user_id, $site_id, $page_no, $page_size) public function phoneFollowUpNew($user_id, $site_id, $page_no, $page_size)
{ {
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进 // $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$m_label = new ULabels();
$label_data = $m_label->getColumn('id,name', ['type'=>1]); //获取标签
$uPhoneFollowTempModel = new UPhoneFollowUpTemporary($site_id); $uPhoneFollowTempModel = new UPhoneFollowUpTemporary($site_id);
//电话跟进 //电话跟进
$userParams["user_id"] = $user_id; $userParams["user_id"] = $user_id;
$field_user_follow = "a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img"; $field_user_follow = "a.id,a.labels_id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img";
$bargainData = $uPhoneFollowTempModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size); $bargainData = $uPhoneFollowTempModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size);
foreach ($bargainData as $k => $v) {
$bargainData[$k]['label_name'] = array_key_exists($v['labels_id'], $label_data) ? $label_data[$v['labels_id']] : '';
}
return $bargainData; return $bargainData;
} }
public function phoneFollowUp($user_id, $site_id, $page_no, $page_size) public function phoneFollowUp($user_id, $site_id, $page_no, $page_size)
{ {
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进 // $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$m_label = new ULabels();
$label_data = $m_label->getColumn('id,name', ['type'=>1]); //获取标签
$uPhoneFollowModel = new UPhoneFollowUp($site_id); $uPhoneFollowModel = new UPhoneFollowUp($site_id);
//电话跟进 //电话跟进
$userParams["user_id"] = $user_id; $userParams["user_id"] = $user_id;
$field_user_follow = "a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img"; $field_user_follow = "a.id,a.labels_id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img";
$bargainData = $uPhoneFollowModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size); $bargainData = $uPhoneFollowModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size);
foreach ($bargainData as $k => $v) {
$bargainData[$k]['label_name'] = array_key_exists($v['labels_id'], $label_data) ? $label_data[$v['labels_id']] : '';
}
return $bargainData; return $bargainData;
} }
......
...@@ -595,7 +595,7 @@ class UserService ...@@ -595,7 +595,7 @@ class UserService
$s_vip = new VipService(); $s_vip = new VipService();
//0:有权限 1:无权限 //0:有权限 1:无权限
$is_can_edit = $s_vip->vip($agent_id,'removeUserBind'); $is_can_edit = $s_vip->vip($agent_id,'removeUserBind');
if ($is_can_edit == 1) { if ($is_can_edit == 1 and ($user_agent_id['agent_id' != $agent_id])) {
return 2;//无解除关联权限权限 return 2;//无解除关联权限权限
} }
// 客户bind_id不等于0才能解绑并记录日志 // 客户bind_id不等于0才能解绑并记录日志
......
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