Commit 62d523b2 authored by clone's avatar clone

Merge branch '0822-v2.8' into test

# Conflicts: # application/api_broker/controller/Broker.php # application/api_broker/controller/User.php # application/app_broker/view/index/customerinfo_details_new.html # application/index/view/cell_phone/index.html # application/index/view/member/users_list.html # application/model/UPhoneFollowPp.php # application/route.php # public/app/dist/index.html # public/app/dist/static/css/app.255c54a886ff5092e74bb857c3d5fcc5.css # public/app/dist/static/css/app.d71c440380385dc9451393bdcab7acfb.css # public/app/dist/static/css/app.d71c440380385dc9451393bdcab7acfb.css.map # public/app/dist/static/css/app.da05cd787f6852fe2b2d15ad25fdd72c.css # public/app/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map # public/app/js/customerinfo_details_new.js # public/resource/js/user.js
parents 11ec9d40 af219df2
No preview for this file type
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
<projects> <projects>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand>
<name>com.aptana.editor.php.aptanaPhpBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand> <buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name> <name>com.aptana.ide.core.unifiedBuilder</name>
<arguments> <arguments>
...@@ -13,6 +18,7 @@ ...@@ -13,6 +18,7 @@
</buildSpec> </buildSpec>
<natures> <natures>
<nature>com.aptana.projects.webnature</nature> <nature>com.aptana.projects.webnature</nature>
<nature>com.aptana.editor.php.phpNature</nature>
</natures> </natures>
<filteredResources> <filteredResources>
<filter> <filter>
...@@ -60,5 +66,14 @@ ...@@ -60,5 +66,14 @@
<arguments>1.0-name-matches-false-false-node_modules</arguments> <arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher> </matcher>
</filter> </filter>
<filter>
<id>1534838163404</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
</filteredResources> </filteredResources>
</projectDescription> </projectDescription>
No preview for this file type
<?php
namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\BargainService;
use think\Request;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/8/23
* Time : 14:39
* Intro:
*/
class Bargain extends Basic
{
private $service_;
public function __construct($request = null)
{
parent::__construct($request);
$this->service_ = new BargainService();
}
public function bargainList()
{
$params = $this->params;
$params = array(
"submit_agent_id" => 93,
"status" => 1,//0全部 1未结单 2已结单 3 撤销审核 4已撤销
"is_my_correlation" => 1, //是否与我相关 0全部 1与我相关
// "keyword" => "17717536291",
"page_no" => 1,
"page_size" => 10
);
$checkResult = $this->validate($params, "BargainValidate.bargainList");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$pageNo = empty($params["page_no"]) ? 1 : $params["page_no"];
$pageSize = empty($params["page_size"]) ? 15 : $params["page_size"];
$submit_agent_id = $params["submit_agent_id"];
$status = $params["status"];
$is_my_correlation = $params["is_my_correlation"];
$keyword = empty($params["keyword"]) ? "" : $params["keyword"];
$result = $this->service_->getBargainList($pageNo, $pageSize, $submit_agent_id, $status, $is_my_correlation, $keyword);
return $this->response("200", "success", $result);
}
}
\ No newline at end of file
...@@ -14,6 +14,8 @@ use app\api\untils\JwtUntils; ...@@ -14,6 +14,8 @@ use app\api\untils\JwtUntils;
use app\api\untils\MessageUntils; use app\api\untils\MessageUntils;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\BrokerService; use app\api_broker\service\BrokerService;
use app\api_broker\service\CallPhoneService;
use app\api_broker\service\ClientService;
use app\api_broker\service\OrderLogService; use app\api_broker\service\OrderLogService;
use app\model\AAgents; use app\model\AAgents;
use app\model\ABindingDevice; use app\model\ABindingDevice;
...@@ -23,6 +25,7 @@ use app\model\NoteLog; ...@@ -23,6 +25,7 @@ use app\model\NoteLog;
use app\model\UPhoneFollowPp; use app\model\UPhoneFollowPp;
use app\model\Users; use app\model\Users;
use think\Exception; use think\Exception;
use think\Log;
use think\Request; use think\Request;
class Broker extends Basic class Broker extends Basic
...@@ -296,13 +299,12 @@ class Broker extends Basic ...@@ -296,13 +299,12 @@ class Broker extends Basic
$params['disc'] = $result[0]['disc']? $result[0]['disc'] : '黄浦区'; $params['disc'] = $result[0]['disc']? $result[0]['disc'] : '黄浦区';
} }
//主表查询商铺详细信息 $UPhoneFollowPp = new UPhoneFollowPp();
$UPhoneFollowPp = new UPhoneFollowPp();
$result = $UPhoneFollowPp->savePhoneFollow($params); $result = $UPhoneFollowPp->savePhoneFollow($params);
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users->update_user_status([ 'id' => $user_id, 'user_status' => $user_status ]);
if ($result == 1) { if ($result > 0) {
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users->update_user_status([ 'id' => $user_id, 'user_status' => $user_status ]);
return $this->response("200", "success!", $result); return $this->response("200", "success!", $result);
} else { } else {
return $this->response("101", "失败!"); return $this->response("101", "失败!");
...@@ -384,8 +386,9 @@ class Broker extends Basic ...@@ -384,8 +386,9 @@ class Broker extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"user_id" => 828 "user_id" => 828,
"agent_id" => 1,
);*/ );*/
if (!isset($params['user_id'])) { if (!isset($params['user_id'])) {
...@@ -420,21 +423,32 @@ class Broker extends Basic ...@@ -420,21 +423,32 @@ class Broker extends Basic
$user = new Users(); $user = new Users();
$user_res = $user->useraction_search_user_res($user_id, 1); $user_res = $user->useraction_search_user_res($user_id, 1);
Log::write(json_encode($user_res), '客户详情'); //记录日志
$user_res['user_pic'] = HEADERIMGURL . $user_res['user_pic']; $user_res['user_pic'] = HEADERIMGURL . $user_res['user_pic'];
$agents_res = $agent->verifyUser('name,phone', '', [ 'id' => $user_res['agent_id'] ]); $agents_res = $agent->verifyUser('name,phone', '', [ 'id' => $user_res['agent_id'] ]);
$user_res['agentinfo'] = $agents_res ? $agents_res['name'] . '-' . $agents_res['phone'] : '未知'; $user_res['agentinfo'] = $agents_res ? $agents_res['name'] . '-' . $agents_res['phone'] : '未知';
$data['agent_path'] = AGENTHEADERIMGURL;
$orderLog = new OrderLogService(); $orderLog = new OrderLogService();
$data['user_date'] = $orderLog->selectListByUserId($user_id, '');
/*修改记录部分 start*/
$records = new GOperatingRecords(); $records = new GOperatingRecords();
$records_result = $records->user_history($user_id); $param_['user_id'] = $user_id;
$param_['type'] = 3;
$records_result = $records->user_history($param_);
$data['user_info'] = $user_res; $data['user_info'] = $user_res;
$data['user_date'] = $orderLog->selectListByUserId($user_id, '');
$data['user_history'] = $records_result; $data['user_history'] = $records_result;
$data['agent_path'] = AGENTHEADERIMGURL; $param_['type'] = 5;
$records_invite_result = $records->user_history($param_);
$data['user_invite_history'] = $records_invite_result;
/*修改记录部分 end*/
//是否被收藏 /*是否被收藏 start*/
$data["is_collect"] = 2; $data["is_collect"] = 2;
//先判断是否已经存在数据 //先判断是否已经存在数据
$field = 'id,status'; $field = 'id,status';
...@@ -445,17 +459,62 @@ class Broker extends Basic ...@@ -445,17 +459,62 @@ class Broker extends Basic
if ($res && ($res[0]['status'] == 1)) {//如果存在 if ($res && ($res[0]['status'] == 1)) {//如果存在
$data["is_collect"] = 1; $data["is_collect"] = 1;
} }
/*是否被收藏 end*/
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期 /*判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期 start*/
/*$ser = new UserExpiredTimeService(); //$ser = new UserExpiredTimeService();
$res = $ser->getExpiredTimeByUser($v["user_id"]); //$res = $ser->getExpiredTimeByUser($v["user_id"]);
$data['data']['list'][$k]['is_outstrip_twenty_four_hours'] = $res ? 0 : 1 ;*/ //$data['data']['list'][$k]['is_outstrip_twenty_four_hours'] = $res ? 0 : 1 ;
$is_outstrip_twenty_four_hours = 0; $is_outstrip_twenty_four_hours = 0;
if((time() - strtotime($user_res['create_time'])) > (60*60*24)){ if ((time() - strtotime($user_res['create_time'])) > (60 * 60 * 24)) {
$is_outstrip_twenty_four_hours = 1; $is_outstrip_twenty_four_hours = 1;
} }
$data['is_outstrip_twenty_four_hours'] = $is_outstrip_twenty_four_hours; $data['is_outstrip_twenty_four_hours'] = $is_outstrip_twenty_four_hours;
/*判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期 end*/
/*查询客户邀请人 start*/
/*引荐人来源 10:会员 20:b端经纪人*/
if ($user_res['referrer_source'] == 0) {
$user_invite_info = [];
} elseif ($user_res['referrer_source'] == 10) {
$userArr = $user->selectUser($user_res['referrer_id'], "id,user_phone");
if (!$userArr) {
$user_invite_info = [];
} else {
$user_invite_info['referrer_source'] = $user_res['referrer_source'];
$user_invite_info['user_phone'] = $userArr['user_phone'];
$user_invite_info['id'] = $userArr['id'];
}
} else {
$model = new AAgents();
$result = $model->searchAgentsByKeyword("id,name,phone", [ "id" => $user_res['referrer_id'] ]);
if (!$result) {
$user_invite_info = [];
} else {
$user_invite_info['referrer_source'] = $user_res['referrer_source'];
$user_invite_info['name'] = $result[0]['name'];
$user_invite_info['phone'] = $result[0]['phone'];
}
}
$data['user_invite_info'] = $user_invite_info;
/*查询客户邀请人 end*/
// 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定
//0允许拨打 1不允许拨打
$data['is_outpace_call_num'] = 0;
$clientService = new ClientService();
if (!$clientService->dialTotal($params["user_id"])) {
$data['is_outpace_call_num'] = 1;
}
$model = new AAgents();
$result = $model->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"]]);
$call = new CallPhoneService();
$result = $call->getBindNum($user_res['user_phone'],$result[0]['phone']);
if($result != 0){
$data['is_outpace_call_num'] = 0;
}
return $this->response("200", "success!", $data); return $this->response("200", "success!", $data);
} }
......
...@@ -30,12 +30,18 @@ class CellPhone extends Basic ...@@ -30,12 +30,18 @@ class CellPhone extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$call = new CallPhoneService();
$result = $call->bindAXB($this->params['phone_a'], $this->params['phone_b']); $call = new CallPhoneService($this->city);
$record = true; //是否录音
$user_id = empty($this->params['user_id']) ? 0:(int)$this->params['user_id'];
$house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id'];
$landlord = empty($this->params['landlord']) ? 0: (int)$this->params['landlord'];
$result = $call->bindAXB($this->params['phone_a'], $this->params['phone_b'], $record, $user_id, $this->agentId, $this->agentName, $landlord, $house_id);
if ($result['status'] == 'success') { if ($result['status'] == 'success') {
$this->msg = $result['msg']; $this->msg = $result['msg'];
$this->data['phone'] = $result['phone']; $this->data['phone'] = $result['phone'];
$this->data['follow_id'] = $result['follow_id'];
} else { } else {
$this->msg = $result['msg']; $this->msg = $result['msg'];
$this->code = 101; $this->code = 101;
...@@ -82,14 +88,13 @@ class CellPhone extends Basic ...@@ -82,14 +88,13 @@ class CellPhone extends Basic
* 解除绑定关系 * 解除绑定关系
* *
* @return \think\Response * @return \think\Response
* @throws \think\exception\DbException
*/ */
public function agentsUnBind() public function agentsUnBind()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$call = new CallPhoneService(); $call = new CallPhoneService();
$result = $call->agentsUnBind($this->params['phone_a'], $this->params['phone_b'], $this->params['phone_x']); $result = $call->agentsUnBind($this->params['phone_a'], $this->params['phone_b'], $this->params['phone_x'], $this->params['user_id']);
if ($result['status'] == 'success') { if ($result['status'] == 'success') {
$this->msg = $result['msg']; $this->msg = $result['msg'];
......
...@@ -3,13 +3,11 @@ ...@@ -3,13 +3,11 @@
namespace app\api_broker\controller; namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\PushMessageService; use app\index\service\UserService;
use app\model\AAgents; use app\model\AAgents;
use app\model\ULabels; use app\model\ULabels;
use app\model\Users; use app\model\Users;
use app\model\UPhoneFollowPp; use app\model\UPhoneFollowPp;
use app\model\AuthGroup;
use app\model\AuthRule;
use app\api_broker\service\VipService; use app\api_broker\service\VipService;
/** /**
...@@ -40,9 +38,6 @@ class Client extends Basic ...@@ -40,9 +38,6 @@ class Client extends Basic
* 新增或编辑客户 * 新增或编辑客户
* *
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function editClient() { public function editClient() {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
...@@ -54,62 +49,17 @@ class Client extends Basic ...@@ -54,62 +49,17 @@ class Client extends Basic
$data = []; $data = [];
if (!empty($this->params['user_name']) || !empty($this->params['id'])) { if (!empty($this->params['user_name']) || !empty($this->params['id'])) {
$user_service = new UserService();
if ($this->request->isPost()) { if ($this->request->isPost()) {
if (!empty($this->params['id'])) { $result = $user_service->editUser($this->params['id'], $this->params, $this->agentId);
if ($result['status'] == 'fail') {
$user_agent_id = $this->user->getUserById('id,user_name,agent_id', $this->params['id']); //查询原始客方 $this->code = 101;
//编辑 $this->msg = $result['msg'];
$data['start'] = $this->user->edit($this->params, $this->params['id'], $this->agentId);
if (!empty($this->params['agents_id'])) {
//是否修改客方
if ($this->params['agents_id'] != $user_agent_id['agent_id']) {
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']);
$remark = '修改为'.$agent_data['name'].'-'.$agent_data['phone'];
$push = new PushMessageService();
$ccr_agent_data = $agent->getAgentInfo('name,phone', $this->params['ccr_id']);
$content = "【{$ccr_agent_data['name']}-{$ccr_agent_data['phone']}修改了{$user_agent_id['user_name']}(id:{$user_agent_id['id']})客方】";
$push->pushMessageById($user_agent_id['agent_id'], '客方修改', $content, 'user_info', $user_agent_id['id']);
$this->operating_records($this->params['ccr_id'], $type=3, $remark,0,$this->params['id']);
}
}
} else {
$table = new AAgents();
//添加
$data['start'] = $this->user->edit($this->params, 0, $this->agentId);
if ($data['start'] > 0 && !empty($this->params['agents_id'])) {
$data['id']= $this->user->id;
$agent_data = $table->getAgentInfo('name,phone',$this->params['agents_id']);
$remark = '新增为'. $agent_data['name'].'-'.$agent_data['phone'];
$this->operating_records($this->params['ccr_id'], $type=3, $remark,0,$data['id']);
}
} }
switch ($data['start']) {
case -1 :
$this->code = 101;
$this->msg = '该用户已存在';break;
case -2 :
$this->code = 101;
$this->msg = '此号码为虚拟号码';break;
case -3 :
$this->code = 101;
$this->msg = '没有新增VIP权限';break;
case -4 :
$this->code = 101;
$this->msg = '客户信息错误,请检查!';break;
case -5 :
$this->code = 101;
$this->msg = '省或市或区未选择';break;
}
} else { } else {
$data['start'] = $this->user->getClient($this->params['id']); $user_data = $user_service->getUserData($this->params['id']);
$data['start'] = $user_data['data'];
} }
} else { } else {
$this->code = 101; $this->code = 101;
......
...@@ -13,6 +13,7 @@ namespace app\api_broker\controller; ...@@ -13,6 +13,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\VipService; use app\api_broker\service\VipService;
use app\model\ACollectUser; use app\model\ACollectUser;
use app\model\Users;
use think\Request; use think\Request;
class CollectUser extends Basic class CollectUser extends Basic
...@@ -66,6 +67,10 @@ class CollectUser extends Basic ...@@ -66,6 +67,10 @@ class CollectUser extends Basic
$res = true ; $res = true ;
} }
}else{//不存在则新增数据 }else{//不存在则新增数据
$is_outstrip_twenty_four_hours = $this->isNewUser($params['user_id']);
if($is_outstrip_twenty_four_hours == 0 ){
return $this->response("101", "客户在保护期内");
}
$insert["agents_id"] = $params['agents_id']; $insert["agents_id"] = $params['agents_id'];
$insert["user_id"] = $params['user_id']; $insert["user_id"] = $params['user_id'];
$insert["status"] = 1; $insert["status"] = 1;
...@@ -140,4 +145,29 @@ class CollectUser extends Basic ...@@ -140,4 +145,29 @@ class CollectUser extends Basic
return $this->response("200", "成功",$data); return $this->response("200", "成功",$data);
} }
/**
* 判断客户是否在保护期内
* @param $user_id
* @return int
*/
public function isNewUser($user_id)
{
$is_outstrip_twenty_four_hours = 1;
if(!$user_id){
return $is_outstrip_twenty_four_hours;
}
$Users = new Users();
$result = $Users->getUserCityInfo($user_id);
if($result){
if((time() - strtotime($result[0]['create_time'])) > (60*60*24)){
$is_outstrip_twenty_four_hours = 1;// 0:保护器内 1:超过保护期
}else{
$is_outstrip_twenty_four_hours = 0;// 0:保护器内 1:超过保护期
}
}
return $is_outstrip_twenty_four_hours;
}
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\api_broker\controller; namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\ClientService;
use app\api_broker\service\UserExpiredTimeService; use app\api_broker\service\UserExpiredTimeService;
use app\model\AAgents; use app\model\AAgents;
use app\model\GHouses; use app\model\GHouses;
...@@ -90,8 +91,8 @@ class HomePageLog extends Basic ...@@ -90,8 +91,8 @@ class HomePageLog extends Basic
$order = "f.id desc"; $order = "f.id desc";
$result = $this->uPhoneFollowUpModel->getSearch($pageNo, $pageSize, $order, $field, [], $where_, ""); $result = $this->uPhoneFollowUpModel->getSearch($pageNo, $pageSize, $order, $field, [], $where_, "");
$clientService = new ClientService();
foreach ($result as $key => $value) { foreach ($result as $key => $value) {
$agent_params = []; $agent_params = [];
$agent_params["a.id"] = $value['agent_id']; $agent_params["a.id"] = $value['agent_id'];
...@@ -103,10 +104,12 @@ class HomePageLog extends Basic ...@@ -103,10 +104,12 @@ class HomePageLog extends Basic
$result[$key]['store_name'] = $res_a[0]['store_name']; $result[$key]['store_name'] = $res_a[0]['store_name'];
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期 //判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$ser = new UserExpiredTimeService(); $ser = new UserExpiredTimeService();
$res = $ser->getExpiredTimeByUser($value['user_id']); $res = $ser->getExpiredTimeByUser($value['user_id']);
$result[$key]['is_outstrip_twenty_four_hours'] = $res ? 0 : 1 ; $result[$key]['is_outstrip_twenty_four_hours'] = $res ? 0 : 1;
$is_show = $clientService->dialTotal($value["user_id"]);
$result[$key]['sign_call'] = $is_show ? 0 : 1;
} }
//$count = $this->uPhoneFollowUpModel->getSearchCount($where_); //$count = $this->uPhoneFollowUpModel->getSearchCount($where_);
......
...@@ -6,6 +6,7 @@ use app\api_broker\extend\Basic; ...@@ -6,6 +6,7 @@ use app\api_broker\extend\Basic;
use app\api_broker\service\LookShopService; use app\api_broker\service\LookShopService;
use app\model\AAgents; use app\model\AAgents;
use app\model\SystemConfig; use app\model\SystemConfig;
use think\Log;
use think\Request; use think\Request;
/** /**
...@@ -62,7 +63,7 @@ class LookShop extends Basic ...@@ -62,7 +63,7 @@ class LookShop extends Basic
public function getAgentsResidueNumList() public function getAgentsResidueNumList()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /*$params = array(
"store_id" => 1, "store_id" => 1,
);*/ );*/
if (!isset($params["store_id"]) && $params["store_id"] <= 0) { if (!isset($params["store_id"]) && $params["store_id"] <= 0) {
...@@ -97,4 +98,60 @@ class LookShop extends Basic ...@@ -97,4 +98,60 @@ class LookShop extends Basic
return $this->response("200", "request success", $result); return $this->response("200", "request success", $result);
} }
/**
* 经纪人列表 v2版本
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getAgentsResidueNumListV2()
{
$params = $this->params;
//$params['agent_id']=80;
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$model = new AAgents();
//$params_["id"] = $params['agent_id'];
$params_["id"] = $this->agentId;
$result = $model->searchAgentsByKeyword("id,store_id,district_id,level", $params_);
$field = "a.id,a.store_id,a.level,a.name,a.phone,a.img,b.store_name";
//店长
if($result[0]["level"] == 20){
$where_["store_id"] = $result[0]["store_id"];
}else{//总监
$where_["district_id"] = $result[0]["district_id"];
}
$where_["a.status"] = 0;
$agentList = $this->agentsModel->getAgentByIdV2($field, $where_, $page_no, $page_size);
if (count($agentList) <= 0) {
return $this->response("200", "request null");
}
$systemConfigModel = new SystemConfig();
$lookNum = 0;
$data = $systemConfigModel->getSetting([ "config_type" => 40 ], "rule");
if ($data && $data["agent_shop_num"] > 0) {
$lookNum = $data["agent_shop_num"];
}
//1.返回剩余铺数等于多少 if 0 判断是否升级过 ,升级过 显示已升级,没升级过 升级可以点击效果 else 不等于0 灰色的升级
foreach ($agentList as $key => $item) {
$can_look_num = $this->lookShopService_->isLookShop($item["id"]);
$is_upgrade = $this->lookShopService_->getAgentUpNum($item["id"]);
$agentList[$key]["can_look_num"] = $can_look_num;
$agentList[$key]["is_upgrade"] = $is_upgrade == 1 ? false : true ;//前端判断 等于1是未升级 2已升级
}
$result["look_num"] = $lookNum;
$result["list"] = $agentList;
return $this->response("200", "request success", $result);
}
} }
\ No newline at end of file
...@@ -404,7 +404,7 @@ class OrderLog extends Basic ...@@ -404,7 +404,7 @@ class OrderLog extends Basic
public function selectReportAllV2() public function selectReportAllV2()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"order_id" => 38024, "order_id" => 38024,
);*/ );*/
if (!isset($params["order_id"])) { if (!isset($params["order_id"])) {
...@@ -425,8 +425,8 @@ class OrderLog extends Basic ...@@ -425,8 +425,8 @@ class OrderLog extends Basic
public function selectReportAllV3() public function selectReportAllV3()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"order_id" => 38002, "order_id" => 38024,
);*/ );*/
if (!isset($params["order_id"])) { if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
......
...@@ -292,7 +292,7 @@ class Performance extends Basic ...@@ -292,7 +292,7 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"agent_id" => 80, "agent_id" => 80,
"start_time" => "2018-06-12", "start_time" => "2018-06-12",
"end_time" => "2018-06-19", "end_time" => "2018-06-19",
...@@ -362,7 +362,7 @@ class Performance extends Basic ...@@ -362,7 +362,7 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"type" => 1, //1个人,2经纪人 "type" => 1, //1个人,2经纪人
"agent_id" => 80, "agent_id" => 80,
"start_time" => "2018-06-12", "start_time" => "2018-06-12",
...@@ -460,4 +460,193 @@ class Performance extends Basic ...@@ -460,4 +460,193 @@ class Performance extends Basic
return $this->response("200", "success", $result["date"]); return $this->response("200", "success", $result["date"]);
} }
} }
/**
* 获取时间段实收数据
* @return \think\Response
*/
public function paylogListPcInfo()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->paylogListPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
/**
* 进场
* @return \think\Response]
*/
public function marchInListPcInfo()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->marchInListPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
/**
* 报备列表
* @return \think\Response
*/
public function followListPcInfo()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"id" => 80,
"type" => 1, //1表示个人业绩排行 2门店79 3区域7
"start_time" => "2018-06-12",
"end_time" => "2018-06-19",
"page_no" => 1,
"page_size" => 15
);*/
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->getFollowListPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
/**
* 新增商铺列表
* @return \think\Response\
*/
public function housingResourcePcInfo()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
//todo 最后跟进时间
$result = $this->service_->getHousingResourceListPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
/**
* 新增客户列表
* @return \think\Response
*/
public function userResourcePcInfo()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->getUserResourceListPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
/**
* 团队人数
* @return \think\Response
*/
public function teamNumPcInfo()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
// dump($params);
$result = $this->service_->getTeamNumPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
/**
* 成交单数 成交报告
* @return \think\Response
*/
public function bargainSumPcInfo()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->getBargainSumPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
} }
<?php
namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\PerformanceUtilService;
use think\Exception;
use think\Request;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/8/8
* Time : 14:02
* Intro:
*/
class PerformanceStatistics extends Basic{
private $service_;
function __construct(Request $request = null)
{
parent::__construct($request);
$this->service_ = new PerformanceUtilService();
}
/**
* 个人业绩
* @return \think\Response
*/
public function agentPerformanceBySearch()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"agent_id" => 9,
"start_time" => "2018-06-20",
"end_time" => "2018-06-20",
"is_case" => 1,//1经纪人 2案场
"house_id" => 0
);*/
if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"]) || !isset($params["is_case"])) {
return $this->response("101", "请求参数错误");
}
$house_id = 0;
if (isset($params["house_id"])) {
$house_id = $params["house_id"];
}
try {
$result = $this->service_->personagePerformance($params["agent_id"], $params["start_time"], $params["end_time"],
$params["is_case"], $house_id);
return $this->response("200", "request success", $result);
} catch (Exception $exception) {
return $this->response("101", "request error,msg:" . $exception);
}
}
}
\ No newline at end of file
...@@ -4,7 +4,9 @@ namespace app\api_broker\controller; ...@@ -4,7 +4,9 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\LookShopService; use app\api_broker\service\LookShopService;
use app\api_broker\service\PushMessageService;
use app\api_broker\service\VerifyService; use app\api_broker\service\VerifyService;
use app\api_broker\service\VipService;
use app\index\validate\HouseValidate; use app\index\validate\HouseValidate;
use app\model\AAgents; use app\model\AAgents;
use app\model\ACollectHouse; use app\model\ACollectHouse;
...@@ -260,13 +262,13 @@ class Shop extends Basic ...@@ -260,13 +262,13 @@ class Shop extends Basic
public function getShopDetail() public function getShopDetail()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
/* $params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端
//"user_id" => 2 //if c端 用户登录后传入user_id
);*/
$params = $this->params;
$params = $this->params;
/* $params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端
"user_id" => 2 //if c端 用户登录后传入user_id
);*/
$conditions = []; $conditions = [];
if (empty($params['id'])) { if (empty($params['id'])) {
return $this->response("101", "详情id不能为空"); return $this->response("101", "详情id不能为空");
...@@ -305,7 +307,7 @@ class Shop extends Basic ...@@ -305,7 +307,7 @@ class Shop extends Basic
$conditions['a.id'] = array( "eq", $params["id"] ); $conditions['a.id'] = array( "eq", $params["id"] );
$field .= ',b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee'; $field .= ',b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,c.agents_id';
$result = $this->gHousesModel->getHouseDetailById($field, $conditions); $result = $this->gHousesModel->getHouseDetailById($field, $conditions);
if (count($result) <= 0) { if (count($result) <= 0) {
return $this->response("101", '此楼盘不存在'); return $this->response("101", '此楼盘不存在');
...@@ -404,13 +406,16 @@ class Shop extends Basic ...@@ -404,13 +406,16 @@ class Shop extends Basic
if ($params['site_area'] == 3) { if ($params['site_area'] == 3) {
//先判断是否已经存在数据 //先判断是否已经存在数据
$field = 'id,status'; $field = 'id,status';
$get_params['agents_id'] = $params["user_id"]; $get_params['agents_id'] = $params["user_id"];//实际就是agents_id,前端之前传错了,将错就错
$get_params['house_id'] = $params["id"]; $get_params['house_id'] = $params["id"];
$collect_house = new ACollectHouse(); $collect_house = new ACollectHouse();
$res = $collect_house->getCollectHouse($field, $get_params); $res = $collect_house->getCollectHouse($field, $get_params);
if ($res && ($res[0]['status'] == 1)) {//如果存在 if ($res && ($res[0]['status'] == 1)) {//如果存在
$result["is_collect"] = 1; $result["is_collect"] = 1;
} }
$vip_services = new VipService();
$result['is_can_edit'] = $vip_services->vip($params['user_id'],'index/houseEdit');
} }
$result['new_sign_rule'] = "付{$result['payment_month']}{$result['deposit_month']},签订{$result['age_limit']}年"; $result['new_sign_rule'] = "付{$result['payment_month']}{$result['deposit_month']},签订{$result['age_limit']}年";
...@@ -461,6 +466,11 @@ class Shop extends Basic ...@@ -461,6 +466,11 @@ class Shop extends Basic
$result['data']['house_id'] = $house_id['house_id']; $result['data']['house_id'] = $house_id['house_id'];
$result['data']['internal_title'] = empty($this->params['internal_title']) ? "" : $this->params['internal_title']; $result['data']['internal_title'] = empty($this->params['internal_title']) ? "" : $this->params['internal_title'];
$result['msg'] = '新增或编辑成功'; $result['msg'] = '新增或编辑成功';
if (isset($house_id['status']) && $house_id['status'] == 2) {
$push_service = new PushMessageService();
$push_service->pushHouseDownMessage($house_id['house_id']);
}
} else { } else {
$data['code'] = 101; $data['code'] = 101;
$data['msg'] = 'Add houses failure'; $data['msg'] = 'Add houses failure';
......
This diff is collapsed.
...@@ -99,12 +99,12 @@ class Basic extends Controller ...@@ -99,12 +99,12 @@ class Basic extends Controller
} }
//获取默认城市 //获取默认城市
$this->getCity($this->agentId); $this->getCity($this->agentId);
//$this->city = "上海市";
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1]; $requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口 //过滤掉不需要验证token的接口
if (!in_array(trim($requestPath), $this->filterVerify)) { if (!in_array(trim($requestPath), $this->filterVerify)) {
$this->tokenVerify(); $this->tokenVerify();
// $this->userAuth(trim($requestPath)); //$this->userAuth(trim($requestPath));
} }
unset($this->params["AuthToken"]); unset($this->params["AuthToken"]);
} }
......
<?php
namespace app\api_broker\service;
use app\model\OBargainModel;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/8/23
* Time : 14:45
* Intro:
*/
class BargainService
{
/**
* 获取成交报告列表
* @param $pageNo
* @param $pageSize
* @param $submit_agent_id
* @param $status
* @param $is_my_correlation
* @param $keyword
* @return array|false|\PDOStatement|string|\think\Collection
*/
public function getBargainList($pageNo, $pageSize, $submit_agent_id, $status, $is_my_correlation, $keyword)
{
$condition = [];
if ($is_my_correlation == 1) {
$aService = new VerifyService();
$ids = $aService->getAgentsByAgentId($submit_agent_id);
$condition["ids"] = $ids;
} else {
$condition["father_id"] = 0;
}
switch ($status) {
case 1:
$condition["account_statement"] = 0;
break;
case 2:
$condition["account_statement"] = 1;
break;
case 3:
$condition["status"] = 20;
break;
case 4:
$condition["status"] = 21;
break;
default:
}
if (!empty($keyword)) {
$condition["keyword"] = $keyword;
}
$bargainModel = new OBargainModel();
$filed = "a.id,a.father_id,a.house_number,a.price,a.commission,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,c.id as order_id,
d.id as house_id,d.internal_title,d.internal_address";
$result = $bargainModel->selectBargainList($filed, $condition, $pageNo, $pageSize);
$convertResult ["total"] = count($result);
$convertResult ["result"] = $this->convert($is_my_correlation, $result);
return $convertResult;
}
private function convert($is_my_correlation, $result)
{
$sortResult = [];
if ($is_my_correlation == 1) {
$list = [];
foreach ($result as $k => $v) {
$father_id = $v["father_id"] == 0 ? $v["id"] : $v["father_id"];
if ($father_id > 0 && in_array($father_id, $list)) {
unset($result[$k]);
} else {
$result[$k]["create_time"] = date("Y-m-d", strtotime($v["create_time"]));
$result[$k]["id"] = $v["father_id"] == 0 ? $v["id"] : $v["father_id"];
array_push($list, $father_id);
}
}
foreach ($result as $k => $v) {
$sortResult[] = $v;
}
} else {
$sortResult = $result;
}
return $sortResult;
}
}
\ No newline at end of file
...@@ -16,35 +16,44 @@ class ClientService ...@@ -16,35 +16,44 @@ class ClientService
{ {
private $uPhoneFollowUpModel; private $uPhoneFollowUpModel;
private $redis; private $redis;
private $day;
private $num;
const SAVE_CALL_NUM = "save_call_num_";
public function __construct() public function __construct()
{ {
$this->uPhoneFollowUpModel = new UPhoneFollowPp(); $this->uPhoneFollowUpModel = new UPhoneFollowPp();
$this->redis = RedisExt::getRedis(); $this->redis = RedisExt::getRedis();
$this->day = $this->redis->get("s_agent_call_day");
$this->num = $this->redis->get("s_agent_call_number");
} }
public function dialTotal($user_id) public function dialTotal($user_id)
{ {
$day = 1; /* $start_time = date("Y-m-d H:i:s", strtotime("-$day day"));
$num = 5; $end_time = date("Y-m-d H:i:s", time());
if ($this->redis) { $params["create_time"] = array( "between", array( $start_time, $end_time ) );
$day = $this->redis->get("s_agent_call_day"); $params["user_id"] = $user_id;
$num = $this->redis->get("s_agent_call_number");
} $total = $this->uPhoneFollowUpModel->getCount($params);*/
$call_num = empty($this->redis->get(self::SAVE_CALL_NUM . $user_id)) ? 0 : $this->redis->get(self::SAVE_CALL_NUM . $user_id);
$start_time = date("Y-m-d H:i:s", strtotime("-$day day")); if ($call_num >= $this->num) {
$end_time = date("Y-m-d H:i:s", time());
$params["create_time"] = array( "between", array( $start_time, $end_time ) );
$params["user_id"] = $user_id;
$total = $this->uPhoneFollowUpModel->getCount( $params);
if ($total >= $num) {
return false; return false;
} else { } else {
return true; return true;
} }
}
public function saveCallNumByUserId($user_id)
{
$call_num = $this->redis->get(self::SAVE_CALL_NUM . $user_id);
if ($call_num > 0) {
$this->redis->set(self::SAVE_CALL_NUM . $user_id, $call_num + 1);
} else {
$this->redis->set(self::SAVE_CALL_NUM . $user_id, 1, $this->day * 3600);
}
} }
} }
\ No newline at end of file
...@@ -56,13 +56,13 @@ class LookShopService ...@@ -56,13 +56,13 @@ class LookShopService
if (!$this->redis) { if (!$this->redis) {
return []; return [];
} }
//todo 过滤掉店长以上的经纪人 //todo 过滤掉店长以上的经纪人 0824所有的都看铺限制
$agentInfo = $this->agentsModel->getAgentById("id,level", [ "agent_id" => $agent_id ]); /* $agentInfo = $this->agentsModel->getAgentById("id,level", [ "agent_id" => $agent_id ]);
Log::record('info ----countLookShopNum-------' . json_encode($agentInfo), "info"); Log::record('info ----countLookShopNum-------' . json_encode($agentInfo), "info");
if ($agentInfo && $agentInfo[0]["level"] > 10) { if ($agentInfo && $agentInfo[0]["level"] > 10) {
Log::record('info ----countLookShopNum------123-', "info"); Log::record('info ----countLookShopNum------123-', "info");
return []; return [];
} }*/
//过滤掉盘方为自己的 //过滤掉盘方为自己的
$params["houses_id"] = $house_id; $params["houses_id"] = $house_id;
$params["agents_id"] = $agent_id; $params["agents_id"] = $agent_id;
...@@ -183,8 +183,25 @@ class LookShopService ...@@ -183,8 +183,25 @@ class LookShopService
return false; return false;
} }
$agentUpNum = $this->redis->hGet(self::LOOK_UP_NUM . $this->nowTime, $agent_id); $agentUpNum = $this->redis->hGet(self::LOOK_UP_NUM . $this->nowTime, $agent_id);
if($agentUpNum >= 2){
return false;
}
$upLookNum = (int)$agentUpNum + 1; $upLookNum = (int)$agentUpNum + 1;
$this->redis->hSet(self::LOOK_UP_NUM . $this->nowTime, $agent_id, $upLookNum); $this->redis->hSet(self::LOOK_UP_NUM . $this->nowTime, $agent_id, $upLookNum);
return true; return true;
} }
/**
* 查询经纪人升级次数
* @param int $agent_id
* @return int
*/
public function getAgentUpNum(int $agent_id): int
{
$agentUpNum = $this->redis->hGet(self::LOOK_UP_NUM . $this->nowTime, $agent_id);
return $agentUpNum;
}
} }
\ No newline at end of file
...@@ -8,6 +8,7 @@ use app\model\FollowUpLogModel; ...@@ -8,6 +8,7 @@ use app\model\FollowUpLogModel;
use app\model\GHousesFollowUp; use app\model\GHousesFollowUp;
use app\model\GHousesToAgents; use app\model\GHousesToAgents;
use app\model\OBargainModel; use app\model\OBargainModel;
use app\model\OFinancialAudit;
use app\model\OImg; use app\model\OImg;
use app\model\OMarchInModel; use app\model\OMarchInModel;
use app\model\OPartialCommission; use app\model\OPartialCommission;
...@@ -386,6 +387,7 @@ class OrderLogService ...@@ -386,6 +387,7 @@ class OrderLogService
$oPayLogModel = new OPayLogModel(); $oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel(); $oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel(); $oBargainModel = new OBargainModel();
$oFinancialModel = new OFinancialAudit();
$orderData = $orderModel->selectOrderByOrderId("f_id,house_title", [ "order_id" => $order_id ]); $orderData = $orderModel->selectOrderByOrderId("f_id,house_title", [ "order_id" => $order_id ]);
...@@ -467,6 +469,16 @@ class OrderLogService ...@@ -467,6 +469,16 @@ class OrderLogService
} }
} }
//审核流程
$field_financial = "id,bargain_id,agent_id,source,status,remark,audit_level,audit_id,audit_name,create_time,update_time";
$oFinancialData = $oFinancialModel->selectFinancialByOrderNo($field_financial, [ "order_id" => $order_id ]);
if (count($oFinancialData) > 0) {
foreach ($oFinancialData as $k => $v) {
$v["step_name"] = "financial";
$result[$sort++] = $v;
}
}
return $this->sortByTime($result); return $this->sortByTime($result);
} }
...@@ -490,6 +502,7 @@ class OrderLogService ...@@ -490,6 +502,7 @@ class OrderLogService
$oPayLogModel = new OPayLogModel(); $oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel(); $oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel(); $oBargainModel = new OBargainModel();
$oFinancialModel = new OFinancialAudit();
$orderData = $orderModel->selectOrderByOrderId("f_id,house_title", [ "order_id" => $order_id ]); $orderData = $orderModel->selectOrderByOrderId("f_id,house_title", [ "order_id" => $order_id ]);
...@@ -572,6 +585,16 @@ class OrderLogService ...@@ -572,6 +585,16 @@ class OrderLogService
} }
} }
//审核流程
$field_financial = "id,bargain_id,agent_id,source,status,remark,audit_level,audit_id,audit_name,create_time,update_time";
$oFinancialData = $oFinancialModel->selectFinancialByOrderNo($field_financial, [ "order_id" => $order_id ]);
if (count($oFinancialData) > 0) {
foreach ($oFinancialData as $k => $v) {
$v["step_name"] = "financial";
$result[$sort++] = $v;
}
}
return $this->sortByTime($result); return $this->sortByTime($result);
} }
......
...@@ -220,6 +220,55 @@ class PushMessageService ...@@ -220,6 +220,55 @@ class PushMessageService
return $this->pushAgentAllDeviceId($agent_data['id'], '新增分佣', $content); return $this->pushAgentAllDeviceId($agent_data['id'], '新增分佣', $content);
} }
/**
* @param $house_id
* @param $operation_id
* @param $agent_id
* @param $push_str
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushHouseMessage($house_id, $operation_id, $agent_id, $push_str) {
$agent = new AAgents();
$ccr_agent_data = $agent->getAgentInfo('name,phone', $operation_id);
$house = new GHouses();
$house_data = $house->getHouseInfoById('internal_title',['id'=>$house_id]);
$content = '你的【'.$house_data['internal_title'].'】商铺,盘方被【'.$ccr_agent_data['name'].'-'.$ccr_agent_data['phone'].'】修改为'.$push_str;
foreach ($agent_id as $k=>$v) {
$this->pushAgentAllDeviceId($v, '修改盘方', $content, 'house_info',$house_id);
}
return ;
}
/**
* 根据商铺id 推送下架消息
*
* @param $house_id
* @return bool|void
*/
public function pushHouseDownMessage($house_id) {
$house = new GHouses();
try {
$house_data = $house->getHouseInfoById('internal_title',['id'=>$house_id]);
$content = '你的【'.$house_data['internal_title'].'】商铺下架,如需要上架,请编辑提交该商铺';
$house_agent = new GHousesToAgents();
$house_agent_data = $house_agent->getAgentList($house_id, 2, 'a.agents_id');
} catch (\Exception $e) {
return false;
}
foreach ($house_agent_data as $k=>$v) {
$this->pushAgentAllDeviceId($v['agents_id'], '商铺下架', $content, 'house_info',$house_id);
}
return ;
}
/** /**
* @param $id * @param $id
* @param $title * @param $title
...@@ -227,9 +276,6 @@ class PushMessageService ...@@ -227,9 +276,6 @@ class PushMessageService
* @param null $type * @param null $type
* @param null $user_id * @param null $user_id
* @return bool * @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function pushAgentAllDeviceId($id, $title, $content, $type = null, $user_id = null) public function pushAgentAllDeviceId($id, $title, $content, $type = null, $user_id = null)
{ {
......
...@@ -72,11 +72,11 @@ class UploadFileService ...@@ -72,11 +72,11 @@ class UploadFileService
break; break;
case 'business_school' : case 'business_school' :
$path .= 'static/business_school/'; $path .= 'static/business_school/';
$internet_path = ''; $internet_path = 'static/business_school/';
break; break;
case 'business_school_file' : case 'business_school_file' :
$path .= 'static/business_school_file/'; $path .= 'static/business_school_file/';
$internet_path = ''; $internet_path = 'static/business_school_file/';
break; break;
default : default :
$data['code'] = 101; $data['code'] = 101;
......
...@@ -59,6 +59,33 @@ class VerifyService ...@@ -59,6 +59,33 @@ class VerifyService
return null; return null;
} }
public function getAgentsByAgentIdPcInfo($id, $type)
{
$arr_list = [];
switch ($type) {
case 1:
return $id;
case 2:
$arr_list = $this->agentModel->searchAgentsByKeyword("id", [ "store_id" => $id ]);
break;
case 3:
$arr_list = $this->agentModel->searchAgentsByKeyword("id", [ "district_id" => $id ]);
break;
default:
return $id;
break;
}
$ids = "";
if (count($arr_list) > 0) {
foreach ($arr_list as $item) {
$ids .= $item["id"] . ",";
}
}
$ids = rtrim($ids, ",");
return $ids;
}
/** /**
* 获取我的案场权限人 * 获取我的案场权限人
* @param $agent_id * @param $agent_id
......
...@@ -74,13 +74,13 @@ class PlsDemo ...@@ -74,13 +74,13 @@ class PlsDemo
* *
* @param $phoneA * @param $phoneA
* @param $phoneB * @param $phoneB
* @param $time 过期时间 * @param $time 过期时间
* @param bool $isRecordingEnabled 是否录音 * @param bool $isRecordingEnabled 是否录音
* @param string $poolKey 号码池Key
* @param string $phoneNoX 中间号码 * @param string $phoneNoX 中间号码
* @param $expectCity 城市
* @return mixed|\SimpleXMLElement * @return mixed|\SimpleXMLElement
*/ */
public static function bindAxb($phoneA, $phoneB, $time, $isRecordingEnabled=false, $phoneNoX = '') { public static function bindAxb($phoneA, $phoneB, $time, $isRecordingEnabled=false, $phoneNoX = '', $expectCity) {
//组装请求对象-具体描述见控制台-文档部分内容 //组装请求对象-具体描述见控制台-文档部分内容
$request = new BindAxbRequest(); $request = new BindAxbRequest();
...@@ -98,7 +98,7 @@ class PlsDemo ...@@ -98,7 +98,7 @@ class PlsDemo
$request->setPhoneNoX($phoneNoX); $request->setPhoneNoX($phoneNoX);
//可选:期望分配X号码归属的地市(省去地市后缀后的城市名称) //可选:期望分配X号码归属的地市(省去地市后缀后的城市名称)
$request->setExpectCity(""); $request->setExpectCity($expectCity);
//必填:绑定关系对应的失效时间-不能早于当前系统时间 //必填:绑定关系对应的失效时间-不能早于当前系统时间
$request->setExpiration($time); $request->setExpiration($time);
......
...@@ -8,54 +8,55 @@ ...@@ -8,54 +8,55 @@
namespace app\api_broker\untils; namespace app\api_broker\untils;
//use app\api_broker\untils\curlUntils; use app\api_broker\service\PushMessageService;
use app\chat\utils\CurlUtil; use app\chat\utils\CurlUtil;
class RongDemo class RongDemo
{ {
/** /**
* 业务url/Accounts/{accountSid}/nme/{type}/{operatorId}/[/{op}]?sig={sigParameter} * 业务url/Accounts/{accountSid}/nme/{type}/{operatorId}/[/{op}]?sig={sigParameter}
* accountSid 账户id * accountSid 账户id
* operatorId 合作运营商标识 * operatorId 合作运营商标识
* type 号码类型 * type 号码类型
* op 操作名 * op 操作名
* sigParameter 访问签名 * sigParameter 访问签名
* appId 应用id * appId 应用id
* authToken 访问授权码 * authToken 访问授权码
* test_phone 测试中间号 * test_phone 测试中间号
* *
*/ */
public $base_url='https://apppro.cloopen.com:8883/2013-12-26'; public $base_url = 'https://apppro.cloopen.com:8883/2013-12-26';
public $components=[ public $components = [
'accountSid'=>'8a48b55153eae51101540e763d3b3888', 'accountSid' => '8a48b55153eae51101540e763d3b3888',
'appId'=>'8a216da85f5c89b1015f7718e2b90a63', 'appId' => '8a216da85f5c89b1015f7718e2b90a63',
'appToken'=>'TOKEN3655166d16164b6ef25d6fa2a266acc1', 'appToken' => 'TOKEN3655166d16164b6ef25d6fa2a266acc1',
'authToken'=>'26b220de299d4a56a6f54dd5792a30e4' 'authToken' => '26b220de299d4a56a6f54dd5792a30e4'
]; ];
public $test_phone='17080219070'; public $test_phone = '17080219070';
public $sign=''; public $sign = '';
public $statusCode=[ public $statusCode = [
'000000' => '成功', '000000' => '成功',
'300001' => '参数错误', '300001' => '参数错误',
'300002' =>'验证错误', '300002' => '验证错误',
'301101' =>'无号码资源', '301101' => '无号码资源',
'301201' =>'内部存储异常', '301201' => '内部存储异常',
'301401' =>'无空闲号码', '301401' => '无空闲号码',
'301402' =>'分配失败', '301402' => '分配失败',
'301501' =>'类型号码未配置', '301501' => '类型号码未配置',
'301633' =>'找不到应用', '301633' => '找不到应用',
'320201' =>'号码已解绑', '320201' => '号码已解绑',
'320400' =>'参数异常', '320400' => '参数异常',
'320402' =>'号码已使用', '320402' => '号码已使用',
'320500' =>'落地异常', '320500' => '落地异常',
'309000' =>'其它错误', '309000' => '其它错误',
]; ];
function __construct(){ function __construct()
{
//$this->sign = $this->sigParameter(); //$this->sign = $this->sigParameter();
} }
...@@ -67,11 +68,11 @@ class RongDemo ...@@ -67,11 +68,11 @@ class RongDemo
*/ */
public function sigParameter($time) public function sigParameter($time)
{ {
$data=$this->components; $data = $this->components;
//生成签名 //生成签名
$data['accountSid'].$data['authToken'].$time; $data['accountSid'] . $data['authToken'] . $time;
$sign=strtoupper(md5($data['accountSid'].$data['authToken'].$time)); $sign = strtoupper(md5($data['accountSid'] . $data['authToken'] . $time));
return $sign; return $sign;
} }
...@@ -80,10 +81,11 @@ class RongDemo ...@@ -80,10 +81,11 @@ class RongDemo
* @param $time * @param $time
* @return mixed * @return mixed
*/ */
public function Authorization($time){ public function Authorization($time)
$data=$this->components; {
$data = $this->components;
$Authorization=base64_encode($data['accountSid'].':'.$time); $Authorization = base64_encode($data['accountSid'] . ':' . $time);
return $Authorization; return $Authorization;
} }
...@@ -95,15 +97,16 @@ class RongDemo ...@@ -95,15 +97,16 @@ class RongDemo
* @param $operatorId 平台标识 * @param $operatorId 平台标识
* @return string * @return string
*/ */
public function url($type,$op='',$operatorId,$sign){ public function url($type, $op = '', $operatorId, $sign)
$data=$this->components; {
$url_c="/Accounts/{$data['accountSid']}/nme/{$type}/{$operatorId}/{$op}?sig={$sign}"; $data = $this->components;
$url=$this->base_url.$url_c; $url_c = "/Accounts/{$data['accountSid']}/nme/{$type}/{$operatorId}/{$op}?sig={$sign}";
$url = $this->base_url . $url_c;
return $url; return $url;
} }
public function sendCurl($url,$arr,$Authorization) public function sendCurl($url, $arr, $Authorization)
{ {
$data = json_encode($arr); $data = json_encode($arr);
$curl = new CurlUtil(); $curl = new CurlUtil();
...@@ -116,9 +119,8 @@ class RongDemo ...@@ -116,9 +119,8 @@ class RongDemo
"CURLOPT_SSL_VERIFYPEER" => 0, "CURLOPT_SSL_VERIFYPEER" => 0,
"CURLOPT_SSL_VERIFYHOST" => 2, "CURLOPT_SSL_VERIFYHOST" => 2,
]; ];
//echo $url;
$response = $curl->post($url, $data); $response = $curl->post($url, $data);
return $response; return $response;
} }
...@@ -132,11 +134,12 @@ class RongDemo ...@@ -132,11 +134,12 @@ class RongDemo
* @param $yx_time * @param $yx_time
* @return string * @return string
*/ */
public function setNumber($aNumber,$bNumber,$xNumber,$areaCode,$yx_time='604800',$record){ public function setNumber($aNumber, $bNumber, $xNumber, $areaCode, $yx_time = '604800', $record)
$data = $this->components; {
$time = date('YmdHis',time()); $data = $this->components;
$sign = $this->sigParameter($time); /*签名*/ $time = date('YmdHis', time());
$url = $this->url('axb','setnumber','cu01',$sign);/*url*/ $sign = $this->sigParameter($time); /*签名*/
$url = $this->url('axb', 'setnumber', 'cu01', $sign);/*url*/
$Authorization = $this->Authorization($time);/*认证信息*/ $Authorization = $this->Authorization($time);/*认证信息*/
$post_data = [ $post_data = [
...@@ -145,20 +148,17 @@ class RongDemo ...@@ -145,20 +148,17 @@ class RongDemo
'bNumber' => $bNumber, 'bNumber' => $bNumber,
'servingNumber' => $xNumber, 'servingNumber' => $xNumber,
'areaCode' => $areaCode, 'areaCode' => $areaCode,
'needRecord' =>$record, 'needRecord' => $record,
'mappingDuratio'=>$yx_time, 'mappingDuration' => strtotime($yx_time) .'',
'cdrNotifyUrl' =>CURRENT_URL."task/rongBilledInformUrl", 'cdrNotifyUrl' => CURRENT_URL . 'task/rongBilledInformUrl',
'callStateNotifyUrl'=>CURRENT_URL."task/rongStatusInformUrl", 'callStateNotifyUrl' => CURRENT_URL . 'task/rongStatusInformUrl',
'recordNotifyUrl'=>CURRENT_URL."task/rongRecordingInformUrl", 'recordNotifyUrl' => CURRENT_URL . 'task/rongRecordingInformUrl',
// 'cdrNotifyUrl' =>"http://pre.tonglianjituan.com/task/rongBilledInfromUrl", 'userData' => $aNumber .'-'.$bNumber, //记录a和b号码,回调使用
// 'callStateNotifyUrl'=>"http://pre.tonglianjituan.com/task/rongRecordingInfromUrl", 'icDisplayFlag' => 3, //"0"显示真实号码"1"显示中间号"2"aNumbe侧"3" bNumber侧默认"1"
// 'recordNotifyUrl'=>"http://pre.tonglianjituan.com/task/rongStatusInfromUrl",
]; ];
//var_dump($post_data);/*************测试****************/ $result = json_decode($this->sendCurl($url, $post_data, $Authorization), true);
$result = json_decode($this->sendCurl($url,$post_data,$Authorization),true); $result['code_msg'] = $this->getCodeString($result['statusCode']);
return $result;
return $result;
} }
/** /**
...@@ -166,35 +166,62 @@ class RongDemo ...@@ -166,35 +166,62 @@ class RongDemo
* @param $mappingId * @param $mappingId
* @return string * @return string
*/ */
public function releaseNumber($mappingId){ public function releaseNumber($mappingId)
$data = $this->components; {
$time = date('YmdHis',time()); $data = $this->components;
$sign = $this->sigParameter($time); /*签名*/ $time = date('YmdHis', time());
$url = $this->url('axb','releasenumber','cu01',$sign);/*url*/ $sign = $this->sigParameter($time); /*签名*/
$url = $this->url('axb', 'releasenumber', 'cu01', $sign);/*url*/
$Authorization = $this->Authorization($time);/*认证信息*/ $Authorization = $this->Authorization($time);/*认证信息*/
$post_data = [ $post_data = [
'appId' => $data['appId'], 'appId' => $data['appId'],
'mappingId'=>$mappingId 'mappingId' => $mappingId
]; ];
$result = json_decode($this->sendCurl($url,$post_data,$Authorization),true); $result = json_decode($this->sendCurl($url, $post_data, $Authorization), true);
return $result; return $result;
} }
/**
* 容联云code对于说明
*
* @param $code
* @return string
*/
public function getCodeString($code) {
$msg = '';
switch ($code) {
case '000000' :
$msg = '成功';break;
case '300001' :
$msg = '参数错误';break;
case '300002' :
$msg = '验证错误';break;
case '301101' :
$msg = '无号码资源';break;
case '301201' :
$msg = '云内部存储异常';break;
case '301401' :
$msg = '无空闲号码';break;
case '301402' :
$msg = '分配失败';break;
case '301403' :
$msg = '数据库错误';break;
case '301501' :
$msg = '类型号码未配置';break;
case '301633' :
$msg = '找不到应用';break;
case '320201' :
$msg = '号码已解绑';break;
case '320400' :
$msg = '参数异常';break;
case '320402' :
$msg = '号码已使用';break;
case '320500' :
$msg = '落地异常';break;
case '309000' :
$msg = '其它错误';break;
}
return $msg;
}
} }
\ No newline at end of file
<?php
namespace app\api_broker\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/8/23
* Time : 14:51
* Intro:
*/
class BargainValidate extends Validate
{
protected $rule = [
'submit_agent_id' => 'require|number',
'status' => 'require|number|in:0,1,2,3,4',
'is_my_correlation' => 'require|number|in:0,1',
];
protected $message = [
'submit_agent_id.require' => '经纪人为必填字段',
'submit_agent_id.number' => '经纪人id只能为数字',
'status.require' => '状态参数不能为空',
'status.number' => '状态参数只能为数字',
'status.in' => '状态错误',
'is_my_correlation.require' => '与我相关不能为空',
'is_my_correlation.number' => '与我相关只能是数字',
'is_my_correlation.in' => '与我相关错误',
];
protected $scene = [
'bargainList' => [ 'submit_agent_id', 'status', 'is_my_correlation' ],
];
}
\ No newline at end of file
<?php
namespace app\api_broker\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/8/7
* Time: 13:54:12
*/
class UserGetLastOrNextUserIdValidate extends Validate{
protected $rule = [
'type' => 'require',
'agent_id' => 'require|number|gt:0',
'user_id' => 'require|number|gt:0'
];
protected $message = [
'type.require' => '网络异常!错误代码:uv1',//type为必填字段
'agent_id.require' => 'agent_id为必填字段',//agent_id为必填字段
'agent_id.number' => '网络异常!错误代码:uv4',//agent_id只能为数字
'agent_id.gt' => '网络异常!错误代码:uv5',//agent_id必须大于0
'user_id.require' => 'user_id为必填字段',//user_id为必填字段
'user_id.number' => '网络异常!错误代码:uv7',//user_id只能为数字
'user_id.gt' => '网络异常!错误代码:uv8',//user_id必须大于0
];
protected $scene = [
'add_phone_follow_up_verify' => [ 'user_id', 'agent_id', 'type'],
];
}
<?php
namespace app\api_broker\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/8/7
* Time: 13:54:12
*/
class UserValidate extends Validate{
protected $rule = [
'type' => 'require',
'agent_id' => 'require|number|gt:0',
'user_id' => 'require|number|gt:0',
'id' => 'require|number|gt:0'
];
protected $message = [
'type.require' => 'type为必填字段',
'agent_id.require' => 'agent_id为必填字段',
'agent_id.number' => 'agent_id只能为数字',
'agent_id.gt' => 'agent_id必须大于0',
'user_id.require' => 'user_id为必填字段',
'user_id.number' => 'user_id只能为数字',
'user_id.gt' => 'user_id必须大于0',
'id.require' => 'id为必填字段',
'id.number' => 'id只能为数字',
'id.gt' => 'id必须大于0',
];
protected $scene = [
'getLastOrNextUserID' => [ 'user_id', 'agent_id', 'type' ],
'getLastOrNextUserIDPhoneFollowPu' => [ 'id', 'agent_id', 'type' ],
];
}
...@@ -182,6 +182,11 @@ class Index ...@@ -182,6 +182,11 @@ class Index
{ {
return view('index/shop_detail_pc'); return view('index/shop_detail_pc');
} }
public function customer_genjin_detail_pc()
{
return view('index/customer_genjin_detail_pc');
}
public function customerinfo_details_new() public function customerinfo_details_new()
{ {
...@@ -203,6 +208,10 @@ class Index ...@@ -203,6 +208,10 @@ class Index
return view('index/download_b'); return view('index/download_b');
} }
/* public function edit_modal()
{
return view('index/edit_modal');
}*/
/* public function index() /* public function index()
{ {
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>同联商业</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
</head>
<body style="display: none;">
<div id="app">
<nav class="oh">
<div class="main-btn-box fl">
<a>客户详情/跟进</a>
<a>约带看</a>
</div>
<div class="step-btn-box fl">
<a>上一条客户</a>
<a>下一条客户</a>
</div>
</nav>
</div>
<script src="/app/js/libs/require.min.js" data-js="/app/js/customer_genjin_detail_pc.js" data-main="/app/js/main" data-norem="yes" defer async="true"></script>
</body>
</html>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<meta name="Keywords" content="" /> <meta name="Keywords" content="" />
<meta name="Description" content="" /> <meta name="Description" content="" />
<link rel="stylesheet" href="/app/css/common.css?rev=14ba5c1d4b1452ee5b804c1b98270acc"> <link rel="stylesheet" href="/app/css/common.css?rev=14ba5c1d4b1452ee5b804c1b98270acc">
<link href="/app/css/customerinfo_details_new.css?new10" rel="stylesheet"> <link href="/app/css/customerinfo_details_new.css?new11" rel="stylesheet">
<script src="/app/js/vconsole.min.js"></script> <script src="/app/js/vconsole.min.js"></script>
<script> <script>
if(~location.origin.indexOf('api.')) { if(~location.origin.indexOf('api.')) {
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="flex-center"><img src="/app/images/ic_default_headpic.png" onerror="javascript:this.src='/app/images/ic_default_headpic.png'" id="customer_pic" /></div> <div class="flex-center"><img src="/app/images/ic_default_headpic.png" onerror="javascript:this.src='/app/images/ic_default_headpic.png'" id="customer_pic" /></div>
<div> <div>
<p><span id="name"></span><span class="edit-btn"><img src="/app/images/boy_ic@2x.png" class="sex-icon" /></span></p> <p><span id="name"></span><span class="edit-btn"><img src="/app/images/boy_ic@2x.png" class="sex-icon" /></span></p>
<p><a href="javascript:;" id="call_list_open_btn" class="flex-center"><span id="customer_id">客户ID:0,</span><span id="customer_phone"></span><img class="call-btn call-btn-main" src="/app/images/ic_tel.png" /></a></p> <p><a href="javascript:;" id="call_list_open_btn" class="flex-center"><span id="customer_id">客户ID:0,</span><span id="customer_phone"></span><img class="call-btn call-btn-main" src="/app/images/ic_tel.png" /><span id="baohuqi_span">保护期内</span></a></p>
<p><span class="flex-center" id="industry_type"></span><span class="flex-center" id="price_demand"></span><span class="flex-center" id="area_demand"></span></p> <p><span class="flex-center" id="industry_type"></span><span class="flex-center" id="price_demand"></span><span class="flex-center" id="area_demand"></span></p>
<p id="add_city_type_area"></p> <p id="add_city_type_area"></p>
</div> </div>
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
<!--<p>客户姓名:<span class="edit-btn"><span id="customer_name"></span><img class="edit-icon" src="/app/images/ic_bianji.png" /></span></p> <!--<p>客户姓名:<span class="edit-btn"><span id="customer_name"></span><img class="edit-icon" src="/app/images/ic_bianji.png" /></span></p>
<p>性别:<span class="edit-btn"><span id="customer_sex"></span><img src="/app/images/boy_ic@2x.png" class="sex-icon" /><img class="edit-icon" src="/app/images/ic_bianji.png" /></span></p>--> <p>性别:<span class="edit-btn"><span id="customer_sex"></span><img src="/app/images/boy_ic@2x.png" class="sex-icon" /><img class="edit-icon" src="/app/images/ic_bianji.png" /></span></p>-->
<p>客方:<span id="kefang"></span><img class="call-btn call-btn-other" src="/app/images/ic_tel.png" /></p> <p>客方:<span id="kefang"></span><img class="call-btn call-btn-other" src="/app/images/ic_tel.png" /></p>
<p>邀请人:<span id="yaoqingren"></span><img class="call-btn call-btn-other" src="/app/images/ic_tel.png" /></p> <p>是否转介绍:<span id="zhuanjieshao"></span></p>
<p>邀请人(介绍人):<span id="yaoqingren"></span><img class="call-btn call-btn-other" src="/app/images/ic_tel.png" /></p>
<p>VIP客户(客方和有权限的人才能看到):<span id="isvip"></span></p> <p>VIP客户(客方和有权限的人才能看到):<span id="isvip"></span></p>
<p>产生类型:<span id="create_type"></span></p> <p>产生类型:<span id="create_type"></span></p>
<p>创建时间:<span id="add_time"></span></p> <p>创建时间:<span id="add_time"></span></p>
...@@ -88,8 +89,24 @@ ...@@ -88,8 +89,24 @@
<p>下载登录时间:<span id="login_time"></span></p> <p>下载登录时间:<span id="login_time"></span></p>
</div> </div>
<div class="record-main"> <div class="record-main">
<p>修改客方日志</p> <p>客方修改日志</p>
<ul> <ul id="modify_kefang_ul">
<!--<li>
<div>
<p>操作时间</p>
<p>2018-12-12</p>
</div>
<div>
<span class="dot-block"><mark></mark></span>
<p>客方修改为白夫子-13636508977客方修改为白夫子-13636508977</p>
<p>操作人:李青青</p>
</div>
</li>-->
</ul>
</div>
<div class="record-main">
<p>邀请人(介绍人)修改日志</p>
<ul id="modify_jieshaoren_ul">
<!--<li> <!--<li>
<div> <div>
<p>操作时间</p> <p>操作时间</p>
...@@ -159,7 +176,7 @@ ...@@ -159,7 +176,7 @@
<script type="text/javascript" src="/app/js/jquery-1122-min.js"></script> <script type="text/javascript" src="/app/js/jquery-1122-min.js"></script>
<script src="/app/js/common.js?new42" charset="utf-8"></script> <script src="/app/js/common.js?new42" charset="utf-8"></script>
<script src="/app/js/customerinfo_details_new.js?new56"></script> <script src="/app/js/customerinfo_details_new.js?new57"></script>
</body> </body>
......
...@@ -19,7 +19,19 @@ ...@@ -19,7 +19,19 @@
<div class="left-area"></div> <div class="left-area"></div>
<div class="right-area"> <div class="right-area">
<div class="right-area-top"> <div class="right-area-top">
<h6>{{switchTitle(item.step_name)}}</h6> <h6 v-if="item.step_name==='financial'">
<p v-if="item.status == '1' && item.audit_level == '0'">财务部 申请撤销成交报告</p>
<p v-if="item.status == '1' && item.audit_level == '1'">财务部 一审通过</p>
<p v-if="item.status == '1' &&item.audit_level == '2'">财务部 二审通过</p>
<p v-if="item.status == '1' &&item.audit_level == '3'">财务部 三审通过 </p>
<p v-if="item.step_name==='financial' && item.status == '2'">财务部 审核驳回{{ item.status }}</p>
<p v-if="item.step_name==='financial' && item.status == '3' && item.audit_level == '1'">财务部 一审转到一级审核 </p>
<p v-if="item.step_name==='financial' && item.status == '3' && item.audit_level == '2'">财务部 二审转到一级审核 </p>
<p v-if="item.step_name==='financial' && item.status == '3' && item.audit_level == '3'">财务部 三审转到一级审核</p>
<p v-if="item.step_name==='financial' && item.status == '4'">财务部 成交报告已撤销</p>
</h6>
<h6 v-else>{{switchTitle(item.step_name)}}</h6>
<p v-if="item.step_name==='report'">{{item.house_title}}</p> <p v-if="item.step_name==='report'">{{item.house_title}}</p>
<p v-if="item.step_name==='report'">客户:<span>{{item.user_name}}</span></p> <p v-if="item.step_name==='report'">客户:<span>{{item.user_name}}</span></p>
<p v-if="item.step_name==='report'">客户电话:<span>{{hideTel(item.user_phone)}}</span></p> <p v-if="item.step_name==='report'">客户电话:<span>{{hideTel(item.user_phone)}}</span></p>
...@@ -83,6 +95,10 @@ ...@@ -83,6 +95,10 @@
<p v-if="item.step_name==='pay_log'" class="li-caozuoren">操作人:<span>{{item.list[0].agent_name}}</span></p> <p v-if="item.step_name==='pay_log'" class="li-caozuoren">操作人:<span>{{item.list[0].agent_name}}</span></p>
<p v-if="item.step_name==='refund'" class="li-caozuoren">操作人:<span>{{item.agent_name}}</span></p> <p v-if="item.step_name==='refund'" class="li-caozuoren">操作人:<span>{{item.agent_name}}</span></p>
<!--<p v-if="item.step_name==='bargain'" class="li-caozuoren">操作人:<span>{{item.submit_agent_name}}</span></p>--> <!--<p v-if="item.step_name==='bargain'" class="li-caozuoren">操作人:<span>{{item.submit_agent_name}}</span></p>-->
<p v-if="item.step_name==='financial' && item.status == '4' ">备注:<span>{{item.remark}}</span></p>
<p v-if="item.step_name==='financial'" class="li-caozuoren">操作人:<span>{{item.audit_name}}</span></p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -139,9 +139,9 @@ class Broker extends Basic ...@@ -139,9 +139,9 @@ class Broker extends Basic
$hg = new GHousesToAgents(); $hg = new GHousesToAgents();
switch ($this->params['type']) { switch ($this->params['type']) {
case 1: case 1:
$res = $hg->addAgents($this->params['agents_id'], $this->params['houses_id'], $this->params['type']);break; $res = $hg->addAgents($this->params['agents_id'], $this->params['houses_id'], $this->params['type'], $this->userId);break;
case 2: case 2:
$res = $hg->addAgents($this->params['agents_id'], $this->params['houses_id'], $this->params['type']);break; $res = $hg->addAgents($this->params['agents_id'], $this->params['houses_id'], $this->params['type'], $this->userId);break;
default : default :
$res = []; $res = [];
$data['status'] = 101; $data['status'] = 101;
......
...@@ -140,9 +140,6 @@ class CellPhone extends Basic ...@@ -140,9 +140,6 @@ class CellPhone extends Basic
* 绑定手机号 * 绑定手机号
* *
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function bindAXB() public function bindAXB()
{ {
...@@ -150,27 +147,25 @@ class CellPhone extends Basic ...@@ -150,27 +147,25 @@ class CellPhone extends Basic
return $this->response(101, '客户id为空'); return $this->response(101, '客户id为空');
} }
$user_id = 0;
$phone_b = 0;
if (empty($this->params['phone_b'])) { if (empty($this->params['phone_b'])) {
$m_user = new Users(); $user_id = $this->params['user_id'];
$user_phone = $m_user->selectUser($this->params['user_id'], 'user_phone');
if (empty($user_phone['user_phone'])) {
return $this->response(101, '没有用户信息');
}
$phone_b = $user_phone['user_phone'];
} else { } else {
$phone_b = $this->params['phone_b']; $phone_b = $this->params['phone_b'];
} }
$call_phone = new CallPhoneService(); $house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id'];
$data = $call_phone->bindAXB($this->params['phone_a'], $phone_b); $record = true; //录音
$call_phone = new CallPhoneService($this->city);
$data = $call_phone->bindAXB($this->params['phone_a'], $phone_b, $record, $user_id, $this->userId, $this->userName, $house_id);
$result['msg'] = ''; $result['msg'] = '';
if ($data['status'] == 'success') { if ($data['status'] == 'success') {
$push = new PushMessageService(); $push = new PushMessageService();
$push->pushMessageById($this->userId, '客户详情', '后台拨打电话推送客户详情', 'user_info', $this->params['user_id']); $push->pushMessageById($this->userId, '客户详情', '后台拨打电话推送客户详情', 'user_info', $this->params['user_id']);
$result['code'] = 200; $result['code'] = 200;
$result['data']['phone'] = $data['phone']; $result['data']['phone'] = $data['phone'];
$result['data']['follow_id'] = $data['follow_id'];
} else { } else {
$result['status'] = 101; $result['status'] = 101;
$result['msg'] = $data['msg']; $result['msg'] = $data['msg'];
...@@ -183,9 +178,6 @@ class CellPhone extends Basic ...@@ -183,9 +178,6 @@ class CellPhone extends Basic
* 解除绑定关系 * 解除绑定关系
* *
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function agentsUnBind() public function agentsUnBind()
{ {
...@@ -193,21 +185,16 @@ class CellPhone extends Basic ...@@ -193,21 +185,16 @@ class CellPhone extends Basic
return $this->response(101, '客户id为空'); return $this->response(101, '客户id为空');
} }
$user_id = 0;
$phone_b = 0;
if (empty($this->params['phone_b'])) { if (empty($this->params['phone_b'])) {
$m_user = new Users(); $user_id = $this->params['user_id'];
$user_phone = $m_user->selectUser($this->params['user_id'], 'user_phone');
if (empty($user_phone['user_phone'])) {
return $this->response(101, '没有用户信息');
}
$phone_b = $user_phone['user_phone'];
} else { } else {
$phone_b = $this->params['phone_b']; $phone_b = $this->params['phone_b'];
} }
$call_phone = new CallPhoneService(); $call_phone = new CallPhoneService();
$data = $call_phone->agentsUnBind($this->params['phone_a'], $phone_b, $this->params['phone_x']); $data = $call_phone->agentsUnBind($this->params['phone_a'], $phone_b, $this->params['phone_x'], $user_id);
$result['msg'] = ''; $result['msg'] = '';
if ($data['status'] == 'success') { if ($data['status'] == 'success') {
$result['code'] = 200; $result['code'] = 200;
......
...@@ -98,8 +98,27 @@ class Collection extends Basic ...@@ -98,8 +98,27 @@ class Collection extends Basic
c.report_agent_name,f.store_name,g.district_name'; c.report_agent_name,f.store_name,g.district_name';
$data['data']['list'] = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where); $data['data']['list'] = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data['data']['total'] = $order->getAddPayLogOrderListLmitTotal($where); $data['data']['total'] = $order->getAddPayLogOrderListLmitTotal($where);
$data['data']['money_total'] = $order->getMoneyTotal(); //总额
//加时间条件
if ($where['a.create_time']) {
if (!empty($this->params['start_time']) && empty($this->params['end_time'])) {
$pay_where['create_time'] = ['> time',$this->params['start_time'] . ' 00:00:00'];
}
if (!empty($this->params['end_time']) && empty($this->params['start_time'])) {
$pay_where['create_time'] = ['< time',$this->params['end_time'] . ' 23:59:59'];
}
if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) {
$pay_where['create_time'] = ['between time', [
$this->params['start_time']. ' 00:00:00',$this->params['end_time']. ' 23:59:59'
]];
}
$data['data']['money_total'] = $order->getMoneyTotal($pay_where); //总额
} else {
$data['data']['money_total'] = '';
}
foreach ($data['data']['list'] as $k=>$v) { foreach ($data['data']['list'] as $k=>$v) {
if (!empty($v['user_phone'])) { if (!empty($v['user_phone'])) {
$data['data']['list'][$k]['user_phone'] = substr_replace($v['user_phone'],'****',3,4); $data['data']['list'][$k]['user_phone'] = substr_replace($v['user_phone'],'****',3,4);
......
...@@ -122,6 +122,10 @@ class Finance extends Basic ...@@ -122,6 +122,10 @@ class Finance extends Basic
$where['g.name'] = ['LIKE', '%'.$this->params['partial_name'].'%']; $where['g.name'] = ['LIKE', '%'.$this->params['partial_name'].'%'];
} }
if (!empty($this->params['bargain_id'])) {
$where['a.id'] = $this->params['bargain_id'];
}
switch ($check_status) { switch ($check_status) {
case 2 : case 2 :
//成交报告列表-第二级审核 //成交报告列表-第二级审核
...@@ -656,6 +660,10 @@ class Finance extends Basic ...@@ -656,6 +660,10 @@ class Finance extends Basic
$where['b.house_number'] = [ 'like', '%' . $this->params['house_number'] . '%' ]; $where['b.house_number'] = [ 'like', '%' . $this->params['house_number'] . '%' ];
} }
if (!empty($this->params['bargain_id'])) {
$where[] = ['EXP', 'b.id ='.$this->params['bargain_id'] .' or father_id='.$this->params['bargain_id']];
}
$field = 'a.id,b.id as bargain_id,a.confirm_date,a.practical_fee,b.scale_fee,d.internal_address,b.agent_id,b.house_number,b.father_id,b.order_id'; $field = 'a.id,b.id as bargain_id,a.confirm_date,a.practical_fee,b.scale_fee,d.internal_address,b.agent_id,b.house_number,b.father_id,b.order_id';
$m_commission = new OPartialCommission(); $m_commission = new OPartialCommission();
...@@ -1299,15 +1307,15 @@ class Finance extends Basic ...@@ -1299,15 +1307,15 @@ class Finance extends Basic
$where = []; $where = [];
if (!empty($this->params['create_time']) && empty($this->params['end_time'])) { if (!empty($this->params['create_time']) && empty($this->params['end_time'])) {
$where['a.create_time'] = [ '> time', $this->params['create_time'] ]; $where['a.create_time'] = [ '> time', $this->params['create_time'].' 00:00:00' ];
} }
if (!empty($this->params['end_time']) && empty($this->params['create_time'])) { if (!empty($this->params['end_time']) && empty($this->params['create_time'])) {
$where['a.create_time'] = [ '< time', $this->params['create_time'] ]; $where['a.create_time'] = [ '< time', $this->params['create_time'].' 23:59:59' ];
} }
if (!empty($this->params['create_time']) && !empty($this->params['end_time'])) { if (!empty($this->params['create_time']) && !empty($this->params['end_time'])) {
$where['a.create_time'] = [ 'between time', [ $this->params['create_time'], $this->params['end_time'] ] ]; $where['a.create_time'] = [ 'between time', [ $this->params['create_time']. ' 00:00:00', $this->params['end_time']. ' 23:59:59'] ];
} }
//商铺号 //商铺号
...@@ -1327,10 +1335,14 @@ class Finance extends Basic ...@@ -1327,10 +1335,14 @@ class Finance extends Basic
//经纪人手机号 //经纪人手机号
if (!empty($this->params['phone'])) { if (!empty($this->params['phone'])) {
$where['b.name'] = [ 'like', '%' . $this->params['phone'] . '%' ]; $where['b.phone'] = [ 'like', '%' . $this->params['phone'] . '%' ];
} }
$fields = 'a.create_time,step_content,b.name,b.phone'; if (!empty($this->params['bargain_id'])) {
$where['a.id'] = $this->params['bargain_id'];
}
$fields = 'a.id,a.create_time,step_content,b.name,b.phone';
$m_log = new OBargainLogModel(); $m_log = new OBargainLogModel();
$data['list'] = $m_log->getLogAgent($pageNo, $pageSize, 'a.id desc', $fields, $where); $data['list'] = $m_log->getLogAgent($pageNo, $pageSize, 'a.id desc', $fields, $where);
$data['total'] = $m_log->getLogAgentTotal($where); $data['total'] = $m_log->getLogAgentTotal($where);
...@@ -1352,9 +1364,8 @@ class Finance extends Basic ...@@ -1352,9 +1364,8 @@ class Finance extends Basic
*/ */
public function editRecordLog(int $bargain_id, string $step_content = '', int $type = 1, string $house_number = '', int $is_open = 0) public function editRecordLog(int $bargain_id, string $step_content = '', int $type = 1, string $house_number = '', int $is_open = 0)
{ {
$m_bargain = new OBargainModel(); $m_bargain = new OBargainModel();
$house_number_table = $m_bargain->getCheckBargain('a.house_number,c.internal_address', (int)$bargain_id); $house_number_table = $m_bargain->getCheckBargain('a.house_number,c.internal_address', (int)$bargain_id, '10,11,12,13,20,21,30');
$step_content .= "[{$house_number_table['internal_address']}]"; $step_content .= "[{$house_number_table['internal_address']}]";
if (empty($house_number)) { if (empty($house_number)) {
...@@ -1530,7 +1541,21 @@ class Finance extends Basic ...@@ -1530,7 +1541,21 @@ class Finance extends Basic
$code = 200; $code = 200;
$this->editRecordLog($this->params['bargain_id'], '[撤销成交报告]', 3); //日志记录 $this->editRecordLog($this->params['bargain_id'], '[撤销成交报告]', 3); //日志记录
$this->updatePerformance($this->params['bargain_id']); $this->updatePerformance($this->params['bargain_id']);
$bargain = new OBargainModel();
$bargain_data = $bargain->getBargainDetail('order_id,order_no,agent_id', ['id'=>$this->params['bargain_id']]);
$financial_data['bargain_id'] = $this->params['bargain_id'];
$financial_data['audit_name'] = $this->userName;
$financial_data['audit_id'] = $this->userId;
$financial_data['agent_id'] = $bargain_data[0]['agent_id'];
$financial_data['order_no'] = $bargain_data[0]['order_no'];
$financial_data['order_id'] = $bargain_data[0]['order_id'];
$financial_data['status'] = 1;
$financial_data['source'] = 3;
$financial_data['audit_level'] = 0;
$financial_data['remark'] = empty($this->params['remark']) ? "" : $this->params['remark'];
$financial_data['audit_id'] = $this->userId;
$m_financial->addAudit($financial_data);
$msg = '撤销成功'; $msg = '撤销成功';
} else { } else {
$code = 101; $code = 101;
......
...@@ -10,6 +10,7 @@ namespace app\index\controller; ...@@ -10,6 +10,7 @@ namespace app\index\controller;
use app\api_broker\service\LookShopService; use app\api_broker\service\LookShopService;
use app\api_broker\service\PushMessageService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\index\validate\HouseValidate; use app\index\validate\HouseValidate;
use app\model\AAgents; use app\model\AAgents;
...@@ -65,14 +66,19 @@ class Houses extends Basic ...@@ -65,14 +66,19 @@ class Houses extends Basic
if (!empty($this->params['sublet_id']) && $this->params['source'] == 'transfer_list') { if (!empty($this->params['sublet_id']) && $this->params['source'] == 'transfer_list') {
$m_sublet = new SubletModel(); $m_sublet = new SubletModel();
$sublet_data['house_id'] = $house_id; $sublet_data['house_id'] = $house_id['house_id'];
$sublet_data['status'] = 2; $sublet_data['status'] = 2;
$sublet_data['agents_id'] = $this->userId; $sublet_data['agents_id'] = $this->userId;
$m_sublet->editData($sublet_data, $this->params['sublet_id']); $m_sublet->editData($sublet_data, $this->params['sublet_id']);
} }
if ($house_id) { if ($house_id['house_id']) {
$return = $this->response($result['code'], $result['msg'], [ 'id', $house_id ]); $return = $this->response($result['code'], $result['msg'], [ 'id', $house_id['house_id'] ]);
if (isset($house_id['status']) && $house_id['status'] == 2) {
$push_service = new PushMessageService();
$push_service->pushHouseDownMessage($house_id['house_id']);
}
} else { } else {
$return = $this->response(101, 'add houses is error'); $return = $this->response(101, 'add houses is error');
} }
...@@ -229,12 +235,18 @@ class Houses extends Basic ...@@ -229,12 +235,18 @@ class Houses extends Basic
} }
$fields = 'id,shop_type,internal_title,rent_price,is_show,create_time,residue_num,rent_type, $fields = 'id,shop_type,internal_title,rent_price,is_show,create_time,residue_num,rent_type,
shop_area_start,shop_area_end,industry_type,disc,is_carefully_chosen'; shop_area_start,shop_area_end,industry_type,disc,is_carefully_chosen,is_exclusive_type';
/*楼盘编号*/ /*楼盘编号*/
if ($this->params['id'] != NULL) { if ($this->params['id'] != NULL) {
$where['id'] = $this->params['id']; $where['id'] = $this->params['id'];
} }
//盘方ID
if ($this->params['dish_id'] != NULL) {
$agent_where['a.agents_id'] = $this->params['dish_id'];
$agent_where['a.type'] = 2;
$agent_where['a.is_del'] = 0;
}
if ($this->params['dish_name'] != NULL) { if ($this->params['dish_name'] != NULL) {
$agent_where['b.name'] = $this->params['dish_name']; $agent_where['b.name'] = $this->params['dish_name'];
...@@ -406,6 +418,27 @@ class Houses extends Basic ...@@ -406,6 +418,27 @@ class Houses extends Basic
return $this->response($this->code, $this->msg, $this->data); return $this->response($this->code, $this->msg, $this->data);
} }
/**
* 商铺列表添加独家
*
* @return \think\Response
* @throws \Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function addExclusive()
{
if ($this->params['houses_id']) {
$this->data = $this->house->exclusive($this->params, $this->params['houses_id']);
} else {
$this->code = 101;
$this->msg = 'houses_id is null';
}
return $this->response($this->code, $this->msg, $this->data);
}
/** /**
* 获取独家方 * 获取独家方
* *
......
...@@ -9,6 +9,7 @@ use app\model\AAgents; ...@@ -9,6 +9,7 @@ use app\model\AAgents;
use app\model\AStore; use app\model\AStore;
use app\model\AuthGroup; use app\model\AuthGroup;
use app\model\AuthRule; use app\model\AuthRule;
use phpDocumentor\Reflection\DocBlock\Tags\See;
use think\Session; use think\Session;
/** /**
...@@ -152,4 +153,19 @@ class Login extends Basic ...@@ -152,4 +153,19 @@ class Login extends Basic
Session::clear(); Session::clear();
return view("/login/login", [ "msg" => "退出成功" ]); return view("/login/login", [ "msg" => "退出成功" ]);
} }
/**
* 检测登录
*
* @return \think\Response
*/
public function checkLogin() {
$user_id = Session::get("userId");
if (empty($user_id)) {
return $this->response(300, '请重新登录');
} else {
return $this->response(200, '');
}
}
} }
\ No newline at end of file
<?php <?php
namespace app\index\controller; namespace app\index\controller;
use app\api_broker\service\CallPhoneService;
use app\api_broker\service\ClientService; use app\api_broker\service\ClientService;
use app\api_broker\service\UserExpiredTimeService; use app\api_broker\service\UserExpiredTimeService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\index\service\UserService;
use app\model\AAgents; use app\model\AAgents;
use app\model\ACollectUser; use app\model\ACollectUser;
use app\model\GOperatingRecords; use app\model\GOperatingRecords;
...@@ -212,6 +214,12 @@ class Member extends Basic{ ...@@ -212,6 +214,12 @@ class Member extends Basic{
$type = 3; $type = 3;
} }
//客方ID
if (!empty($params['agent_id'])) {
$where['a.agent_id'] = $params['agent_id'];
}
if (!empty($params['first_login_start'])) { if (!empty($params['first_login_start'])) {
$where['a.first_login_time'] = $params['first_login_start'] . ' 00:00:00'; $where['a.first_login_time'] = $params['first_login_start'] . ' 00:00:00';
} }
...@@ -296,6 +304,26 @@ class Member extends Basic{ ...@@ -296,6 +304,26 @@ class Member extends Basic{
} }
$data_list[$k]['is_outstrip_twenty_four_hours']=$is_outstrip_twenty_four_hours; $data_list[$k]['is_outstrip_twenty_four_hours']=$is_outstrip_twenty_four_hours;
/* 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定 start*/
//0允许拨打 1不允许拨打
$is_outpace_call_num = 0;
$clientService = new ClientService();
if (!$clientService->dialTotal($v["id"])) {
$is_outpace_call_num = 1;
}
$model = new AAgents();
$result = $model->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"]]);
$call = new CallPhoneService();
$result = $call->getBindNum($v['user_phone'],$result[0]['phone']);
if($result != 0){
$is_outpace_call_num = 0;
}
$data_list[$k]['is_outpace_call_num'] = $is_outpace_call_num;
/* 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定 end*/
$is_show = true; $is_show = true;
if( $if_search_user == false){ if( $if_search_user == false){
$is_show = $clientService->dialTotal($v["id"]); $is_show = $clientService->dialTotal($v["id"]);
...@@ -350,90 +378,22 @@ class Member extends Basic{ ...@@ -350,90 +378,22 @@ class Member extends Basic{
* 查看或编辑客户 * 查看或编辑客户
* *
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function pcEditClient() { public function pcEditClient() {
$data = []; $data = [];
$user_service = new UserService();
if ($this->request->isPost()) { if ($this->request->isPost()) {
//编辑用户 $result = $user_service->editUser($this->params['id'], $this->params, $this->userId);
$result = ''; if ($result['status'] == 'fail') {
if (empty($this->params['id'])) { $this->code = 101;
//新增用户 $this->msg = $result['msg'];
$where['user_phone'] = $this->params['user_phone'];
$num = $this->user->all_user_count($where);
if ($num > 0) {
return $this->response(101, '该用户已经存在!');
}
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('id,name,phone,store_id,district_id', $this->params['agents_id']);
$remark = '新增为' . $agent_data['name'] . '-' . $agent_data['phone'];
$result = $this->user->edit($this->params, $this->params['id'], $this->userId); //新增或编辑
//更新业绩统计
$sum = new ResultsSummaryNewTask();
$date = date('Y-m-d');
$sum->updateTotalByAgentId($agent_data['id'], $agent_data['store_id'], $agent_data['district_id'], $date);
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']); //记录日志
} else {
$user_data = $this->user->getUserById('id,agent_id', $this->params['id']);
if (empty($user_data)) {
return $this->response(101, '没有用户信息');
}
if (!empty($this->params['agents_id'])) {
//是否修改客方
if ($this->params['agents_id'] != $user_data['agent_id']) {
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('id,name,phone,store_id,district_id', $this->params['agents_id']);
$remark = '修改为' . $agent_data['name'] . '-' . $agent_data['phone'];
//更新业绩统计
$sum = new ResultsSummaryNewTask();
$date = date('Y-m-d');
$sum->updateTotalByAgentId($agent_data['id'], $agent_data['store_id'], $agent_data['district_id'], $date);
} else {
$remark = '用户编辑';
}
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']); //记录日志
}
$result = $this->user->edit($this->params, $this->params['id'], $this->userId); //新增或编辑
}
switch ($result) {
case -1 :
$this->code = 101;
$this->msg = '该用户已存在';break;
case -2 :
$this->code = 101;
$this->msg = '此号码为虚拟号码';break;
case -3 :
$this->code = 101;
$this->msg = '没有新增和编辑VIP权限';break;
case -4 :
$this->code = 101;
$this->msg = '客户信息错误,请检查!';break;
case -5 :
$this->code = 101;
$this->msg = '市或区未选择';break;
} }
} else { } else {
$data['list'] = $user_service->getUserData($this->params['id']);
//编辑获取用户信息
if (empty(($this->params['id']))) {
return $this->response(101, 'Id is null');
}
$data['list'] = $this->user->getClient($this->params['id']);
} }
return $this->response($this->code, $this->msg, $data); return $this->response($this->code, $this->msg, $data);
} }
/** /**
* 删除用户 * 删除用户
* @return \think\Response * @return \think\Response
......
...@@ -11,6 +11,7 @@ namespace app\index\controller; ...@@ -11,6 +11,7 @@ namespace app\index\controller;
use app\api_broker\service\UploadFileService; use app\api_broker\service\UploadFileService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\SFile;
use app\model\SLabel; use app\model\SLabel;
use app\model\SNews; use app\model\SNews;
use think\Request; use think\Request;
...@@ -98,11 +99,22 @@ class News extends Basic ...@@ -98,11 +99,22 @@ class News extends Basic
$data['cover_plan'] = $this->params['file_img']; $data['cover_plan'] = $this->params['file_img'];
$data['s_label_id'] = $this->params['s_label_id']; $data['s_label_id'] = $this->params['s_label_id'];
$data['annex_file_name'] = $this->params['annex_file_name']; $data['annex_file_name'] = $this->params['annex_file_name'];
$data['id'] = $this->params['id'];
try { try {
$this->m_news->editData($data, $this->params['id']); $id = $this->m_news->addData($data, $this->userId);
if ($id) {
$m_file = new SFile();
$file_data = [];
foreach ($data['annex_file_name'] as $k=>$v) {
$file_data['file_name'] = $v;
$file_data['new_id'] = $id;
$file_data['type'] = 1;
$file_data['status'] = 0;
$m_file->insertData($file_data);
}
}
} catch (\Exception $e) { } catch (\Exception $e) {
return $this->response(101, '新增或编辑失败!'); return $this->response(101, '新增或编辑失败!'.$e->getMessage());
} }
return $this->response(200, '新增成功!'); return $this->response(200, '新增成功!');
...@@ -161,8 +173,27 @@ class News extends Basic ...@@ -161,8 +173,27 @@ class News extends Basic
$data = $label->getList(1, 200, '', 'id,label_name', ['status'=>0]); $data = $label->getList(1, 200, '', 'id,label_name', ['status'=>0]);
return $this->response(200, '', $data); return $this->response(200, '', $data);
} }
/**
* @return \think\response\View
*/
public function newText() { public function newText() {
return view('new_text'); return view('new_text');
} }
/**
* 删除文件
*
* @return \think\Response
*/
public function delNewsFile() {
if (empty($this->params['file_id'])) {
return $this->response(101, '参数错误');
}
$m_file = new SFile();
$m_file->updateDateById($this->params['file_id'], ['status'=>1]);
return $this->response(200, '删除成功');
}
} }
\ No newline at end of file
...@@ -63,11 +63,11 @@ class Performance extends Basic ...@@ -63,11 +63,11 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
// $params = array( /*$params = array(
// "type" => 3, //1表示个人业绩排行 2门店 3区域 "type" => 3, //1表示个人业绩排行 2门店 3区域
//// "end_day" => "", "end_day" => "",
//// "start_day" =>"", "start_day" =>"",
// ); );*/
$params["type"] = 3; $params["type"] = 3;
...@@ -104,10 +104,10 @@ class Performance extends Basic ...@@ -104,10 +104,10 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
// $params = array( /*$params = array(
// "start_day" => '2018-08-08', "start_day" => '2018-08-08',
// "end_day" => '2018-08-08', "end_day" => '2018-08-08',
// ); );*/
$params["type"] = 2; $params["type"] = 2;
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
...@@ -139,11 +139,11 @@ class Performance extends Basic ...@@ -139,11 +139,11 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
// $params = array( /* $params = array(
// "type" => 1, //1表示个人业绩排行 2门店 3区域 "type" => 1, //1表示个人业绩排行 2门店 3区域
// // "end_day" => "", "end_day" => "",
// // "start_day" =>"", "start_day" => "",
// ); );*/
$params["type"] = 1; $params["type"] = 1;
...@@ -169,14 +169,12 @@ class Performance extends Basic ...@@ -169,14 +169,12 @@ class Performance extends Basic
} }
/** /**
* 导出分佣提成明细表 * 导出
*
* @return string * @return string
*/ */
public function getPerformanceExcel() public function getPerformanceExcel()
{ {
$export = new ExportExcelUntil(); $export = new ExportExcelUntil();
$data = Session::get('excelPerformance'); $data = Session::get('excelPerformance');
if(!$data){ if(!$data){
return $this->response("101","Session读取失败"); return $this->response("101","Session读取失败");
...@@ -208,8 +206,6 @@ class Performance extends Basic ...@@ -208,8 +206,6 @@ class Performance extends Basic
}else{ }else{
$title = [ '排名', '经纪人', '业绩(元)', '成交单数', '收款数', '进场数', '报备数', '新增商铺', '新增客户', '团队人数' ]; $title = [ '排名', '经纪人', '业绩(元)', '成交单数', '收款数', '进场数', '报备数', '新增商铺', '新增客户', '团队人数' ];
} }
$export->exportTable('业绩排行', $e_data_new, 10, '业绩排行表', $title); $export->exportTable('业绩排行', $e_data_new, 10, '业绩排行表', $title);
return ''; return '';
} }
......
...@@ -65,6 +65,12 @@ class PerformanceInfo extends Basic ...@@ -65,6 +65,12 @@ class PerformanceInfo extends Basic
if ($this->params['store_id'] != NULL) { if ($this->params['store_id'] != NULL) {
$where['Store.id'] = $this->params['store_id'] ; $where['Store.id'] = $this->params['store_id'] ;
} }
//todo 经纪人ID
if ($this->params['agents_id'] != NULL) {
$where['Agent.id'] = $this->params['agents_id'];
}
//todo 姓名 //todo 姓名
if ($this->params['name'] != NULL) { if ($this->params['name'] != NULL) {
$where['Agent.name'] = ['like', '%'.$this->params['name'].'%']; $where['Agent.name'] = ['like', '%'.$this->params['name'].'%'];
...@@ -74,7 +80,10 @@ class PerformanceInfo extends Basic ...@@ -74,7 +80,10 @@ class PerformanceInfo extends Basic
$where['Agent.phone'] = ['like', '%'.$this->params['phone'].'%']; $where['Agent.phone'] = ['like', '%'.$this->params['phone'].'%'];
} }
//todo 成交报告id
if ($this->params['bargain_id'] != NULL) {
$where['Obargain.id'] = $this->params['bargain_id'];
}
$field = 'Obargain.create_time,'; $field = 'Obargain.create_time,';
$field .= 'Obargain.id,'; $field .= 'Obargain.id,';
...@@ -148,8 +157,6 @@ class PerformanceInfo extends Basic ...@@ -148,8 +157,6 @@ class PerformanceInfo extends Basic
$where['Agent.phone'] = ['like', '%'.$this->params['phone'].'%']; $where['Agent.phone'] = ['like', '%'.$this->params['phone'].'%'];
} }
$field = 'Obargain.create_time,'; $field = 'Obargain.create_time,';
$field .= 'Obargain.trade_type,'; $field .= 'Obargain.trade_type,';
$field .= 'Houses.landmark,'; $field .= 'Houses.landmark,';
...@@ -169,7 +176,6 @@ class PerformanceInfo extends Basic ...@@ -169,7 +176,6 @@ class PerformanceInfo extends Basic
$export = new ExportExcelUntil(); $export = new ExportExcelUntil();
foreach ($return as $key => $v) { foreach ($return as $key => $v) {
$e_data_old['create_time'] = $v['create_time'];//提交时间 $e_data_old['create_time'] = $v['create_time'];//提交时间
...@@ -182,9 +188,8 @@ class PerformanceInfo extends Basic ...@@ -182,9 +188,8 @@ class PerformanceInfo extends Basic
}else{ }else{
$e_data_old['trade_type'] = "好处费"; $e_data_old['trade_type'] = "好处费";
} }
$e_data_old['landmark'] = $v['landmark'];//商铺地址 $e_data_old['landmark'] = $v['landmark'];//商铺地址
$e_data_old['house_id'] = $v['house_id'];//商铺编号 $e_data_old['house_id'] = $v['house_id'];//商铺编号
$e_data_old['name_phone'] = $v['name'].'-'.$v['phone'];//分佣提成方 $e_data_old['name_phone'] = $v['name'].'-'.$v['phone'];//分佣提成方
$e_data_old['district_name'] = $v['district_name'].'-'.$v['store_name'];//所属部门 $e_data_old['district_name'] = $v['district_name'].'-'.$v['store_name'];//所属部门
$e_data_old['scale'] = $v['scale'];//分佣比例 $e_data_old['scale'] = $v['scale'];//分佣比例
...@@ -193,10 +198,7 @@ class PerformanceInfo extends Basic ...@@ -193,10 +198,7 @@ class PerformanceInfo extends Basic
$e_data_new[]=$e_data_old; $e_data_new[]=$e_data_old;
} }
$title = [ '提交时间', '成交类型', '商铺地址', '商铺编号', '分佣提成方', '所属部门门店', '分佣比例', '应收佣金', '实收佣金' ]; $title = [ '提交时间', '成交类型', '商铺地址', '商铺编号', '分佣提成方', '所属部门门店', '分佣比例', '应收佣金', '实收佣金' ];
$export->exportTable('业绩明细', $e_data_new, 10, '业绩明细表', $title); $export->exportTable('业绩明细', $e_data_new, 10, '业绩明细表', $title);
return ''; return '';
} }
......
This diff is collapsed.
...@@ -9,6 +9,7 @@ namespace app\index\extend; ...@@ -9,6 +9,7 @@ namespace app\index\extend;
* Time: 9:35 * Time: 9:35
* 基类 * 基类
*/ */
use app\extra\RedisExt;
use app\model\AAgents; use app\model\AAgents;
use app\model\GHousesToAgents; use app\model\GHousesToAgents;
use app\model\GOperatingRecords; use app\model\GOperatingRecords;
...@@ -36,6 +37,8 @@ class Basic extends Controller ...@@ -36,6 +37,8 @@ class Basic extends Controller
public $lastLoginTime; public $lastLoginTime;
public $city;
protected $filterVerify = array( protected $filterVerify = array(
'index/login', 'index/login',
'index/loginVerify', 'index/loginVerify',
...@@ -49,7 +52,8 @@ class Basic extends Controller ...@@ -49,7 +52,8 @@ class Basic extends Controller
'index/getAuth2', 'index/getAuth2',
'index/getDistrict', 'index/getDistrict',
'index/getAgentDistrictStore', 'index/getAgentDistrictStore',
'index/agentsUnBind' 'index/agentsUnBind',
'index/checkLogin'
); );
/** /**
...@@ -85,6 +89,9 @@ class Basic extends Controller ...@@ -85,6 +89,9 @@ class Basic extends Controller
$this->userVerify(); $this->userVerify();
$this->userAuth($requestPath); $this->userAuth($requestPath);
} }
//获取默认城市
$this->getCity($this->agentId);
} }
/** /**
...@@ -164,6 +171,16 @@ class Basic extends Controller ...@@ -164,6 +171,16 @@ class Basic extends Controller
} }
} }
} }
//没有独家方编辑权限处理
if ($requestPath == 'index/editExclusive' && isset($this->params['exclusive_id'])) {
$m_house_agent = new GHousesToAgents();
//独家方
$exclusive_num = $m_house_agent->getAgentHouseNum($this->params['exclusive_id'], 3);
if ($exclusive_num > 0) {
$is_auth = 1;
}
}
} }
if (empty($is_auth) && $this->userId != 1) { if (empty($is_auth) && $this->userId != 1) {
...@@ -265,4 +282,25 @@ class Basic extends Controller ...@@ -265,4 +282,25 @@ class Basic extends Controller
$result = $records->record($agents_id, $type, $remark, '',$user_id); $result = $records->record($agents_id, $type, $remark, '',$user_id);
return $result; return $result;
} }
/**
* 默认城市选择
* @param $agentId
*/
public function getCity($agentId)
{
try {
$redis_ = RedisExt::getRedis();
if ($redis_) {
$city = $redis_->get("agent_city_" . $agentId);
$this->city = empty($city) ? "上海市" : $city;
} else {
$this->city = "上海市";
}
} catch (Exception $exception) {
$this->city = "上海市";
}
}
} }
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/8/27
* Time: 12:43
*/
namespace app\index\service;
use app\api_broker\service\PushMessageService;
use app\model\AAgents;
use app\model\GOperatingRecords;
use app\model\Users;
use app\task\controller\ResultsSummaryNewTask;
class UserService
{
protected $user;
protected $code = 200;
protected $msg = '';
protected $operation_id;
public function __construct()
{
$this->user = new Users();
}
/**
* 新增或编辑客户
*
* @param $id
* @param $data
* @param $operation_id
* @return array|int|mixed
*/
public function editUser($id, $data, $operation_id)
{
$this->operation_id = $operation_id;
$result = [];
$agent_id_old = $referrer_id_old = 0;
try {
if (empty($id)) {
//新增用户
$where['user_phone'] = $data['user_phone'];
$num = $this->user->all_user_count($where);
if ($num > 0) {
$result['status'] = 'fail';
$result['msg'] = '该用户已经存在';
return $result;
}
$type = 'add';
} else {
$user_data = $this->user->getUserById('id,agent_id,referrer_id,referrer_source,user_name', $id);
if (empty($user_data['id'])) {
$result['status'] = 'fail';
$result['msg'] = '没有该用户信息';
return $result;
}
$agent_id_old = empty($user_data['agent_id']) ? 0:$user_data['agent_id'];
$referrer_id_old = empty($user_data['referrer_id']) ? 0:$user_data['referrer_id'];
$user_name = empty($user_data['user_name']) ? '':$user_data['user_name'];
$type = 'edit';
}
$id = $this->user->edit($data, $id, $operation_id); //新增或编辑
if ($id <= 0) {
$msg = $this->getCodeMsg($id);
$result['status'] = 'fail';
$result['msg'] = $msg;
return $result;
} else {
$result['status'] = 'successful';
$result['msg'] = '';
}
//记录修改客方
$this->recordGuest((int)$data['agents_id'], (int)$agent_id_old, $id, $user_name,$type);
//记录邀请人修改记录
$this->recordReferrer($data['referrer_id'], $id, $referrer_id_old, $type);
//更新业绩统计
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('id,name,phone,store_id,district_id', $data['agents_id']);
$sum = new ResultsSummaryNewTask();
$date = date('Y-m-d');
$sum->updateTotalByAgentId($agent_data['id'], $agent_data['store_id'], $agent_data['district_id'], $date);
} catch (\Exception $e) {
$result['status'] = 'fail';
$result['msg'] = $e->getMessage();
}
return $result;
}
/**
* 根据客户id获取客户信息
*
* @param int $user_id
* @return array
*/
public function getUserData(int $user_id) : array
{
if ($user_id) {
try {
$data['data'] = $this->user->getClient($user_id);
$data['msg'] = '';
$data['status'] = 'successful';
} catch (\Exception $e) {
$data['msg'] = $e->getMessage();
$data['status'] = 'fail';
}
} else {
$data['status'] = 'fail';
$data['msg'] = 'Id is null';
}
return $data;
}
/**
* 记录客方记录修改并推送消息
*
* @param int $agent_id
* @param int $agent_id_old
* @param int $user_id
* @param string $user_name
* @param string $type
* @return array
*/
public function recordGuest(int $agent_id,int $agent_id_old, int $user_id, $user_name, $type = 'add'): array
{
try {
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('id,name,phone,store_id,district_id', $agent_id);
$remark = '';
if ($type == 'add') {
$remark = '新增为' . $agent_data['name'] . '-' . $agent_data['phone'];
} else {
if ($agent_id != $agent_id_old) {
$remark = '修改为' . $agent_data['name'] . '-' . $agent_data['phone'];
$this->pushMessage($agent_id, $this->operation_id, $user_name, $user_id);
}
}
if ($remark != '') {
$this->operating_records($this->operation_id, 3, $remark, $user_id); //记录日志
}
$result['status'] = 'successful';
$result['msg'] = '';
} catch (\Exception $e) {
$result['status'] = 'fail';
$result['msg'] = $e->getMessage();
}
return $result;
}
/**
* 记录邀请人修改记录
*
* @param $referrer_id
* @param $user_id
* @param $referrer_id_old
* @param string $type
* @return array
*/
public function recordReferrer($referrer_id, $user_id, $referrer_id_old, $type = 'add')
{
$result = [];
$remark = '';
try {
$user_data = $this->user->getUserById('user_name,user_phone', $referrer_id);
if ($type == 'add') {
$remark = '新增为' . $user_data['user_name'] . '-' . $user_data['user_phone'] . ',客户ID:' . $referrer_id;
} else {
if ($referrer_id != $referrer_id_old) {
$user_data = $this->user->getUserById('user_name,user_phone', $referrer_id);
$remark = '编辑为' . $user_data['user_name'] . '-' . $user_data['user_phone'] . ',客户ID:' . $referrer_id;
}
}
if ($remark != '') {
$this->operating_records($this->operation_id, 5, $remark, $user_id); //邀请人修改-客户
}
$result['status'] = 'successful';
$result['msg'] = "";
} catch (\Exception $e) {
$result['status'] = 'fail';
$result['msg'] = $e->getMessage();
}
return $result;
}
/**
* @param $code
* @return string
*/
public function getCodeMsg($code)
{
switch ($code) {
case -1 :
$msg = '该用户已存在';
break;
case -2 :
$msg = '此号码为虚拟号码';
break;
case -3 :
$msg = '没有新增和编辑VIP权限';
break;
case -4 :
$msg = '客户信息错误,请检查!';
break;
case -5 :
$msg = '市或区未选择';
break;
default :
$msg = '新增或编辑成功';
}
return $msg;
}
/**
* 记录操作
*
* @param int $agents_id
* @param string $type
* @param string $remark
* @param string $user_id
* @return bool|false|int
*/
public function operating_records($agents_id = 0, $type = '' ,$remark = '', $user_id = '') {
$records = new GOperatingRecords();
$result = $records->record($agents_id, $type, $remark, '',$user_id);
return $result;
}
/**
* 推送消息
*
* @param $agent_id
* @param $operation_id
* @param $user_name
* @param $user_id
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushMessage($agent_id, $operation_id, $user_name, $user_id) {
$push = new PushMessageService();
$agent = new AAgents();
$ccr_agent_data = $agent->getAgentInfo('name,phone', $operation_id);
$content = "【{$ccr_agent_data['name']}-{$ccr_agent_data['phone']}修改了{$user_name}(id:{$user_id})客方】";
$push->pushMessageById($agent_id, '客方修改', $content, 'user_info', $user_id);
}
}
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<input type="hidden" class="page-load" id="callPhoneIndex" /> <input type="hidden" class="page-load" id="callPhoneIndex" />
<style> <style>
.modal-body1 { .modal-body1 {
height: 600px; height: 720px;
overflow-y: auto; overflow-y: auto;
padding-bottom: 60px; padding-bottom: 60px;
} }
...@@ -388,7 +388,7 @@ ...@@ -388,7 +388,7 @@
<table class="" id="caozuo_hide" border='0'> <table class="" id="caozuo_hide" border='0'>
<thead> <thead>
<tr> <tr>
<td width="40%"> <td width="32%">
<span class="fore-span ld-Marheight">产生类型:</span> <span class="fore-span ld-Marheight">产生类型:</span>
<span class="fore-span ld-Marheight source_type"></span> <span class="fore-span ld-Marheight source_type"></span>
</td> </td>
...@@ -423,8 +423,6 @@ ...@@ -423,8 +423,6 @@
<td> <td>
<span class="fore-span ld-Marheight">电话:</span> <span class="fore-span ld-Marheight">电话:</span>
<span class="fore-span ld-Marheight cus_phone"></span> <span class="fore-span ld-Marheight cus_phone"></span>
<!--<a class="fore-span btn-primary ld-Marheight user_call" href="#modal-call" data-toggle="modal">拨打</a>-->
<!--<a class="fore-span btn-primary user_call" >拨打</a>-->
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -456,13 +454,11 @@ ...@@ -456,13 +454,11 @@
<span class="fore-span ld-Marheight registration_time"></span> <span class="fore-span ld-Marheight registration_time"></span>
</td> </td>
<td> <td>
<span class="fore-span ld-Marheight">邀请人:</span> <span class="fore-span ld-Marheight">客户所属城市:</span>
<span class="fore-span ld-Marheight referrer_user"></span> <span class="user_details_city ld-Marheight fore-span"></span>
</td> </td>
<td> <td>
<span class="fore-span ld-Marheight">昵称:</span> <span class="fore-span ld-Marheight">昵称:</span>
<!--<input type="hidden" value='[%= it[item]["agent_img"] %]'>-->
<!--<img src='' class="diagram-image J_preview" data-bimg=''>-->
<img src="" alt="" class="fore-span ld-Marheight diagram-image J_preview user_pic" data-bimg='' /> <img src="" alt="" class="fore-span ld-Marheight diagram-image J_preview user_pic" data-bimg='' />
<span class="fore-span ld-Marheight cus_nick"></span> <span class="fore-span ld-Marheight cus_nick"></span>
</td> </td>
...@@ -491,14 +487,16 @@ ...@@ -491,14 +487,16 @@
<span class="fore-span ld-Marheight">客方:</span> <span class="fore-span ld-Marheight">客方:</span>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control btn6-1 ld-Marheight cus_fang_edit" name="pwd" autocomplete="off" disabled="disabled"> <input type="text" class="form-control btn6-1 ld-Marheight cus_fang_edit" name="pwd" autocomplete="off" disabled="disabled">
<!--<ul class="user-ul2"></ul>-->
</div> </div>
</div> </div>
</td> </td>
<td> <td>
<span class="fore-span ld-Marheight">客户所属城市:</span> <span class="fore-span">是否转介绍:</span>
<span class="user_details_city ld-Marheight fore-span"> <span class="user-details-introduce fore-span"></span>
</span> </td>
<td>
<span class="fore-span">邀请人(介绍人):</span>
<span class="user-details-introduce-id fore-span"></span>
</td> </td>
</tr> </tr>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<table class="table table-striped table-bordered table-hover table-condensed"> <table class="table table-striped table-bordered table-hover table-condensed">
<thead> <thead>
<tr> <tr>
<td colspan="9" class="maintable-top-sub-tr"> <td colspan="10" class="maintable-top-sub-tr">
<a class="btn btn-info liudan_pic_btn">第一级审核</a> <a class="btn btn-info liudan_pic_btn">第一级审核</a>
<a class="btn btn-default liudan_pic_btn">第二级审核</a> <a class="btn btn-default liudan_pic_btn">第二级审核</a>
<a class="btn btn-default liudan_pic_btn">第三级审核</a> <a class="btn btn-default liudan_pic_btn">第三级审核</a>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</tr> </tr>
<!--三级审核的搜索功能--> <!--三级审核的搜索功能-->
<tr> <tr>
<td colspan="9"> <td colspan="10">
<form id="maintable_form_search"> <form id="maintable_form_search">
<span class="fore-span">商铺类型:</span> <span class="fore-span">商铺类型:</span>
<select class="form-control btn2" name="maintable_shop_type" id="maintable_shop_type"> <select class="form-control btn2" name="maintable_shop_type" id="maintable_shop_type">
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_name" placeholder="约带看人姓名" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_name" placeholder="约带看人姓名" type="text" value="">
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_phone" placeholder="约带看人手机号" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_phone" placeholder="约带看人手机号" type="text" value="">
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="分佣方姓名" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="分佣方姓名" type="text" value="">
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="bargain_id" placeholder="成交报告id" type="text" value="">
<div class="clear"> <div class="clear">
</div> </div>
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
</td> </td>
</tr> </tr>
<tr class="maintable-tr-bar"> <tr class="maintable-tr-bar">
<th class="text-center">ID</th>
<th class="text-center">提交时间</th> <th class="text-center">提交时间</th>
<th class="text-center">是否开业</th> <th class="text-center">是否开业</th>
<th class="text-center">商铺地址</th> <th class="text-center">商铺地址</th>
......
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
</div> </div>
</div> </div>
<!-- 弹出框 详情 --> <!-- 弹出框 详情 -->
<!--<link rel="import" href="edit_modal.html" id="xq">-->
<div class="modal fade" id="modal_detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="modal_detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<!--<div class="modal-content"> <!--<div class="modal-content">
</div>--> </div>-->
<iframe class="modal-content"></iframe> <iframe class="modal-content"></iframe>
<!-- /.modal --> <!-- /.modal -->
...@@ -246,4 +246,5 @@ ...@@ -246,4 +246,5 @@
<!-- /.modal-content --> <!-- /.modal-content -->
</div> </div>
<!-- /.modal --> <!-- /.modal -->
</div> </div>
\ No newline at end of file <!--<script type="text/javascript src="edit_modal.js"></script>-->
\ No newline at end of file
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<table class="table table-striped table-bordered table-hover table-condensed"> <table class="table table-striped table-bordered table-hover table-condensed">
<thead> <thead>
<tr> <tr>
<td colspan="9"> <td colspan="10">
<form id="form_search"> <form id="form_search">
<span class="fore-span ld-Marheight">收佣日期:</span> <span class="fore-span ld-Marheight">收佣日期:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time" name="start_date" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time" name="start_date" type="date">
...@@ -75,11 +75,12 @@ ...@@ -75,11 +75,12 @@
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_address" placeholder="商铺地址" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_address" placeholder="商铺地址" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_num" placeholder="商铺号" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_num" placeholder="商铺号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="业务员姓名" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="业务员姓名" type="text" value="">
<div class="clear"> <div class="clear">
</div> </div>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="业务员手机号" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="业务员手机号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="bargain_id" placeholder="成交报告id" type="text" value="">
<span class="btn btn-info btn3" id="search">搜索</span> <span class="btn btn-info btn3" id="search">搜索</span>
<span class="btn btn-info btn3" id="reset">重置</span> <span class="btn btn-info btn3" id="reset">重置</span>
<span class="btn btn-info btn3" id="export">导出excel</span> <span class="btn btn-info btn3" id="export">导出excel</span>
...@@ -87,6 +88,7 @@ ...@@ -87,6 +88,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="text-center">ID</th>
<th class="text-center">收佣日期</th> <th class="text-center">收佣日期</th>
<th class="text-center">所属部门/门店</th> <th class="text-center">所属部门/门店</th>
<th class="text-center">业务员</th> <th class="text-center">业务员</th>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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