Commit 6ee57396 authored by zw's avatar zw

Merge branch 'test' into 0102-v3.0.4

# Conflicts: # application/api_broker/controller/User.php # application/index/extend/Basic.php # application/index/service/UserLogService.php # application/model/Users.php # public/resource/js/RemarkFollowIndex.js # public/resource/js/user.js
parents 63de59f2 31fecada
No preview for this file type
No preview for this file type
......@@ -28,8 +28,10 @@ use app\model\Evaluate;
use app\model\GOperatingRecords;
use app\model\NoteLog;
use app\model\OBargainModel;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use app\task\controller\FollowUpTask;
use think\Exception;
use think\Log;
use think\Request;
......@@ -345,17 +347,19 @@ class Broker extends Basic
$params['user_status']='1';//0电话跟进 1普通跟进*/
$checkResult = $this->validate($params, "BrokerValidate.verifyStatus");
$checkResult = $this->validate($params, "BrokerValidate.add_phone_follow_up_verify");
if (true !== $checkResult) {
return $this->response("300", $checkResult);
}
$user_id = $params['user_id'];
$user_status = $params['user_status'];
$Users = new Users();
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$result = $UPhoneFollowPp->savePhoneFollow($params);
// $s_phone_follow_up = new UPhoneFollowUp($this->siteId);
$s_phone_follow_up = new UPhoneFollowUpTemporary($this->siteId);
$result = $s_phone_follow_up->savePhoneFollow($params);
if ($result > 0) {
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
......
......@@ -6,8 +6,8 @@ use app\api_broker\extend\Basic;
use app\index\service\UserService;
use app\model\AAgents;
use app\model\ULabels;
use app\model\UPhoneFollowUp;
use app\model\Users;
use app\model\UPhoneFollowPp;
use app\api_broker\service\VipService;
/**
......@@ -171,7 +171,7 @@ class Client extends Basic
*/
public function agentUserFollow(){
header('Access-Control-Allow-Origin:*');
$table= new UPhoneFollowPp($this->siteId);
$table= new UPhoneFollowUp($this->siteId);
$data['msg'] = '';
$params = $this->request->param();
$time=date("Y-m-d H:i:s",time());//当前时间
......@@ -283,9 +283,9 @@ class Client extends Basic
$total = $user->all_user_count($conditions);
}else{
//跟进
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$user_res = $UPhoneFollowPp->all_user_search($phone_or_name,$pagesize,$pagenum);
$total = $UPhoneFollowPp->all_user_search_count($phone_or_name);
$s_phone_follow_up = new UPhoneFollowUp($this->siteId);
$user_res = $s_phone_follow_up->all_user_search($phone_or_name,$pagesize,$pagenum);
$total = $s_phone_follow_up->all_user_search_count($phone_or_name);
}
if($search_type!='2')
......
......@@ -10,7 +10,9 @@ use app\extra\RedisExt;
use app\model\AAgents;
use app\model\GHouses;
use app\model\GHousesFollowUp;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\task\controller\FollowUpTask;
use think\Log;
use think\Request;
......@@ -26,12 +28,14 @@ class HomePageLog extends Basic
private $uPhoneFollowUpModel;
private $gHouseFollowUpModel;
private $phoneFollowUpTemporary;
function __construct(Request $request = null)
{
parent::__construct($request);
$this->uPhoneFollowUpModel = new UPhoneFollowPp($this->siteId);
$this->uPhoneFollowUpModel = new UPhoneFollowUp( $this->siteId);
$this->gHouseFollowUpModel = new GHousesFollowUp();
$this->phoneFollowUpTemporary = new UPhoneFollowUpTemporary( $this->siteId);
}
/**
......@@ -44,16 +48,14 @@ class HomePageLog extends Basic
public function userFollowUpList()
{
$params = $this->params;
Log::write($params, 'userFollowUpList'); //记录日志
/*$params = array(
"start_time" => strtotime('2016-08-14 15:47:36'), //开始时间
"end_time" => strtotime('2018-08-14 15:47:36'), //结束时间
"name_or_phone" => "18112347151",//用户姓名或电话 经纪人
/* $params = array(
"start_time" => strtotime('2018-08-14 15:47:36'), //开始时间
"end_time" => strtotime('2019-01-10 15:47:36'), //结束时间
//"name_or_phone" => "18112347151",//用户姓名或电话 经纪人
"search_content" => "",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
$vrs = new VerifyRepetitionService();
$is_check = $vrs->followUpClick($this->agentId);
if($params["pageNo"] == 1 && !$is_check){
......@@ -69,19 +71,24 @@ class HomePageLog extends Basic
if (empty($params['start_time']) || empty($params['end_time'])) {
return $this->response("101", '请选择时间');
}
$start_time = date("Y-m-d H:i:s", $params["start_time"]);
$end_time = date("Y-m-d H:i:s", $params["end_time"]);
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field = "f.id,f.user_id,f.agent_id,f.type,f.content,f.create_time,f.user_status";
$field = "id,user_id,agent_id,type,content,create_time,user_status";
$where_ = [];
$where = ' 1=1 ';
if (!empty($params["search_content"])) {
$where_["f.content"] = array( "like", "%" . trim($params['search_content']) . "%" );
$search_content = trim($params['search_content']);
$where_["content"] = array( "like", "%" . $search_content . "%" );
$where .= " AND content LIKE '%$search_content%'";
}
if (!empty($params["start_time"]) && !empty($params["end_time"])) {
$start_time = date("Y-m-d H:i:s", $params["start_time"]);
$end_time = date("Y-m-d H:i:s", $params["end_time"]);
$where_["f.create_time"] = array( 'between', array( $start_time, $end_time ) );
$where_["create_time"] = array( 'between', array( $start_time, $end_time ) );
$where .= ' AND create_time BETWEEN "'.$start_time.'" AND "'.$end_time .'"';
}
if (!empty($params["name_or_phone"])) {
......@@ -97,17 +104,20 @@ class HomePageLog extends Basic
$model = new AAgents();
$res_a = $model->getAgentsIdsArray($agent_field, $agent_params);
if ($res_a) {
$where_["f.agent_id"] = [ 'in', $res_a ];
$where_["agent_id"] = [ 'in', $res_a ];
$where .= " AND agent_id in ($res_a)";
} else {
return $this->response("200", "request null");
}
}
//$where_["f.city"] = trim($this->city) ? trim($this->city) : '上海市';
$order = "f.id desc";
$result = $this->uPhoneFollowUpModel->getSearch($pageNo, $pageSize, $order, $field, [], $where_, "");
$date = date("Y-m-d", time());
if ($start_time >= $date && $start_time <= $date . " 23:59:59" ) {
big_log(json_encode($where_));
$result = $this->phoneFollowUpTemporary->getFollowList($pageNo, $pageSize, $order_ = 'id desc', $field, $where_);
} else {
$result = $this->uPhoneFollowUpModel->getFollowList($pageNo, $pageSize, 'id desc',$field, $where);
}
$clientService = new ClientService();
foreach ($result as $key => $value) {
$agent_params = [];
......
......@@ -7,12 +7,12 @@ use app\api_broker\service\CallPhoneService;
use app\api_broker\service\ClientService;
use app\api_broker\service\UserExpiredTimeService;
use app\api_broker\service\VipService;
use app\index\service\UserLogService;
use app\index\service\UserService;
use app\model\AAgents;
use app\model\GOperatingRecords;
use app\model\ULabels;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\Users;
use think\Log;
use think\Request;
......@@ -663,7 +663,7 @@ class User extends Basic
$field = 'a.id,a.user_id,b.user_nick,b.user_nick,b.agent_id,b.vip,b.create_time';
$model = new UPhoneFollowPp($this->siteId);
$model = new UPhoneFollowUp($this->siteId);
$model_res = $model->getLastOrNextUserIDPhoneFollowP($where, $field, $limit = 1, $order);
if (!$model_res) {
......@@ -724,206 +724,4 @@ class User extends Basic
);
}
/**
* 获取用户主要信息
* @return \think\Response
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function userDetail()
{
$params = $this->params;
/* $params = array(
"user_id" => 187,
"agent_id" => 1,
);*/
if (!isset($params['user_id']) || !isset($params['agent_id'])) {
return $this->response("101", "参数不全");
}
//简易客户详情
$result['user_detail'] = $this->userLogService->userDetailStreamline($params['user_id'],$params['agent_id']);
//绑定关系(关联客户)
$s_index_user = new UserService();
$result['user_bind_list'] = $s_index_user->userBindInfo($params['user_id']);
if($result){
return $this->response("200", "success!", $result);
}else{
return $this->response("101", $result["msg"]);
}
}
/**客户动态
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function userLog(){
$params = $this->params;
/* $params = array(
"user_id" => 828,
"type" => 1,
);*/
if (!isset($params['user_id']) || !isset($params['type'])) {
return $this->response("101", "参数不全");
}
$user_id = $params['user_id'];
$type = $params['type'];
$result = $this->userLogService->userLog($user_id,$this->siteId,$type);
if(count($result) > 0){
return $this->response("200", "success!", $result);
}else{
return $this->response("200", "请求数据为空");
}
}
/**
* 电话跟进
* @return \think\Response
*/
public function followUpLog(){
$params = $this->params;
/* $params = array(
"user_id" => 828,
"page_no" => 1,
"page_size" => 15
);*/
if (!isset($params['user_id'])) {
return $this->response("101", "参数不全");
}
$user_id = $params['user_id'];
$pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->userLogService->phoneFollowUp($user_id,$this->siteId,$pageNo,$pageSize);
if(count($result) > 0){
return $this->response("200", "success!", $result);
}else{
return $this->response("200", "请求数据为空");
}
}
/**
* 客户详情-详细信息-
* @return \think\Response
*/
public function userDetailFull()
{
$params = $this->params;
/*$params = array(
"user_id" => 187,
"agent_id" => 1,
);*/
if (!isset($params['user_id']) || !isset($params['agent_id'])) {
return $this->response("101", "参数不全");
}
//简易客户详情
$result['user_detail'] = $this->userLogService->userDetailFull($params['user_id'],$params['agent_id']);
$m_records = new GOperatingRecords();
//客方修改日志
$param_['user_id'] = $params['user_id'];
$param_['type'] = 3;
$result['user_history'] = $m_records->user_history($param_);
//邀请人修改日志
$param_['type'] = 5;
$result['user_invite_history'] = $m_records->user_history($param_);
if($result){
return $this->response("200", "success!", $result);
}else{
return $this->response("101", $result["msg"]);
}
}
/**
* 新增关联客户
* @return \think\Response
*/
public function addUserBind()
{
if (empty($this->params['user_id']) OR empty($this->params['bind_id'])) {
return $this->response(101, '参数错误');
}
$s_index_user = new UserService();
//新增
$add_res = $s_index_user->addUserBind($this->params['user_id'],$this->params['bind_id']);
switch ($add_res) {
case 1 :
return $this->response("300", "参数不全");
break;
case 2 :
return $this->response("300", "当前客户已经存在绑定关系");
break;
case 3 :
return $this->response("300", "当前客户已经存在绑定关系");
break;
case 4 :
return $this->response("300", "绑定客户关系数超限");
break;
case 5 :
return $this->response("300", "绑定失败");
break;
case 6 :
return $this->response("300", "不得绑定自己");
break;
case 0 :
return $this->response("200", "绑定成功");
break;
default :
return $this->response("300", "绑定失败");
}
}
/**
* 客户关联解绑
* @return \think\Response
*/
public function removeUserBind()
{
if (empty($this->params['user_id'])) {
return $this->response(101, '参数错误');
}
//解除
$s_index_user = new UserService();
$rm_res = $s_index_user->removeUserBind($this->params['user_id'],$this->agentId);
switch ($rm_res) {
case 1 :
return $this->response("300", "操作人不是客方");
break;
case 2 :
return $this->response("300", "无解除关联权限权限");
break;
case 3 :
return $this->response("300", "主账号不允许此操作!");
break;
case 0 :
return $this->response("200", "解绑成功");
break;
default :
return $this->response("300", "解绑失败");
}
}
}
\ No newline at end of file
......@@ -15,7 +15,8 @@ use app\extra\RedisExt;
use app\model\AliYunPhone;
use app\model\BindingPhone;
use app\model\SecretReport;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use think\Log;
......@@ -562,7 +563,7 @@ class CallPhoneService
if(empty($array[2])){
$this->redis->hDel($user_key, $v);
} else {
$m_follow_up = new UPhoneFollowPp($array[2]);
$m_follow_up = new UPhoneFollowUpTemporary($array[2]);
$num = $m_follow_up->getFollowTotal($follow_where);
if (empty($num) && !empty($array[1])) {
//$agent_id, $user_id, $content, $type
......
......@@ -3,7 +3,6 @@
namespace app\api_broker\service;
use app\extra\RedisExt;
use app\model\UPhoneFollowPp;
/**
* Created by PhpStorm.
......
......@@ -467,7 +467,7 @@ class DailyPaperService
return ["code" => 101, "msg" => "经纪人信息错误"];
}
//todo 判断是否提交过,
$dailyInfo = $this->getDailyInfo($agent_id,$daily_date);
$dailyInfo = $this->getDailyInfo($agent_id,$daily_date,1);
if(count($dailyInfo) > 0 ){
return ["code" => 101, "msg" => "请勿重复提交日报"];
}
......@@ -600,17 +600,22 @@ class DailyPaperService
* 获取提交的日报记录
* @param $store_id
* @param $daily_data
* @param $type
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private function getDailyInfo($store_id, $daily_data)
private function getDailyInfo($store_id, $daily_data,$type = 0)
{
$field_info_field = "id,agent_id,agent_name,daily_date,alipay,tenpay,realty_pay,family_pay,private_bank,
cash,pos,other_bank,status,create_time,update_time";
if($type == 1){
$daily_info_params["agent_id"] = $store_id;
}else{
$daily_info_params["store_id"] = $store_id;
}
$daily_info_params["store_id"] = $store_id;
$daily_info_params["daily_date"] = $daily_data;
return $this->oDailyModel->getDailyList($field_info_field, $daily_info_params, 1, 1);
......
......@@ -18,7 +18,8 @@ use app\model\ORefundModel;
use app\model\OReportModel;
use app\model\OTaxes;
use app\model\Regions;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
......@@ -752,12 +753,28 @@ class OrderLogService
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$uPhoneFollowModel = new UPhoneFollowPp($site_id);
$uPhoneFollowModel = new UPhoneFollowUp($site_id);
$uPhoneFollowTempModel = new UPhoneFollowUpTemporary($site_id);
//电话跟进
$userParams["user_id"] = $user_id;
$userParams["type"] = 0; //电话跟进
$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,c.store_name";
$bargainData = $uPhoneFollowModel->getFollowUpListByUserId($field_user_follow, $userParams);
$bargainDataTemp = $uPhoneFollowTempModel->getFollowUpListByUserId($field_user_follow, $userParams);
if (count($bargainDataTemp) > 0) {
foreach ($bargainDataTemp as $k => $v) {
$type = "无效";
if ($v["user_status"] == 0) {
$type = "求租";
} elseif ($v["user_status"] == 1) {
$type = "已租";
}
$v["step_name"] = "phone_follow_up";
$v["step"] = "电话跟进:" . $v['content'] . "【" . $type . "】";
$result[$sort++] = $v;
}
}
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$type = "无效";
......@@ -775,6 +792,21 @@ class OrderLogService
//跟进
$userParams["type"] = 1; //普通跟进
$bargainData = $uPhoneFollowModel->getFollowUpListByUserId($field_user_follow, $userParams);
$bargainDataTemp = $uPhoneFollowTempModel->getFollowUpListByUserId($field_user_follow, $userParams);
if (count($bargainDataTemp) > 0) {
foreach ($bargainDataTemp as $k => $v) {
$type = "无效";
if ($v["user_status"] == 0) {
$type = "求租";
} elseif ($v["user_status"] == 1) {
$type = "已租";
}
$v["step_name"] = "follow_up";
$v["step"] = "跟进:" . $v['content'] . "【" . $type . "】";
$result[$sort++] = $v;
}
}
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$type = "无效";
......
......@@ -12,7 +12,7 @@ use app\model\OMarchInModel;
use app\model\OPayLogModel;
use app\model\OReportModel;
use app\model\TAgentTotalModel;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\Users;
use think\Log;
......@@ -759,7 +759,7 @@ class PerformanceService
}
$addUserList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]);
$follow = new UPhoneFollowPp($site_id);
$follow = new UPhoneFollowUp($site_id);
$res = $follow->getLastPhoneFollowTime($val['id']);
$addUserList[$key]["last_phone_follow_time"] = $res[0]['create_time'] ? $res[0]['create_time'] : '暂无!';
......@@ -856,7 +856,7 @@ class PerformanceService
$list = $this->agentModel->searchAgentsByKeywordPcInfo($field, $params, $page_size, $page_no);
foreach ($list as $key => $val) {
$follow = new UPhoneFollowPp($site_id);
$follow = new UPhoneFollowUp($site_id);
$res = $follow->getLastPhoneFollowTime($val['id']);
$list[$key]["user_name"] = $val["user_name"] ? $val["user_name"] : '';
$list[$key]["last_phone_follow_time"] = $res[0]['create_time'] ? $res[0]['create_time'] : '暂无!';
......
......@@ -164,7 +164,7 @@ class StatementService
$where_["agent_id"] = array( "in", $agentIds );
}
$where_['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) );
$where_['status'] =array( "in", '10, 11, 13, 20' );
$where_['status'] =array( "in", '10, 11, 13' );
// $obargain = new OBargainModel();
$performanceSum = $this->bargainModel->getAddBargainNum($where_, 1);//1表示业绩 2表示实收
......
......@@ -13,7 +13,8 @@ use app\api_broker\service\PushMessageService;
use app\index\extend\Basic;
use app\model\AAgents;
use app\model\SecretReport;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use app\model\TAgentTotalCallModel;
......@@ -92,7 +93,8 @@ class CellPhone extends Basic
$list = $report->getCallList($pageNo, $pageSize, 'id desc', $field, $where);
$m_user = new Users();
$m_phone_follow = new UPhoneFollowPp($this->siteId);
$m_phone_follow = new UPhoneFollowUp($this->siteId);
$m_phone_follow_temp = new UPhoneFollowUpTemporary($this->siteId);
$m_agent = new AAgents();
foreach ($list as $k => $v) {
if (empty($v['agents_id'])) {
......@@ -142,7 +144,10 @@ class CellPhone extends Basic
$where_follow['user_id'] = $v['users_id'];
$where_follow['type'] = 0;
$where_follow['agent_id'] = $v['agents_id'];
$result[$k]['content'] = $m_phone_follow->getUserFollowKey('content', $where_follow, 'id DESC');
$result[$k]['content'] = $m_phone_follow_temp->getUserFollowKey('content', $where_follow, 'id DESC');
if (empty($result[$k]['content'])) {
$result[$k]['content'] = $m_phone_follow->getUserFollowKey('content', $where_follow, 'id DESC');
}
} else {
$result[$k]['user_nick'] = "";
$result[$k]['content'] = "";
......
......@@ -13,7 +13,8 @@ use app\index\extend\Basic;
use app\model\FollowUp;
use app\model\GLabels;
use app\model\ULabels;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use think\Session;
class Label extends Basic
......@@ -162,8 +163,12 @@ class Label extends Basic
if (empty($this->params['user_id'])) {
return $this->response(101, '没有用户信息');
}
$follow = new UPhoneFollowPp($this->siteId);
$user_status = $follow->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC');
$follow_temp = new UPhoneFollowUpTemporary($this->siteId);
$user_status = $follow_temp->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC');
if (empty($user_status)) {
$follow = new UPhoneFollowUp($this->siteId);
$user_status = $follow->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC');
}
return $this->response(200, '', $user_status);
}
......
......@@ -11,8 +11,10 @@ use app\index\service\UserService;
use app\model\AAgents;
use app\model\ACollectUser;
use app\model\GOperatingRecords;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use app\model\UPhoneFollowPp;
use app\task\controller\FollowUpTask;
use think\Log;
use think\Request;
use think\session;
......@@ -437,8 +439,10 @@ class Member extends Basic{
$params['agent_id'] = Session::get("user_info.id");
$params['type'] = 1;
$params['user_status'] = $params['user_status'];
$model = new UPhoneFollowPp($this->siteId);
$result = $model->savePhoneFollow($params);
// $model = new UPhoneFollowUp($this->siteId);
$s_phone_follow_up = new UPhoneFollowUpTemporary($this->siteId);
$result = $s_phone_follow_up->savePhoneFollow($params);
$user = new Users();
$user->update_user_status(['id'=>$params['user_id'],'user_status'=>$params['user_status']]);
......
......@@ -13,6 +13,7 @@ use app\api_broker\service\ClientService;
use app\extra\RedisExt;
use app\api_broker\service\VerifyRepetitionService;
use app\index\extend\Basic;
use app\index\service\PhoneFollowUpService;
use app\index\service\UserService;
use app\model\AAgents;
use app\model\AAgentsPhone;
......@@ -20,7 +21,7 @@ use app\model\ASite;
use app\model\GOperatingRecords;
use app\model\Remarks;
use app\model\ULabels;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\Users;
class Remark extends Basic
......@@ -49,7 +50,7 @@ class Remark extends Basic
return $this->response("101", $msg);
}
$u_phone_follow = new UPhoneFollowPp($this->siteId);
$u_phone_follow = new UPhoneFollowUp($this->siteId);
$user_service = new UserService();
$clientService = new ClientService();
$m_agent_phone = new AAgentsPhone();
......@@ -166,6 +167,84 @@ class Remark extends Basic
return $this->response(200, '成功', $data);
}
/**
* 跟进列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function followUpListV2()
{
if (!$this->request->isAjax()) {
return view('remark_follow_index');
}
$m_user = new Users();
$m_label = new ULabels();
$m_agent = new AAgents();
$code = 200;
$msg = '';
$follow_up_service = new PhoneFollowUpService($this->siteId);
$where = $list = [];
$where['page_no'] = $this->params['pageNo'];
$where['page_size'] = $this->params['pageSize'];
if (!empty($this->params['user_id'])) {
$where['user_id'] = (int)$this->params['user_id'];
}
if (!empty($this->params['agent_id'])) {
$where['agent_id'] = (int)$this->params['agent_id'];
}
if (!empty($this->params['content'])) {
$where['content'] = $this->params['content'];
}
if (!empty($this->params['remark_store_id'])) {
$where['store_id'] = (int)$this->params['remark_store_id'];
}
if (!empty($this->params['remark_district_id'])) {
$where['district_id'] = (int)$this->params['remark_district_id'];
}
$result_data = $follow_up_service->getPhoneFollowList($this->params['start_date'], $this->params['end_date'], $where, $this->userId);
$label_data = $m_label->getColumn('id,name', ['type'=>1]); //获取标签
if ($result_data['code'] == 200) {
if (!empty($result_data['data'])) {
foreach ($result_data['data'] as $k => $v) {
if (!empty($v['user_id'])) {
$user_data = $m_user->getUserById('user_name,user_phone,vip,agent_id,create_time', $v['user_id']);
$list[$k]['user_name'] = $user_data['user_name'];
$list[$k]['user_phone'] = $user_data['user_phone'];
$list[$k]['u_create_time'] = $user_data['create_time'];
$list[$k]['vip'] = $user_data['vip'];
$list[$k]['agent_id'] = $user_data['agent_id']; //客户客方
}
$list[$k]['user_phone'] = substr_replace($list[$k]['user_phone'], '****', 3, 4);
$list[$k]['admin'] = $m_agent->getAgentsById($v['agent_id'], 'name');
$list[$k]['label_name'] = array_key_exists($v['labels_id'], $label_data) ? $label_data[$v['labels_id']] : '';
$list[$k]['is_outstrip_twenty_four_hours'] = $v['is_outstrip_twenty_four_hours'];
$list[$k]['is_outpace_call_num'] = $v['is_outpace_call_num'];
$list[$k]['create_time'] = $v['create_time'];
$list[$k]['user_id'] = $v['user_id'];
$list[$k]['content'] = $v['content'];
$list[$k]['user_status'] = $v['user_status'];
$list[$k]['id'] = $v['id'];
}
}
} else {
$msg = $result_data['data'];
$code = 101;
$list = [];
}
$data['data']['list'] = $list;
$data['data']['total'] = 40000;
return $this->response($code, $msg, $data);
}
/**
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
......@@ -214,22 +293,22 @@ class Remark extends Basic
$pagesize = 15;
$user_id = $params['user_id'];
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$s_phone_follow_up = new UPhoneFollowUp($this->siteId);
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->select_useraction_search($user_id, $searchdate);
$s_phone_follow_up_res = $s_phone_follow_up->select_useraction_search($user_id, $searchdate);
foreach ($UPhoneFollowPp_res as $k => $v) {
foreach ($s_phone_follow_up_res as $k => $v) {
$table = new AAgents();
$Agents_res = $table->Agents_res($v['agent_id']);
$UPhoneFollowPp_res[$k]['agentinfo'] = $Agents_res ? $Agents_res['store_name'] . '-' . $Agents_res['name'] : '未知';
$UPhoneFollowPp_res[$k]['user_pic'] = AGENTHEADERIMGURL . $Agents_res['img'];
$UPhoneFollowPp_res[$k]['label'] = '';
$s_phone_follow_up_res[$k]['agentinfo'] = $Agents_res ? $Agents_res['store_name'] . '-' . $Agents_res['name'] : '未知';
$s_phone_follow_up_res[$k]['user_pic'] = AGENTHEADERIMGURL . $Agents_res['img'];
$s_phone_follow_up_res[$k]['label'] = '';
//电话跟进标签
if ($v['labels_id']) {
$table = new ULabels();
$table_res = $table->get_labelsname($v['labels_id']);
$UPhoneFollowPp_res[$k]['label'] = $table_res[0]['name'];
$s_phone_follow_up_res[$k]['label'] = $table_res[0]['name'];
}
}
......@@ -324,7 +403,7 @@ class Remark extends Basic
return $this->response("200", "success!", [
'user_info' => $user_res,
'user_date' => $UPhoneFollowPp_res,
'user_date' => $s_phone_follow_up_res,
'user_history' => $records_result,
'user_invite_history' => $records_invite_result,
'user_invite_info' => $user_invite_info,
......@@ -343,12 +422,12 @@ class Remark extends Basic
$page_num = isset($params['pagenum']) ? $params['pagenum'] : 1;
$page_size = 15;
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$s_phone_follow_up = new UPhoneFollowUp($this->siteId);
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->phone_up_list($page_size, $page_num);
$total = $UPhoneFollowPp->phone_up_list_count();
$s_phone_follow_up_res = $s_phone_follow_up->phone_up_list($page_size, $page_num);
$total = $s_phone_follow_up->phone_up_list_count();
$total = intval($total / $page_size) + (($total % $page_size == 0) ? 0 : 1);
return $this->response("200", "success!", [ 'user_date' => $UPhoneFollowPp_res, 'pagenum' => $pagenum, 'total' => $total ]);
return $this->response("200", "success!", [ 'user_date' => $s_phone_follow_up_res, 'pagenum' => $pagenum, 'total' => $total ]);
}
......
......@@ -83,6 +83,34 @@ class UserLog extends Basic{
}
/**
* 电话跟进
* @return \think\Response
*/
public function followUpLogNew(){
$params = $this->params;
/* $params = array(
"user_id" => 828,
"page_no" => 1,
"page_size" => 15
);*/
if (!isset($params['user_id'])) {
return $this->response("101", "参数不全");
}
$user_id = $params['user_id'];
$pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->phoneFollowUpNew($user_id,$this->siteId,$pageNo,$pageSize);
if(count($result) > 0){
return $this->response("200", "success!", $result);
}else{
return $this->response("101", "请求数据为空");
}
}
/**
* 电话跟进
* @return \think\Response
......
......@@ -68,6 +68,10 @@ class Basic extends Controller
'index/yindaoIos',
'index/getUserMacAddress',
'index/getConfigWeek',
'index/followUpLogNew',
'index/followUpLog',
'index/userLog',
'index/userDetail',
'index/getSystemMessageByUser',
'index/userModalList',
'index/mainIndex'
......
<?php
/**
* Created by PhpStorm.
* User: 43897
* Date: 2019/1/10
* Time: 13:51
*/
namespace app\index\service;
use app\api_broker\service\VerifyRepetitionService;
use app\model\AAgents;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use app\task\controller\FollowUpTask;
class PhoneFollowUpService
{
private $phoneFollowUp;
private $phoneFollowUpTemporary;
private $siteId;
public function __construct($site_id)
{
$this->siteId = $site_id;
$this->phoneFollowUp = new UPhoneFollowUp($site_id);
$this->phoneFollowUpTemporary = new UPhoneFollowUpTemporary($site_id);
}
/**
* @param string $start_time
* @param string $end_time
* @param array $params
* @param string $field
* @param $agent_id
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getPhoneFollowList(string $start_time, string $end_time, array $params, $agent_id, $field = 'id,user_id,create_time,content,user_status,labels_id,agent_id')
{
$vrs = new VerifyRepetitionService();
$page_no = isset($params['page_no']) ? $params['page_no'] : 1;
$page_size = isset($params['page_size']) ? $params['page_size'] : 15;
$is_check = $vrs->followUpClick($agent_id);
if($page_no == 1 && !$is_check){
$is_bool = $vrs->getCurrTimeSection();
$msg = "请勿频繁请求";
if($is_bool) {
$msg = "高峰期间每10秒钟只能搜索一次(6.30-8.30)";
}
return ['code'=>'101','data'=>$msg];
}
$where = ' 1=1 ';
if (empty($start_time) || empty($end_time)) {
return ['code'=>'101','data'=>'时间不能为空'];
} else {
$where .= ' AND create_time BETWEEN "'.$start_time.' 00:00:00" AND "'.$end_time. ' 23:59:59"';
}
$data = [];
if (isset($params['user_id'])) {
$where .= " AND user_id= {$params['user_id']}";
}
if (isset($params['agent_id'])) {
$where .= " AND agent_id = {$params['agent_id']}";
}
if (!empty($params['store_id'])) {
$agent_where['store_id'] = $params['store_id'];
}
if (!empty($params['district_id'])) {
$agent_where['district_id'] = $params['district_id'];
}
if (!empty($params['content'])) {
$params['content'] = trim($params['content']);
$where .= " AND content LIKE '%{$params['content']}%'";
}
if (!empty($agent_where)) {
$m_agent = new AAgents();
$agent_id = $m_agent->getAgentsByWhereColumn($agent_where, 'id');
if (empty($agent_id)) {
return ['code'=>'101','data'=>'暂无数据'];
} else {
$agent_id_string = implode(',', $agent_id);
$where .= " AND agent_id in ({$agent_id_string})";
}
}
$date = date("Y-m-d", time());
// if ($end_time < $date && $end_time < $date . " 23:59:59" ) {
if ($end_time == $date && $start_time == $date) {
$data = $this->phoneFollowUpTemporary->getFollowList($page_no, $page_size, $order_ = 'id desc', $field, $where);
} else {
$data = $this->phoneFollowUp->getFollowList($page_no, $page_size, $order_ = 'id desc', $field, $where);
}
// else {
// $data = $this->phoneFollowUpTemporary->getFollowListV3($this->siteId,$page_no, $page_size, $where, $field);
// }
$s_user_service = new UserService();
$s_user_Log_service = new UserLogService();
$m_user = new Users();
foreach ($data as $k => $v) {
#客户是否在保护期内(0:保护器内 1:超过保护期)
$data[$k]['is_outstrip_twenty_four_hours'] = $s_user_service->isUserProtect($v['user_id']);
#判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定(0允许拨打 1不允许拨打)
$user_res = $m_user->verifyUser('user_name,user_phone', '', [ 'id' => $v['user_id'] ]);
$data[$k]['is_outpace_call_num'] = $s_user_Log_service->userDetailIsOutpaceCallNum($v['user_id'],$user_res['user_phone'], $agent_id);
}
return ['code'=>'200','data'=>$data];
}
}
\ No newline at end of file
......@@ -11,7 +11,8 @@ use app\model\ACollectUser;
use app\model\ASite;
use app\model\GOperatingRecords;
use app\model\OReportModel;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
/**
......@@ -56,6 +57,8 @@ class UserLogService
}
$user_arr['user_pic'] = HEADERIMGURL . $user_arr['user_pic'];
$user_arr['user_phone'] = substr_replace($user_arr['user_phone'], '****', 3, 4);
$agents_arr = $this->agentModel->verifyUser('name,phone', '', ['id' => $user_arr['agent_id']]);
$user_arr['agent_info'] = $agents_arr ? $agents_arr['name'] . '-' . $agents_arr['phone'] : '未知';
......@@ -200,14 +203,27 @@ class UserLogService
* @param $page_no
* @param $page_size
*/
public function phoneFollowUpNew($user_id, $site_id, $page_no, $page_size)
{
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$uPhoneFollowTempModel = new UPhoneFollowUpTemporary($site_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";
$bargainData = $uPhoneFollowTempModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size);
return $bargainData;
}
public function phoneFollowUp($user_id, $site_id, $page_no, $page_size)
{
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$uPhoneFollowModel = new UPhoneFollowPp($site_id);
$uPhoneFollowModel = new UPhoneFollowUp($site_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";
$bargainData = $uPhoneFollowModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size);
return $bargainData;
......@@ -368,4 +384,28 @@ class UserLogService
}
return $referrer_user_string;
}
/**
* 判断当天被拨打是否超过5次
* 同时判断是否当前经纪人跟当前客户是否有电话绑定
* @param $user_id
* @param $user_phone
* @param $agent_id
* @return int
*/
public function userDetailIsOutpaceCallNum($user_id,$user_phone, $agent_id)
{
$is_outpace_call_num = 0;
$clientService = new ClientService();
if (!$clientService->dialTotal($user_id)) {
$is_outpace_call_num = 1;
}
$agent_res = $this->agentModel->searchAgentsByKeyword("id,name,phone", ["id" => $agent_id]);
$call = new CallPhoneService();
$bind_num_res = $call->getBindNum($user_phone, $agent_res[0]['phone']);
if ($bind_num_res != 0) {
$is_outpace_call_num = 0;
}
return $is_outpace_call_num;
}
}
\ No newline at end of file
......@@ -393,27 +393,21 @@ class UserService
return false;
}
//根据客户id查询
$user_res = $this->user->selectUser($user_id, "id,site_ids");
//dump($user_res);exit;
if ($user_res['site_ids']) {
// $user_res = $this->user->selectUser($user_id, "id,site_ids");
/*if ($user_res['site_ids']) {
$site_ids_array = explode(',', rtrim($user_res['site_ids'], ','));
$site_ids_array_ = explode(',', rtrim($site_id, ','));
$site_ids_merge = array_merge($site_ids_array, $site_ids_array_);//数组合并
$site_ids_merge = array_unique($site_ids_merge);//数组去重
$site_ids = implode(",", $site_ids_merge);
} else {
$site_ids = $site_id;
}
//dump($site_ids);exit;
}*/
$site_ids = $site_id;
//保存数据
$params_['site_ids'] = $site_ids;
//dump($user_id);
$res = $this->user->updateUsers($user_id, $params_);//int(1)
$this->user->updateUsers($user_id, $params_);//int(1)
return true;
}
......
......@@ -594,9 +594,7 @@
</div>
<div class="modal-body">
备注: <textarea name="" rows="" cols=""style="width: 500px;height: 160px;" class="remark-financial">
</textarea>
备注: <textarea name="" rows="" cols=""style="width: 500px;height: 160px;" class="remark-financial"></textarea>
</div>
<div class="modal-footer">
<button type="button btn2" class="btn btn-primary is-submit-pass">
......
<script src='/resource/lib/js/require.min.js' data-main='/resource/js/main?version=20190103' charset='utf-8'></script>
<script src='/resource/lib/js/require.min.js' data-main='/resource/js/main?version=201901111111' charset='utf-8'></script>
......@@ -404,11 +404,11 @@
<div class="clear">
</div>
<select class="form-control btn4 ld-Marheight input" name="" id="district_id">
<!--<select class="form-control btn4 ld-Marheight input" name="" id="district_id">
<option value="">跟进人所在部门</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>
</select>-->
<!--<span class="fore-span ld-Marheight">
客户去重:
</span>
......@@ -422,6 +422,8 @@
<div class="clear "></div>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
<!--<span class="btn btn-info btn3 ld-Marheight" id="is_today">今天跟进</span>-->
</form>
</td>
</tr>
......
......@@ -5,20 +5,20 @@ namespace app\model;
use think\Db;
class UPhoneFollowPp extends BaseModel
class UPhoneFollowUp extends BaseModel
{
protected $table = 'u_phone_follow_up';
protected $UPhoneFollowPp;
protected $UPhoneFollowUp;
function __construct($site_id)
{
$this->UPhoneFollowPp = Db($this->table."_".$site_id);
$this->UPhoneFollowUp = Db($this->table."_".$site_id);
}
/**
* 新增电话跟进-插入数据
* @param $data
* @param $params
* @return int|string
*/
public function savePhoneFollow($params) {
......@@ -51,7 +51,8 @@ class UPhoneFollowPp extends BaseModel
if (isset($params["disc"])) {
$arr["disc"] = $params["disc"];
}
$result = $this->UPhoneFollowPp->insert($arr);
$result = $this->UPhoneFollowUp->insert($arr);
return $result;
}
......@@ -70,7 +71,7 @@ class UPhoneFollowPp extends BaseModel
*/
public function getSearch($p = 1, $pageSize = 15, $order_ = 'id desc', $field, $join, $where, $group)
{
$r = $this->UPhoneFollowPp->field($field)
$r = $this->UPhoneFollowUp->field($field)
->alias('f')
->join($join)
->where($where)
......@@ -92,7 +93,7 @@ class UPhoneFollowPp extends BaseModel
public function getUserAgentTotal($params, $join)
{
$result = $this->UPhoneFollowPp->alias('f')
$result = $this->UPhoneFollowUp->alias('f')
->join($join)
->where($params)->count();
return $result;
......@@ -106,19 +107,19 @@ class UPhoneFollowPp extends BaseModel
public function select_useraction_search($user_id, $searchdate)
{
if ($searchdate) {
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->where('user_id', $user_id)
->where('content', $searchdate)
->order('create_time', 'desc')
->select();
} else {
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->where('user_id', $user_id)
->order('create_time', 'desc')
->select();
}
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
/*zw start**/
......@@ -132,7 +133,7 @@ class UPhoneFollowPp extends BaseModel
if (isset($params["type"])) {
$where_["a.type"] = $params["type"];
}
$result = $this->UPhoneFollowPp
$result = $this->UPhoneFollowUp
->field($field)
->alias("a")
->join("a_agents b", "a.agent_id = b.id", "left")
......@@ -151,7 +152,7 @@ class UPhoneFollowPp extends BaseModel
if (isset($params["user_id"])) {
$where_["a.user_id"] = $params["user_id"];
}
$result = $this->UPhoneFollowPp
$result = $this->UPhoneFollowUp
->field($field)
->alias("a")
->join("a_agents b", "a.agent_id = b.id", "left")
......@@ -169,26 +170,26 @@ class UPhoneFollowPp extends BaseModel
public function phone_up_list($pagesize, $pagenum)
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->order('create_time', 'desc')
->limit($pagesize)
->page($pagenum)
->select();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
public function phone_up_list_count()
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->count();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
public function all_user_search($searchdate, $pagesize, $pagenum)
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->field('a.*,b.vip')
->alias('a')
->join('u_users b','a.user_id = b.id', 'left')
......@@ -197,15 +198,15 @@ class UPhoneFollowPp extends BaseModel
->limit($pagesize)
->page($pagenum)
->select();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
public function all_user_search_count($searchdate)
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->where('content', 'like', "%$searchdate%")
->count();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
/**
......@@ -222,7 +223,7 @@ class UPhoneFollowPp extends BaseModel
* @throws \think\exception\DbException
*/
public function getFollowList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
return $this->UPhoneFollowPp->field($field)
return $this->UPhoneFollowUp->field($field)
->where($params)
->order($order_)
->limit($pageSize)
......@@ -238,12 +239,12 @@ class UPhoneFollowPp extends BaseModel
*/
public function getFollowTotal($params)
{
return $this->UPhoneFollowPp->where($params)
return $this->UPhoneFollowUp->where($params)
->count();
}
public function getUserFollowKey($field, $where, $order = 'id asc') {
return $this->UPhoneFollowPp->where($where)
return $this->UPhoneFollowUp->where($where)
->order($order)
->value($field);
}
......@@ -252,7 +253,7 @@ class UPhoneFollowPp extends BaseModel
public function getLastOrNextUserIDPhoneFollowP($where, $field, $limit, $order)
{
$return = $this->UPhoneFollowPp
$return = $this->UPhoneFollowUp
->field($field)
->alias('a')
->join('u_users b','a.user_id = b.id', 'left')
......@@ -286,7 +287,7 @@ class UPhoneFollowPp extends BaseModel
$data['user_id'] = $user_id;
$data['content'] = $content;
$data['type'] = $type;
return $this->UPhoneFollowPp->insertGetId($data);
return $this->UPhoneFollowUp->insertGetId($data);
}
public function getLastPhoneFollowTime($user_id)
......@@ -298,12 +299,12 @@ class UPhoneFollowPp extends BaseModel
$field = 'create_time';
$order = 'id desc';
$limit = 1;
$return = $this->UPhoneFollowPp
->field($field)
->where($arr)
->limit($limit)
->order($order)
->select();
$return = $this->UPhoneFollowUp
->field($field)
->where($arr)
->limit($limit)
->order($order)
->select();
//echo $this->getLastSql();
return $return;
......@@ -315,7 +316,7 @@ class UPhoneFollowPp extends BaseModel
*/
public function getPhoneFollowData($field,$params,$order)
{
$result = $this->UPhoneFollowPp
$result = $this->UPhoneFollowUp
->field($field)
->order($order)
->where($params)
......
<?php
namespace app\model;
/**
* 客户电话跟进-临时表
*/
use app\task\controller\FollowUpTask;
use think\Db;
class UPhoneFollowUpTemporary extends BaseModel
{
protected $table = 'u_phone_follow_up';
protected $follow_up;
protected $siteId;
protected $table_name_string;
function __construct($site_id)
{
$date = date("Y-m-d", time());
$this->follow_up = Db($this->table."_".$site_id."_".$date);
$this->siteId = $site_id;
$this->table_name_string = '`'.$this->table."_".$site_id."_".$date.'`';
}
public function createTable(){
$date = date("Y-m-d", time());
$t_follow_up_task = new FollowUpTask();
if(!$t_follow_up_task->isExistTable($date, $this->siteId)){
return false;
}
return true;
}
/**
* 新增电话跟进-插入数据
* @param $params
* @return int|string
*/
public function savePhoneFollow($params) {
if(!$this->createTable()){
return null;
}
$arr = [];
if (isset($params["content"])) {
$arr["content"] = $params["content"];
}
if (isset($params["labels_id"])) {
$arr["labels_id"] = $params["labels_id"];
}
if (isset($params["user_id"])) {
$arr["user_id"] = $params["user_id"];
}
if (isset($params["agent_id"])) {
$arr["agent_id"] = $params["agent_id"];
}
if (isset($params["type"])) {
$arr["type"] = $params["type"];
}
if (isset($params["user_status"])) {
$arr["user_status"] = $params["user_status"];
}
if (isset($this->siteId)) {
switch ($this->siteId) {
case 10001 :
$province = '上海市';
$city = '上海市';
$disc = '黄埔区';
break;
case 10002 :
$province = '浙江省';
$city = '杭州市';
$disc = '西湖区';
break;
case 10003 :
$province = '广东省';
$city = '深圳市';
$disc = '罗湖区';
break;
default :
$province = '上海市';
$city = '上海市';
$disc = '黄埔区';
}
$arr["province"] = $province;
$arr["city"] = $city;
$arr["disc"] = $disc;
}else{
$arr["site_id"] = '10001';
$arr["province"] = '上海市';
$arr["city"] = '上海市';
$arr["disc"] = '黄埔区';
}
$result = $this->follow_up->insert($arr);
return $result;
}
public function getFollowList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
if(!$this->createTable()){
return null;
}
return $this->follow_up->field($field)
->where($params)
->order($order_)
->limit($pageSize)
->page($pageNo)
->select();
}
public function getFollowUpList($field, $params,$page_no,$page_size)
{
if(!$this->createTable()){
return null;
}
$where_ = [];
if (isset($params["user_id"])) {
$where_["a.user_id"] = $params["user_id"];
}
$result = $this->follow_up
->field($field)
->alias("a")
->join("a_agents b", "a.agent_id = b.id", "left")
->where($where_)
->order("a.create_time desc")
->page($page_no)
->limit($page_size)
->select();
return $result;
}
public function getFollowUpListByUserId($field, $params)
{
if(!$this->createTable()){
return null;
}
$where_ = [];
if (isset($params["user_id"])) {
$where_["a.user_id"] = $params["user_id"];
}
if (isset($params["type"])) {
$where_["a.type"] = $params["type"];
}
$result = $this->follow_up
->field($field)
->alias("a")
->join("a_agents b", "a.agent_id = b.id", "left")
->join("a_store c", "b.store_id = c.id", "left")
->where($where_)
->select();
return $result;
}
/**
* 插入默认跟进
*
* @param $agent_id
* @param $user_id
* @param $content
* @param $type
* @return int|string
*/
public function insertDefaultFollow($agent_id, $user_id, $content, $type) {
if(!$this->createTable()){
return null;
}
$data['agent_id'] = $agent_id;
$data['user_id'] = $user_id;
$data['content'] = $content;
$data['type'] = $type;
return $this->follow_up->insertGetId($data);
}
/**
* 记录总数
*
* @param $params
* @return int|string
*/
public function getFollowTotal($params)
{
if(!$this->createTable()){
return null;
}
return $this->follow_up->where($params)
->count();
}
/**
* 查询数据
* 朱伟 2018-10-24
*/
public function getPhoneFollowData($field,$params,$order)
{
if(!$this->createTable()){
return null;
}
$result = $this->follow_up
->field($field)
->order($order)
->where($params)
->limit(1)
->select();
//dump($this->getLastSql());
return $result;
}
public function getFollowListV2($site_id,$pageNo = 1, $pageSize = 15, $where, $filed = '`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`') {
if(!$this->createTable()){
return null;
}
$start_index = ($pageNo - 1) * $pageSize;
$sql = "SELECT * FROM
((SELECT
$filed
FROM
$this->table_name_string
WHERE
$where)
UNION
(SELECT
$filed
FROM
u_phone_follow_up_$site_id
WHERE
$where
) ) as aa ORDER BY `id` DESC limit $start_index,$pageSize";
return $this->follow_up->execute($sql);
}
/**
* @param $site_id
* @param int $pageNo
* @param int $pageSize
* @param $where
* @param string $field
* @return false|null|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getFollowListV3($site_id, $pageNo, $pageSize, $where, $field = '`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`') {
if(!$this->createTable()){
return null;
}
$sql = Db::table('u_phone_follow_up_'.$site_id)->field($field)->order('id desc')->where($where)->buildSql();
$sql_string = $this->table($this->table_name_string)->field($field)->where($where)->union([$sql], true)->buildSql();
$data = Db::table($sql_string. ' a')
->field($field)
->order('id desc')
->limit($pageSize)
->page($pageNo)
->order('id desc')
->select();
return $data;
}
/**
* @param $field
* @param $where
* @param string $order
* @return null
*/
public function getUserFollowKey($field, $where, $order = 'id asc') {
if(!$this->createTable()){
return null;
}
return $this->follow_up->where($where)
->order($order)
->value($field);
}
}
......@@ -162,7 +162,32 @@ class Users extends Model
->page($pageNo)
->select();
}
return $result;
//echo Db::table($this->table)->getLastSql();
$s_phone_follow_up = new UPhoneFollowUp($site_id);
$s_phone_follow_temp = new UPhoneFollowUpTemporary($site_id);
foreach ($result as $k => $v) {
$data[$k] = $v->getData();
if ($data[$k]['user_pic']) {
$data[$k]['user_pic'] = CURRENT_URL . 'static/head_portrait/' . $data[$k]['user_pic'];
} else {
$data[$k]['user_pic'] = '';
}
$user_data = $this->field('id,user_nick,user_phone')->where('id', $data[$k]['referrer_id'])->find();
$data[$k]['name'] = $user_data['user_nick'];
$data[$k]['phone'] = $user_data['user_phone'];
$params_['user_id']= $data[$k]['id'];
$order= 'id desc';
$res = $s_phone_follow_temp->getPhoneFollowData('create_time',$params_,$order);
if (empty($res)) {
$res = $s_phone_follow_up->getPhoneFollowData('create_time',$params_,$order);
}
$data[$k]['follow_time'] = $res[0]['create_time'];
}
return $data;
}
/**
......@@ -478,15 +503,6 @@ class Users extends Model
return $data;
}
public function getUserDetailStreamline($user_id,$field)
{
$data = db('u_users')
->where('id', $user_id)
->field($field)
->find();
return $data;
}
/*public function user_search($phone_or_name,$Two_days_ago,$user_id,$pagesize,$pagenum) {
$data =$this ->where('user_nick|user_phone','like',"%$phone_or_name%")
->where('create_time','< time',$Two_days_ago)//小于两天前,即排除48小时内受保护的客户
......@@ -974,20 +990,5 @@ class Users extends Model
//dump($this->getLastSql());
return $data;
}
public function verifyUser($field, $join, $params)
{
try {
$data = $this->field($field)
->alias('a')
->join($join)
->where($params)
->find();
} catch (\Exception $e) {
$data = [];
}
return $data;
}
}
......@@ -199,7 +199,7 @@ Route::group('index', [
'lable' => ['index/label/index', ['method' => 'get']], //标签列表
'getDistrict' => ['index/District/getList', ['method' => 'get']], //获取部门列表
//数据统计
'RemarkFollowList' => ['index/remark/followUpList', ['method' => 'get']],//跟进列表
'RemarkFollowList' => ['index/remark/followUpListV2', ['method' => 'get']],//跟进列表
'phone_list' => ['index/Phone/index', ['method' => 'get']],//隐私号码列表
'bindPhoneList' => ['index/Phone/bindPhoneList', ['method' => 'get']],//绑定的隐私号码列表
'edit_aliYunPhone' => ['index/Phone/edit_aliYunPhone', ['method' => 'get|post']],//新增或编辑中间号
......@@ -399,6 +399,7 @@ Route::group('index', [
'userDetail' => ['index/UserLog/userDetail', ['method' => 'get|post']],
'userLog' => ['index/UserLog/userLog', ['method' => 'get|post']],
'followUpLog' => ['index/UserLog/followUpLog', ['method' => 'get|post']],
'followUpLogNew' => ['index/UserLog/followUpLogNew', ['method' => 'get|post']],
'dailyDetail' => ['index/DailyPaper/dailyDetail', ['method' => 'get|post']],
'addDaily' => ['index/DailyPaper/addDaily', ['method' => 'get|post']],
......@@ -559,7 +560,12 @@ Route::group('task', [
'updateShopAgeLimit' => ['task/JobTask/updateShopAgeLimit', ['method' => 'get']], //默认年限
'push' => ['task/PushMessageTask/push', ['method' => 'get']], //推送和客户推送
'updateLandlordLimit' => ['task/JobTask/updateLandlordLimit', ['method' => 'get']] //转换房东手机号
'updateLandlordLimit' => ['task/JobTask/updateLandlordLimit', ['method' => 'get']], //转换房东手机号
'test' => ['task/FollowUpTask/test', ['method' => 'get']],
'isExistTable' => ['task/FollowUpTask/isExistTable', ['method' => 'get']],
'moveFollowUpList' => ['task/FollowUpTask/moveFollowUpList', ['method' => 'get']],
]);
Route::group('broker', [
......@@ -684,6 +690,7 @@ Route::group('broker', [
//首页跟进记录
'userFollowUpList' => ['api_broker/HomePageLog/userFollowUpList', ['method' => 'post']],
'userFollowUpListV2' => ['api_broker/HomePageLog/userFollowUpListV2', ['method' => 'post|get']],
'houseFollowUpList' => ['api_broker/HomePageLog/houseFollowUpList', ['method' => 'post']],
'housingResource' => ['api_broker/Performance/housingResource', ['method' => 'POST|GET']], //获取房源list
......
<?php
namespace app\task\controller;
use app\extra\RedisExt;
use app\model\ASite;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
/**
* Created by PhpStorm.
* User : zw
* Date : 2019/1/10
* Time : 2:20 PM
* Intro:
*/
class FollowUpTask
{
private $redis_;
private $table = 'u_phone_follow_up_';
private $siteModel;
public function __construct()
{
$this->redis_ = RedisExt::getRedis();
$this->siteModel = new ASite();
}
/**
* @param $time
* @param $siteId
* @return bool
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
*/
public function isExistTable($time, $siteId)
{
$site_arr = $this->siteModel->findByOne('city', ["id" => $siteId]);
if (count($site_arr) <= 0) {
return false;
}
//todo 1.判断表是否存在,不存在则创建,
$date = date("Y-m-d", time());
//时间是今天
if ($time >= $date && $time <= $date . " 23:59:59") {
$phoneFollowUpModel = new UPhoneFollowUpTemporary($siteId);
$table_name = $this->table . $siteId . "_" . $date;
//存在表
if ($this->redis_->get($table_name) > 0) {
return true;
}
$isTable = $phoneFollowUpModel->query('SHOW TABLES LIKE "' . $table_name . '"');
if ($isTable) {
$this->redis_->set($table_name, 1, 24 * 3600);
return true;//存在表
} else {
//创建表
return $this->createTemp($phoneFollowUpModel, $table_name);
}
}
return false;
}
/**
* @param $db
* @param $tableName
* @return bool
*/
public function createTemp($db, $tableName)
{
if (!$tableName) {
return false;
}
$sql = "CREATE TABLE `" . $tableName . "` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '电话跟进表',
`content` varchar(255) DEFAULT '' COMMENT '跟进内容',
`labels_id` int(10) DEFAULT '0' COMMENT 'u_labels表主键',
`user_id` int(10) unsigned DEFAULT '0' COMMENT 'u_users ID用户表id',
`agent_id` int(10) unsigned DEFAULT '0' COMMENT 'agent表id',
`province` varchar(60) DEFAULT '' COMMENT '省份',
`city` varchar(60) DEFAULT '' COMMENT '城市',
`disc` varchar(60) DEFAULT '' COMMENT '区域',
`type` int(10) unsigned DEFAULT '0' COMMENT '0 电话跟进 1普通跟进 2不知道是什么,3打电话未跟进',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user_status` tinyint(2) DEFAULT '0' COMMENT '客户状态(0:求租;1:已租;-1:无效)',
PRIMARY KEY (`id`),
KEY `idx_agent_id` (`agent_id`),
KEY `idx_user_id` (`user_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_city` (`city`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8";
if (false !== $db->execute($sql)) {
return true;
} else {
return false;
}
}
/**
* 每天0.30执行移动操作
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
*/
public function moveFollowUpList()
{
//todo 判断参数和时间
$checkDayStr = date('Y-m-d ', time());
$timeBegin1 = strtotime($checkDayStr . "0:10" . ":00");
$timeEnd1 = strtotime($checkDayStr . "0:50" . ":00");
$curr_time = time();
if ($curr_time < $timeBegin1 || $curr_time > $timeEnd1) {
return;
}
$site_arr = $this->siteModel->getSite("id,name,city,is_del", ["is_del" => 0]);
if (count($site_arr) <= 0) {
return;
}
$date = date("Y-m-d",strtotime("-1 day"));
foreach ($site_arr as $item) {
$site_id = $item["id"];
//判断此站点是否执行过
if ($this->redis_->get("is_run_" . $date . "_" . $site_id) > 0) {
continue;
}
$table_name = $this->table . $site_id . "_" . $date;
$phoneFollowUpModel = new UPhoneFollowUpTemporary($site_id);
$isTable = $phoneFollowUpModel->query('SHOW TABLES LIKE "' . $table_name . '"');
if ($isTable) {
$sql = "INSERT into u_phone_follow_up_" . $site_id . "
(content,labels_id,user_id,agent_id,province,city,disc,type,create_time,update_time,user_status )
select content,labels_id,user_id,agent_id,province,city,disc,type,create_time,update_time,user_status
from `" . $table_name . "`";
$followUpModel = new UPhoneFollowUp($site_id);
if (false !== $followUpModel->execute($sql)) {
$this->redis_->set("is_run_" . $date . "_" . $site_id, 1, 24 * 3600);
}
}
}
}
}
......@@ -11,7 +11,8 @@ use app\model\OMarchInModel;
use app\model\OPayLogModel;
use app\model\OReportModel;
use app\model\TAgentTotalModel;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use Think\Log;
......@@ -294,7 +295,8 @@ class ResultsSummaryNewTask
$result_arr["bargain_sum"] = $bargainSum[0]["num"];
//电话跟进数
$uFollowModel = new UPhoneFollowPp($site_id);
//$uFollowModel = new UPhoneFollowUp($site_id);
$uFollowModel = new UPhoneFollowUpTemporary($site_id);
$followUp = $uFollowModel->getFollowTotal($params);
$result_arr["followUp_sum"] = $followUp;
......
No preview for this file type
......@@ -47,22 +47,23 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
agent_id_phone:'',
pageNoUser:1,//客户详情 客户动态初始化分页
moreUser:0,//标识点击加载更多 还有没有数据
isExitsNew:0,
isTaday:1,
init: function() {
//初始化dot
$("body").append(template);
//初始化时间
var myDate = new Date();
var y = myDate.getFullYear();
var m = myDate.getMonth() + 1;
var d = myDate.getDate();
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
$('#start_date').val(day_end);
$('#end_date').val(day_end);//客户跟进 添加 默认时间一天
//初始化城市 区域筛选
user.initializationCityFunction();
user.event();
// 初始化时间
var myDate = new Date();
var y = myDate.getFullYear();
var m = myDate.getMonth() + 1;
var d = myDate.getDate();
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
$('#start_date').val(day_end);
$('#end_date').val(day_end);
//时间控件初始化
//bootstrap 时间控件选择
......@@ -141,18 +142,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_doc.on('input', '#user_area_choose', function() {
user.getList(1);
});
_doc.on('click', '#is_taday', function() {
$('#start_date').val('');
$('#end_date').val('');
user.isTaday=1;
$(this).removeClass('btn-default').addClass('btn-info');
// user.getList(1);
});
_doc.on('input', '#end_date', function() {
$('#is_taday').removeClass('btn-info').addClass('btn-default');
user.isTaday=0;
});
//客户详情跟进 取消收藏
_doc.on('click', '#user_is_collect', function() {
if(!confirm('是否继续?')) {
......@@ -259,12 +248,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
BrowseServer('cover_image');
});
$("#search").click(function() {
var time_=getTimeStamp(getBeforeDate(1));
var time1_=getTimeStamp($('#day_end').val());
if(time1_ > time_){
alert('请选择大于今天的日期!!!')
return;
};
user.getList(1);
});
......@@ -273,8 +256,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.agent_id_phone='';//重置搜索
$('#guest_stores').html('');
$('#guest_stores2').html('');
user.isTaday=0;
$('#is_taday').removeClass('btn-info').addClass('btn-default');
});
//新增 客户 重置信息
$("#confirm_delete").click(function() {
......@@ -288,8 +269,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.delete_user(params);
});
$(document).delegate(".genj_ure", "click", function() {
var _$this = $(this);
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&id=' + _$this.attr('data-id'));
user.user_id = $(this).attr("data-id");
// checkLogin();
user.getGenjinLabel();
});
$(document).delegate(".add_alert", "click", function() {
......@@ -334,7 +316,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
});
//客户列表操作
$(document).delegate(".cao-zuo-record", "click", function() { //点击操作跟进详情
$(document).delegate(".cao-zuo-record", "click", function() { //点击操作跟进详情
user.isExitsNew=0;
user.user_id = $(this).attr("data-id");
user.user_phone = $(this).attr("data-phone");
user.baohu = $(this).attr("data-baohu");
......@@ -381,6 +364,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$('.user-log-more').show();
user.pageNoUser=1;
$('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon()//获取客户动态
}
});
......@@ -480,6 +464,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.Caozuo();
user.pageNoUser=1;
$('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon();
}
});
......@@ -699,6 +684,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_btnSave.css('display','block');
user.pageNoUser=1;
$('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon();
};
}else {
......@@ -746,6 +732,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_genjinModal.hide();
user.pageNoUser=1;
$('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon();
}else {
layerTipsX(data['msg']);
......@@ -1355,6 +1342,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
alert('修改成功');
user.pageNoUser=1;
$('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon();
$('#genj_text').val('');
// $("#modal-record").modal('hide');
......@@ -1614,28 +1602,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
params.user_id = $.trim($("#customer_name_id").val());//区域
// params.disc = $.trim($("#user_area_choose").val());//区域
if(user.isTaday){
var myDate = new Date();
var y = myDate.getFullYear();
var m = myDate.getMonth() + 1;
var d = myDate.getDate();
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
params.start_date = day_end;
params.end_date = day_end;
}else{
params.start_date = _startDateObj.val();
params.end_date = _endDateObj.val();
var time_=getTimeStamp(getBeforeDate(1));
if(getTimeStamp(params.end_date) > time_){
alert('选择的时间不能大于等于今天!!!');
return;
}
};
_startDateObj.val() != '' && (params.start_date = _startDateObj.val());
_endDateObj.val() != '' && (params.end_date = _endDateObj.val());
$.trim(_customerNameObj.val()) != '' && (params.customer = $.trim(_customerNameObj.val()));
$.trim(_customerPhoneObj.val()) != '' && (params.phone = $.trim(_customerPhoneObj.val()));
$.trim(_followContentObj.val()) != '' && (params.content = $.trim(_followContentObj.val()));
if(!params.start_date || !params.end_date){
if(!$('#start_date').val() || !$('#end_date').val()){
alert('请您选择跟进时间!');
return;
};
......
......@@ -35,7 +35,9 @@ define(['doT', 'text!temp/financial_daily_list_template_tpl.html', 'css!style/ho
e.preventDefault();
e.stopPropagation();
localStorage.setItem('financial_check_string_liu',$(this).attr("data-store"));
location.href=href='/index/dailyDetailsFinance?time=' + $(this).attr("data-storeTime")+"&storeId="+$(this).attr("data-storeId");
var href_='/index/dailyDetailsFinance?time=' + $(this).attr("data-storeTime")+"&storeId="+$(this).attr("data-storeId");
window.open(href_);
});
//搜索按钮的事件
......
......@@ -402,8 +402,8 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
$('#pay_f').html(data.data.total_info.cash);
$('#pay_g').html(data.data.total_info.pos);
$('#pay_h').html(data.data.total_info.other_bank);
$('#pay_i').html();
$('#pay_j').html();
$('#pay_i').html('');
$('#pay_j').html('');
}
//入账总计
......@@ -445,8 +445,8 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
$('#total_f').html(data.data.total_info.cash);
$('#total_g').html(data.data.total_info.pos);
$('#total_h').html(data.data.total_info.other_bank);
$('#total_i').html();
$('#total_j').html();
$('#total_i').html('');
$('#total_j').html('');
}
}
......@@ -598,7 +598,7 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
alert('提交成功');
$("#modal_financialremark").modal('hide');//提交成功后 关闭弹窗
bargain.getList();
location.href='/index/dailyList'
// location.href='/index/dailyList'
}else{
alert(data.msg);
}
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
<!--<td>[%= it[item]['bargain_id'] %]</td>-->
<td>[%= it[item]['house_address'] %]</td>
<td>[%= it[item]['price']%]</td>
<td>[%= (it[item]['price']*0.8).toFixed(2) %]</td>
<td>[%= (it[item]['price']*0.7).toFixed(2) %]</td>
<td>[%= it[item]['money']%]</td>
<td>[%= (it[item]['money']*1 - (it[item]['price']*0.7)).toFixed(2) %]</td>
<td>[%= sw(it[item]['pay_type'])%]</td>
......
......@@ -22,14 +22,13 @@
<td width="46%" class="text-left follow-up-home">
[% if(it[item]['label_name']) { %]
[%= it[item]['label_name'] %]
[% } %]
[% if(it[item]['user_status'] == 0) { %]
【求租】
[% } else if(it[item]['user_status'] == 1) { %]
【已租】
[% }else{ %]
[% if(it[item]['user_status'] == 0) { %]
【求租】
[% } else if(it[item]['user_status'] == 1) { %]
【已租】
[% }else{ %]
【无效】
[% } %]
【无效】
[% } %]
[%= dealPunctuation(it[item]['content']) %]
</td>
......
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