Commit 3275c20e authored by clone's avatar clone

Merge branch '0709-v.2.3.1' into test

# Conflicts: # application/index/controller/Member.php # public/resource/template/user_template_tpl.html
parents f5de51a8 170b65b2
...@@ -16,6 +16,7 @@ use app\api_broker\extend\Basic; ...@@ -16,6 +16,7 @@ use app\api_broker\extend\Basic;
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;
use app\model\ACollectUser;
use app\model\GOperatingRecords; use app\model\GOperatingRecords;
use app\model\NoteLog; use app\model\NoteLog;
use app\model\UPhoneFollowPp; use app\model\UPhoneFollowPp;
...@@ -415,6 +416,8 @@ class Broker extends Basic ...@@ -415,6 +416,8 @@ class Broker extends Basic
} }
} }
/** /**
* 客户动态展示加搜索加客户详情 * 客户动态展示加搜索加客户详情
* *
...@@ -476,6 +479,18 @@ class Broker extends Basic ...@@ -476,6 +479,18 @@ class Broker extends Basic
$data['user_date'] = $orderLog->selectListByUserId($user_id, ''); $data['user_date'] = $orderLog->selectListByUserId($user_id, '');
$data['user_history'] = $records_result; $data['user_history'] = $records_result;
$data['agent_path'] = AGENTHEADERIMGURL; $data['agent_path'] = AGENTHEADERIMGURL;
//是否被收藏
$data["is_collect"] = 2;
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["agent_id"];
$get_params['user_id'] = $params["user_id"];
$collect_house = new ACollectUser();
$res = $collect_house->getCollectUser($field,$get_params);
if($res && ($res[0]['status'] == 1)){//如果存在
$data["is_collect"] = 1;
}
return $this->response("200", "success!", $data); return $this->response("200", "success!", $data);
} }
......
...@@ -9,14 +9,10 @@ ...@@ -9,14 +9,10 @@
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\CallPhoneService;
use app\api_broker\untils\PlsDemo; use app\api_broker\untils\PlsDemo;
use app\api_broker\untils\RongDemo;
use app\extra\RedisExt;
use app\model\AAgentsPhone; use app\model\AAgentsPhone;
use app\model\AliYunPhone;
use app\model\BindingPhone; use app\model\BindingPhone;
use app\model\SecretReport;
use think\Log;
class CellPhone extends Basic class CellPhone extends Basic
{ {
...@@ -29,145 +25,22 @@ class CellPhone extends Basic ...@@ -29,145 +25,22 @@ class CellPhone extends Basic
* 解绑之后有延迟(15s) * 解绑之后有延迟(15s)
* *
* @return \think\Response * @return \think\Response
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function bindAXB() public function bindAXB()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
if (empty($this->params['phone_a']) || empty($this->params['phone_b'])) { $call = new CallPhoneService();
$this->code = 101; $result = $call->bindAXB($this->params['phone_a'], $this->params['phone_b']);
$this->msg = 'phone_a or phone_b is null';
return $this->response(101, '参数错误,请联系运营人员!');
}
$phone_a = $this->params['phone_a'];//经纪人手机号
$phone_b = $this->params['phone_b'];//客户手机号
$record = true; //是否录音
$redis = RedisExt::getRedis();
$is_privacy = $redis->get('s_is_privacy');
//0不使用隐私号码 1阿里云 2容联云
if ($is_privacy == 0) {
$this->data = [ 'phone' => $phone_b ];
$m_report = new SecretReport();
$report_data['phone_no'] = $phone_a;
$report_data['secret_no'] = $phone_b;
$report_data['peer_no'] = $phone_b;
$report_data['call_type'] = 1;
$report_data['record_down'] = 3;
$m_report->editData($report_data); //记录不使用隐号拨打记录
return $this->response($this->code, $this->msg, $this->data);
}
$bind = new BindingPhone();
$where['a.status'] = 1;
$where['a.phone_a'] = $phone_a;
$where['a.phone_b'] = $phone_b;
$where['a.type'] = $is_privacy;
$phone_x = $bind->getPhoneX('b.phone_x', $where); //已经绑定的返回隐私号码
if (!empty($phone_x['phone_x'])) {
$this->data = [ 'phone' => $phone_x['phone_x'] ];
$this->msg = '已绑定,返回隐私号码。';
return $this->response($this->code, $this->msg, $this->data); //绑定过了,返回隐号
}
$day_num = $redis->get('s_day_num'); if ($result['status'] == 'success') {
$release = 1; //是否释放 $this->msg = $result['msg'];
if (empty($day_num)) { $this->data['phone'] = $result['phone'];
$time = _EXPIRATION;
} else { } else {
if (empty($this->params['landlord'])) { $this->msg = $result['msg'];
$time = date('Y-m-d H:i:s', strtotime("+{$day_num} day")); $this->code = 101;
} else {
$day_num = $redis->get('s_landlord_phone_day');
if ($day_num == 0) {
$time = date('Y-m-d H:i:s', time() + 5);
$release = 0;
} else {
$time = date('Y-m-d H:i:s', strtotime("+{$day_num} day"));
}
}
}
if ($is_privacy == 1) {
/*阿里云*/
try {
$result = PlsDemo::bindAxb($phone_a, $phone_b, $time, $record);
} catch (\Exception $e) {
return $this->response(101, '参数异常,无法呼叫,请联系运营人员!');
}
if ($result->Code == 'OK') {
//记录绑定
$bind->recordBindPhone($result->SecretBindDTO->SecretNo, $phone_a, $phone_b, $record, $time, $result, '', $is_privacy, $release);
$this->msg = '绑定成功。';
$this->data = [ 'phone' => $result->SecretBindDTO->SecretNo ];
} elseif ($result->Code == 'isv.NO_AVAILABLE_NUMBER') {
$this->code = 101;
$this->msg = '号码使用完,请联系运营人员。';
$this->data = [];
} else {
$this->code = 101;
$this->msg = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!';
$this->data = [];
}
} else {
/*容联云*/
$Rong = new RongDemo();
$record2 = empty($this->params['record']) ? 'true' : 'false'; /* 是否录音(容联云规定string类型)*/
$aliYunPhone = new AliYunPhone();
$phone_x = $aliYunPhone->getAliYunPhone($phone_a, $phone_b, $is_privacy); //获取未绑定隐号
$result = $Rong->setNumber($phone_a, $phone_b, $phone_x['phone_x'], $phone_x['area'], $time, $record2);
/*绑定成功*/
if ($result['statusCode'] == '000000') {
$bind->recordBindPhone($phone_x['phone_x'], $phone_a, $phone_b, $record, $time, 0, $result['data']['mappingId'], $is_privacy, $release); //记录绑定
$this->msg = '绑定成功';
$this->data = [ 'phone' => $phone_x['phone_x'] ];
} else {
$phone_x_arr[] = $phone_x['phone_x']; //剔除绑定失败的中间号
//尝试5次再绑定
for ($i = 0; $i < 5; $i++) {
$phone_x = $aliYunPhone->getAliYunPhone($phone_a, $phone_b, $is_privacy, $phone_x_arr); //获取未绑定隐号
$result = $Rong->setNumber($phone_a, $phone_b, $phone_x['phone_x'], $phone_x['area'], $time, $record2);
if ($result['statusCode'] == '000000') {
$bind->recordBindPhone($phone_x['phone_x'], $phone_a, $phone_b, $record, $time, 0, $result['data']['mappingId'], $is_privacy, $release); //记录绑定
$this->msg = '绑定成功';
$this->data = [ 'phone' => $phone_x['phone_x'] ];
return $this->response($this->code, $this->msg, $this->data);
} else {
$phone_x_arr[] = $phone_x['phone_x']; //剔除绑定失败的中间号
}
}
//绑定失败返回错误信息
$this->code = 101;
$this->msg = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!';
}
} }
Log::write(json_encode($result), 'AliYunBindAxb'); //记录日志
return $this->response($this->code, $this->msg, $this->data); return $this->response($this->code, $this->msg, $this->data);
} }
...@@ -214,58 +87,16 @@ class CellPhone extends Basic ...@@ -214,58 +87,16 @@ class CellPhone extends Basic
public function agentsUnBind() public function agentsUnBind()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$phone_x = $this->params['phone_x'];
$phone_a = $this->params['phone_a'];
$phone_b = $this->params['phone_b'];
if (empty($phone_x) || empty($phone_a) || empty($phone_b)) { $call = new CallPhoneService();
$this->code = 101; $result = $call->agentsUnBind($this->params['phone_a'], $this->params['phone_b']);
$this->msg = '解除关系参数错误,请联系运营人员!';
return $this->response($this->code, $this->msg);
}
$phone = new BindingPhone();
$redis = RedisExt::getRedis();
$is_privacy = $redis->get('s_is_privacy');
$is_privacy = $is_privacy != '0' ? $is_privacy : 0;
if ($is_privacy == 1) {
/*阿里云*/
$subsId = $phone->getSubsId($phone_x, $phone_a, $phone_b, 1, 'subsId');
if ($subsId) {
$result = PlsDemo::unbindSubscription($subsId, $phone_x);/*解绑*/
if ($result->Message == 'OK') {
$phone->unBind($phone_x, $phone_a, $phone_b);
} else {
$this->code = 101;
$this->msg = '解除绑定关系失败,请联系运营!';
}
} else {
$this->code = 200;
$this->msg = '没有号码绑定关系,请忽略!。';
}
} elseif ($is_privacy == 2) {
/*容联云*/
$mappingId = $phone->getSubsId($phone_x, $phone_a, $phone_b, 1, 'mappingId');
$Rong = new RongDemo();
if ($mappingId) {
$result = $Rong->releaseNumber($mappingId);/*解绑*/
if ($result['statusCode'] == '000000') {
$phone->unBind($phone_x, $phone_a, $phone_b);
} else {
$this->code = 101;
$this->msg = '解除绑定关系失败,请联系运营!';
}
} else {
$this->code = 200;
$this->msg = '没有号码绑定关系,请忽略!。';
}
if ($result['status'] == 'success') {
$this->msg = $result['msg'];
$this->data['phone'] = $result['phone'];
} else { } else {
$this->code = 200; $this->msg = $result['msg'];
$this->msg = '没有号码绑定关系,请忽略!。'; $this->code = 101;
} }
return $this->response($this->code, $this->msg); return $this->response($this->code, $this->msg);
......
...@@ -8,6 +8,9 @@ use app\model\AAgents; ...@@ -8,6 +8,9 @@ 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;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
...@@ -150,6 +153,11 @@ class Client extends Basic ...@@ -150,6 +153,11 @@ class Client extends Basic
$data['msg'] = ''; $data['msg'] = '';
$time = date("Y-m-d H:i:s",time());//当前时间 $time = date("Y-m-d H:i:s",time());//当前时间
$params = $this->request->param(); $params = $this->request->param();
$params['type'] = 0;
$params['agent_id'] = '5775';
if(empty($params['agent_id'])){ if(empty($params['agent_id'])){
return $this->response(100,'参数不全'); return $this->response(100,'参数不全');
} }
...@@ -160,7 +168,7 @@ class Client extends Basic ...@@ -160,7 +168,7 @@ class Client extends Basic
//条件 //条件
//time_minute_diff 时间差(分)48小时内增加的【拥有经纪人】的客户为--受保护客户 //time_minute_diff 时间差(分)48小时内增加的【拥有经纪人】的客户为--受保护客户
$field = ['id as user_id','user_name','user_phone','agent_id','referrer_id','create_time',"TIMESTAMPDIFF(MINUTE,create_time,'{$time}')as time_minute_diff"]; $field = ['id as user_id','user_name','user_phone','agent_id','referrer_id','create_time',"TIMESTAMPDIFF(MINUTE,create_time,'{$time}')as time_minute_diff",'vip'];
$where = " agent_id in({$params['agent_id']}) and user_status={$type}"; $where = " agent_id in({$params['agent_id']}) and user_status={$type}";
if(!empty($params['search'])){ if(!empty($params['search'])){
...@@ -176,11 +184,17 @@ class Client extends Basic ...@@ -176,11 +184,17 @@ class Client extends Basic
$total = $table->getMyUserCount($where); $total = $table->getMyUserCount($where);
$data['total'] = ceil($total / $pageSize); $data['total'] = ceil($total / $pageSize);
$data['page'] = $pageNo; $data['page'] = $pageNo;
$vip_services = new VipService();
$data['examine_vip'] = $vip_services->vip($params['agent_id']);
return $this->response(200,'成功',$data); return $this->response(200,'成功',$data);
} }
/**搜索客户跟进 /**搜索客户跟进
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
...@@ -349,6 +363,9 @@ class Client extends Basic ...@@ -349,6 +363,9 @@ class Client extends Basic
$data['pagenum'] = $pagenum; $data['pagenum'] = $pagenum;
$data['total'] = $total; $data['total'] = $total;
$data['search_type'] = $search_type; $data['search_type'] = $search_type;
$vip_services = new VipService();
$data['examine_vip'] = $vip_services->vip($params['agent_id']);
return $this->response("200", "success!", $data); return $this->response("200", "success!", $data);
} }
......
...@@ -9,6 +9,7 @@ namespace app\api_broker\controller; ...@@ -9,6 +9,7 @@ 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\model\ACollectHouse; use app\model\ACollectHouse;
use think\Request; use think\Request;
...@@ -95,25 +96,48 @@ class CollectHouse extends Basic ...@@ -95,25 +96,48 @@ class CollectHouse extends Basic
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
$field = 'CollectUser.id,'; $pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$field .= 'Houses.internal_title,'; $pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field .= 'Houses.market_area,';
$field .= 'Houses.rent_type,'; /**
$field .= 'Houses.rent_price,'; * id : 4
* title : vvvv
* business_district_id : 0
* status : 1
* industry_type : 百货零售,其他
* shop_area_start : 6
* shop_area_end : 7
* shop_type : 0
* shop_sign : 办公室配套,5A景区游客量大,超高佣金,居民区十字路口
* rent_type : 2
* rent_price : 11
* is_look : true
*/
$field = 'CollectUser.id as collect_user_id,';
$field .= 'Houses.id,';
$field .= 'Houses.internal_title as title,';
$field .= 'Houses.business_district_id,';
$field .= 'Houses.status,';
$field .= 'Houses.industry_type,';
$field .= 'Houses.shop_area_start,'; $field .= 'Houses.shop_area_start,';
$field .= 'Houses.shop_area_end,'; $field .= 'Houses.shop_area_end,';
$field .= 'Houses.shop_sign'; $field .= 'Houses.shop_type,';
$field .= 'Houses.shop_sign,';
$field .= 'Houses.rent_type,';
$field .= 'Houses.rent_price';
$get_params['agents_id'] = $params["agents_id"]; $get_params['agents_id'] = $params["agents_id"];
$res = $this->aCollectHouse->getCollectList($field,$get_params); $get_params['CollectUser.status'] = 1;
$res = $this->aCollectHouse->getCollectList($pageNo,$pageSize,$field,$get_params);
$look_shop_service = new LookShopService();
foreach ($res as $key => $val) {
$isLook = $look_shop_service->isLooked($params["agents_id"], $val["id"]);
$res[$key]["is_look"] = $isLook;
}
//dump($res); //dump($res);
if ($res) { return $this->response("200", "成功",$res);
return $this->response("200", "成功",$res);
} else {
return $this->response("101", "失败");
}
} }
} }
\ No newline at end of file
...@@ -11,6 +11,7 @@ namespace app\api_broker\controller; ...@@ -11,6 +11,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\model\ACollectUser; use app\model\ACollectUser;
use think\Request; use think\Request;
...@@ -34,6 +35,7 @@ class CollectUser extends Basic ...@@ -34,6 +35,7 @@ class CollectUser extends Basic
*/ */
public function addCollectUser() public function addCollectUser()
{ {
header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/*$params = array( /*$params = array(
...@@ -96,20 +98,26 @@ class CollectUser extends Basic ...@@ -96,20 +98,26 @@ class CollectUser extends Basic
if (!isset($params["agents_id"])) { if (!isset($params["agents_id"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field = 'CollectUser.id,'; $field = 'CollectUser.id,';
$field .= 'CollectUser.status,'; $field .= 'CollectUser.status,';
$field .= 'Users.id AS user_id,'; $field .= 'Users.id AS user_id,';
$field .= 'Users.user_nick,'; $field .= 'Users.user_nick,';
$field .= 'Users.user_name,';
$field .= 'Users.user_phone,'; $field .= 'Users.user_phone,';
$field .= 'Users.agent_id,'; $field .= 'Users.agent_id,';
$field .= 'Users.user_status,'; $field .= 'Users.user_status,';
$field .= 'Users.industry_type,'; $field .= 'Users.industry_type,';
$field .= 'Users.price_demand,'; $field .= 'Users.price_demand,';
$field .= 'Users.vip,';
$field .= 'Users.area_demand'; $field .= 'Users.area_demand';
$get_params['agents_id'] = $params["agents_id"]; $get_params['agents_id'] = $params["agents_id"];
$res = $this->aCollectUser->getCollectList($field,$get_params); $get_params['CollectUser.status'] = 1;
$res = $this->aCollectUser->getCollectList($pageNo,$pageSize,$field,$get_params);
foreach($res as $k=>$v) foreach($res as $k=>$v)
{ {
$label = []; $label = [];
...@@ -121,14 +129,16 @@ class CollectUser extends Basic ...@@ -121,14 +129,16 @@ class CollectUser extends Basic
if($v['user_status'] != -1){ if($v['user_status'] != -1){
$res[$k]['label'] = implode(',',$label); $res[$k]['label'] = implode(',',$label);
} }
}
//dump($res);
if ($res) {
return $this->response("200", "成功",$res);
} else {
return $this->response("101", "失败");
} }
$data['user_date']=$res;
//dump($res);
$vip_services = new VipService();
$data['examine_vip'] = $vip_services->vip($params['agents_id']);
return $this->response("200", "成功",$data);
} }
} }
\ No newline at end of file
...@@ -659,6 +659,7 @@ class OrderLog extends Basic ...@@ -659,6 +659,7 @@ class OrderLog extends Basic
*/ */
public function getListByHouseId() public function getListByHouseId()
{ {
header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"house_id"=>1 "house_id"=>1
......
...@@ -102,7 +102,8 @@ class Report extends Basic ...@@ -102,7 +102,8 @@ class Report extends Basic
$pageNo = empty($params['page_no']) ? 1 : $params['page_no']; $pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size']; $pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$field = "a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,b.house_id,b.house_title"; $field = "a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,b.house_id,b.house_title";
$params["report_agent_id"] = $params["agent_id"]; $params["report_agent_id"] = $params["agent_id"];
$result = $this->service_->orderList($field, $params, $pageNo, $pageSize); $result = $this->service_->orderList($field, $params, $pageNo, $pageSize);
...@@ -131,7 +132,7 @@ class Report extends Basic ...@@ -131,7 +132,7 @@ class Report extends Basic
if (!isset($params["agent_id"])) { if (!isset($params["agent_id"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
if(isset($params["house_id"])){ if (isset($params["house_id"])) {
$agent_id = $params["agent_id"]; $agent_id = $params["agent_id"];
$house_id = $params["house_id"]; $house_id = $params["house_id"];
......
...@@ -5,6 +5,7 @@ namespace app\api_broker\controller; ...@@ -5,6 +5,7 @@ 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\VerifyService; use app\api_broker\service\VerifyService;
use app\model\ACollectHouse;
use app\model\AttentionModel; use app\model\AttentionModel;
use app\model\GHouses; use app\model\GHouses;
use app\model\GHousesFollowUp; use app\model\GHousesFollowUp;
...@@ -13,6 +14,7 @@ use app\model\OBargainModel; ...@@ -13,6 +14,7 @@ use app\model\OBargainModel;
use app\model\Regions; use app\model\Regions;
use think\Log; use think\Log;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User : zw * User : zw
...@@ -45,6 +47,8 @@ class Shop extends Basic ...@@ -45,6 +47,8 @@ class Shop extends Basic
*/ */
public function getShopList() public function getShopList()
{ {
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array( /*$params = array(
"site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备 "site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备
// "title" => "vv", //1,2 external_title ,3,4internal_title // "title" => "vv", //1,2 external_title ,3,4internal_title
...@@ -66,8 +70,6 @@ class Shop extends Basic ...@@ -66,8 +70,6 @@ class Shop extends Basic
"pageNo" => 1, "pageNo" => 1,
"pageSize" => 15 "pageSize" => 15
);*/ );*/
$params = $this->params;
$conditions = []; $conditions = [];
if (empty($params['site_area'])) { if (empty($params['site_area'])) {
return $this->response("101", "请求来源不能为空"); return $this->response("101", "请求来源不能为空");
...@@ -226,8 +228,7 @@ class Shop extends Basic ...@@ -226,8 +228,7 @@ class Shop extends Basic
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
/* $params = array( /* $params = array(
"id" => 3084, "id" => 3084,
"site_area" => 3, //1.c端 3.b端 "site_area" => 3, //1.c端 3.b端 4.pc端
"site_area" => 1, //1.c端 3.b端
//"user_id" => 2 //if c端 用户登录后传入user_id //"user_id" => 2 //if c端 用户登录后传入user_id
);*/ );*/
$params = $this->params; $params = $this->params;
...@@ -249,12 +250,22 @@ class Shop extends Basic ...@@ -249,12 +250,22 @@ class Shop extends Basic
b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule"; b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule";
$conditions['a.status'] = array( "eq", 1 ); $conditions['a.status'] = array( "eq", 1 );
$conditions['a.is_show'] = array( 'eq', 0 ); //c端只显示公开楼盘 $conditions['a.is_show'] = array( 'eq', 0 ); //c端只显示公开楼盘
} else { } else if ($params['site_area'] == 3) {
$field = "a.id,a.internal_title as title,a.internal_address as address,a.city,a.disc,a.business_district_id,a.status, $field = "a.id,a.internal_title as title,a.internal_address as address,a.city,a.disc,a.business_district_id,a.status,
a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type, a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type,
a.rent_price,a.management_fee,a.slotting_fee,a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude, a.rent_price,a.management_fee,a.slotting_fee,a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude,
b.enter_num,b.internal_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic, b.enter_num,b.internal_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.auditorium,b.tiny_brochure_url,b.start_business_date,a.upload_id,b.fee_rule,b.landlord_remark,a.create_time,b.landlord_phone"; b.auditorium,b.tiny_brochure_url,b.start_business_date,a.upload_id,b.fee_rule,b.landlord_remark,a.create_time,b.landlord_phone
";
$conditions['a.status'] = array( "neq", 3 );
} else {
$field = "a.id,a.internal_title,a.internal_address,a.external_title,a.external_address,
a.city,a.disc,a.business_district_id,a.status,a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,
a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type, a.rent_price,a.management_fee,a.slotting_fee,
a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude,a.is_show,a.is_exclusive_type,
b.enter_num,b.internal_item_advantage as item_advantage, b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.auditorium,b.tiny_brochure_url,b.start_business_date,a.upload_id,b.fee_rule,b.landlord_remark,a.create_time,b.landlord_phone
,a.update_time,b.agent_start_time,b.agent_end_time,b.internal_item_advantage,b.external_item_advantage";
$conditions['a.status'] = array( "neq", 3 ); $conditions['a.status'] = array( "neq", 3 );
} }
...@@ -287,7 +298,7 @@ class Shop extends Basic ...@@ -287,7 +298,7 @@ class Shop extends Basic
$param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图 $param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result["plan_images"] = $this->gHousesImgModel->getHouseImages($param, 1); $result["plan_images"] = $this->gHousesImgModel->getHouseImages($param, 1);
$result["plan_images"] = []; $result["plan_images"] = [];
if ($params['site_area'] == 3) { if ($params['site_area'] == 3 || $params["site_area"] == 4) {
$result['landlord_phone'] = json_decode($result['landlord_phone'], true); $result['landlord_phone'] = json_decode($result['landlord_phone'], true);
$result['create_time'] = date('Y-m-d', strtotime($result['create_time'])); $result['create_time'] = date('Y-m-d', strtotime($result['create_time']));
} }
...@@ -316,7 +327,7 @@ class Shop extends Basic ...@@ -316,7 +327,7 @@ class Shop extends Basic
// 计数开始 // 计数开始
if ($params["site_area"] == 3 && $result) { if ($params["site_area"] == 3 || $params["site_area"] == 4 && $result) {
$lookShopArr = $this->lookShopService_->countLookShopNum((int)$this->agentId, (int)$params["id"]); $lookShopArr = $this->lookShopService_->countLookShopNum((int)$this->agentId, (int)$params["id"]);
//判断看铺数量是否上限 //判断看铺数量是否上限
if ($lookShopArr) { if ($lookShopArr) {
...@@ -329,6 +340,20 @@ class Shop extends Basic ...@@ -329,6 +340,20 @@ class Shop extends Basic
} }
} }
//是否被收藏
$result["is_collect"] = 2;
if ($params['site_area'] == 3) {
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["user_id"];
$get_params['house_id'] = $params["id"];
$collect_house = new ACollectHouse();
$res = $collect_house->getCollectHouse($field,$get_params);
if($res && ($res[0]['status'] == 1)){//如果存在
$result["is_collect"] = 1;
}
}
return $this->response("200", 'request success', $result); return $this->response("200", 'request success', $result);
} }
...@@ -483,6 +508,7 @@ class Shop extends Basic ...@@ -483,6 +508,7 @@ class Shop extends Basic
*/ */
public function addShopFollowUp() public function addShopFollowUp()
{ {
header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"house_id" => 1, "house_id" => 1,
......
...@@ -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\VipService;
use app\model\Users; use app\model\Users;
use think\Request; use think\Request;
...@@ -72,7 +73,7 @@ class User extends Basic ...@@ -72,7 +73,7 @@ class User extends Basic
"pageSize" => 15, "pageSize" => 15,
"status" => -1, "status" => -1,
);*/ );*/
$field = "id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand"; $field = "id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip";
$conditions = []; $conditions = [];
...@@ -121,8 +122,10 @@ class User extends Basic ...@@ -121,8 +122,10 @@ class User extends Basic
if (empty($userList)) { if (empty($userList)) {
return $this->response("200", "此条件没有找到数据"); return $this->response("200", "此条件没有找到数据");
} }
$vip_services = new VipService();
return $this->response("200", 'request success', ["user_date"=>$userList]); $data['examine_vip'] = $vip_services->vip($params['agent_id']);
$data['user_date'] = $userList;
return $this->response("200", 'request success', $data);
} }
} }
\ No newline at end of file
This diff is collapsed.
<?php
namespace app\api_broker\service;
use app\model\AAgents;
use app\model\AuthGroup;
use app\model\AuthRule;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018-07-10
* Time: 17:09:38
*/
class VipService
{
/**
* 是否具有查看vip客户权限
*
*/
public function vip($id)
{
//$id= 5743;
$agent = new AAgents();
$fields='auth_group_id';
$auth_group_id = $agent->getAgentsById($id, $fields);
//var_dump($auth_group_id);
$auth_group = New AuthGroup();
$id= $auth_group_id;
$fields='rules';
$rules = $auth_group->getAuthGroupById($id, $fields);
$auth_group = New AuthRule();
$name= 'auth_vip';
$fields='id';
$sauth_ruel_id = $auth_group->getAuthRuleByName($name, $fields);
$rules_arr = explode(',',$rules);
if (in_array($sauth_ruel_id, $rules_arr)) {
return 0;
} else {
return 1;
}
}
}
\ No newline at end of file
...@@ -177,6 +177,11 @@ class Index ...@@ -177,6 +177,11 @@ class Index
{ {
return view('index/bargaininfo_detail_pc'); return view('index/bargaininfo_detail_pc');
} }
public function shop_detail_pc()
{
return view('index/shop_detail_pc');
}
public function customerinfo_details_new() public function customerinfo_details_new()
{ {
......
...@@ -102,8 +102,9 @@ ...@@ -102,8 +102,9 @@
</div> </div>
<div class="bottom-btn-area"> <div class="bottom-btn-area">
<a href="javascript:;" id="baobei_btn"><img src="/app/images/img_look@2x.png" /></a> <a href="javascript:;" id="mark_btn" data-ismark="0"><img src="/app/images/icon_collection@2x.png" /></a>
<a href="javascript:;" id="genjin_btn"><img src="/app/images/but_genjin_new.png" /></a> <a href="javascript:;" id="baobei_btn"><img src="/app/images/img_look01@2x.png" /></a>
<a href="javascript:;" id="genjin_btn"><img src="/app/images/img_followup01@2x.png" /></a>
</div> </div>
<div id="genjin_modal"> <div id="genjin_modal">
......
<!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">
<main>
<section v-if="d.lookShopArr && (d.lookShopArr.isPanParty || (d.lookShopArr.residue_num>0))">
<table>
<tbody>
<tr>
<td>商铺编号:{{d.id}}</td>
<td>商铺类型:{{d.shop_type?'街铺':'商场'}}</td>
<td>是否对客户展示:{{d.is_show?'否':'是'}}</td>
<td>是否独家:{{d.is_exclusive_type?'是':'否'}}</td>
</tr>
<tr>
<td>{{dealPrice}}</td>
<td>{{d.shop_type?'转让费':'进场费'}}:{{d.slotting_fee}}元</td>
<td>物业管理费:{{d.management_fee}}元/月</td>
<td></td>
</tr>
<tr>
<td>商铺面积:{{dealArea}}</td>
<td>项目总面积:{{d.market_area}}</td>
<td>剩余铺数:{{d.residue_num}}</td>
<td>总铺数:{{d.total}}</td>
</tr>
<tr>
<td>业态:{{d.industry_type}}</td>
<td>已入驻:{{d.enter_num}}</td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2">对内商铺名称:{{d.internal_title}}</td>
<td colspan="2">对内商铺地址:{{d.province}}{{d.city+d.disc+d.internal_address}}</td>
</tr>
<tr>
<td colspan="2">交通:{{d.traffic}}</td>
<td colspan="2">签约规则:{{d.sign_rule}}</td>
</tr>
<tr>
<td colspan="2">对内项目优势:{{d.internal_item_advantage}}</td>
<td colspan="2">标签:{{d.shop_sign}}</td>
</tr>
<tr>
<td>营业时间:{{d.do_business_date}}</td>
<td>招商时间:{{d.opening_date}}</td>
<td>开业时间:{{d.start_business_date}}</td>
<td>煤气:{{d.is_has_gas?'没有':'有'}}</td>
</tr>
<tr class="tr-seat">
<td colspan="4"></td>
</tr>
<tr>
<td colspan="4" class="oh">
<div class="fl">详情页面轮播图:</div>
<div class="fl">
<ul class="oh img-list">
<li class="fl oh" v-for="(item, index) in d.images" :key="index" :data-id="item.id"><img class="fl" :src="d.api_path+item.img_name" /></li>
</ul>
</div>
</td>
</tr>
<tr class="tr-seat">
<td colspan="4"></td>
</tr>
<tr v-if="!d.is_show">
<td colspan="2">对外商铺名称:{{d.external_title}}</td>
<td colspan="2">对外商铺地址:{{d.province}}{{d.city+d.disc+d.external_address}}</td>
</tr>
<tr v-if="!d.is_show">
<td colspan="2">对外项目优势:{{d.external_item_advantage}}</td>
<td colspan="2"></td>
</tr>
<tr class="tr-seat">
<td colspan="4"></td>
</tr>
<tr>
<td colspan="4">
<div class="fl">房东:</div>
<div class="fl">
<ul class="oh phone-list">
<li class="fl oh" v-for="(item, index) in d.landlord_phone" :key="index">{{item.name+'-'+item.phone}}</li>
</ul>
</div>
</td>
</tr>
<tr>
<td colspan="4">房东备注:{{d.landlord_remark}}</td>
</tr>
<tr>
<td colspan="4">
<div class="fl">盘方:</div>
<div class="fl">
<ul class="oh phone-list">
<li class="fl oh" v-for="(item, index) in d.panParty" :key="index" :data-id="item.id">{{item.name+'-'+item.phone}}</li>
</ul>
</div>
</td>
</tr>
<tr v-if="false">
<td colspan="4">
<div class="fl">案场权限人:</div>
<div class="fl">
<ul class="oh phone-list">
<li class="fl oh" v-for="(item, index) in d.panParty" :key="index" :data-id="item.phone">{{item.name+'-'+item.phone}}</li>
</ul>
</div>
</td>
</tr>
<tr>
<td>上传时间:{{d.create_time}}</td>
<td>最后编辑时间:{{d.update_time}}</td>
<td v-if="d.is_exclusive_type">独家有效期:{{d.agent_start_time+'至'+d.agent_end_time}}</td>
<td v-if="d.is_exclusive_type"><!--独家方:{{d.exclusive_name}}--></td>
</tr>
</tbody>
</table>
</section>
<section v-else>查看数量已达上限</section>
</main>
</div>
<script src="/app/js/libs/require.min.js" data-js="/app/js/shop_detail_pc.js" data-main="/app/js/main" data-norem="yes" defer async="true"></script>
</body>
</html>
\ No newline at end of file
...@@ -8,19 +8,18 @@ ...@@ -8,19 +8,18 @@
namespace app\index\controller; namespace app\index\controller;
use app\api_broker\service\CallPhoneService;
use app\api_broker\service\PushMessageService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\api_broker\untils\PlsDemo;
use app\model\AliYunPhone;
use app\model\BindingPhone;
use app\model\SecretReport; use app\model\SecretReport;
use think\Db; use app\model\Users;
class CellPhone extends Basic class CellPhone extends Basic
{ {
protected $code = 200; protected $code = 200;
protected $data = []; protected $data = [];
protected $msg = ""; protected $msg = "";
/** /**
* 总记录列表、搜索 * 总记录列表、搜索
...@@ -30,55 +29,56 @@ class CellPhone extends Basic ...@@ -30,55 +29,56 @@ class CellPhone extends Basic
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function callLog() { public function callLog()
{
if ($this->request->isAjax()) { if ($this->request->isAjax()) {
$result['code'] = 200; $result['code'] = 200;
$result['msg'] = ''; $result['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$report = new SecretReport(); $report = new SecretReport();
$field = 'agents_id,users_id,call_type,call_time,time,voice_file,user_status,a.id,a.create_time,type'; $field = 'agents_id,users_id,call_type,call_time,time,voice_file,user_status,a.id,a.create_time,type';
$where = []; $where = [];
if (!empty($this->params['start_date'])) { if (!empty($this->params['start_date'])) {
$where['a.call_time'] = ['> time', $this->params['start_date'] . ' 00:00:00']; $where['a.call_time'] = [ '> time', $this->params['start_date'] . ' 00:00:00' ];
} }
if (!empty($this->params['end_date'])) { if (!empty($this->params['end_date'])) {
$where['a.call_time'] = ['< time', $this->params['end_date']. ' 23:59:59']; $where['a.call_time'] = [ '< time', $this->params['end_date'] . ' 23:59:59' ];
} }
if (!empty($this->params['start_date']) && !empty($this->params['end_date'])) { if (!empty($this->params['start_date']) && !empty($this->params['end_date'])) {
$where['a.call_time'] = ['between', [$this->params['start_date'] . ' 00:00:00',$this->params['end_date'] . ' 23:59:59']]; $where['a.call_time'] = [ 'between', [ $this->params['start_date'] . ' 00:00:00', $this->params['end_date'] . ' 23:59:59' ] ];
} }
if (!empty($this->params['call_name'])) { if (!empty($this->params['call_name'])) {
$where['name'] = ['LIKE', $this->params['call_name'] . '%']; $where['name'] = [ 'LIKE', $this->params['call_name'] . '%' ];
} }
if (!empty($this->params['call_phone'])) { if (!empty($this->params['call_phone'])) {
$where['phone_no'] = ['LIKE', $this->params['call_phone'] . '%']; $where['phone_no'] = [ 'LIKE', $this->params['call_phone'] . '%' ];
} }
if (!empty($this->params['client_phone'])) { if (!empty($this->params['client_phone'])) {
$where['c.user_phone'] = ['LIKE', $this->params['client_phone'] . '%']; $where['c.user_phone'] = [ 'LIKE', $this->params['client_phone'] . '%' ];
} }
if (!empty($this->params['user_nick'])) { if (!empty($this->params['user_nick'])) {
$where['c.user_nick'] = ['LIKE', '%'.$this->params['user_nick'] . '%']; $where['c.user_nick'] = [ 'LIKE', '%' . $this->params['user_nick'] . '%' ];
} }
if (!empty($this->params['call_type'])) { if (!empty($this->params['call_type'])) {
$where['a.type'] = $this->params['call_type']; $where['a.type'] = $this->params['call_type'];
} }
$data['list'] = $report->getCallList($pageNo, $pageSize, 'id desc', $field, $where); $data['list'] = $report->getCallList($pageNo, $pageSize, 'id desc', $field, $where);
$data['total'] = $report->getCallListTotal($where); $data['total'] = $report->getCallListTotal($where);
return $this->response($result['code'], $result['msg'], $data); return $this->response($result['code'], $result['msg'], $data);
} else { } else {
return view('cell_phone/index'); return view('cell_phone/index');
} }
} }
/** /**
...@@ -89,39 +89,123 @@ class CellPhone extends Basic ...@@ -89,39 +89,123 @@ class CellPhone extends Basic
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function callCollectList() { public function callCollectList()
{
if ($this->request->isAjax()) { if ($this->request->isAjax()) {
$result['code'] = 200; $result['code'] = 200;
$result['msg'] = ''; $result['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$report = new SecretReport(); $report = new SecretReport();
$field = 'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time'; $field = 'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time';
$where = []; $where = [];
if (!empty($this->params['start_date'])) { if (!empty($this->params['start_date'])) {
$where['create_time'] = ['> time', $this->params['start_date']]; $where['create_time'] = [ '> time', $this->params['start_date'] ];
} }
if (!empty($this->params['end_date'])) { if (!empty($this->params['end_date'])) {
$where['create_time'] = ['< time', $this->params['end_date']]; $where['create_time'] = [ '< time', $this->params['end_date'] ];
} }
if (!empty($this->params['agents_name'])) { if (!empty($this->params['agents_name'])) {
$where['realName'] = ['LIKE', $this->params['agents_name'] . '%']; $where['realName'] = [ 'LIKE', $this->params['agents_name'] . '%' ];
} }
if (!empty($this->params['phone'])) { if (!empty($this->params['phone'])) {
$where['phone'] = ['LIKE', $this->params['phone'] . '%']; $where['phone'] = [ 'LIKE', $this->params['phone'] . '%' ];
} }
$data['list'] = $report->getCallCollect($pageNo, $pageSize, 'id desc', $field, $where); $data['list'] = $report->getCallCollect($pageNo, $pageSize, 'id desc', $field, $where);
$data['total'] = $report->getCallCollectTotal($where); $data['total'] = $report->getCallCollectTotal($where);
return $this->response($result['code'], $result['msg'], $data); return $this->response($result['code'], $result['msg'], $data);
} else { } else {
return view('cell_phone/agentIndex'); return view('cell_phone/agentIndex');
} }
}
/**
* 绑定手机号
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function bindAXB()
{
if (empty($this->params['user_id'])) {
return $this->response(101, '客户id为空');
}
if (empty($this->params['phone_b'])) {
$m_user = new Users();
$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 {
$phone_b = $this->params['phone_b'];
}
$call_phone = new CallPhoneService();
$data = $call_phone->bindAXB($this->params['phone_a'], $phone_b);
$result['msg'] = '';
if ($data['status'] == 'success') {
$push = new PushMessageService();
$push->pushMessageById($this->userId, '客户详情', '后台拨打电话推送客户详情', 'user_info', $this->params['user_id']);
$result['code'] = 200;
$result['data']['phone'] = $data['phone'];
} else {
$result['status'] = 101;
$result['msg'] = $data['msg'];
}
return $this->response($result['code'], $result['msg'], $result);
}
/**
* 解除绑定关系
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function agentsUnBind()
{
if (empty($this->params['user_id'])) {
return $this->response(101, '客户id为空');
}
if (empty($this->params['phone_b'])) {
$m_user = new Users();
$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 {
$phone_b = $this->params['phone_b'];
}
$call_phone = new CallPhoneService();
$data = $call_phone->agentsUnBind($this->params['phone_a'], $phone_b, $this->params['phone_x']);
$result['msg'] = '';
if ($data['status'] == 'success') {
$result['code'] = 200;
$result['msg'] = '释放成功';
} else {
$result['status'] = 101;
$result['msg'] = $data['msg'];
}
return $this->response($result['code'], $result['msg']);
} }
} }
\ No newline at end of file
...@@ -81,7 +81,7 @@ class Collection extends Basic ...@@ -81,7 +81,7 @@ class Collection extends Basic
} }
if (empty($this->params['excel'])) { if (empty($this->params['excel'])) {
$field = 'a.id,a.father_id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,a.house_number,a.type,d.internal_title,d.internal_address,a.source'; $field = 'a.id,a.father_id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,a.house_number,a.type,d.internal_title,d.internal_address,a.source,a.transaction_fee';
$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(); //总额 $data['data']['money_total'] = $order->getMoneyTotal(); //总额
...@@ -91,13 +91,13 @@ class Collection extends Basic ...@@ -91,13 +91,13 @@ class Collection extends Basic
} else { } else {
$pageNo = 1; $pageNo = 1;
$pageSize = 50000; //最多5万条数据 $pageSize = 50000; //最多5万条数据
$field = 'a.create_time,c.user_name,c.user_phone,e.name,e.phone,f.store_name,g.district_name,a.money,a.real_money,a.type,a.pay_type,d.internal_address,a.house_number,a.source'; $field = 'a.create_time,c.user_name,c.user_phone,e.name,e.phone,f.store_name,g.district_name,a.money,a.real_money,a.transaction_fee,a.type,a.pay_type,d.internal_address,a.house_number,a.source';
$data = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where); $data = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data = $this->numberTransitionString($data); $data = $this->numberTransitionString($data);
$export = new ExportExcelUntil(); $export = new ExportExcelUntil();
$title = [ '收款时间', '客户姓名', '客户手机号', '约带看人姓名', '约带看人手机号', '约带看人所属门店', '约带看人所属部门', '收款金额(元)', '实付金额(元)', '入账类型','入账方式','商铺地址','商铺号' ]; $title = [ '收款时间', '客户姓名', '客户手机号', '约带看人姓名', '约带看人手机号', '约带看人所属门店', '约带看人所属部门', '收款金额(元)', '实付金额(元)', '手续费(元)', '入账类型','入账方式','商铺地址','商铺号' ];
$export->exportTable('收款记录', $data, 9, '收款记录', $title); $export->exportTable('收款记录', $data, 9, '收款记录', $title);
} }
...@@ -108,18 +108,27 @@ class Collection extends Basic ...@@ -108,18 +108,27 @@ class Collection extends Basic
public function addRealMoney(){ public function addRealMoney(){
$params = $this->params; $params = $this->params;
/* $params = array( /*$params = array(
"collection_id" => 1, "collection_id" => 1,
"real_money" => 123, "real_money" => 77,
"transaction_fee" => 100,
);*/ );*/
if(!isset($params["collection_id"]) || $params["collection_id"] <= 0){ if(!isset($params["collection_id"]) || $params["collection_id"] <= 0){
return $this->response("101","请求参数错误"); return $this->response("101","请求参数错误");
} }
if(!isset($params["real_money"]) || $params["real_money"] <= 0){ if((!isset($params["real_money"]) || $params["real_money"] <= 0) and (!isset($params["transaction_fee"]) || $params["transaction_fee"] <= 0)){
return $this->response("101","请求参数错误"); return $this->response("101","请求参数错误");
} }
$where_["id"] = $params["collection_id"]; $where_["id"] = $params["collection_id"];
$where_["real_money"] = $params["real_money"];
if(isset($params["real_money"])){
$where_["real_money"] = $params["real_money"];
}
if(isset($params["transaction_fee"])){
$where_["transaction_fee"] = $params["transaction_fee"];
}
$order = new OPayLogModel(); $order = new OPayLogModel();
$id = $order->updatePayLog($where_); $id = $order->updatePayLog($where_);
if($id > 0 ){ if($id > 0 ){
......
...@@ -65,7 +65,7 @@ class Finance extends Basic ...@@ -65,7 +65,7 @@ class Finance extends Basic
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$check_status = $this->params['check_status']; $check_status = $this->params['check_status'];
$fields = 'a.id,a.create_time,a.trade_type,b.user_phone,b.user_name,d.internal_title,d.internal_address, $fields = 'a.id,a.create_time,a.trade_type,b.user_phone,b.user_name,d.internal_title,d.internal_address,
a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number'; a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number,a.is_open';
$where['a.father_id'] = 0; $where['a.father_id'] = 0;
// $where['c.is_del'] = 0; // $where['c.is_del'] = 0;
$where['a.status'] = 11; $where['a.status'] = 11;
...@@ -238,7 +238,7 @@ class Finance extends Basic ...@@ -238,7 +238,7 @@ class Finance extends Basic
} }
if (empty($this->params['estimated_receipt_date'])) { if (empty($this->params['estimated_receipt_date'])) {
return $this->response(101,'预计收款时间为空'); return $this->response(101, '预计收款时间为空');
} }
//应收总佣金 //应收总佣金
...@@ -289,7 +289,7 @@ class Finance extends Basic ...@@ -289,7 +289,7 @@ class Finance extends Basic
if (empty($item['fee']) || empty($item['operation_date'])) { if (empty($item['fee']) || empty($item['operation_date'])) {
$update_real_arr[$i]['id'] = $item['fee_id']; $update_real_arr[$i]['id'] = $item['fee_id'];
$update_real_arr[$i]['is_del'] = 1; $update_real_arr[$i]['is_del'] = 1;
$log_data[$i] = '[删除实收佣金:'.$item['fee'].',收佣日期'.$item['operation_date'].']'; // $log_data[$i] = '[删除实收佣金:' . $item['fee'] . ',收佣日期' . $item['operation_date'] . ']'; //
$i++; $i++;
} elseif ($item["fee_id"] > 0) { } elseif ($item["fee_id"] > 0) {
$update_real_arr[$i]['id'] = $item['fee_id']; $update_real_arr[$i]['id'] = $item['fee_id'];
...@@ -304,7 +304,7 @@ class Finance extends Basic ...@@ -304,7 +304,7 @@ class Finance extends Basic
$add_real_arr[$j]['operation_id'] = $this->userId; $add_real_arr[$j]['operation_id'] = $this->userId;
$add_real_arr[$j]['money'] = $item['fee']; $add_real_arr[$j]['money'] = $item['fee'];
$add_real_arr[$j]['income_time'] = $item['operation_date']; $add_real_arr[$j]['income_time'] = $item['operation_date'];
$log_data[$j] = '[新增实收佣金:'.$item['fee'].',收佣日期'.$item['operation_date'].']'; $log_data[$j] = '[新增实收佣金:' . $item['fee'] . ',收佣日期' . $item['operation_date'] . ']';
$j++; $j++;
} }
} }
...@@ -383,10 +383,11 @@ class Finance extends Basic ...@@ -383,10 +383,11 @@ class Finance extends Basic
$data['code'] = 101; $data['code'] = 101;
$data['msg'] = 'Id is null.'; $data['msg'] = 'Id is null.';
} else { } else {
$m_comm = new OBargainModel(); $m_comm = new OBargainModel();
$fields = 'a.id,a.role,a.agent_id,a.scale,a.scale_fee'; $fields = 'a.id,a.role,a.agent_id,a.scale,a.scale_fee,a.father_id';
$where[0] = [ 'EXP', "a.id = {$this->params['id']} or a.father_id = {$this->params['id']}" ]; $where[0] = [ 'EXP', "a.id = {$this->params['id']} or a.father_id = {$this->params['id']}" ];
$data['data'] = $m_comm->getBargainPartial(1, 100, 'a.id desc', $fields, $where); $where['a.status'] = [ '<>', 30 ];
$data['data'] = $m_comm->getBargainPartial(1, 100, 'a.id desc', $fields, $where);
} }
return $this->response($data['code'], $data['msg'], $data['data']); return $this->response($data['code'], $data['msg'], $data['data']);
...@@ -1328,4 +1329,30 @@ class Finance extends Basic ...@@ -1328,4 +1329,30 @@ class Finance extends Basic
$m_bargain = new OBargainLogModel(); $m_bargain = new OBargainLogModel();
return $m_bargain->addLog($insert_data); return $m_bargain->addLog($insert_data);
} }
/**
* 删除分佣方
*
* @return \think\Response
*/
public function delPartialCommission()
{
if (empty($this->params['partial_id']))
return $this->response(101, '参数错误');
$partial_id = $this->params['partial_id'];
$m_partial = new OBargainModel();
$data['status'] = 30;
$num = $m_partial->updateBargainById($partial_id, $data);
if ($num > 0) {
$result['code'] = 200;
$result['msg'] = '删除成功';
} else {
$result['code'] = 101;
$result['msg'] = '删除失败';
}
return $this->response($result['code'], $result['msg']);
}
} }
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/3/13
* Time: 15:48
*/
namespace app\index\controller;
use app\index\extend\Basic;
class HouseFollowUp extends Basic{
//在controller里新增的php文件名
public function followUpList(){
//followUpList 方法
if (!$this->request->isAjax()) {
return view('houses/HouseFollowUp');
//找到view下的 houses 文件夹下的 HouseFollowUp的html 文件
}
}
}
\ No newline at end of file
...@@ -10,6 +10,7 @@ namespace app\index\controller; ...@@ -10,6 +10,7 @@ namespace app\index\controller;
use app\api\controller\Sublet; use app\api\controller\Sublet;
//use app\api_broker\service\LookShopService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\GHouses; use app\model\GHouses;
...@@ -218,6 +219,13 @@ class Houses extends Basic ...@@ -218,6 +219,13 @@ class Houses extends Basic
$data['data']['list'] = $this->house->getHouseListDish($pageNo, $pageSize, 'a.id DESC', $fields, $where, $this->userId); $data['data']['list'] = $this->house->getHouseListDish($pageNo, $pageSize, 'a.id DESC', $fields, $where, $this->userId);
$data['data']['total'] = $this->house->getHouseListDishTotal($where); $data['data']['total'] = $this->house->getHouseListDishTotal($where);
} }
// $look_shop = new LookShopService();
foreach ($data['data']['list'] as $k=>$v) {
$data['data']['list'][$k]["is_look"] = false;
}
return $this->response($data['status'], $data['msg'], $data['data']); return $this->response($data['status'], $data['msg'], $data['data']);
} else { } else {
return view('houseList'); return view('houseList');
......
<?php
namespace app\index\controller;
/**
* Created by PhpStorm.
* User: liu yin ping
* Date: 2018/3/13
* Time: 15:48
*/
use app\index\extend\Basic;
class InspectionRecord extends Basic
{
public function inspectionRecordList()
{
if (!$this->request->isAjax()) {
return view('inspection/inspectionRecord');
}
}
}
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace app\index\controller; namespace app\index\controller;
use app\api\untils\JwtUntils;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\AuthRule; use app\model\AuthRule;
...@@ -105,11 +106,19 @@ class Login extends Basic ...@@ -105,11 +106,19 @@ class Login extends Basic
$list = $list->toArray();//转化arr $list = $list->toArray();//转化arr
} }
$jwt = new JwtUntils();
$jwt_data['id'] = $list['id'];
$jwt_data['name'] = $list['name'];
$jwt_data['phone'] = $list['phone'];
$jwt_data['level'] = $list['level'];
$list['AuthToken'] = $jwt->createToken($jwt_data);
Session::set("userName",$list["name"]); Session::set("userName",$list["name"]);
Session::set("userId",$list["id"]); Session::set("userId",$list["id"]);
Session::set("lastLoginTime",time()); Session::set("lastLoginTime",time());
Session::set("user_info",$list); Session::set("user_info",$list);
$this->operating_records($list["id"],1,'后台登陆'); //记录操作日志 $this->operating_records($list["id"],1,'后台登陆'); //记录操作日志
if($this->request->isAjax()) { if($this->request->isAjax()) {
return $this->response('200', '登录成功', $list); return $this->response('200', '登录成功', $list);
}else { }else {
......
...@@ -253,6 +253,11 @@ class Member extends Basic{ ...@@ -253,6 +253,11 @@ class Member extends Basic{
try { try {
$data['list'] = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type); $data['list'] = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type);
foreach ($data['list'] as $k=>$v) {
$data['list'][$k]['current_agent_id'] = $this->userId;
}
$data['total'] = $this->user->getUserAgentTotal($where, $type); $data['total'] = $this->user->getUserAgentTotal($where, $type);
} catch (\Exception $e) { } catch (\Exception $e) {
return $this->response(101, '内部错误,获取客户失败!请联系运营。'); return $this->response(101, '内部错误,获取客户失败!请联系运营。');
...@@ -266,76 +271,6 @@ class Member extends Basic{ ...@@ -266,76 +271,6 @@ class Member extends Basic{
return $return; return $return;
} }
/**
* 新增或编辑用户
*
* @return \think\Response
* @throws \think\exception\DbException
*/
public function user_add() {
$params = $this->request->param();
$status = 101;
$data = '';
if (empty($params['id'])) {
$user_data = $this->user->get(['user_phone'=> $params['user_phone']]);
} else {
$user_data = $this->user->get($params['id']);
}
$date = date('Y-m-d H:i:s');
if (!check_phone($params['user_phone'])) {
return $this->response($status, '手机号错误');
}
if (empty($user_data) && $params['type'] == 'add') {
$insert_data['sex'] = $params['sex'];
$insert_data['user_name'] = $params['user_name'];
$insert_data['user_phone'] = $params['user_phone'];
$insert_data['user_pswd'] = md5(md5($params['pwd']).'+123');
$insert_data['status'] = -1;
$insert_data['create_time'] = $date;
$insert_data['source'] = $date;
$insert_data['agent_id'] = $params['agent_id']; //客方
$insert_data['industry_type'] = $params['industry_type']; //业态
$insert_data['price_demand'] = $params['price_demand']; //价格需求 元
$insert_data['area_demand'] = $params['area_demand']; //价格需求 元面积要求
$this->user->save($insert_data);
if ($this->user->id) {
$status = 200;
$data = ['id'=>$this->user->id];
$msg = '添加用户成功';
} else {
$msg = '新增用户失败';
}
} else {
if (!empty($user_data) && $params['type'] == 'edit'){
$insert_data['sex'] = $params['sex'];
$user_data->user_nick = $params['realname'] ? $params['realname'] : $user_data->user_nick;
$user_data->user_phone = $params['user_phone'] ? $params['user_phone'] : $user_data->user_phone;
$user_data->user_pswd = $params['pwd'] != $user_data->user_pswd ? md5(md5($params['pwd']).'+123') : $user_data->user_pswd;
$user_data->status = $params['status'] ? $params['status'] : $user_data->status;
$user_data->update_time = $date;
$user_data->save();
if ($user_data->id) {
$status = 200;
$data = ['id'=>$user_data->id];
$msg = '编辑用户成功';
} else {
$msg = '编辑用户失败';
}
} else {
$msg = '该用户已存在';
$status = 101;
}
}
return $this->response($status, $msg, $data);
}
/** /**
* 添加跟进 * 添加跟进
* *
...@@ -375,24 +310,8 @@ class Member extends Basic{ ...@@ -375,24 +310,8 @@ class Member extends Basic{
$data = []; $data = [];
if ($this->request->isPost()) { if ($this->request->isPost()) {
//编辑用户 //编辑用户
if (isset($this->params['id'])) { if (empty($this->params['id'])) {
$user_data = $this->user->getUserById('id,agent_id', $this->params['id']);
if (empty($user_data)) {
return $this->response(101, '没有用户信息');
} else {
//是否修改客方
if ($this->params['agents_id'] != $user_data['agent_id']) {
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']);
$remark = '修改为' . $agent_data['name'] . '-' . $agent_data['phone'];
} else {
$remark = '用户编辑';
}
$data['start'] = $this->user->edit($this->params, $this->params['id']); //新增或编辑
}
} else {
//新增用户 //新增用户
$where['user_phone'] = $this->params['user_phone']; $where['user_phone'] = $this->params['user_phone'];
$num = $this->user->all_user_count($where); $num = $this->user->all_user_count($where);
...@@ -403,12 +322,27 @@ class Member extends Basic{ ...@@ -403,12 +322,27 @@ class Member extends Basic{
$agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']); $agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']);
$remark = '新增为' . $agent_data['name'] . '-' . $agent_data['phone']; $remark = '新增为' . $agent_data['name'] . '-' . $agent_data['phone'];
$result = $this->user->edit($this->params, $this->params['id']); //新增或编辑 $result = $this->user->edit($this->params, $this->params['id']); //新增或编辑
if ($result == -1) { if ($result == -1) {
return $this->response(101, '该用户已经存在!'); return $this->response(101, '该用户已经存在!');
} }
$this->params['id'] = $result; $this->params['id'] = $result;
} else {
$user_data = $this->user->getUserById('id,agent_id', $this->params['id']);
if (empty($user_data)) {
return $this->response(101, '没有用户信息');
} else {
//是否修改客方
if ($this->params['agents_id'] != $user_data['agent_id']) {
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']);
$remark = '修改为' . $agent_data['name'] . '-' . $agent_data['phone'];
} else {
$remark = '用户编辑';
}
$data['start'] = $this->user->edit($this->params, $this->params['id']); //新增或编辑
}
} }
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']); $this->operating_records($this->userId, $type=3, $remark, $this->params['id']);
......
...@@ -76,18 +76,16 @@ class Remark extends Basic ...@@ -76,18 +76,16 @@ class Remark extends Basic
} }
//跟进人门店 //跟进人门店
if (!empty($this->params['remark_store'])) { if (!empty($this->params['remark_store_id'])) {
$where['f.district_name'] = ['NOT NULL']; $where['b.store_id'] = $this->params['remark_store_id'];
$where['e.store_name'] = ['like', "%{$this->params['remark_store']}%"];
} }
//跟进人部门 //跟进人部门
if (!empty($this->params['remark_district'])) { if (!empty($this->params['remark_district_id'])) {
$where['e.store_name'] = ['NOT NULL']; $where['b.district_id'] = $this->params['remark_district_id'];
$where['f.district_name'] = ['like', "%{$this->params['remark_district']}%"];
} }
$field = 'c.id,a.create_time,a.content,b.name as admin,d.name as label_name,c.user_nick,c.user_phone,a.user_status'; $field = 'c.id,a.create_time,a.content,b.name as admin,d.name as label_name,c.user_name,c.user_phone,a.user_status';
$data['data']['list'] = $u_phone_follow->getFollowList($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where); $data['data']['list'] = $u_phone_follow->getFollowList($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data['data']['total'] = $u_phone_follow->getFollowTotal($where); $data['data']['total'] = $u_phone_follow->getFollowTotal($where);
return $this->response(200,'成功',$data); return $this->response(200,'成功',$data);
......
...@@ -12,6 +12,7 @@ namespace app\index\extend; ...@@ -12,6 +12,7 @@ namespace app\index\extend;
use app\model\AAgents; use app\model\AAgents;
use app\model\GHousesToAgents; use app\model\GHousesToAgents;
use app\model\GOperatingRecords; use app\model\GOperatingRecords;
use app\model\Users;
use think\Controller; use think\Controller;
use think\Request; use think\Request;
use think\Response; use think\Response;
...@@ -128,15 +129,34 @@ class Basic extends Controller ...@@ -128,15 +129,34 @@ class Basic extends Controller
$is_auth = $agents->agentsAuth($auth_id, $this->userId); $is_auth = $agents->agentsAuth($auth_id, $this->userId);
$is_auth = empty($is_auth['id']) ? 0:1; $is_auth = empty($is_auth['id']) ? 0:1;
//处理盘方编辑商铺
if ($is_auth == 0) { if ($is_auth == 0) {
//处理盘方编辑商铺
if ($requestPath == 'index/houseEdit' && isset($this->params['id'])) { if ($requestPath == 'index/houseEdit' && isset($this->params['id'])) {
$agent = new GHousesToAgents();
$where['houses_id'] = $this->params['id']; if (empty($this->params['id'])) {
$where['type'] = 2; $is_auth = 1;
$where['agents_id'] = $this->userId; } else {
$is_ = $agent->getTotal($where); $agent = new GHousesToAgents();
$is_auth = $is_ > 0 ? 1:0; $where['houses_id'] = $this->params['id'];
$where['type'] = 2;
$where['agents_id'] = $this->userId;
$is_ = $agent->getTotal($where);
$is_auth = $is_ > 0 ? 1:0;
}
}
//处理客方编辑客户
if (($requestPath == 'index/pcEditClient' || $requestPath == 'index/pcAddFollow') && isset($this->params['id'])) {
if (empty($this->params['id'])) {
$is_auth = 1;
} else {
$m_user = new Users();
$where['agent_id'] = $this->userId;
$where['id'] = $this->params['id'];
$is_ = $m_user->getUserAgentTotal($where);
$is_auth = $is_ > 0 ? 1:0;
}
} }
} }
......
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
× ×
</button> </button>
<h4 class="modal-title"> <h4 class="modal-title">
角色设置 绑定手机
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
<form class="form form-inline" method="get" action="/admin.php/admin/user/index.html"> <form class="form form-inline" method="get" action="/admin.php/admin/user/index.html">
<div class="form-group"> <div class="form-group">
<div class="input-group search-form"> <div class="input-group search-form">
<input type="text" name="search" class="form-control search-input pull-right" value="" placeholder="请输入ID/部分url/名称"> <input type="text" name="search" class="form-control" value="" placeholder="请输入ID/部分url/名称" onkeydown="if(event.keyCode==13){event.keyCode=0;event.returnValue=false;}">
<!--<input class="form-control btn6 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="industry_type" placeholder="请输入ID/部分url/名称" type="text" value="" name="search">-->
<span class="input-group-btn"> <span class="input-group-btn">
<button id="search" type="button" class="btn btn-success search-btn"><i class="glyphicon glyphicon-search"></i></button> <button id="search" type="button" class="btn btn-success search-btn"><i class="glyphicon glyphicon-search"></i></button>
</span> </span>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<form class="form form-inline" method="get" action="/admin.php/admin/user/index.html"> <form class="form form-inline" method="get" action="/admin.php/admin/user/index.html">
<div class="form-group"> <div class="form-group">
<div class="input-group search-form"> <div class="input-group search-form">
<input type="text" name="search" class="form-control search-input pull-right" value="" placeholder="请输入ID/用户名/昵称"> <input type="text" name="search" class="form-control search-input pull-right" value="" placeholder="请输入ID/用户名/昵称" onkeydown="if(event.keyCode==13){event.keyCode=0;event.returnValue=false;}">
<span class="input-group-btn"> <span class="input-group-btn">
<button id="search" type="button" class="btn btn-success search-btn"><i class="glyphicon glyphicon-search"></i></button> <button id="search" type="button" class="btn btn-success search-btn"><i class="glyphicon glyphicon-search"></i></button>
</span> </span>
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<input type="hidden" class="page-load" id="getCollection" /> <input type="hidden" class="page-load" id="getCollection" />
<style> <style>
.modal-body { .modal-body {
/*height: 600px;*/
overflow-y: auto; overflow-y: auto;
padding-bottom: 60px;
} }
.user-ul2 { .user-ul2 {
...@@ -35,7 +33,6 @@ ...@@ -35,7 +33,6 @@
.img-pre-ul { .img-pre-ul {
padding-left: 0; padding-left: 0;
overflow: hidden; overflow: hidden;
/*width: 100%;*/
} }
/*图片上传相关样式*/ /*图片上传相关样式*/
...@@ -239,7 +236,7 @@ ...@@ -239,7 +236,7 @@
<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>
<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> <th class="text-center">商铺地址</th>
...@@ -296,6 +293,9 @@ ...@@ -296,6 +293,9 @@
<div class="modal-body" id="del_msg"> <div class="modal-body" id="del_msg">
实付金额:<input type="number" id='real_money' /> 实付金额:<input type="number" id='real_money' />
</div> </div>
<div class="modal-body" id="del_msg">
手续费:&nbsp;&nbsp;&nbsp;<input type="number" id='real_money2' />
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭 <!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
</tr> </tr>
<tr class="maintable-tr-bar"> <tr class="maintable-tr-bar">
<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> <th class="text-center">商铺号</th>
<th class="text-center">成交客户</th> <th class="text-center">成交客户</th>
...@@ -171,6 +172,7 @@ ...@@ -171,6 +172,7 @@
<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>
<th class="text-center">操作</th>
</tr> </tr>
</thead> </thead>
<tbody class="text-center" id="maid_new_table_list"> <tbody class="text-center" id="maid_new_table_list">
......
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="houseFollowUp" />
<style>
.modal-body {
/*height: 600px;*/
overflow-y: auto;
padding-bottom: 60px;
}
.user-ul2 {
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
}
.user-ul2 li {
list-style: none;
line-height: 30px;
}
.money_total_two {
font-weight: bold;
font-size: 15px;
}
#search {
float: left;
}
#reset {
float: left;
}
#district_id {
width: 16%!important;
}
#follow_up_con{
width: 32%!important;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="javascript:;">商铺跟进列表</a>
</li>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="10">
<form id="form_search">
<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_start" name="start_date1" type="date">
<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_end" name="end_date1" type="date">
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="houseID" placeholder="商铺ID" type="text" value="">-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="house_title" placeholder="商铺名称" type="text" value="">-->
<input class="form-control btn4 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="follow_up_con" placeholder="跟进内容" type="text" value="">
<!--<select class="form-control btn4 ld-Marheight input" name="" id="district_id">
<option value="">跟进人所在部门</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>-->
<!--<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_phone" placeholder="用户姓名或电话" type="text" value="">
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
</td>
</tr>
<tr>
<th class="text-center">跟进时间</th>
<th class="text-center">跟进内容</th>
<th class="text-center">跟进人</th>
<th class="text-center">商铺ID</th>
<th class="text-center">商铺名称</th>
<!--<th class="text-center">操作</th>-->
</tr>
</thead>
<tbody class="text-center" id="follow_list">
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--时间轴-->
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<div class="form-group"> <div class="form-group">
<label for="shangpuType">商铺类型</label> <label for="shangpuType">商铺类型</label>
<select class="form-control" name="shangpuType" id="shangpuType" data-alert="请选择商铺类型"> <select class="form-control" name="shangpuType" id="shangpuType" data-alert="请选择商铺类型">
<option value="">请选择</option>
<option value="0">商场</option> <option value="0">商场</option>
<option value="1">街铺</option> <option value="1">街铺</option>
</select> </select>
...@@ -194,7 +195,7 @@ ...@@ -194,7 +195,7 @@
<label for="">进场费</label> <label for="">进场费</label>
<div class="input-group"> <div class="input-group">
<input type="number" class="form-control input-100-width" id="jinchangPrice" placeholder="请输入" data-alert="请填写进场费!"> <input type="number" class="form-control input-100-width" id="jinchangPrice" placeholder="请输入" data-alert="请填写进场费!">
<div class="input-group-addon">/月</div> <div class="input-group-addon"></div>
</div> </div>
</div> </div>
</li> </li>
......
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="inspectionRecord" />
<style>
.modal-body {
/*height: 600px;*/
overflow-y: auto;
padding-bottom: 60px;
}
.user-ul2 {
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
}
.user-ul2 li {
list-style: none;
line-height: 30px;
}
.money_total_two {
font-weight: bold;
font-size: 15px;
}
#search {
float: left;
}
#reset {
float: left;
}
#district_id {
width: 16%!important;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="javascript:;">约带看记录</a>
</li>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<!--同步app-->
<!--<tr>
<td colspan="10">
<form id="form_search">
<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_start" name="start_date1" type="date">
<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_end" name="end_date1" type="date">
<select class="form-control btn4 ld-Marheight input" name="" id="district_id">
<option value="">约带看人所在部门</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>
<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_phone" placeholder="约带看人手机号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="house_title" placeholder="商铺名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="report_agent_phone" placeholder="客户手机号" type="text" value="">
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
</td>
</tr>-->
<tr>
<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>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody class="text-center" id="follow_list">
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--时间轴-->
<!--时间轴-->
<div class="modal fade" id="modal-time" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title">
时间轴
</h4>
</div>
<div class="modal-body" class="iframe-div-parent">
<iframe class="iframe-time-line"></iframe>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
...@@ -47,8 +47,14 @@ ...@@ -47,8 +47,14 @@
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_name" placeholder="跟进人姓名" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_name" placeholder="跟进人姓名" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_phone" placeholder="跟进人手机号" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_phone" placeholder="跟进人手机号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_store" placeholder="跟进人所在门店" type="text" value=""> <!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_store" placeholder="跟进人所在门店" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_district" placeholder="跟进人所在部门" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="remark_district" placeholder="跟进人所在部门" type="text" value="">-->
<select class="form-control btn4 ld-Marheight input" name="" id="district_id">
<option value="">跟进人所在部门</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>
<span class="btn btn-info btn3 ld-Marheight" id="search_t">搜索</span> <span class="btn btn-info btn3 ld-Marheight" id="search_t">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span> <span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
......
...@@ -51,13 +51,15 @@ class ACollectHouse extends Model ...@@ -51,13 +51,15 @@ class ACollectHouse extends Model
* 查询收藏数据 * 查询收藏数据
* 朱伟 2018-07-04 * 朱伟 2018-07-04
*/ */
public function getCollectList($field,$params) public function getCollectList($pageNo,$pageSize,$field,$params)
{ {
$result = Db::table($this->table) $result = Db::table($this->table)
->field($field) ->field($field)
->alias('CollectUser') ->alias('CollectUser')
->join('g_houses Houses', 'CollectUser.house_id = Houses.id', 'left') ->join('g_houses Houses', 'CollectUser.house_id = Houses.id', 'left')
->where($params) ->where($params)
->limit($pageSize)
->page($pageNo)
->select(); ->select();
//dump($this->getLastSql()); //dump($this->getLastSql());
return $result; return $result;
......
...@@ -49,13 +49,15 @@ class ACollectUser extends Model ...@@ -49,13 +49,15 @@ class ACollectUser extends Model
* 查询收藏数据 * 查询收藏数据
* 朱伟 2018-07-04 * 朱伟 2018-07-04
*/ */
public function getCollectList($field,$params) public function getCollectList($pageNo,$pageSize,$field,$params)
{ {
$result = Db::table($this->table) $result = Db::table($this->table)
->field($field) ->field($field)
->alias('CollectUser') ->alias('CollectUser')
->join('u_users Users', 'CollectUser.user_id = Users.id', 'left') ->join('u_users Users', 'CollectUser.user_id = Users.id', 'left')
->where($params) ->where($params)
->limit($pageSize)
->page($pageNo)
->select(); ->select();
//dump($this->getLastSql()); //dump($this->getLastSql());
return $result; return $result;
......
...@@ -232,4 +232,16 @@ class AuthGroup extends BaseModel ...@@ -232,4 +232,16 @@ class AuthGroup extends BaseModel
return $this->where($where) return $this->where($where)
->value($key); ->value($key);
} }
/**
* 根据id获取单个字段值
*
* @param $id
* @param $fields
* @return mixed
*/
public function getAuthGroupById($id, $fields)
{
return $this->where('id', $id)->value($fields);
}
} }
...@@ -195,4 +195,16 @@ class AuthRule extends BaseModel ...@@ -195,4 +195,16 @@ class AuthRule extends BaseModel
->where($where) ->where($where)
->find(); ->find();
} }
/**
* 根据id获取单个字段值
*
* @param $id
* @param $fields
* @return mixed
*/
public function getAuthRuleByName($name, $fields)
{
return $this->where('name', $name)->value($fields);
}
} }
\ No newline at end of file
...@@ -150,16 +150,17 @@ class BindingPhone extends BaseModel ...@@ -150,16 +150,17 @@ class BindingPhone extends BaseModel
* @param $phone_b * @param $phone_b
* @param $record * @param $record
* @param $time * @param $time
* @param $result * @param $subs_id
* @param string $mappingId * @param $request_id
* @param string $mapping_id
* @param int $type * @param int $type
* @param int $status 绑定状态 * @param int $status
* @return int|string * @return int|string
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function recordBindPhone($phone_x, $phone_a, $phone_b, $record, $time, $result, $mappingId = '', $type = 1, $status = 1) public function recordBindPhone($phone_x, $phone_a, $phone_b, $record, $time, $subs_id, $request_id, $mapping_id = '', $type = 1, $status = 1)
{ {
$m_ali_phone = new AliYunPhone(); $m_ali_phone = new AliYunPhone();
$phone_id = $m_ali_phone->field('id,bind_num')->where('phone_x', $phone_x)->find(); $phone_id = $m_ali_phone->field('id,bind_num')->where('phone_x', $phone_x)->find();
...@@ -168,9 +169,9 @@ class BindingPhone extends BaseModel ...@@ -168,9 +169,9 @@ class BindingPhone extends BaseModel
$insert_data['phone_a'] = $phone_a; $insert_data['phone_a'] = $phone_a;
$insert_data['phone_b'] = $phone_b; $insert_data['phone_b'] = $phone_b;
$insert_data['subsId'] = $result->SecretBindDTO->SubsId; $insert_data['subsId'] = $subs_id;
$insert_data['requestId'] = $result->RequestId; $insert_data['requestId'] = $request_id;
$insert_data['mappingId'] = $mappingId; $insert_data['mappingId'] = $mapping_id;
$insert_data['record'] = $record; $insert_data['record'] = $record;
$insert_data['aliYun_phone_id'] = $phone_id['id']; $insert_data['aliYun_phone_id'] = $phone_id['id'];
$insert_data['expiry_date'] = $time; $insert_data['expiry_date'] = $time;
......
...@@ -180,6 +180,7 @@ class GHouses extends BaseModel ...@@ -180,6 +180,7 @@ class GHouses extends BaseModel
->page($pageNo) ->page($pageNo)
->select(); ->select();
$house_id = array(); $house_id = array();
$house_ext = new GHousesExt();
foreach ($data as $k => $v) { foreach ($data as $k => $v) {
$house_id[$k] = $v['id']; $house_id[$k] = $v['id'];
$v->create_time = date('Y-m-d', strtotime($v->create_time)); $v->create_time = date('Y-m-d', strtotime($v->create_time));
......
...@@ -217,8 +217,6 @@ class UPhoneFollowPp extends BaseModel ...@@ -217,8 +217,6 @@ class UPhoneFollowPp extends BaseModel
->join('a_agents b','a.agent_id = b.id', 'left') ->join('a_agents b','a.agent_id = b.id', 'left')
->join('u_users c','a.user_id = c.id', 'left') ->join('u_users c','a.user_id = c.id', 'left')
->join('u_labels d','d.id = a.labels_id', 'left') ->join('u_labels d','d.id = a.labels_id', 'left')
->join('a_store e', 'b.store_id = e.id', 'left')
->join('a_district f', 'b.district_id= f.id', 'left')
->where($params) ->where($params)
->order($order_) ->order($order_)
->limit($pageSize) ->limit($pageSize)
...@@ -237,8 +235,6 @@ class UPhoneFollowPp extends BaseModel ...@@ -237,8 +235,6 @@ class UPhoneFollowPp extends BaseModel
return $this->alias('a') return $this->alias('a')
->join('a_agents b','a.agent_id = b.id', 'left') ->join('a_agents b','a.agent_id = b.id', 'left')
->join('u_users c','a.user_id = c.id', 'left') ->join('u_users c','a.user_id = c.id', 'left')
->join('a_store e', 'b.store_id = e.id', 'left')
->join('a_district f', 'b.district_id= f.id', 'left')
->where($params) ->where($params)
->count(); ->count();
} }
......
...@@ -267,6 +267,9 @@ class Users extends Model ...@@ -267,6 +267,9 @@ class Users extends Model
if (!empty($data['area_demand'])) { if (!empty($data['area_demand'])) {
$insert_data['area_demand'] = $data['area_demand']; $insert_data['area_demand'] = $data['area_demand'];
} }
if (!empty($data['vip'])) {
$insert_data['vip'] = $data['vip'];
}
if ($id && $id > 0) { if ($id && $id > 0) {
//修改 //修改
$insert_data['update_time'] = date('Y-m-d H:i:s'); $insert_data['update_time'] = date('Y-m-d H:i:s');
...@@ -351,7 +354,7 @@ class Users extends Model ...@@ -351,7 +354,7 @@ class Users extends Model
public function useraction_search_user_res($user_id, int $referrer = 0) public function useraction_search_user_res($user_id, int $referrer = 0)
{ {
$field = 'id as user_id,agent_id,sex,user_nick,user_name,user_pic,user_status,user_phone,create_time, $field = 'id as user_id,agent_id,sex,user_nick,user_name,user_pic,user_status,user_phone,create_time,
referrer_source,referrer_id,registration_time,industry_type,price_demand,area_demand,source'; referrer_source,referrer_id,registration_time,industry_type,price_demand,area_demand,source,vip,first_login_time';
$data = db('u_users') $data = db('u_users')
->where('id', $user_id) ->where('id', $user_id)
->field($field) ->field($field)
...@@ -497,7 +500,7 @@ class Users extends Model ...@@ -497,7 +500,7 @@ class Users extends Model
//->where('create_time','< time',$Two_days_ago)//小于两天前,即排除48小时内受保护的客户 //->where('create_time','< time',$Two_days_ago)//小于两天前,即排除48小时内受保护的客户
->limit($pagesize) ->limit($pagesize)
->page($pagenum) ->page($pagenum)
->field('id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand') ->field('id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip')
->select(); ->select();
} }
......
...@@ -45,6 +45,7 @@ Route::group('app_broker', [ ...@@ -45,6 +45,7 @@ Route::group('app_broker', [
'daily_achieve_ywy' => [ 'app_broker/index/daily_achieve_ywy', [ 'method' => 'get' ] ], 'daily_achieve_ywy' => [ 'app_broker/index/daily_achieve_ywy', [ 'method' => 'get' ] ],
'customerinfo_genjin' => [ 'app_broker/index/customerinfo_genjin', [ 'method' => 'get' ] ], 'customerinfo_genjin' => [ 'app_broker/index/customerinfo_genjin', [ 'method' => 'get' ] ],
'timeline_pc' => [ 'app_broker/index/timeline_pc', [ 'method' => 'get' ] ], 'timeline_pc' => [ 'app_broker/index/timeline_pc', [ 'method' => 'get' ] ],
'shop_detail_pc' => [ 'app_broker/index/shop_detail_pc', [ 'method' => 'get' ] ],
'bargaininfo_detail_pc' => [ 'app_broker/index/bargaininfo_detail_pc', [ 'method' => 'get' ] ], 'bargaininfo_detail_pc' => [ 'app_broker/index/bargaininfo_detail_pc', [ 'method' => 'get' ] ],
'customerinfo_customer_add' => [ 'app_broker/index/customerinfo_customer_add', [ 'method' => 'get' ] ], 'customerinfo_customer_add' => [ 'app_broker/index/customerinfo_customer_add', [ 'method' => 'get' ] ],
'customerinfo_details_new' => [ 'app_broker/index/customerinfo_details_new', [ 'method' => 'get' ] ], 'customerinfo_details_new' => [ 'app_broker/index/customerinfo_details_new', [ 'method' => 'get' ] ],
...@@ -73,7 +74,6 @@ Route::group('index', [ ...@@ -73,7 +74,6 @@ Route::group('index', [
//user列表 //user列表
'users_list' => [ 'index/member/getUserList', [ 'method' => 'get' ] ], 'users_list' => [ 'index/member/getUserList', [ 'method' => 'get' ] ],
'user_add' => [ 'index/member/user_add', [ 'method' => 'post' ] ],
'del_user' => [ 'index/member/delUser', [ 'method' => 'post' ] ], 'del_user' => [ 'index/member/delUser', [ 'method' => 'post' ] ],
'pcAddFollow' => [ 'index/member/pcAddFollow', [ 'method' => 'post' ] ], 'pcAddFollow' => [ 'index/member/pcAddFollow', [ 'method' => 'post' ] ],
'pcEditClient' => [ 'index/member/pcEditClient', [ 'method' => 'post | get' ] ], 'pcEditClient' => [ 'index/member/pcEditClient', [ 'method' => 'post | get' ] ],
...@@ -227,11 +227,12 @@ Route::group('index', [ ...@@ -227,11 +227,12 @@ Route::group('index', [
'getTallAgeList' => [ 'index/Finance/getTallAgeList', [ 'method' => 'GET' ] ], //税费承担明细表 'getTallAgeList' => [ 'index/Finance/getTallAgeList', [ 'method' => 'GET' ] ], //税费承担明细表
'getCommissionTotalList' => [ 'index/Finance/getCommissionTotalList', [ 'method' => 'GET' ] ], //分佣提成汇总表 'getCommissionTotalList' => [ 'index/Finance/getCommissionTotalList', [ 'method' => 'GET' ] ], //分佣提成汇总表
'getCollection' => [ 'index/Collection/getCollection', [ 'method' => 'post|get' ] ],//收款记录 'getCollection' => [ 'index/Collection/getCollection', [ 'method' => 'post|get' ] ],//收款记录
'addRealMoney' => [ 'index/Collection/addRealMoney', [ 'method' => 'post' ] ],//新增实收 'addRealMoney' => [ 'index/Collection/addRealMoney', [ 'method' => 'post|get' ] ],//新增实收
'visitShop' => [ 'index/Supervise/visitShop', [ 'method' => 'get' ] ],//门店拜访 'visitShop' => [ 'index/Supervise/visitShop', [ 'method' => 'get' ] ],//门店拜访
'carryOut' => [ 'index/Supervise/carryOut', [ 'method' => 'get' ] ],//监督执行 'carryOut' => [ 'index/Supervise/carryOut', [ 'method' => 'get' ] ],//监督执行
'toReportListOne' => [ 'index/Finance/toReportListOne', [ 'method' => 'POST' ] ], //回到一级审核 'toReportListOne' => [ 'index/Finance/toReportListOne', [ 'method' => 'POST' ] ], //回到一级审核
'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单 'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单
'delPartialCommission' => [ 'index/Finance/delPartialCommission', [ 'method' => 'POST' ] ], //删除分佣方
'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存 'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存
'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片 'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片
'receiptImgList' => [ 'index/Collection/receiptImgList', [ 'method' => 'post|get' ] ],//收款列表-收款图片列表 'receiptImgList' => [ 'index/Collection/receiptImgList', [ 'method' => 'post|get' ] ],//收款列表-收款图片列表
...@@ -259,6 +260,11 @@ Route::group('index', [ ...@@ -259,6 +260,11 @@ Route::group('index', [
'new_text' => [ 'index/news/newText', [ 'method' => 'GET' ] ], //删除商学院文章 'new_text' => [ 'index/news/newText', [ 'method' => 'GET' ] ], //删除商学院文章
'agentEvaluateNumAndFraction' => [ 'index/agent/agentEvaluateNumAndFraction', [ 'method' => 'POST|GET' ] ],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03 'agentEvaluateNumAndFraction' => [ 'index/agent/agentEvaluateNumAndFraction', [ 'method' => 'POST|GET' ] ],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg' => [ 'index/UploadImg/uploadImg', [ 'method' => 'POST' ] ],//全局图片上传 'uploadImg' => [ 'index/UploadImg/uploadImg', [ 'method' => 'POST' ] ],//全局图片上传
'followUpList' => [ 'index/HouseFollowUp/followUpList', [ 'method' => 'GET' ] ],//商铺跟进liu
'inspectionRecordList' => [ 'index/InspectionRecord/inspectionRecordList', [ 'method' => 'GET' ] ],//约带看记录liu
]); ]);
...@@ -400,7 +406,8 @@ Route::group('broker', [ ...@@ -400,7 +406,8 @@ Route::group('broker', [
'labelEdit' => [ 'api_broker/label/index', [ 'method' => 'get|post' ] ], //编辑标签 'labelEdit' => [ 'api_broker/label/index', [ 'method' => 'get|post' ] ], //编辑标签
'getLabelsList' => [ 'api_broker/label/getLabelsList', [ 'method' => 'get' ] ], //标签列表 'getLabelsList' => [ 'api_broker/label/getLabelsList', [ 'method' => 'get' ] ], //标签列表
'add_phone_follow_up' => [ 'api_broker/broker/add_phone_follow_up', [ 'method' => 'get|post' ] ],//新增-客户电话跟进 'add_phone_follow_up' => [ 'api_broker/broker/add_phone_follow_up', [ 'method' => 'get|post' ] ],//新增-客户电话跟进
'useraction_search' => [ 'api_broker/broker/useraction_search', [ 'method' => 'get|post' ] ],//新增-客户电话跟进 'useraction_search' => [ 'api_broker/broker/useraction_search', [ 'method' => 'get|post' ] ],//客户电话跟进
'vip' => [ 'api_broker/broker/vip', [ 'method' => 'get|post' ] ],
'userStateSearch' => [ 'api_broker/broker/userStateSearch', [ 'method' => 'get|post' ] ],//新增-客户电话跟进 'userStateSearch' => [ 'api_broker/broker/userStateSearch', [ 'method' => 'get|post' ] ],//新增-客户电话跟进
'user_search' => [ 'api_broker/broker/user_search', [ 'method' => 'get|post' ] ],//客户搜索 'user_search' => [ 'api_broker/broker/user_search', [ 'method' => 'get|post' ] ],//客户搜索
'bindAXB' => [ 'api_broker/CellPhone/bindAXB', [ 'method' => 'post' ] ],//隐私号码 'bindAXB' => [ 'api_broker/CellPhone/bindAXB', [ 'method' => 'post' ] ],//隐私号码
......
...@@ -300,24 +300,30 @@ span.dot-block>mark{ ...@@ -300,24 +300,30 @@ span.dot-block>mark{
overflow: hidden; overflow: hidden;
position: fixed; position: fixed;
width: 7.5rem; width: 7.5rem;
box-sizing: border-box;
padding: .1rem .2rem;
left: 0; left: 0;
bottom: .1rem; bottom: 0;
display: flex;
justify-content: space-between;
background-color: white;
box-shadow: 0 -.03rem .1rem rgba(0, 0, 0, .1);
} }
.bottom-btn-area>a{ .bottom-btn-area>a{
overflow: hidden; flex: 1;
} }
.bottom-btn-area>a:nth-of-type(1){ .bottom-btn-area>a:nth-of-type(1){
float: left; flex: 1.28rem 0 0;
margin-left: 1.04rem;
} }
.bottom-btn-area>a:nth-of-type(2){ .bottom-btn-area>a:nth-of-type(2),
float: right; .bottom-btn-area>a:nth-of-type(3){
margin-right: 1.04rem; flex: 2.6rem 0 0;
display: flex;
align-items: center;
justify-content: center;
} }
.bottom-btn-area>a>img{ .bottom-btn-area>a>img{
float: left; width: 100%;
width: 2.24rem;
height: 1.6rem;
} }
/*跟进模态框区域*/ /*跟进模态框区域*/
......
@charset "utf-8";
body{
background-color: white;
font-size: 14px;
}
main>section{
padding: 20px;
}
table{
display: block;
}
table td{
box-sizing: border-box;
padding: 5px 10px;
width: 260px;
}
.tr-seat{
height: 20px;
}
tbody>tr:nth-of-type(10),
tbody>tr:nth-of-type(12),
tbody>tr:nth-of-type(14),
tbody>tr:nth-of-type(16){
margin-top: 20px;
border-top: 1px solid #999;
}
.img-list>li{
width:140px;
height: 140px;
}
.img-list>li+li{
margin-left: 20px;
}
.img-list>li>img{
width: 100%;
height: 100%;
object-fit: cover;
}
.phone-list>li{
background-color: #e0e0e0;
}
.phone-list>li+li{
margin-left: 20px;
}
...@@ -61,7 +61,8 @@ function loadMain(){ ...@@ -61,7 +61,8 @@ function loadMain(){
url: ServerHostTempC + '/broker/useraction_search', url: ServerHostTempC + '/broker/useraction_search',
data: { data: {
'AuthToken': _token, 'AuthToken': _token,
'user_id': Number(_customerId) 'user_id': Number(_customerId),//客户id
'agent_id': Number(_userId)//当前用户的id
}, },
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
...@@ -70,6 +71,11 @@ function loadMain(){ ...@@ -70,6 +71,11 @@ function loadMain(){
console.log(data); console.log(data);
if(typeof data === 'object') { if(typeof data === 'object') {
if (data.code == 200) { if (data.code == 200) {
if(data.data.is_collect == '1'){
//收藏状态 1:表示已经收藏 2:暂未收藏
$('#mark_btn').attr('data-ismark','1').find('img').attr('src', '/app/images/icon_collection_choice@2x.png');
};
$('#customer_code').html(data['data']['user_info']['user_id']); $('#customer_code').html(data['data']['user_info']['user_id']);
$('#customer_name, #name').html((data['data']['user_info']['user_name'] == null?'':data['data']['user_info']['user_name'])+(data['data']['user_info']['user_nick']?('('+data['data']['user_info']['user_nick']+')'):'')); $('#customer_name, #name').html((data['data']['user_info']['user_name'] == null?'':data['data']['user_info']['user_name'])+(data['data']['user_info']['user_nick']?('('+data['data']['user_info']['user_nick']+')'):''));
if(data['data']['user_info']['sex']==2){ if(data['data']['user_info']['sex']==2){
...@@ -161,6 +167,56 @@ function loadMain(){ ...@@ -161,6 +167,56 @@ function loadMain(){
$('.record-main>ul').html('<div id="zanwu_data" class="zanwu_data" style="display: block;">暂无数据...</div>'); $('.record-main>ul').html('<div id="zanwu_data" class="zanwu_data" style="display: block;">暂无数据...</div>');
} }
//点击收藏按钮触发的事件
var isAjaxIng = false;//是否正在执行请求操作
$('#mark_btn').click(function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
var isMark = ((_this.attr('data-ismark')=='1')?true:false);//点击的时候,是否是已经收藏的状态,记录
if(!isAjaxIng){
isAjaxIng = true;
//只有没有在执行请求操作的时候,才能进行请求
$.ajax({
type: 'GET',
url: ServerHostTempC + '/broker/addCollectUser',
data: {
'AuthToken': _token,
'agents_id': _userId,//当前用户的id
'user_id': _customerId,//客户id
'status': isMark?2:1
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if (data.code == 200) {
isAjaxIng = false;
if(isMark){
_this.attr('data-ismark', '0').find('img').attr('src', '/app/images/icon_collection@2x.png');
}else{
_this.attr('data-ismark', '1').find('img').attr('src', '/app/images/icon_collection_choice@2x.png');
}
}else {
layerTipsX(data['msg']);
};
}else{
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
}
});
}
});
//添加报备的点击事件 //添加报备的点击事件
$('#baobei_btn').click(function(){ $('#baobei_btn').click(function(){
......
'use strict';
require(['vue', 'css!style/shop_detail_pc.css', 'jquery0325', 'common'],function(Vue, VConsole){
var shop_id = getUrlParam('shop_id');
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var vm = new Vue({
el: '#app',
data: {
user_info_obj,
d: {}
},
created: function() {
var _this = this;
document.body.style.display = 'block';
$.ajax({
type: 'get',
url: '/broker/getShopDetail',
data: {
'id': shop_id,
'site_area': 4,//pc后台固定传4
'AuthToken': _this.user_info_obj.AuthToken
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
_this.d = _data.data;
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
methods: {
dealPriceSwicth: function(t) {
let _this = this;
if(t == '1'){
return {
}
}else if(t == '2'){
return {
}
}else{
return {
}
}
}
},
computed: {
dealPrice: function(){
let _this = this;
if(_this.d.rent_type == '1'){
return '租金均价 :' + _this.d.rent_price + '元/月';
}else if(_this.d.rent_type == '2'){
return '营业额扣点 :' + _this.d.rent_price + '%';
}else{
return '租金均价 :' + _this.d.rent_price + '元/天/m²';
}
},
dealArea: function(){
let _this = this;
if(_this.d.shop_type){
//街铺
return _this.d.shop_area_start + '㎡';
}else{
//商场
return _this.d.shop_area_start + '㎡—' + _this.d.shop_area_end + '㎡';
}
}
}
});
});
...@@ -239,7 +239,40 @@ a:hover{ ...@@ -239,7 +239,40 @@ a:hover{
max-width: 750px; max-width: 750px;
height: 600px; height: 600px;
} }
#modal_shop_detail>div{
width: 1090px;
}
.iframe-shop-detail{
border: none;
width: 100%;
max-width: 1090px;
height: 600px;
}
.menu-sub-alink.active-a{ .menu-sub-alink.active-a{
background-color: #ff9419!important; background-color: #ff9419!important;
} }
/*商铺列表,商铺动态,跟进信息样式*/
.followup-modal-list-area{
height: 450px;
overflow-y: scroll;
}
#modal_followup_table_list>tr>td:nth-of-type(1){
width: 70%;
}
#modal_followup_table_list>tr>td:nth-of-type(2){
width: 15%;
}
#modal_followup_table_list>tr>td:nth-of-type(3){
width: 15%;
}
.followup-modal-comment-area{
padding-top: 30px;
}
.followup-modal-comment-area>textarea{
width: 100%;
height: 80px;
display: block;
margin: 0 auto;
}
...@@ -142,13 +142,16 @@ addtax_ ...@@ -142,13 +142,16 @@ addtax_
#maid_new_btn{ #maid_new_btn{
float: right; float: right;
} }
#maid_table_main>thead th:nth-last-of-type(-n+6){ #maid_table_main>thead th:nth-last-of-type(-n+7){
width: 91px; width: 91px;
} }
#maid_table_main>thead th:nth-last-of-type(1){ #maid_table_main>thead th:nth-last-of-type(2){
width: 149px; width: 149px;
} }
#maid_table_main>thead th:nth-last-of-type(1){
width: 40px;
}
.detail-modal-maid-mix-td{ .detail-modal-maid-mix-td{
padding: 0!important; padding: 0!important;
...@@ -304,7 +307,7 @@ addtax_ ...@@ -304,7 +307,7 @@ addtax_
#modal_detail>div { #modal_detail>div {
/*width: 1030px;*/ /*width: 1030px;*/
width: 1250px; width: 1280px;
} }
/*成交信息tab*/ /*成交信息tab*/
......
...@@ -22,7 +22,25 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -22,7 +22,25 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$("#search").click(function() { $("#search").click(function() {
follow.getList(1); follow.getList(1);
}); });
// 部门 门店 二级联动
var _doc = $(document);
follow.getDistrict(function() {
_doc.on('input', '#district_id, #district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
if(_id && _id != '0') {
follow.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="0">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
_this.next().html(_str);
});
} else {};
});
});
$("#reset").click(function() { //重置 $("#reset").click(function() { //重置
document.getElementById("form_search").reset(); document.getElementById("form_search").reset();
}); });
...@@ -140,8 +158,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -140,8 +158,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}; };
params.remark_name = $("#remark_name").val(); params.remark_name = $("#remark_name").val();
params.remark_phone = $("#remark_phone").val(); params.remark_phone = $("#remark_phone").val();
params.remark_store = $("#remark_store").val(); params.remark_store_id = $("#guest_stores").val();
params.remark_district = $("#remark_district").val(); params.remark_district_id = $("#district_id").val();
_startDateObj.val() != '' && (params.start_date = _startDateObj.val()); _startDateObj.val() != '' && (params.start_date = _startDateObj.val());
_endDateObj.val() != '' && (params.end_date = _endDateObj.val()); _endDateObj.val() != '' && (params.end_date = _endDateObj.val());
...@@ -188,6 +206,46 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -188,6 +206,46 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}; };
} }
}); });
},
//调用部门 和 门店的接口
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
} }
}; };
return follow; return follow;
......
...@@ -88,7 +88,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -88,7 +88,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
agent.agent_id = $(this).attr("data-id"); agent.agent_id = $(this).attr("data-id");
agent.getPhoneBindingList(); agent.getPhoneBindingList();
}); });
$(document).delegate(".submit_edit", "click", function() { //提交编辑 $(document).delegate(".submit_edit", "click", function(e) { //提交编辑
e.preventDefault();
e.stopPropagation();
agent.Submit_edit(); agent.Submit_edit();
}); });
...@@ -145,7 +147,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -145,7 +147,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
return; return;
} }
agent.id = $(this).attr("data-id"); agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj); // console.log(user_info_obj);
var params = { var params = {
...@@ -198,7 +200,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -198,7 +200,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
agent.getList(1);
} else { } else {
alert("重复提交"); alert("重复提交");
} }
...@@ -298,8 +299,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -298,8 +299,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
alert('修改成功');
$("#modal-edit").modal('hide'); $("#modal-edit").modal('hide');
agent.getList(1);
} else { } else {
alert(data.msg); alert(data.msg);
} }
......
...@@ -9,7 +9,7 @@ authRule={ ...@@ -9,7 +9,7 @@ authRule={
authRule.event(); authRule.event();
}, },
event:function () { event:function () {
$ (document).delegate ("#search", "click", function () {//点击编辑 $ (document).delegate ("#search", "click", function () {//点击搜索
authRule.getList(1); authRule.getList(1);
}); });
$ (document).delegate (".edit", "click", function () {//点击编辑 $ (document).delegate (".edit", "click", function () {//点击编辑
......
...@@ -927,7 +927,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_s ...@@ -927,7 +927,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_s
$.each($('.addtax-modal-tax-table-datatr'), function(i, v) { $.each($('.addtax-modal-tax-table-datatr'), function(i, v) {
_data['tax['+i+']'] = { _data['tax['+i+']'] = {
'fee': v.childNodes[3].innerHTML, 'fee': v.childNodes[3].innerHTML,
'agent_id': JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))).id, 'agent_id': JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))).id,
'role': v.getAttribute('data-role'), 'role': v.getAttribute('data-role'),
'scale': v.childNodes[2].innerHTML.split('%')[0] 'scale': v.childNodes[2].innerHTML.split('%')[0]
}; };
......
...@@ -55,6 +55,8 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -55,6 +55,8 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
follow.house_id2 = _this.attr("data-id"); follow.house_id2 = _this.attr("data-id");
console.log(follow.house_id2); console.log(follow.house_id2);
$("#real_money").val(_this.attr("data-money")); $("#real_money").val(_this.attr("data-money"));
$("#real_money2").val(_this.attr("data-fee"));
}); });
//编辑-收付金额-保存 //编辑-收付金额-保存
...@@ -164,19 +166,28 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -164,19 +166,28 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}); });
}, },
//编辑-收付金额-保存 //编辑-收付金额-保存
Submit_follow: function() { //提交 Submit_follow: function() {//提交
if(!($("#real_money").val()>0&&$("#real_money2").val()>0)){
alert('实付金额及手续费需大于0')
return false;
}
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
'url': '/index/addRealMoney', 'url': '/index/addRealMoney',
data: { data: {
"collection_id": follow.house_id2, "collection_id": follow.house_id2,
"real_money": $("#real_money").val(), "real_money": $("#real_money").val(),
"transaction_fee": $("#real_money2").val()
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
follow.getList(0); follow.getList(0);
} else {} } else {
alert(data.msg)
}
} }
}); });
}, },
......
define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
house = {
pageNo: 1,
/*第几页*/
pageSize: 10,
/*每页显示多少条*/
id: '',
house_id: '',
type: '',
valueCurrent: '',
ajaxObj: '',
stopstatus: true,
boxphoto: '',
init: function() {
//初始化dot
$(document.body).append(template);
// house.getList(0);
house.event();
},
event: function() {
var _doc = $(document);
function  getPreMonth(date)  {            
var  arr  =  date.split('-');            
var  year  =  arr[0];             
var  month  =  arr[1];             
var  day  =  arr[2];             
var  days  =  new  Date(year,  month,  0);            
days  =  days.getDate();             
var  year2  =  year;            
var  month2  =  parseInt(month)  -  1;            
if (month2  ==  0)  {                
year2  =  parseInt(year2)  -  1;                
month2  =  12;            
}            
var  day2  =  day;            
var  days2  =  new  Date(year2,  month2,  0);            
days2  =  days2.getDate();            
if (day2  >  days2)  {                
day2  =  days2;            
}            
if (month2  <  10)  {                
month2  =  '0'  +  month2;            
}            
var  t2  =  year2  +  '-'  +  month2  +  '-'  +  day2;            
return  t2;        
}
//初始化时间
var myDate = new Date();
var y = myDate.getFullYear();
var m = myDate.getMonth() + 1;
var d = myDate.getDate();
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
var day_start = getPreMonth(day_end);
$('#create_time_start').val(day_start);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
house.getList(0);//商铺跟进列表
// 部门 门店 二级联动
house.getDistrict(function() {
_doc.on('input', '#district_id, #district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
if(_id && _id != '0') {
record.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="0">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
_this.next().html(_str);
});
} else {};
});
});
$("#search").click(function() { //搜索
house.getList(1);
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
$('#guest_stores').html('');
});
},
getList: function(pageNo) { //获取约带看记录列表
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj.AuthToken);
house.pageNo = pageNo;
var params = {};
var start_ = $('#create_time_start').val()+" 00:00:00";
date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
params.start_time =date_start.getTime()*0.001;
console.log(params.start_time);
//结束时间
var end_ = $('#create_time_end').val()+" 23:59:59";
date_end =new Date(Date.parse(end_.replace(/-/g, "/")));
console.log(date_end);
params.end_time =date_end.getTime()*0.001;
//时间转化为时间戳
//var date="2014-05-08 00:22:11";
// date = new Date(Date.parse(date.replace(/-/g, "/")));
// date = date.getTime();
// params.district_id = $('#district_id').val() * 1;
// params.store_id = $('#guest_stores').val() * 1;
// params.user_name = $('#user_name').val();
params.name_or_phone = $('#user_phone').val();
// params.report_agent_phone = $('#report_agent_phone').val();
params.search_content = $('#follow_up_con').val();
params.pageNo = house.pageNo;
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
if( !(params.end_time&&params.start_time)){
alert('请选择时间')
return;
}
$.ajax({
type: 'POST',
url: '/broker/houseFollowUpList', //商铺跟进 对接接口
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('followHouseUp_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.result));
/*分页代码*/
add_page(data.data.total, pageNo, house.pageSize, house.getList);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
//调用部门 和 门店的接口
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
}
};
return house;
});
\ No newline at end of file
...@@ -7,6 +7,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -7,6 +7,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
pageNo: 1, pageNo: 1,
/*第几页*/ /*第几页*/
pageSize: 10, pageSize: 10,
AuthToken: '',
agent_id: 0,
agent_phone: '',
agent_name: '',
/*每页显示多少条*/ /*每页显示多少条*/
id: '', id: '',
house_id: '', house_id: '',
...@@ -17,6 +21,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -17,6 +21,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
ldHtml: $('.phone_list'), ldHtml: $('.phone_list'),
boxphoto: '', boxphoto: '',
exclusive_id: 0, exclusive_id: 0,
isFollowupSaving: false,
init: function() { init: function() {
//初始化dot //初始化dot
$("body").append(template); $("body").append(template);
...@@ -60,6 +65,11 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -60,6 +65,11 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}, },
event: function() { event: function() {
var _doc = $(document); var _doc = $(document);
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
business.AuthToken = user_info_obj.AuthToken;
business.agent_id = user_info_obj.id;
business.phone = user_info_obj.phone;
business.name = user_info_obj.name;
$("#search").click(function() { $("#search").click(function() {
business.getList(1); business.getList(1);
}); });
...@@ -95,7 +105,9 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -95,7 +105,9 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
business.house_id = $(this).attr("data-id"); business.house_id = $(this).attr("data-id");
business.Caozuo(); business.Caozuo();
}); });
$(document).delegate(".submit_follow2", "click", function() { //提交独家 $(document).delegate(".submit_follow2", "click", function(e) { //提交独家
e.preventDefault();
e.stopPropagation();
business.Dujianew(); business.Dujianew();
}); });
...@@ -110,7 +122,9 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -110,7 +122,9 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
} }
}); });
$(document).delegate("#confirm_delete", "click", function() { $(document).delegate("#confirm_delete", "click", function(e) {
e.preventDefault();
e.stopPropagation();
business.delBusiness(); business.delBusiness();
}); });
$(document).delegate(".jia", "click", function() { //加号 $(document).delegate(".jia", "click", function() { //加号
...@@ -249,8 +263,38 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -249,8 +263,38 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
_this.parent().prev().val(_this.html()).attr('data-id', _this.attr('data-id')); _this.parent().prev().val(_this.html()).attr('data-id', _this.attr('data-id'));
_this.parent().html('').hide(); _this.parent().html('').hide();
}); });
// //点击查看,触发定位事件
_doc.on('click', '[href="#modal_detail"]', function(){
var _this = $(this);
if(_this.hasClass('btn-success')){
_this.removeClass('btn-success').addClass('btn-warning');
};
});
//点击跟进,获取商铺跟进动态的接口
_doc.on('click', '[href="#modal_followup"]', function(){
business.id = $(this).attr("data-id");
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
business.getFollowupList();
});
//点击商铺跟进保存按钮,保存数据的接口
_doc.on('click', '#modal_followup_submit_btn', function(e){
e.preventDefault();
e.stopPropagation();
business.followupAdd();
});
//查看点击事件
_doc.on('click', 'a[href="#modal_shop_detail"]', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.removeClass('btn-success').addClass('btn-warning');
var _id = _this.attr('data-id');
console.log(_id);
$('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+_id);
});
}, },
// 获取信息 手机号 名字 // 获取信息 手机号 名字
...@@ -350,7 +394,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -350,7 +394,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) {} else { if(data.code == 200) {
alert('修改成功');
$("#modal-dujia").modal('hide');
} else {
alert('获取失败!'); alert('获取失败!');
} }
...@@ -447,7 +494,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -447,7 +494,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
if(data.data) { if(data.data) {
$("#modal-anch").hide; $("#modal-anch").hide;
} }
business.getList(1);
} else { } else {
$("#modal-anch").hide; $("#modal-anch").hide;
} }
...@@ -592,7 +638,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -592,7 +638,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
business.getList(1);
console.log(666); console.log(666);
} }
} }
...@@ -654,13 +699,76 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -654,13 +699,76 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
business.getList(1); alert('删除成功');
$("#modal-delete").modal('hide'); $("#modal-delete").modal('hide');
} else { } else {
$("#del_msg").html('<span style="color: red">删除失败!</span>'); $("#del_msg").html('<span style="color: red">删除失败!</span>');
} }
} }
}); });
},
getFollowupList: function(){
$.ajax({
'type': 'get',
'url': '/broker/getListByHouseId',
data: {
'house_id': business.id,
'AuthToken': business.AuthToken
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
if(data.data && Array.isArray(data.data) && data.data.length>0) {
var _htmlTemp = '';
$.each(data.data, function(i, v) {
_htmlTemp += '<tr><td>{0}</td><td>{1}</td><td>{2}</td></tr>'.stringFormatObj({
'0': v.step,
'1': v.agent_name,
'2': v.create_time
})
});
$('#modal_followup_table_list').html(_htmlTemp);
}else{
$('#modal_followup_table_list').html('<tr><td>暂无数据</td></tr>');
}
} else {
alert('请登录!');
}
}
});
},
followupAdd: function(){
var _tareaObjVal = $('.followup-modal-comment-area>textarea').val();
if(_tareaObjVal == ''){
alert('内容不能为空');
return false;
};
if(!business.isFollowupSaving){
business.isFollowupSaving = true;
$.ajax({
'type': 'post',
'url': '/broker/addShopFollowUp',
data: {
'house_id': business.id,
'AuthToken': business.AuthToken,
'agent_id': business.agent_id,
'agent_phone': business.agent_phone,
'agent_name': business.agent_name,
'follow_up_info': _tareaObjVal
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
alert('添加成功');
business.isFollowupSaving = false;
$("#modal_followup").modal('hide');
} else {
alert('请登录!');
}
}
});
}
} }
}; };
return business; return business;
......
define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
record = {
pageNo: 1,
/*第几页*/
pageSize: 10,
/*每页显示多少条*/
id: '',
record_id: '',
type: '',
valueCurrent: '',
ajaxObj: '',
stopstatus: true,
boxphoto: '',
init: function() {
//初始化dot
$(document.body).append(template);
record.event();
},
event: function() {
var _doc = $(document);
function  getPreMonth(date)  {            
var  arr  =  date.split('-');            
var  year  =  arr[0];             
var  month  =  arr[1];             
var  day  =  arr[2];             
var  days  =  new  Date(year,  month,  0);            
days  =  days.getDate();             
var  year2  =  year;            
var  month2  =  parseInt(month)  -  1;            
if (month2  ==  0)  {                
year2  =  parseInt(year2)  -  1;                
month2  =  12;            
}            
var  day2  =  day;            
var  days2  =  new  Date(year2,  month2,  0);            
days2  =  days2.getDate();            
if (day2  >  days2)  {                
day2  =  days2;            
}            
if (month2  <  10)  {                
month2  =  '0'  +  month2;            
}            
var  t2  =  year2  +  '-'  +  month2  +  '-'  +  day2;            
return  t2;        
}
//初始化时间
var myDate = new Date();
var y = myDate.getFullYear();
var m = myDate.getMonth() + 1;
var d = myDate.getDate();
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
var day_start = getPreMonth(day_end);
$('#create_time_start').val(day_start);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
record.getList(0);
// 部门 门店 二级联动
record.getDistrict(function() {
_doc.on('input', '#district_id, #district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
if(_id && _id != '0') {
record.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="0">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
_this.next().html(_str);
});
} else {};
});
});
_doc.on('click', 'a[href="#modal-time"]', function(e) { //获取时间轴
record.record_id = $(this).attr("data-id");
e.preventDefault();
e.stopPropagation();
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id=' + record.record_id);
});
$("#search").click(function() { //搜索
record.getList(1);
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
$('#guest_stores').html('');
});
},
getList: function(pageNo) { //获取约带看记录列表
record.pageNo = pageNo;
var params = {};
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj);
console.log(user_info_obj.AuthToken);
// params.district_id = $('#district_id').val() * 1;
// params.store_id = $('#guest_stores').val() * 1;
// params.user_name = $('#user_name').val();
// params.user_phone = $('#user_phone').val();
// params.report_agent_phone = $('#report_agent_phone').val();
// params.house_title = $('#house_title').val();
params.pageNo = record.pageNo;
params.pageSize = record.pageSize;
// var start_ = $('#create_time_start').val()+" 00:00:00";
// date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
// params.start_time =date_start.getTime()*0.001;
// console.log(params.start_time);
// 结束时间
// var end_ = $('#create_time_end').val()+" 23:59:59";
// date_end =new Date(Date.parse(end_.replace(/-/g, "/")));
// console.log(date_end);
// params.end_time =date_end.getTime()*0.001;
params.AuthToken = user_info_obj.AuthToken;
params.agent_id = user_info_obj.id;
params.type = 1;
$.ajax({
type: 'GET',
url: '/broker/reportList', //约带看记录 对接接口
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('inspectionRecord_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data));
/*分页代码*/
add_page(data.data.total, pageNo, record.pageSize, record.getList);
$(".move-block").html(' ');
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
//调用部门 和 门店的接口
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
}
};
return record;
});
\ No newline at end of file
...@@ -53,7 +53,7 @@ $(function(){ ...@@ -53,7 +53,7 @@ $(function(){
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
if (data.code == 200) { if (data.code == 200) {
sessionStorage.setItem('pcUserInfo',encodeURIComponent(JSON.stringify(data.data)));//存储PC后台登录用户所有信息 localStorage.setItem('pcUserInfo',encodeURIComponent(JSON.stringify(data.data)));//存储PC后台登录用户所有信息
location.href = '/admin.php/index/banner'; location.href = '/admin.php/index/banner';
}else { }else {
alert(data['msg']); alert(data['msg']);
......
...@@ -37,7 +37,8 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function ...@@ -37,7 +37,8 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
function menu_bar(fn) { function menu_bar(fn) {
var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$ ("#menu_bar").append (template); $ ("#menu_bar").append (template);
...@@ -70,7 +71,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function ...@@ -70,7 +71,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
} }
$("#logout").click(function () { $("#logout").click(function () {
sessionStorage.removeItem('pcUserInfo'); localStorage.removeItem('pcUserInfo');
}); });
var _doc = $(document); var _doc = $(document);
...@@ -92,6 +93,14 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function ...@@ -92,6 +93,14 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
layerTipsX=function(n){layer.open({content:n,skin:"msg",time:2})};//注册一个layer自定义全局函数 layerTipsX=function(n){layer.open({content:n,skin:"msg",time:2})};//注册一个layer自定义全局函数
}); });
var ServerHost = location.origin;
var ServerHostTempC = 'https://pre2.tonglianjituan.com';
if(~ServerHost.indexOf('run.tonglianjituan.com')){
ServerHostTempC = 'https://run.tonglianjituan.com';
};
if(~ServerHost.indexOf('api.tonglianjituan.com')){
ServerHostTempC = 'https://api.tonglianjituan.com';
};
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = decodeURI(window.location.search).substr(1).match(reg); var r = decodeURI(window.location.search).substr(1).match(reg);
...@@ -124,7 +133,7 @@ String.prototype.stringFormatObj = function(){ ...@@ -124,7 +133,7 @@ String.prototype.stringFormatObj = function(){
* @returns {boolean} * @returns {boolean}
*/ */
function check_auth(auth_rule) { function check_auth(auth_rule) {
var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var result = false; var result = false;
if (user_info_obj.id != 1) { if (user_info_obj.id != 1) {
......
...@@ -213,6 +213,17 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -213,6 +213,17 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
} }
}); });
//详情弹出框,分佣提成里,点击删除触发的事件
_doc.on('click', '.detail-modal-maid-a-del', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
if(confirm('确认删除吗?')){
var _id = _this.closest('tr').attr('data-id');
bargain.deletMaid(_id);
};
});
//详情弹出框,分佣提成里,点击新增,分佣方选择,弹出选择列表触发的事件 //详情弹出框,分佣提成里,点击新增,分佣方选择,弹出选择列表触发的事件
_doc.on('click', '#addmaid_select_ul>li', function(e){ _doc.on('click', '#addmaid_select_ul>li', function(e){
e.preventDefault(); e.preventDefault();
...@@ -948,6 +959,40 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -948,6 +959,40 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
} }
}); });
}, },
//分佣提成,删除
deletMaid: function(id){
$.ajax({
type: 'POST',
url: '/index/delPartialCommission',
data: {
'partial_id': id
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
alert('删除成功');
bargain.maidShow();
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
//转到一级审核 //转到一级审核
transFirstExamine: function(){ transFirstExamine: function(){
$.ajax({ $.ajax({
...@@ -1056,7 +1101,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -1056,7 +1101,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(data.code == 200) { if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML);
$("#maintable_list").html(doTtmpl(data.data)); $("#maintable_list").html(doTtmpl(data.data));
// var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); // var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo')));
/*分页代码*/ /*分页代码*/
add_page(data.data.total, pageNo, bargain.pageSize, bargain.getList); add_page(data.data.total, pageNo, bargain.pageSize, bargain.getList);
......
...@@ -251,7 +251,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -251,7 +251,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(data.code == 200) { if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML);
$("#maintable_list").html(doTtmpl(data.data)); $("#maintable_list").html(doTtmpl(data.data));
// var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); // var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo')));
/*分页代码*/ /*分页代码*/
add_page(data.data.total, pageNo, bargain.pageSize, bargain.getList); add_page(data.data.total, pageNo, bargain.pageSize, bargain.getList);
......
...@@ -119,7 +119,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -119,7 +119,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
}); });
}; };
var _pcUserInfo = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); var _pcUserInfo = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo')));
console.log(_pcUserInfo); console.log(_pcUserInfo);
$('#pf_tel_jia').prev().find('input').val(_pcUserInfo.id + '-' + _pcUserInfo.name + '-' + _pcUserInfo.phone).attr('data-id', _pcUserInfo.id); $('#pf_tel_jia').prev().find('input').val(_pcUserInfo.id + '-' + _pcUserInfo.name + '-' + _pcUserInfo.phone).attr('data-id', _pcUserInfo.id);
$('#acqx_tel_jia').prev().find('input').val(_pcUserInfo.id + '-' + _pcUserInfo.name + '-' + _pcUserInfo.phone).attr('data-id', _pcUserInfo.id); $('#acqx_tel_jia').prev().find('input').val(_pcUserInfo.id + '-' + _pcUserInfo.name + '-' + _pcUserInfo.phone).attr('data-id', _pcUserInfo.id);
...@@ -280,8 +280,8 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -280,8 +280,8 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_discExternalObj.val(_data['disc']); //对外区 _discExternalObj.val(_data['disc']); //对外区
_addressInternalObj.val(_data['internal_address']); //对内详细地址 _addressInternalObj.val(_data['internal_address']); //对内详细地址
_longitudeObj.val(_data['longitude']), //经度 _longitudeObj.val(_data['longitude']), //经度
_latitudeObj.val(_data['latitude']), //纬度 _latitudeObj.val(_data['latitude']), //纬度
_trafficObj.val(_data['traffic']); //交通 _trafficObj.val(_data['traffic']); //交通
_hasMovedObj.val(_data['enter_num']); //已入住 _hasMovedObj.val(_data['enter_num']); //已入住
_yingyeTimeObj.val(_data['do_business_date']); //营业时间 _yingyeTimeObj.val(_data['do_business_date']); //营业时间
_data['opening_date'] && _kaipanTimeObj.val(_data['opening_date'].split(' ')[0]); //开盘时间 _data['opening_date'] && _kaipanTimeObj.val(_data['opening_date'].split(' ')[0]); //开盘时间
...@@ -853,6 +853,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -853,6 +853,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
var _isBreakFlag = false; var _isBreakFlag = false;
//是否给商户公开,是否独家验证是否选择 //是否给商户公开,是否独家验证是否选择
$.each([ $.each([
_shangpuTypeObj, //商铺类型是否选择
_showCdObj, //显示给C端用户看 _showCdObj, //显示给C端用户看
_exclusiveTypeObj, //是否独家 _exclusiveTypeObj, //是否独家
], function(i, item) { ], function(i, item) {
...@@ -1137,7 +1138,9 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -1137,7 +1138,9 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
if(_id != null) { if(_id != null) {
_data['id'] = _id; _data['id'] = _id;
_data['upload_id'] = _objThis.upload_id; _data['upload_id'] = _objThis.upload_id;
}; }else{
_data['id'] = '';//新增时id传空
}
//当为委托转铺新增时,需要传这两个参数 //当为委托转铺新增时,需要传这两个参数
if(_source) { if(_source) {
_data['source'] = _source; _data['source'] = _source;
......
...@@ -66,7 +66,9 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -66,7 +66,9 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
store.Edit(); store.Edit();
}); });
$ (document).delegate (".submit_edit", "click", function () {//提交编辑 $ (document).delegate (".submit_edit", "click", function (e) {//提交编辑
e.preventDefault();
e.stopPropagation();
store.Submit_edit(); store.Submit_edit();
}); });
$ (document).delegate (".mend", "click", function () {//点击业务员列表 $ (document).delegate (".mend", "click", function () {//点击业务员列表
...@@ -259,7 +261,8 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -259,7 +261,8 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
dataType: "json", dataType: "json",
success: function(data){ success: function(data){
if(data.code==200){ if(data.code==200){
store.getList(1); alert('修改成功');
$("#modal-edit").modal('hide');
}else{ }else{
alert(data.msg); alert(data.msg);
} }
......
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