Commit ff9f75ec authored by clone's avatar clone

Merge branch '0702-v.2.2.0' into test

# Conflicts: # application/api_broker/service/UploadFileService.php # application/index/controller/Collection.php # application/index/controller/Finance.php # application/index/view/agent/agent.html # application/index/view/collection/getCollection.html # public/app/dist/index.html # public/app/dist/static/css/app.2c71066ef70dbce04427e0ec71aee085.css # public/app/dist/static/css/app.2c71066ef70dbce04427e0ec71aee085.css.map # public/app/dist/static/css/app.65a7482b65465b468cd50d083c6b13f2.css # public/app/dist/static/css/app.cf2603707f2f5640ca6c8f596dac90c4.css # public/app/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map # public/app/js/customerinfo_details_new.js # public/resource/js/agent.js # public/resource/js/getCollection.js # public/resource/template/get_collection_template_tpl.html
parents 9be4b055 feb7a037
...@@ -15,25 +15,29 @@ use app\api\untils\MessageUntils; ...@@ -15,25 +15,29 @@ use app\api\untils\MessageUntils;
use app\api_broker\extend\Basic; 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\GOperatingRecords; use app\model\GOperatingRecords;
use app\model\NoteLog; use app\model\NoteLog;
use app\model\UPhoneFollowPp; use app\model\UPhoneFollowPp;
use app\model\Users; use app\model\Users;
use think\Exception;
use think\Request; use think\Request;
class Broker extends Basic class Broker extends Basic
{ {
protected $a_agents; protected $a_agents;
protected $aBD;
public function __construct(Request $request = null) public function __construct(Request $request = null)
{ {
parent::__construct($request); parent::__construct($request);
$this->a_agents = new AAgents(); $this->a_agents = new AAgents();
$this->aBD = new ABindingDevice();
} }
/** /**
* 经纪人登录 * 经纪人登录
* * 废弃by zw0702
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
...@@ -91,6 +95,182 @@ class Broker extends Basic ...@@ -91,6 +95,182 @@ class Broker extends Basic
return $this->response(200, $data['msg'], $data['data']); return $this->response(200, $data['msg'], $data['data']);
} }
/**
* 经纪人登录
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function loginV2()
{
$params = $this->params;
/*$params = array(
"phone" => "15002102357",
"pwd" => "123456",
"push_id" => "123123",
"device_id" => "qweqweqweqweqw123123",
"model" => "iphone7",//手机型号
);*/
$checkResult = $this->validate($params, "PerformanceValidate.login");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$field = 'id,store_id,auth_group_id,district_id,level,name,phone,password,sex,img,inviter_id,status';
$where['phone'] = $params['phone'];
$where['id'] = [ '<>', 1 ];
$agents_data = $this->a_agents->getAgentInfo($field, '', $where);
if (count($agents_data) <= 0) {
return $this->response(101, '没有该用户');
}
if ($agents_data['status'] == 2) {
return $this->response(101, '您已离职');
}
if ($agents_data['status'] == 1) {
return $this->response(101, '账号已冻结');
}
if ($agents_data['password'] != md5($this->params['pwd'])) {
return $this->response(101, '密码错误');
}
//判断设备id是否存在
$is_login = $this->judgeBand($params["device_id"], $agents_data['id'], $params["model"], 0, $params["push_id"]);
if (!$is_login) {
return $this->response("102", "该账号没有绑定该手机,请致电人事进行绑定。");
}
$agents_data['last_login_ip'] = ip2long($this->request->ip());
$agents_data['last_login_time'] = date('Y-m-d H:i:s');
$agents_data->allowField(true)->save();
if (!empty($agents_data['img'])) {
$agents_data['img'] = AGENTHEADERIMGURL . $agents_data->img;
}
$jwt_data['id'] = $agents_data['id'];
$jwt_data['name'] = $agents_data['name'];
$jwt_data['phone'] = $agents_data['phone'];
$jwt_data['level'] = $agents_data['level'];
$jwt = new JwtUntils();
$data['data'] = $agents_data->getData();
$data['data']['last_login_ip'] = long2ip($data['data']['last_login_ip']);
$data['data']['AuthToken'] = $jwt->createToken($jwt_data);
$data['msg'] = '登陆成功';
return $this->response(200, $data['msg'], $data['data']);
}
/**
* 判断经济人是否在后台被解绑
* @return \think\Response
*/
public function verifyAgentStatus()
{
$params = $this->params;
/* $params = array(
"agent_id" => 12,
"device_id" => "123123131"
);*/
$checkResult = $this->validate($params, "PerformanceValidate.verifyStatus");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$is_visit = $this->judgeBand($params["device_id"], $params["agent_id"], "", 1, "");
if ($is_visit) {
return $this->response("200", "success", []);
} else {
return $this->response("102", "该账号没有绑定该手机,请致电人事进行绑定。");
}
}
/**
* 判断设备绑定关系
* @param string $device_id
* @param int $agent_id
* @param string $model
* @param int $type 0提交记录到后台, 1仅仅判断
* @param string $push_id
* @return bool
*/
private function judgeBand(string $device_id, int $agent_id, string $model, int $type, string $push_id): bool
{
$params["agent_id"] = $agent_id;
$result = $this->aBD->getDeviceByAgentId($params);
if (count($result) <= 0) {
//新增设备绑定关系 默认直接登陆
if ($type == 0)
$this->aBD->addDevice([ "device_id" => $device_id,
"agent_id" => $agent_id,
"model" => $model,
"push_id" => $push_id,
"is_forbidden" => 0 ]);
return true;
}
$is_exits = false;
foreach ($result as $item) {
if ($device_id == $item["device_id"]) {
//当个推返回的id改变时则更新记录
if (!empty($push_id) && $push_id != $item["push_id"]){
$this->aBD->updateDevice([ "id" => $item["id"], "push_id" => $push_id ]);
}
if ($item["is_forbidden"] == 0) {
return true;
} elseif ($item["is_forbidden"] == 1) { //已存在申请关系
$is_exits = true;
}
}
}
if (!$is_exits && $type == 0)
//新增申请绑定关系,需要后台同意登陆
$this->aBD->addDevice([ "device_id" => $device_id,
"agent_id" => $agent_id,
"model" => $model,
"push_id" => $push_id,
"is_forbidden" => 1 ]);
return false;
}
/**
* 绑定或者解绑
* @return \think\Response
*/
public function updateDevice()
{
$params = $this->params;
/* $params = array(
"agent_id" => 1,
"id" => 1,
"operator_id" => 12,
"is_forbidden" => 0,//0正常 1禁止
);*/
$checkResult = $this->validate($params, "PerformanceValidate.verifyIsForbidden");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
try {
$id = $this->aBD->updateDevice($params);
if ($id > 0) {
return $this->response("200", "update success", [ "id" => $id ]);
} else {
return $this->response("101", "请求异常");
}
} catch (Exception $exception) {
return $this->response("101", "请求错误:" . $exception);
}
}
/** /**
* 获取经纪人列表 * 获取经纪人列表
* *
......
<?php
namespace app\api_broker\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/7/4
* Time: 下午3:25
*/
use app\api_broker\extend\Basic;
use app\model\ACollectHouse;
use think\Request;
class CollectHouse extends Basic
{
protected $aCollectHouse;
public function __construct($request = null)
{
parent::__construct($request);
$this->aCollectHouse = new ACollectHouse();
}
/**
* 收藏或取消收藏商铺
* User: 朱伟
* Date: 2018-07-04
* Time: 15:35:40
*/
public function addCollectHouse(){
$params = $this->params;
/*$params = array(
"agents_id" => 1,
"house_id" => 4,
"status" => 2,
);*/
if (!isset($params["agents_id"]) or !isset($params["house_id"]) or !isset($params["status"])) {
return $this->response("101", "请求参数错误");
}
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["agents_id"];
$get_params['house_id'] = $params["house_id"];
$res = $this->aCollectHouse->getCollectHouse($field,$get_params);
if($res){//如果存在
if($res[0]['status'] != $params["status"] ){//如果存在-并且状态一致 不作处理 不一致则更新状态
$insert["id"] = $res[0]['id'];
$insert["status"] = $params["status"];
$res = $this->aCollectHouse->updateCollectHouse($insert);//int(1)
}else{
$res = true ;
}
}else{//不存在则新增数据
$insert["agents_id"] = $params['agents_id'];
$insert["house_id"] = $params['house_id'];
$insert["status"] = 1;
$res = $this->aCollectHouse->saveCollectHouse($insert);//int(1)
}
if ($res) {
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
}
/**
* 查询收藏数据
* User: 朱伟
* Date: 2018-07-04
* Time: 15:35:40
*/
public function getCollectHouseList()
{
$params = $this->params;
/*$params = array(
"agents_id" => 2,
);*/
if (!isset($params["agents_id"])) {
return $this->response("101", "请求参数错误");
}
$field = 'CollectUser.id,';
$field .= 'Houses.internal_title,';
$field .= 'Houses.market_area,';
$field .= 'Houses.rent_type,';
$field .= 'Houses.rent_price,';
$field .= 'Houses.shop_area_start,';
$field .= 'Houses.shop_area_end,';
$field .= 'Houses.shop_sign';
$get_params['agents_id'] = $params["agents_id"];
$res = $this->aCollectHouse->getCollectList($field,$get_params);
//dump($res);
if ($res) {
return $this->response("200", "成功",$res);
} else {
return $this->response("101", "失败");
}
}
}
\ No newline at end of file
<?php
namespace app\api_broker\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/7/4
* Time: 下午3:25
*/
use app\api_broker\extend\Basic;
use app\model\ACollectUser;
use think\Request;
class CollectUser extends Basic
{
protected $aCollectUser;
public function __construct($request = null)
{
parent::__construct($request);
$this->aCollectUser = new ACollectUser();
}
/**
* 收藏或取消收藏客户
* User: 朱伟
* Date: 2018-07-04
* Time: 15:35:40
*/
public function addCollectUser()
{
$params = $this->params;
/*$params = array(
"agents_id" => 2,
"user_id" => 3,
"status" => 2,
);*/
if (!isset($params["agents_id"]) or !isset($params["user_id"]) or !isset($params["status"])) {
return $this->response("101", "请求参数错误");
}
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["agents_id"];
$get_params['user_id'] = $params["user_id"];
$res = $this->aCollectUser->getCollectUser($field,$get_params);
if($res){//如果存在
if($res[0]['status'] != $params["status"] ){//如果存在-并且状态一致 不作处理 不一致则更新状态
$insert["id"] = $res[0]['id'];
$insert["status"] = $params["status"];
$res = $this->aCollectUser->updateCollectUser($insert);//int(1)
}else{
$res = true ;
}
}else{//不存在则新增数据
$insert["agents_id"] = $params['agents_id'];
$insert["user_id"] = $params['user_id'];
$insert["status"] = 1;
$res = $this->aCollectUser->saveCollectUser($insert);//int(1)
}
if ($res) {
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
}
/**
* 查询收藏数据
* User: 朱伟
* Date: 2018-07-04
* Time: 15:35:40
*/
public function getCollectUserList()
{
$params = $this->params;
/*$params = array(
"agents_id" => 2,
);*/
if (!isset($params["agents_id"])) {
return $this->response("101", "请求参数错误");
}
$field = 'CollectUser.id,';
$field .= 'CollectUser.status,';
$field .= 'Users.id AS user_id,';
$field .= 'Users.user_nick,';
$field .= 'Users.user_phone,';
$field .= 'Users.agent_id,';
$field .= 'Users.user_status,';
$field .= 'Users.industry_type,';
$field .= 'Users.price_demand,';
$field .= 'Users.area_demand';
$get_params['agents_id'] = $params["agents_id"];
$res = $this->aCollectUser->getCollectList($field,$get_params);
foreach($res as $k=>$v)
{
$label = [];
if($params["agents_id"] == $v['agent_id'])
{
$label[] = '我的';
}
//无效客户不显示标签
if($v['user_status'] != -1){
$res[$k]['label'] = implode(',',$label);
}
}
//dump($res);
if ($res) {
return $this->response("200", "成功",$res);
} else {
return $this->response("101", "失败");
}
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/6/12
* Time: 17:21
*/
namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\model\SLabel;
use app\model\SNews;
use app\model\SNewsComment;
use think\Request;
class News extends Basic
{
protected $m_news;
public function __construct(Request $request = null)
{
header('Access-Control-Allow-Origin:*');
parent::__construct($request);
$this->m_news = new SNews();
}
/**
* 商学院列表
*
* @return \think\Response|\think\response\View
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function index()
{
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
if (!empty($this->params['start_time']) && empty($this->params['end_time'])) {
$where['a.create_time'] = [ '> time', $this->params['start_time'] . ' 00:00:00' ];
}
if (!empty($this->params['end_time']) && empty($this->params['start_time'])) {
$where['a.create_time'] = [ '< time', $this->params['end_time'] . ' 23:59:59' ];
}
if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) {
$where['a.create_time'] = [ 'between time', [ $this->params['start_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' ] ];
}
if (!empty($this->params['title'])) {
$where['a.title'] = [ 'LIKE', '%' . $this->params['title'] . '%' ];
}
if (!empty($this->params['label_id'])) {
$where['a.s_label_id'] = $this->params['label_id'];
}
$field = 'a.id,a.title,a.content,a.create_time,b.name,c.label_name,a.cover_plan';
$where['a.status'] = 0;
$data['list'] = $this->m_news->getListAgent($pageNo, $pageSize, 'a.id DESC', $field, $where);
$data['total'] = $this->m_news->getListAgentTotal($where);
return $this->response(200, "", $data);
}
/**
* 商学院资讯详情
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getNewsInfo()
{
if (empty($this->params['id'])) {
return $this->response(101, "Id is null.");
}
$comment = new SNewsComment();
$field_news = 'id,title,s_label_id,cover_plan,content,create_time';
$where_news['status'] = 0;
$where_news['id'] = $this->params['id'];
$data['news'] = $this->m_news->getNewsInfo($field_news, $where_news);
$field = 'a.id,a.comment_content,a.create_time,b.name,b.img';
$where['a.s_news_id'] = $this->params['id'];
$where['a.status'] = 0;
$data['comment'] = $comment->getListAgent(1, 3, 'a.id DESC', $field, $where);
return $this->response(200, "", $data);
}
/**
* 评论列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getComment()
{
if (empty($this->params['news_id'])) {
return $this->response(101, "参数错误");
}
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$comment = new SNewsComment();
$field = 'a.id,a.comment_content,a.create_time,b.name,b.img';
$where['a.s_news_id'] = $this->params['news_id'];
$where['a.status'] = 0;
$data = $comment->getListAgent($pageNo, $pageSize, 'a.id DESC', $field, $where);
return $this->response(200, "", $data);
}
/**
* 商学院标签
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getNewsLabel()
{
$label = new SLabel();
$data = $label->getList(1, 200, '', 'id,label_name', [ 'status' => 0 ]);
return $this->response(200, '', $data);
}
/**
* 评论文章
*
* @return \think\Response
*/
public function commentNews()
{
if (empty($this->params['news_id'])) {
return $this->response(101, '文章参数错误');
}
if (empty($this->params['content'])) {
return $this->response(101, '文章内容为空');
}
if (mb_strlen($this->params['content']) > 501) {
return $this->response(101, '内容字数超过限制!');
}
$data['agent_id'] = $this->agentId;
$data['s_news_id'] = $this->params['news_id'];
$data['comment_content'] = htmlentities($this->params['content']);
$data['status'] = 0;
$m_new_comment = new SNewsComment();
$num = $m_new_comment->editData($data);
if ($num > 0) {
$news = new SNews();
$news->setCommentNumber($this->params['news_id']);
return $this->response(200, '评论成功');
}
return $this->response(101, '评论失败');
}
}
\ No newline at end of file
...@@ -13,6 +13,7 @@ use app\model\OBargainModel; ...@@ -13,6 +13,7 @@ use app\model\OBargainModel;
use app\model\OMarchInModel; use app\model\OMarchInModel;
use app\model\ORefundModel; use app\model\ORefundModel;
use think\Exception; use think\Exception;
use Think\Log;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
...@@ -115,8 +116,9 @@ class OrderLog extends Basic ...@@ -115,8 +116,9 @@ class OrderLog extends Basic
$params["collecting_bill"] = json_decode($params["collecting_bill"], true); $params["collecting_bill"] = json_decode($params["collecting_bill"], true);
$remark = isset($params["remark"]) ? $params["remark"] : ""; $remark = isset($params["remark"]) ? $params["remark"] : "";
$transfer_img = isset($params["transfer_img"]) ? $params["transfer_img"] : ""; $transfer_img = isset($params["transfer_img"]) ? json_decode($params["transfer_img"] ,true): "";
$source = $params["source"] ? $params["source"] : 0; Log::record("********************transfer_img**". json_encode($transfer_img));
$source = isset($params["source"]) ? $params["source"] : 0;
$is_ok = $this->service_->addCollectingBill($params["agent_id"], $params["agent_name"], $params["report_id"], $params["order_id"], $params["order_no"], $is_ok = $this->service_->addCollectingBill($params["agent_id"], $params["agent_name"], $params["report_id"], $params["order_id"], $params["order_no"],
$params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img, $source); $params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img, $source);
...@@ -219,7 +221,8 @@ class OrderLog extends Basic ...@@ -219,7 +221,8 @@ class OrderLog extends Basic
if (!isset($params["submit_agent_id"]) || !isset($params["submit_agent_name"]) || !isset($params["report_id"]) || if (!isset($params["submit_agent_id"]) || !isset($params["submit_agent_name"]) || !isset($params["report_id"]) ||
!isset($params["order_id"]) || !isset($params["order_no"]) || !isset($params["trade_type"]) || !isset($params["order_id"]) || !isset($params["order_no"]) || !isset($params["trade_type"]) ||
//!isset($params["house_number"]) || !isset($params["is_open"]) || !isset($params["industry_type"]) || //!isset($params["estimated_receipt_date"]) ||
!isset($params["house_number"]) || !isset($params["is_open"]) || !isset($params["industry_type"]) ||
!isset($params["price"]) || !isset($params["commission"]) || !isset($params["commission_arr"])) { !isset($params["price"]) || !isset($params["commission"]) || !isset($params["commission_arr"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -234,8 +237,8 @@ class OrderLog extends Basic ...@@ -234,8 +237,8 @@ class OrderLog extends Basic
"trade_type" => 10, //成交类型 10出租 20 增佣 30 代理 40 好处费 "trade_type" => 10, //成交类型 10出租 20 增佣 30 代理 40 好处费
"price" => 112131, //成交价格 存分 "price" => 112131, //成交价格 存分
"commission" => 111, //佣金 存分 "commission" => 111, //佣金 存分
"estimated_receipt_date" => '2018-07-15',
//`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方', //`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方 6APP盘下载方 7APP客下载方',
//`agent_id`'分佣经纪人id', //`agent_id`'分佣经纪人id',
//`scale`'分佣比例 如 5表示百分之5', //`scale`'分佣比例 如 5表示百分之5',
// `scale_fee` '应分佣金 存分 ', // `scale_fee` '应分佣金 存分 ',
...@@ -244,15 +247,17 @@ class OrderLog extends Basic ...@@ -244,15 +247,17 @@ class OrderLog extends Basic
{ "role": 11, "agent_id" : 12, "scale": 13, "scale_fee" : 1112 }]', { "role": 11, "agent_id" : 12, "scale": 13, "scale_fee" : 1112 }]',
);*/ );*/
$house_number = !isset($params["house_number"]) ? null : $params["house_number"]; $house_number = !isset($params["house_number"]) ? null : $params["house_number"];
$is_open = !isset($params["is_open"]) ? 0 : $params["is_open"]; $is_open = !isset($params["is_open"]) ? 0 : $params["is_open"];
$industry_type = !isset($params["industry_type"]) ? null : $params["industry_type"]; $industry_type = !isset($params["industry_type"]) ? null : $params["industry_type"];
$estimated_receipt_date = $params["estimated_receipt_date"];
$params["commission_arr"] = json_decode($params["commission_arr"], true); $params["commission_arr"] = json_decode($params["commission_arr"], true);
$is_ok = $this->service_->addBargain($params["submit_agent_id"], $params["submit_agent_name"], $params["report_id"], $params["order_id"], $params["order_no"], $is_ok = $this->service_->addBargain($params["submit_agent_id"], $params["submit_agent_name"], $params["report_id"],
$params["trade_type"], $params["price"], $params["commission"], $params["commission_arr"], $house_number, $is_open, $industry_type); $params["order_id"], $params["order_no"], $params["trade_type"], $params["price"], $params["commission"],
$params["commission_arr"], $house_number, $is_open, $industry_type, $estimated_receipt_date);
if ($is_ok > 0) { if ($is_ok > 0) {
//todo 更改用户信息 求租->已租 //todo 更改用户信息 求租->已租
...@@ -327,8 +332,8 @@ class OrderLog extends Basic ...@@ -327,8 +332,8 @@ class OrderLog extends Basic
public function selectReportAll() public function selectReportAll()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"order_id" => 2, "order_id" => 38024,
);*/ );*/
if (!isset($params["order_id"])) { if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
......
<?php
namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\UploadFileService;
use think\Log;
use think\Request;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/7/3
* Time : 10:44
* Intro:
*/
class UploadImg extends Basic
{
private $uFService;
public function __construct($request = null)
{
parent::__construct($request);
$this->uFService = new UploadFileService();
}
/**
* 图片上传
* @return \think\Response
*/
public function uploadImg()
{
header('Access-Control-Allow-Origin:*');
set_time_limit(0);
$file = $_FILES['image'];
$type = request()->param('type');
Log::record("upload img info :" . json_encode($file) );
$uploadResult = $this->uFService->upload($file, $type);
if ($uploadResult["code"] == 200) {
return $this->response("200", "图片上传成功", $uploadResult["msg"]);
} else {
return $this->response("101", $uploadResult["msg"]);
}
}
}
\ No newline at end of file
...@@ -59,17 +59,18 @@ class User extends Basic ...@@ -59,17 +59,18 @@ class User extends Basic
public function searchUser() public function searchUser()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /*$params = array(
"user_status" => 1,//客户状态(0:求租;1:已租;-1:无效) "user_status" => 0,//客户状态(0:求租;1:已租;-1:无效)
"yetai" => "休闲娱乐", "yetai" => "休闲娱乐",
"area_start" => 45,//面积起始范围 room_area2 "area_start" => 1,//面积起始范围 room_area2
"area_end" => 65,//面积结束范围 "area_end" => 65,//面积结束范围
"money_start" => 1000,//租金 price2 "money_start" => 1,//租金 price2
"money_end" => 10000,//租金 "money_end" => 10000,//租金
"start_time" => "2018-05-25", "start_time" => "2016-05-25",
"end_time" => "2018-05-30", "end_time" => "2018-05-30",
"pageNo" => 1, "pageNo" => 1,
"pageSize" => 15 "pageSize" => 15,
"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";
...@@ -111,6 +112,10 @@ class User extends Basic ...@@ -111,6 +112,10 @@ class User extends Basic
$conditions['create_time'] = array( 'between', array( $start_time, $end_time ) ); $conditions['create_time'] = array( 'between', array( $start_time, $end_time ) );
} }
if (isset($params['status'])) {
$conditions['status'] = $params['status'] ;
}
$userList = $this->userModel->selectUserList($field, $conditions,$pageNo, $pageSize, "id desc"); $userList = $this->userModel->selectUserList($field, $conditions,$pageNo, $pageSize, "id desc");
if (empty($userList)) { if (empty($userList)) {
......
...@@ -39,6 +39,7 @@ class Basic extends Controller ...@@ -39,6 +39,7 @@ class Basic extends Controller
protected $timeStamp_; protected $timeStamp_;
protected $filterVerify = array( protected $filterVerify = array(
'broker/login', 'broker/login',
'broker/loginV2',
'broker/token', 'broker/token',
'broker/getShopList', 'broker/getShopList',
'broker/getShopDetail', 'broker/getShopDetail',
......
<?php <?php
namespace app\api_broker\service;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User: hu jun * User: hu jun
...@@ -6,9 +7,6 @@ ...@@ -6,9 +7,6 @@
* Time: 16:21 * Time: 16:21
*/ */
namespace app\api_broker\service;
use think\File; use think\File;
class UploadFileService class UploadFileService
...@@ -22,7 +20,7 @@ class UploadFileService ...@@ -22,7 +20,7 @@ class UploadFileService
* @param array $ext * @param array $ext
* @return array * @return array
*/ */
public function upload($_upload_file, $type, $size = 1000000, $ext = [ 'jpg' ]) public function upload($_upload_file, $type, $size = 1000000, $ext = [ 'jpg','png','jpeg' ])
{ {
/** /**
* *
...@@ -56,21 +54,34 @@ class UploadFileService ...@@ -56,21 +54,34 @@ class UploadFileService
$path = ROOT_PATH . 'public/'; $path = ROOT_PATH . 'public/';
switch ($type) { switch ($type) {
case 'chat':
$path .= 'static/chat_image/';
$internet_path = CHAT_IMG_URL;
break;
case 'user_header' : case 'user_header' :
$path .= 'static/user_header/'; $path .= 'static/user_header/';
$internet_path = '';
break; break;
case 'agent_header' : case 'agent_header' :
$path .= 'static/head_portrait/'; $path .= 'static/head_portrait/';
$internet_path = '';
break; break;
case 'house_img': case 'house_img':
$path .= 'resource/lib/Attachments/images/'; $path .= 'resource/lib/Attachments/images/';
$internet_path = '';
break;
case 'business_school' :
$path .= 'static/business_school/';
$internet_path = '';
break; break;
default : default :
$path .= 'static/'; $data['code'] = 101;
$data['msg'] = "上传图片类型错误";
return $data;
} }
$date = date('Ymd');
$path .= date('Ymd'); $path .= $date;
$name_str = date('YmdHis') . mt_rand(1000); $name_str = date('YmdHis') . mt_rand(10,1000);
if (is_array($_upload_file['tmp_name'])) { if (is_array($_upload_file['tmp_name'])) {
foreach ($_upload_file['tmp_name'] as $k => $v) { foreach ($_upload_file['tmp_name'] as $k => $v) {
...@@ -80,12 +91,13 @@ class UploadFileService ...@@ -80,12 +91,13 @@ class UploadFileService
$info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']); $info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']);
if ($info) { if ($info) {
$data[$k]['code'] = 200; $data['code'] = 200;
$data[$k]['img_path'] = $info->getSaveName(); //生成的图片路径 $data["msg"][$k]['img_path'] = $date .'/'. $info->getSaveName(); //生成的图片路径
$data[$k]['img_ext'] = $info->getExtension(); $data["msg"][$k]['internet_img_name'] = $internet_path . $data["msg"][$k]['img_path'];
$data["msg"][$k]['img_ext'] = $info->getExtension();
} else { } else {
$data[$k]['code'] = 101; $data['code'] = 101;
$data[$k]['error'] = $_file->getError(); $data["msg"][$k]['error'] = $_file->getError();
} }
} }
...@@ -96,11 +108,12 @@ class UploadFileService ...@@ -96,11 +108,12 @@ class UploadFileService
$info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']); $info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']);
if ($info) { if ($info) {
$data['code'] = 200; $data['code'] = 200;
$data['img_path'] = $info->getSaveName(); //生成的图片路径 $data["msg"]['img_path'] = $date .'/'. $info->getSaveName(); //生成的图片路径
$data['img_ext'] = $info->getExtension(); $data["msg"]['internet_img_name'] = $internet_path . $data["msg"]['img_path'];
$data["msg"]['img_ext'] = $info->getExtension();
} else { } else {
$data['code'] = 101; $data['code'] = 101;
$data['error'] = $_file->getError(); $data['msg'] = $_file->getError();
} }
} }
...@@ -116,7 +129,7 @@ class UploadFileService ...@@ -116,7 +129,7 @@ class UploadFileService
* @param $ext * @param $ext
* @return array * @return array
*/ */
public function checkUploadFile($_upload_file, $size, $ext) private function checkUploadFile($_upload_file, $size, $ext)
{ {
$data = []; $data = [];
if (is_array($_upload_file['tmp_name'])) { if (is_array($_upload_file['tmp_name'])) {
...@@ -126,13 +139,13 @@ class UploadFileService ...@@ -126,13 +139,13 @@ class UploadFileService
if (filesize($v) > $size) { if (filesize($v) > $size) {
$data['code'] = 101; $data['code'] = 101;
$data['error'] = '文件太大无法上传'; $data['msg'] = '文件太大无法上传';
break; break;
} }
if (!in_array($file_info['extension'], $ext)) { if (!in_array($file_info['extension'], $ext)) {
$data['code'] = 101; $data['code'] = 101;
$data['error'] = '文件类型不符无法上传'; $data['msg'] = '文件类型不符无法上传';
break; break;
} }
...@@ -141,13 +154,13 @@ class UploadFileService ...@@ -141,13 +154,13 @@ class UploadFileService
if (filesize($_upload_file['tmp_name']) > $size) { if (filesize($_upload_file['tmp_name']) > $size) {
$data['code'] = 101; $data['code'] = 101;
$data['error'] = '文件太大无法上传'; $data['msg'] = '文件太大无法上传';
} }
$file_info = pathinfo($_upload_file['name']); $file_info = pathinfo($_upload_file['name']);
if (!in_array($file_info['extension'], $ext)) { if (!in_array($file_info['extension'], $ext)) {
$data['code'] = 101; $data['code'] = 101;
$data['error'] = '文件类型不符无法上传'; $data['msg'] = '文件类型不符无法上传';
} }
} }
......
...@@ -14,19 +14,38 @@ use think\Validate; ...@@ -14,19 +14,38 @@ use think\Validate;
class PerformanceValidate extends Validate class PerformanceValidate extends Validate
{ {
protected $rule = [ protected $rule = [
'type' => 'require|number', 'type' => 'require|number',
'agent_id' => 'require|number', 'agent_id' => 'require|number',
'phone' => 'require|number',
'pwd' => 'require|min:6',
'device_id' => 'require',
'push_id' => 'require',
'is_forbidden' => 'require|in:0,1',
'operator_id' => 'require|number',
]; ];
protected $message = [ protected $message = [
'type.require' => 'type为必填字段', 'type.require' => 'type为必填字段',
'type.number' => 'type只能为数字', 'type.number' => 'type只能为数字',
'agent_id.require' => 'agent_id为必填字段', 'agent_id.require' => 'agent_id为必填字段',
'agent_id.number' => 'agent_id只能为数字', 'agent_id.number' => 'agent_id只能为数字',
'phone.require' => '手机号不能为空',
'phone.number' => '手机号输入错误',
'pwd.require' => '密码不能为空',
'pwd.min' => '密码小于6位',
'device_id.require' => '设备号获取失败,请联系管理员',
'push_id.require' => '个推帐号获取失败,请联系管理员',
'is_forbidden.require' => '是否绑定字段必填',
'is_forbidden.in' => '是否绑定字段值只能为0或1',
'operator_id.require' => '操作人为必填字段',
'operator_id.number' => '操作人编号只能为数字',
]; ];
protected $scene = [ protected $scene = [
'verify' => [ 'type', 'agent_id' ], 'verify' => [ 'type', 'agent_id' ],
'verifyOther' => [ 'agent_id' ], 'verifyOther' => [ 'agent_id' ],
'login' => [ 'phone', 'pwd', 'device_id', "push_id" ],
'verifyStatus' => [ 'agent_id', 'device_id' ],
'verifyIsForbidden' => [ 'phone', 'device_id', 'is_forbidden', 'operator_id' ],
]; ];
} }
\ No newline at end of file
...@@ -32,11 +32,20 @@ ...@@ -32,11 +32,20 @@
<p v-if="item.step_name==='follow_up_log'">对面积的要求:<span>{{item.area_requirement}}</span></p> <p v-if="item.step_name==='follow_up_log'">对面积的要求:<span>{{item.area_requirement}}</span></p>
<p v-if="item.step_name==='follow_up_log'">对价格的要求:<span>{{item.price_requirement}}</span></p> <p v-if="item.step_name==='follow_up_log'">对价格的要求:<span>{{item.price_requirement}}</span></p>
<p v-if="item.step_name==='follow_up_log'">所在区域:<span>{{item.area_detail+' '+item.business_area}}</span></p> <p v-if="item.step_name==='follow_up_log'">所在区域:<span>{{item.area_detail+' '+item.business_area}}</span></p>
<p v-if="item.step_name==='pay_log'">入账类型:<span>{{switchRzType(item.type)}}</span></p> <div v-if="item.step_name==='pay_log'">
<p v-if="item.step_name==='pay_log'">支付方式:<span>{{switchPayType(item.pay_type)}}</span></p> <div class="sp-pay-log-div" v-for="(item2, idnex2) in item.list">
<p v-if="item.step_name==='pay_log'">入账金额:<span class="span-active">{{item.money}}元</span></p> <p>入账类型:<span>{{switchRzType(item2.type)}}</span></p>
<p v-if="item.step_name==='pay_log'">商铺号:<span class="span-active">{{item.house_number}}</span></p> <p>支付方式:<span>{{switchPayType(item2.pay_type)}}</span></p>
<p v-if="item.step_name==='pay_log'">业态/品牌:<span>{{item.industry_type}}</span></p> <p>入账金额:<span class="span-active">{{item2.money}}元</span></p>
</div>
</div>
<p v-if="item.step_name==='pay_log'">商铺号:<span class="span-active">{{item.list[0].house_number}}</span></p>
<p v-if="item.step_name==='pay_log'">业态/品牌:<span>{{item.list[0].industry_type}}</span></p>
<ol v-if="item.step_name==='pay_log'" class="li-img-list">
<li v-for="(item2, idnex2) in item.img">
<a href="javascript:;" data-id="item2.id"><img :src="item.img_path+item2.img_name"></a>
</li>
</ol>
<p v-if="item.step_name==='refund'">退款金额:<span class="span-active">{{item.refund_money}}元</span></p> <p v-if="item.step_name==='refund'">退款金额:<span class="span-active">{{item.refund_money}}元</span></p>
<p v-if="item.step_name==='refund'" class="yinhangka-info">退款银行卡信息</p> <p v-if="item.step_name==='refund'" class="yinhangka-info">退款银行卡信息</p>
<p v-if="item.step_name==='refund'">姓名:<span>{{item.agent_name}}</span></p> <p v-if="item.step_name==='refund'">姓名:<span>{{item.agent_name}}</span></p>
...@@ -52,14 +61,19 @@ ...@@ -52,14 +61,19 @@
<p v-if="item.step_name==='march_in'">补充说明:<span class="buchongshuoming">{{item.march_in_remark}}</span></p> <p v-if="item.step_name==='march_in'">补充说明:<span class="buchongshuoming">{{item.march_in_remark}}</span></p>
<p v-if="item.step_name==='follow_up_log'">补充说明:<span class="buchongshuoming">{{item.explain}}</span></p> <p v-if="item.step_name==='follow_up_log'">补充说明:<span class="buchongshuoming">{{item.explain}}</span></p>
<p v-if="item.step_name==='march_in'">地址:{{item.march_in_area}}</p> <p v-if="item.step_name==='march_in'">地址:{{item.march_in_area}}</p>
<ol v-if="item.step_name==='march_in'||item.step_name==='follow_up_log'" class="li-img-list"> <ol v-if="item.step_name==='march_in'" class="li-img-list">
<li> <li>
<a href="javascript:;"><img :src="item.img_path+item.march_in_img"></a> <a href="javascript:;"><img :src="item.img_path+item.march_in_img"></a>
</li> </li>
</ol> </ol>
<ol v-if="item.step_name==='follow_up_log'" class="li-img-list">
<li>
<a href="javascript:;"><img :src="item.img_path+item.explain_img"></a>
</li>
</ol>
<p v-if="item.step_name==='march_in'" class="li-caozuoren">操作人:<span>{{item.reception_name}}</span></p> <p v-if="item.step_name==='march_in'" class="li-caozuoren">操作人:<span>{{item.reception_name}}</span></p>
<p v-if="item.step_name==='follow_up_log'" class="li-caozuoren">操作人:<span>{{item.agent_name}}</span></p> <p v-if="item.step_name==='follow_up_log'" class="li-caozuoren">操作人:<span>{{item.agent_name}}</span></p>
<p v-if="item.step_name==='pay_log'" class="li-caozuoren">操作人:<span>{{item.agent_name}}</span></p> <p v-if="item.step_name==='pay_log'" class="li-caozuoren">操作人:<span>{{item.list[0].agent_name}}</span></p>
<p v-if="item.step_name==='refund'" class="li-caozuoren">操作人:<span>{{item.agent_name}}</span></p> <p v-if="item.step_name==='refund'" class="li-caozuoren">操作人:<span>{{item.agent_name}}</span></p>
<p v-if="item.step_name==='bargain'" class="li-caozuoren">操作人:<span>{{item.submit_agent_name}}</span></p> <p v-if="item.step_name==='bargain'" class="li-caozuoren">操作人:<span>{{item.submit_agent_name}}</span></p>
</div> </div>
...@@ -74,4 +88,14 @@ ...@@ -74,4 +88,14 @@
<script src="/app/js/libs/require.min.js" data-js="/app/js/timeline_pc.js" data-main="/app/js/main" defer async="true"></script> <script src="/app/js/libs/require.min.js" data-js="/app/js/timeline_pc.js" data-main="/app/js/main" defer async="true"></script>
</body> </body>
</html> </html>
\ No newline at end of file
<!--
report 报备
march_in 进场
follow_up_log 跟进
pay_log 收款
refund 退款
bargain 成交报告
-->
\ No newline at end of file
...@@ -19,7 +19,7 @@ if (!function_exists('create_editor')) { ...@@ -19,7 +19,7 @@ if (!function_exists('create_editor')) {
if (!empty($config)) { if (!empty($config)) {
$_config = array_merge($_config, $config); $_config = array_merge($_config, $config);
} }
$CKEditor->editor("describe", $value, $_config); $CKEditor->editor($id,$value,$_config);
} }
} }
......
...@@ -23,9 +23,12 @@ namespace app\index\controller; ...@@ -23,9 +23,12 @@ namespace app\index\controller;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\ABindingDevice;
use app\model\Agents; use app\model\Agents;
use app\model\AStore; use app\model\AStore;
use app\model\Evaluate;
use app\model\Regions; use app\model\Regions;
use think\Exception;
use think\Session; use think\Session;
use think\Db; use think\Db;
...@@ -114,6 +117,61 @@ class Agent extends Basic ...@@ -114,6 +117,61 @@ class Agent extends Basic
return $this->response(200, '成功', $data); return $this->response(200, '成功', $data);
} }
/**
* 经纪人设备绑定列表
* @return \think\Response
*/
public function deviceList()
{
$agent_id = $this->request->param("agent_id");
if (!$agent_id) {
return $this->response(101, '经纪人id不能为空');
}
$aBD = new ABindingDevice();
$params["agent_id"] = $agent_id;
$field = "id,agent_id,device_id,model,is_forbidden,create_time,update_time";
$result = $aBD->getDeviceByAgentId($params,$field);
if(count($result) > 0){
return $this->response("200","success",$result);
}else{
return $this->response("101","此账号未绑定过设备");
}
}
/**
* 绑定或者解绑
* @return \think\Response
*/
public function updateDevice()
{
$params = $this->request->param();
/* $params = array(
"agent_id" => 1,//解绑或者绑定的经纪人id
"id" => 1, //关系id
"operator_id" => 12,//操作人id 登陆后台的经纪人id
"is_forbidden" => 0,//0正常 1禁止
);*/
$checkResult = $this->validate($params, "VerifyValidate.verifyIsForbidden");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$aBD = new ABindingDevice();
try {
$id = $aBD->updateDevice($params);
if ($id > 0) {
return $this->response("200", "update success", [ "id" => $id ]);
} else {
return $this->response("101", "请求异常");
}
} catch (Exception $exception) {
return $this->response("101", "请求错误:" . $exception);
}
}
/** /**
* 新增or修改or查看 * 新增or修改or查看
* $group_id !=0为查看 * $group_id !=0为查看
...@@ -246,4 +304,48 @@ class Agent extends Basic ...@@ -246,4 +304,48 @@ class Agent extends Basic
return $this->response($code, $msg, $data); return $this->response($code, $msg, $data);
} }
/**
* 经纪人列表计算-评价次数和分数
* 朱伟 2018年07月03日
*/
public function agentEvaluateNumAndFraction()
{
$data = $this->request->param();
/*$data = array(
"agents_id" => '869,5758,5757,5756,5755,5754,5753,5752,5751,5750,5749,5748,5747,5746,5745'
);*/
$agents_ids = $data['agents_id'];
if (!isset($agents_ids)) {
return $this->response("300", "参数不全");
}
$model = new Evaluate();
foreach (explode(',',$agents_ids) as $k => $v){
$params['agents_id'] = $v;
//dump($v);
$field='sum(evaluate_grade) as agent_evaluate_fraction';
$agent_evaluate_num = $model->getAgentEvaluateNum($params);
$agent_evaluate_fraction_res = $model->getAgentEvaluateFraction($field,$params);
$agent_evaluate_fraction = 0;
if($agent_evaluate_fraction_res[0]['agent_evaluate_fraction']){
$agent_evaluate_fraction = round($agent_evaluate_fraction_res[0]['agent_evaluate_fraction']/2 /$agent_evaluate_num,1);
}
$res['agents_id'] = $v;
$res['agent_evaluate_num'] = $agent_evaluate_num;
$res['agent_evaluate_fraction'] = $agent_evaluate_fraction;
$result[] = $res;
}
if ($result) {
return $this->response(200, '成功', $result);
} else {
return $this->response(100, '失败');
}
}
} }
\ No newline at end of file
This diff is collapsed.
...@@ -203,7 +203,7 @@ class Finance extends Basic ...@@ -203,7 +203,7 @@ class Finance extends Basic
} else { } else {
$bargain = new OBargainModel(); $bargain = new OBargainModel();
$fields = 'a.id,a.create_time,b.user_phone,b.user_name,d.internal_title,d.internal_address,a.is_open,a.order_id,'; $fields = 'a.id,a.create_time,b.user_phone,b.user_name,d.internal_title,d.internal_address,a.is_open,a.order_id,';
$fields .= 'a.trade_type,a.house_number,a.commission,a.content,d.shop_type,a.industry_type,a.price'; $fields .= 'a.trade_type,a.house_number,a.commission,a.content,d.shop_type,a.industry_type,a.price,a.estimated_receipt_date';
$where['a.id'] = $this->params['id']; $where['a.id'] = $this->params['id'];
$data['data'] = $bargain->getBargainInfo($fields, $where); $data['data'] = $bargain->getBargainInfo($fields, $where);
} }
...@@ -237,6 +237,10 @@ class Finance extends Basic ...@@ -237,6 +237,10 @@ class Finance extends Basic
return $this->response('101', '实收佣金数量超过限制'); return $this->response('101', '实收佣金数量超过限制');
} }
if (empty($this->params['estimated_receipt_date'])) {
return $this->response(101,'预计收款时间为空');
}
//应收总佣金 //应收总佣金
if (!empty($this->params['commission'])) { if (!empty($this->params['commission'])) {
$update_data['commission'] = $this->params['commission']; $update_data['commission'] = $this->params['commission'];
...@@ -266,6 +270,8 @@ class Finance extends Basic ...@@ -266,6 +270,8 @@ class Finance extends Basic
$update_data['price'] = $this->params['price']; $update_data['price'] = $this->params['price'];
} }
$update_data['estimated_receipt_date'] = $this->params['estimated_receipt_date']; //预计收款时间
$m_bargain = new OBargainModel(); $m_bargain = new OBargainModel();
$m_real = new ORealIncome(); $m_real = new ORealIncome();
...@@ -280,10 +286,12 @@ class Finance extends Basic ...@@ -280,10 +286,12 @@ class Finance extends Basic
$log_data = $add_real_arr = $update_real_arr = []; $log_data = $add_real_arr = $update_real_arr = [];
$i = $j = 0; $i = $j = 0;
foreach ($practical_fee_arr as $item) { foreach ($practical_fee_arr as $item) {
if (!$item['fee'] || !$item['operation_date']) { if (empty($item['fee']) || empty($item['operation_date'])) {
continue; $update_real_arr[$i]['id'] = $item['fee_id'];
} $update_real_arr[$i]['is_del'] = 1;
if ($item["fee_id"] > 0) { $log_data[$i] = '[删除实收佣金:'.$item['fee'].',收佣日期'.$item['operation_date'].']'; //
$i++;
} elseif ($item["fee_id"] > 0) {
$update_real_arr[$i]['id'] = $item['fee_id']; $update_real_arr[$i]['id'] = $item['fee_id'];
$update_real_arr[$i]['bargain_id'] = $bargain_id; $update_real_arr[$i]['bargain_id'] = $bargain_id;
$update_real_arr[$i]['operation_id'] = $this->userId; $update_real_arr[$i]['operation_id'] = $this->userId;
...@@ -296,7 +304,7 @@ class Finance extends Basic ...@@ -296,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++;
} }
} }
...@@ -888,7 +896,7 @@ class Finance extends Basic ...@@ -888,7 +896,7 @@ class Finance extends Basic
/** /**
* 根据成交报告order_id查询经纪人 * 根据成交报告order_id查询经纪人
* 1盘方,2客方,3反签,4独家,5合作 * 1盘方,2客方,3反签,4独家,5合作方,6APP盘下载方,7APP客下载
* *
* @return \think\Response * @return \think\Response
*/ */
......
...@@ -60,7 +60,13 @@ class Member extends Basic{ ...@@ -60,7 +60,13 @@ class Member extends Basic{
//客户手机号 //客户手机号
if (!empty($params['phone'])) { if (!empty($params['phone'])) {
$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"']; //$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"'];
$where['a.user_phone'] = ['LIKE','%'.$params['phone'].'%'];
}
if (!empty($params['user_nick'])) {
//$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"'];
$where['a.user_nick'] = ['LIKE','%'.$params['user_nick'].'%'];
} }
//是否公客 //是否公客
......
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/6/12
* Time: 17:21
*/
namespace app\index\controller;
use app\api_broker\service\UploadFileService;
use app\index\extend\Basic;
use app\model\SLabel;
use app\model\SNews;
use think\Request;
class News extends Basic
{
protected $m_news;
public function __construct(Request $request = null)
{
parent::__construct($request);
$this->m_news = new SNews();
}
/**
* 商学院列表
*
* @return \think\Response|\think\response\View
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function index()
{
if (!$this->request->isAjax()) {
return view('index');
}
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
if (!empty($this->params['start_time']) && empty($this->params['end_time'])) {
$where['a.create_time'] = [ '> time', $this->params['start_time'] . ' 00:00:00' ];
}
if (!empty($this->params['end_time']) && empty($this->params['start_time'])) {
$where['a.create_time'] = [ '< time', $this->params['end_time'] . ' 23:59:59' ];
}
if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) {
$where['a.create_time'] = [ 'between time', [ $this->params['start_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' ] ];
}
if (!empty($this->params['title'])) {
$where['a.title'] = [ 'LIKE', '%' . $this->params['title'] . '%' ];
}
if (!empty($this->params['label_id'])) {
$where['a.s_label_id'] = $this->params['label_id'];
}
$field = 'a.id,a.title,a.content,a.create_time,b.name,c.label_name,a.comment_number';
$where['a.status'] = 0;
$data['list'] = $this->m_news->getListAgent($pageNo, $pageSize, 'id DESC', $field, $where);
$data['total'] = $this->m_news->getListAgentTotal($where);
return $this->response(200, "", $data);
}
/**
* 新增文章
*
* @return \think\Response
*/
public function addNews()
{
if (empty($this->params['title'])) {
return $this->response(101, '标题为空!');
}
if (empty($this->params['content'])) {
return $this->response(101, '内容为空!');
}
if (empty($this->params['file_img'])) {
return $this->response(101, '封面图片为空');
}
if (empty($this->params['s_label_id'])) {
return $this->response(101, '标签为空');
}
$data['title'] = trim($this->params['title']);
$data['content'] = trim($this->params['content']);
$data['publisher_id'] = $this->userId;
$data['cover_plan'] = $this->params['file_img'];
$data['s_label_id'] = $this->params['s_label_id'];
try {
$this->m_news->editData($data, $this->params['id']);
} catch (\Exception $e) {
return $this->response(101, '新增或编辑失败!');
}
return $this->response(200, '新增成功!');
}
/**
* 商学院资讯详情
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getNewsInfo()
{
if (empty($this->params['id'])) {
return $this->response(101, "Id is null.");
}
$field = 'id,title,s_label_id,cover_plan,content';
$where['status'] = 0;
$where['id'] = $this->params['id'];
$data = $this->m_news->getNewsInfo($field, $where);
return $this->response(200, "", $data);
}
/**
* 删除状态
*
* @return \think\Response
*/
public function delNews()
{
if (empty($this->params['id'])) {
return $this->response(101, "Id is null.");
}
$num = $this->m_news->editData([ 'status' => 1 ], $this->params['id']);
if ($num > 0) {
return $this->response(200);
} else {
return $this->response(101, "删除失败!");
}
}
/**
* 商学院标签
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getNewsLabel() {
$label = new SLabel();
$data = $label->getList(1, 200, '', 'id,label_name', ['status'=>0]);
return $this->response(200, '', $data);
}
public function newText() {
return view('new_text');
}
}
\ No newline at end of file
<?php
namespace app\index\controller;
use app\index\extend\Basic;
use app\api_broker\service\UploadFileService;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/7/3
* Time : 10:44
* Intro:
*/
class UploadImg extends Basic
{
private $uFService;
public function __construct($request = null)
{
parent::__construct($request);
$this->uFService = new UploadFileService();
}
/**
* 图片上传
* @return \think\Response
*/
public function uploadImg()
{
header('Access-Control-Allow-Origin:*');
set_time_limit(0);
$file = $_FILES['image'];
$type = request()->param('type');
$uploadResult = $this->uFService->upload($file, $type);
if ($uploadResult["code"] == 200) {
return $this->response("200", "图片上传成功", $uploadResult["msg"]);
} else {
return $this->response("101", $uploadResult["msg"]);
}
}
}
\ No newline at end of file
<?php <?php
namespace app\index\validate; namespace app\index\validate;
use think\Validate; use think\Validate;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User: zhuwei * User: zhuwei
* Date: 2018/6/13 * Date: 2018/6/13
* Time: 上午11:02 * Time: 上午11:02
*/ */
class VerifyValidate extends Validate class VerifyValidate extends Validate
{ {
protected $rule = [ protected $rule = [
'id' => 'require|number', 'id' => 'require|number',
'agent_id' => 'require|number',
// 'wx_open_id' => 'require|length:10,50', 'is_forbidden' => 'require|in:0,1',
// 'source' => 'require|number', 'operator_id' => 'require|number',
// 'user_id' => 'require|number|gt:0',
]; ];
protected $message = [ protected $message = [
'id.require' => 'id不能为空', 'id.require' => 'id不能为空',
'agent_id.require' => '经纪人id不能为空',
'agent_id.number' => '经纪人id必须为数字',
'is_forbidden.require' => '是否绑定字段必填',
'is_forbidden.in' => '是否绑定字段值只能为0或1',
'operator_id.require' => '操作人为必填字段',
'operator_id.number' => '操作人编号只能为数字',
]; ];
protected $scene = [ protected $scene = [
'select' => [ 'id' ], 'select' => [ 'id' ],
'verifyIsForbidden' => [ 'agent_id', 'is_forbidden', 'operator_id', 'id' ],
]; ];
} }
\ No newline at end of file
...@@ -47,9 +47,24 @@ ...@@ -47,9 +47,24 @@
</select> </select>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="姓名/手机号" name="search" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="姓名/手机号" name="search" type="text" value="">
<span class="btn btn-default btn3 ld-Marheight" id="search">搜索</span> </form>
<span class="btn btn-default btn3 ld-Marheight" id="reset">重置</span> </td>
<!--变更角色--> </tr>
<tr>
<th>注册时间</th>
<th>用户ID</th>
<th>用户头像</th>
<th>姓名</th>
<th>手机号</th>
<th>角色</th>
<!--2.2版本 -->
<th>评价次数</th>
<th>分数</th>
<th>操作</th>
</tr>
</thead>
<tbody id="agentlist">
</form> </form>
</td> </td>
...@@ -206,24 +221,34 @@ ...@@ -206,24 +221,34 @@
<!-- /.modal --> <!-- /.modal -->
</div> </div>
<!--绑定手机 2.2版本--> <!--绑定手机 2.2版本-->
<div class="modal fade" id="modal-unbundling" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="modal-phonebundling" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
× ×
</button> </button>
<h4 class="modal-title"> <h4 class="modal-title">
角色设置 角色设置
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
绑定手机 <table class="table table-striped table-bordered table-hover table-condensed">
<!--<label class="col-sm-3 control-label">权限角色:</label> <thead>
<select name="status" class="form-control btn6" id="edit_role"> <tr>
</select>--> <th>绑定手机</th>
<th>请求时间</th>
<th>手机绑定状态</th>
</tr>
</thead>
<tbody id='agent_phone_binding'>
</tbody>
</table>
</div> </div>
</form> </form>
</div> </div>
......
...@@ -97,36 +97,104 @@ ...@@ -97,36 +97,104 @@
margin-top: -350px; margin-top: -350px;
} }
/*上传图片列表 样式*/ /*上传图片列表 样式*/
.form-group { .form-group {
margin: 10px; margin: 10px;
} }
.input-100-width { .input-100-width {
width: 100px!important; width: 100px!important;
} }
.input-360-width { .input-360-width {
width: 360px!important; width: 360px!important;
} }
.textarea-500-width { .textarea-500-width {
width: 500px!important; width: 500px!important;
} }
.list-group-item>.full-width-100+.full-width-100 { .list-group-item>.full-width-100+.full-width-100 {
padding-top: 10px; padding-top: 10px;
} }
.list-group-item>.full-width-100>label { .list-group-item>.full-width-100>label {
width: 60px; width: 60px;
} }
.list-group-item>.full-pic-area>label { .list-group-item>.full-pic-area>label {
width: 120px; width: 120px;
} }
.delet-pic-btn{
color:red; .delet-pic-btn {
} color: red;
}
/*css样式*/
.img-cont {
width: 1000px;
height: 570px;
border: 2px solid #317ef3;
margin: 50px auto;
}
.img-cont>div {
width: 300px;
height: 260px;
border: 1px solid #777;
float: left;
margin: 20px 0 0 20px;
}
.img-cont>div>div {
width: 300px;
height: 220px;
border: 1px solid red;
}
.img-cont>div>a {
width: 60px;
height: 30px;
border-radius: 4px;
line-height: 30px;
text-align: center;
color: #fff;
display: block;
background: #317ef3;
margin: 5px 0 0 0px;
cursor: pointer;
}
.hide {
display: none !important;
}
.result>img,.result2>img{
width: 200px;
height: 200px;
}
#container_body{
position: relative;
}
#file_input {
opacity: 0;
position: absolute;
top: 0;
left: 145px;
height: 35px;
width: 80px;
}
.out-style {
position: absolute;
top: 0;
left: 60px;
}
.span-del2,.span-del{
color: red;
}
/*css样式*/
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
...@@ -149,7 +217,7 @@ ...@@ -149,7 +217,7 @@
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date1" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date1" type="date">
<span class="fore-span ld-Marheight">-</span> <span class="fore-span ld-Marheight">-</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date1" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date1" type="date">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_name" placeholder="商铺名称" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_name" placeholder="商铺地址" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_num" placeholder="商铺号" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_num" placeholder="商铺号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="customer_phone" placeholder="客户手机号" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="customer_phone" placeholder="客户手机号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="customer_name" placeholder="客户姓名" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="customer_name" placeholder="客户姓名" type="text" value="">
...@@ -256,23 +324,26 @@ ...@@ -256,23 +324,26 @@
<div class="modal-body"> <div class="modal-body">
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item"> <li class="list-group-item">
<div class="form-group full-width-100 full-pic-area"> <div class="form-group full-width-100 full-pic-area">
<!--<label for="">详情页轮播图(至少4张)</label>--> <!--input上传图片-->
<input readonly="readonly" type="text" name="xiangqing_pic_input" class="form-control" style="display: none" id="xiangqing_pic_input" placeholder="请选择图片"> <div id="container_body">
<button class="btn btn-default upload-image-btn" id="xiangqing_pic_btn" type="button" data-limittop="20">上传图片</button> <label>请选择一个图像文件:</label>
<span class="tip"></span> <button type="button btn2" class="btn btn-default">上传图片</button>
</div> <input type="file" id="file_input"/>
<ul class="img-pre-ul" id="xiangqing_pic_ul"> <div id="container_body_img_area"></div>
</ul> </div>
</li> </div>
<ul class="img-pre-ul" id="xiangqing_pic_ul">
</ul>
</li>
</ul> </ul>
</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">关闭
</button>--> </button>-->
<button type="button" class="btn btn-primary" id="saveBtn" data-dismiss="modal"> <button type="button btn2" class="btn btn-primary" id="saveBtn" data-dismiss="modal">
保存 保存
</button> </button>
</div> </div>
...@@ -282,5 +353,5 @@ ...@@ -282,5 +353,5 @@
<!-- /.modal --> <!-- /.modal -->
</div> </div>
<div id="img_mask_area" title="点击任意位置可关闭"> <div id="img_mask_area" title="点击任意位置可关闭">
<img /> <img />
</div> </div>
\ No newline at end of file \ No newline at end of file
...@@ -118,6 +118,8 @@ ...@@ -118,6 +118,8 @@
<option value="1"></option> <option value="1"></option>
</select> <br /> </select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br> <span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>
<!--<span>预计收款时间:</span><span id="bargaininfo_expect_payback_time"></span><br>-->
<span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" placeholder="请输入"><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br> <span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br> <span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number"> <span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number">
...@@ -300,17 +302,15 @@ ...@@ -300,17 +302,15 @@
<option value="3">反签</option> <option value="3">反签</option>
<option value="4">独家</option> <option value="4">独家</option>
<option value="5">合作方</option> <option value="5">合作方</option>
<option value="6">APP盘下载方</option>
<option value="7">APP客下载方</option>
</select> </select>
</div> </div>
<div class="po-relative"> <div class="po-relative">
<span>业务员:</span><input class="form-control" type="text" id="addmaid_input_ywy" /> <span>业务员:</span><input class="form-control" type="text" id="addmaid_input_ywy" />
<ul> <ul>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li> <!--<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li> <li data-id="5755">5755-测试-小杨业务员-17621975554</li>-->
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
</ul> </ul>
</div> </div>
<div> <div>
......
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
</select> <br /> </select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br> <span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br> <span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" readonly="readonly" placeholder="请输入"><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br> <span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number"> <span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number">
</div> </div>
......
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
</select> <br /> </select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br> <span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br> <span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" readonly="readonly" placeholder="请输入"><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br> <span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number"> <span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number">
</div> </div>
......
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
<label for="" style="width: 100%;">大讲堂(选填)</label> <label for="" style="width: 100%;">大讲堂(选填)</label>
<div class="input-group" style="width: 100%;" id="dajiangtang"> <div class="input-group" style="width: 100%;" id="dajiangtang">
<?php <?php
create_editor('describe'); create_editor('da_jiang_tang','');
?> ?>
</div> </div>
</div> </div>
......
...@@ -151,9 +151,11 @@ ...@@ -151,9 +151,11 @@
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="login_end" name="login_end" type="date"> --> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="login_end" name="login_end" type="date"> -->
<!-- <div class="row"></div> --> <!-- <div class="row"></div> -->
<!-- <input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" name="user" placeholder="客户姓名" type="text" value=""> --> <!--版本 2.2-->
<input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" name="userID" placeholder="客户ID" type="text" value="">
<input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" name="user" placeholder="客户姓名" type="text" value="">
<input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" name="phone" placeholder="客户姓名或手机号" type="text" value=""> <input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" name="phone" placeholder="客户手机号" type="text" value="">
<input class="form-control btn2 margin-top-ld input" data-rule-phoneus="false" data-rule-required="false" name="invite_phone" placeholder="邀请人(C端用户)手机号" type="text" value=""> <input class="form-control btn2 margin-top-ld input" data-rule-phoneus="false" data-rule-required="false" name="invite_phone" placeholder="邀请人(C端用户)手机号" type="text" value="">
......
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="schoolBusiness" />
<style>
.modal-body1 {
height: 600px;
overflow-y: auto;
padding-bottom: 60px;
}
.modal-body2 {
padding: 35px;
height: 380px;
}
.user-ul {
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
position: relative;
left: -40px;
}
.user-ul li {
list-style: none;
line-height: 30px;
}
.user-ul2 {
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
position: relative;
left: -40px;
}
.user-ul2 li {
list-style: none;
line-height: 30px;
}
.input {
width: 16%!important;
}
.text-left {
float: left;
display: inline-block;
height: 26px;
line-height: 26px;
font-size: 14px;
}
.text-right {
float: right;
display: inline-block;
}
#batch {
float: left;
height: 34px;
line-height: 34px;
}
.ld-Marheight {
margin-top: 15px;
}
.phone_list {
margin-top: 32px;
width: 182px;
margin-left: -182px;
}
.phone_jia {
width: 182px;
}
.phone_list li {
height: 22px;
line-height: 22px;
}
.phone_list li:nth-of-type(even) {
display: none;
}
.modal-dialog-one {
width: 668px;
}
.clear {
clear: both;
}
.left {
float: left;
font-size: 12px;
}
.bottom {
margin-top: 30px;
}
.btn6_1 {
width: 80% !important;
float: left;
}
.notice-title {
font-size: 20px;
}
.notice-time {
font-size: 13px;
margin-top: 20px;
}
.notice-text {
font-size: 16px;
margin-top: 30px;
text-indent: 2em;
}
.col-sm-9 .btn5 {
width: 30%!important;
}
.img-pre-ul {
padding-left: 0;
overflow: hidden;
/*width: 100%;*/
}
/*图片上传相关样式*/
.img-pre-ul>li {
list-style: no;
float: left;
width: 210px;
height: 170px;
overflow: hidden;
margin-right: 10px;
margin-top: 10px;
}
.img-pre-ul>li.pdf-pre-li {
height: 70px;
}
.img-pre-ul>li>img {
float: left;
width: 210px;
height: 140px;
object-fit: contain;
cursor: pointer;
}
.img-pre-ul>li>a {
float: left;
width: 210px;
text-align: center;
line-height: 30px;
}
.img-pre-ul>li>a.pdf-pre-a {
line-height: 20px;
word-break: break-all;
}
/*图片点击放大预览区域的样式*/
#img_mask_area {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 1999;
background-color: rgba(0, 0, 0, .3);
display: none;
}
#img_mask_area>img {
width: 900px;
height: 700px;
object-fit: contain;
position: absolute;
left: 50%;
top: 50%;
margin-left: -450px;
margin-top: -350px;
}
/*上传图片列表 样式*/
.form-group {
margin: 10px;
}
.input-100-width {
width: 100px!important;
}
.input-360-width {
width: 360px!important;
}
.textarea-500-width {
width: 500px!important;
}
.list-group-item>.full-width-100+.full-width-100 {
padding-top: 10px;
}
.list-group-item>.full-width-100>label {
width: 60px;
}
.list-group-item>.full-pic-area>label {
width: 120px;
}
.delet-pic-btn {
color: red;
}
#modal_content_add {
width: 900px;
}
</style>
<!--导航star-->
<!-- Sidebar -->
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<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="#">商学院</a>
</li>
<li class="active">商学院列表</li>
<div class="pull-right">
<ul class="bread_btn">
<li>
<a href="new_text.html" class="btn btn-default add_alert" target="_self"><i class="icon-plus"></i> 新增文章
</a>
</li>
</ul>
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="11">
<form action="" method="get" 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="start_date" name="start_date" 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="end_date" name="end_date" type="date">
<!--下拉列表-->
<select class="form-control btn2 margin-top-ld input" name="" id="district_id" title=" ">
<option value="">请选择标签</option>
</select>
<input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" id="release_title" placeholder="文章标题" type="text" value="">
<span class="btn btn-info btn3 margin-top-ld" id="search">搜索</span>
<span class="btn btn-info btn3 margin-top-ld" 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>
</tr>
</thead>
<tbody id="users_list" class="text-center">
</tbody>
</table>
</div>
<!-- /#page-content-wrapper -->
<!-- <div class="text-left">
每页显示<span id="page">15</span>条 | 共<span id="total_page"></span>条
</div> -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /#wrapper -->
<!-- /#删除模态框 -->
<div class="modal fade" id="modal-delete" 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">
&times;
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body">
<input type="hidden" value="" id="delete_id" /> 确认删除吗?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" id="confirm_delete">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="schoolBusinessNew" />
<style>
.modal-body1 {
height: 600px;
overflow-y: auto;
padding-bottom: 60px;
}
.modal-body2 {
padding: 35px;
height: 380px;
}
.user-ul {
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
position: relative;
left: -40px;
}
.user-ul li {
list-style: none;
line-height: 30px;
}
.user-ul2 {
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
position: relative;
left: -40px;
}
.user-ul2 li {
list-style: none;
line-height: 30px;
}
.input {
width: 16%!important;
}
.text-left {
float: left;
display: inline-block;
height: 26px;
line-height: 26px;
font-size: 14px;
}
.text-right {
float: right;
display: inline-block;
}
#batch {
float: left;
height: 34px;
line-height: 34px;
}
.ld-Marheight {
margin-top: 15px;
}
.phone_list {
margin-top: 32px;
width: 182px;
margin-left: -182px;
}
.phone_jia {
width: 182px;
}
.phone_list li {
height: 22px;
line-height: 22px;
}
.phone_list li:nth-of-type(even) {
display: none;
}
.modal-dialog-one {
width: 668px;
}
.clear {
clear: both;
}
.left {
float: left;
font-size: 12px;
}
.bottom {
margin-top: 30px;
}
.btn6_1 {
width: 80% !important;
float: left;
}
.notice-title {
font-size: 20px;
}
.notice-time {
font-size: 13px;
margin-top: 20px;
}
.notice-text {
font-size: 16px;
margin-top: 30px;
text-indent: 2em;
}
.col-sm-9 .btn5 {
width: 30%!important;
}
.img-pre-ul {
padding-left: 0;
overflow: hidden;
/*width: 100%;*/
}
/*图片上传相关样式*/
.img-pre-ul>li {
list-style: no;
float: left;
width: 210px;
height: 170px;
overflow: hidden;
margin-right: 10px;
margin-top: 10px;
}
.img-pre-ul>li.pdf-pre-li {
height: 70px;
}
.img-pre-ul>li>img {
float: left;
width: 210px;
height: 140px;
object-fit: contain;
cursor: pointer;
}
.img-pre-ul>li>a {
float: left;
width: 210px;
text-align: center;
line-height: 30px;
}
.img-pre-ul>li>a.pdf-pre-a {
line-height: 20px;
word-break: break-all;
}
/*图片点击放大预览区域的样式*/
#img_mask_area {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 1999;
background-color: rgba(0, 0, 0, .3);
display: none;
}
#img_mask_area>img {
width: 900px;
height: 700px;
object-fit: contain;
position: absolute;
left: 50%;
top: 50%;
margin-left: -450px;
margin-top: -350px;
}
/*上传图片列表 样式*/
.form-group {
margin: 10px;
}
.input-100-width {
width: 100px!important;
}
.input-360-width {
width: 360px!important;
}
.textarea-500-width {
width: 500px!important;
}
.list-group-item>.full-width-100+.full-width-100 {
padding-top: 10px;
}
.list-group-item>.full-width-100>label {
width: 60px;
}
.list-group-item>.full-pic-area>label {
width: 120px;
}
.delet-pic-btn {
color: red;
}
#modal_content_add {
width: 900px;
}
</style>
<!--导航star-->
<!-- Page Content -->
<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="#">商学院</a>
</li>
<li class="active">新增文章</li>
<div class="pull-right">
<ul class="bread_btn">
<li>
</li>
</ul>
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
</thead>
<tbody id="" class="text-center">
<div class="" id="modal_add_user">
<div class="">
<div class="" id="">
<div class="">
</button>
</div>
<div class="">
<form class="form-horizontal" action="/agents/add_user" id="">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">标题:</label>
<div class="col-sm-9">
<input type="text" class="form-control btn6" name="user_name" id="announcement_title" placeholder="请输入标题">
<span class="use-span text-danger">(20字以内,显示在首页列表)</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">标签:</label>
<div class="col-sm-9">
<select class="form-control btn5 input" name="" id="district_id2" title=" ">
<option value="">请选择标签</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">封面图:</label>
<div class="col-sm-9">
<!--选择图片-->
<ul class="list-group">
<li class="list-group-item">
<!--封面图 一张-->
<div class="form-group full-width-100 full-pic-area">
<!--<label for="">列表页封面图(1张)</label>-->
<input readonly="readonly" type="text" name="liebiao_pic_input" class="form-control" style="width: 150px !important;display:none" id="liebiao_pic_input" placeholder="请选择图片">
<button class="btn btn-default upload-image-btn" id="liebiao_pic_btn" type="button" data-limittop="1">选择图片</button>
<span class="tip"></span>
</div>
<ul class="img-pre-ul" id="liebiao_pic_ul"></ul>
</li>
</ul>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">内容</label>
<div class="col-sm-9">
<div class="form-group" style="width: 100%;">
<!--<label for="" style="width: 100%;">内容</label>-->
<div class="input-group" style="width: 100%;" id="dajiangtang">
<?php
create_editor('goods_sup_id','');
?>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="">
<button type="button" class="btn btn-primary" id="add_news">
保存
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /#wrapper -->
<!-- /#删除模态框 -->
<div class="modal fade" id="modal-delete" 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">
&times;
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body">
<input type="hidden" value="" id="delete_id" /> 确认删除吗?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" id="confirm_delete">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</div>
\ No newline at end of file
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
</td> </td>
</tr> </tr>
<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>
<th class="text-center">期待看铺时间</th> <th class="text-center">期待看铺时间</th>
......
...@@ -631,9 +631,11 @@ class AAgents extends BaseModel ...@@ -631,9 +631,11 @@ class AAgents extends BaseModel
} else { } else {
$where = $params; $where = $params;
} }
return $this->field($field) $result = $this->field($field)
->where($where) ->where($where)
->find(); ->find();
//echo $this->getLastSql();
return $result;
} }
/** /**
......
<?php
namespace app\model;
use think\Db;
use think\Exception;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/7/2
* Time : 11:31
* Intro:
*/
class ABindingDevice extends BaseModel
{
protected $table = 'a_binding_device';
/**
* @param array $params
* @return int
* @throws \Exception
*/
public function addDevice(array $params): int
{
$bandBin = $this->deviceBin($params);
Db::startTrans();
try {
$id = $this->insertGetId($bandBin);
Db::commit();
return $id;
} catch (Exception $exception) {
Db::rollback();
throw $exception;
}
}
/**
* 修改绑定的设备id
* @param array $params
* @return int
* @throws Exception
*/
public function updateDevice(array $params): int
{
$bandBin = $this->deviceBin($params);
Db::startTrans();
try {
$this->update($bandBin);
Db::commit();
return $params["id"];
} catch (Exception $exception) {
Db::rollback();
throw $exception;
}
}
/**
* 根据经纪人id获取绑定过的设备id
* @param array $params
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
*/
public function getDeviceByAgentId(array $params, string $field = "id,agent_id,device_id,is_forbidden,push_id")
{
$where_ = [];
if (isset($params["agent_id"])) {
$where_["agent_id"] = $params["agent_id"];
}
if (isset($params["device_id"])) {
$where_["device_id"] = $params["device_id"];
}
if (isset($params["is_forbidden"])) {
$where_["is_forbidden"] = $params["is_forbidden"];
}
return $this
->field($field)
->where($where_)
->order("create_time desc")
->select();
}
/**
* bin
* @param $params
* @return array
*/
private function deviceBin($params)
{
$arr = [];
if (isset($params["id"])) {
$arr["id"] = $params["id"];
} else {
$arr["create_time"] = date("Y-m-d H:i:s", time());
}
if (isset($params["agent_id"])) {
$arr["agent_id"] = $params["agent_id"];
}
if (isset($params["device_id"])) {
$arr["device_id"] = $params["device_id"];
}
if (isset($params["push_id"])) {
$arr["push_id"] = $params["push_id"];
}
if (isset($params["model"])) {
$arr["model"] = $params["model"];
}
if (isset($params["is_forbidden"])) {
$arr["is_forbidden"] = $params["is_forbidden"];
}
if (isset($params["operator_id"])) {
$arr["operator_id"] = $params["operator_id"];
}
$arr["update_time"] = date("Y-m-d H:i:s", time());
return $arr;
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class ACollectHouse extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'a_collect_house';
public function saveCollectHouse($data) {
$time = date("Y-m-d h:i:sa", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->insert($data);
}
/**
* 查询数据
* 朱伟 2018-07-04
*/
public function getCollectHouse($field,$params)
{
$result = Db::table($this->table)
->field($field)
//->alias('a')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
/**
* 更新数据
* 朱伟 2018-07-04
*/
public function updateCollectHouse($params)
{
$result = $this->update($params);
//dump($this->getLastSql());
return $result;
}
/**
* 查询收藏数据
* 朱伟 2018-07-04
*/
public function getCollectList($field,$params)
{
$result = Db::table($this->table)
->field($field)
->alias('CollectUser')
->join('g_houses Houses', 'CollectUser.house_id = Houses.id', 'left')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class ACollectUser extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'a_collect_user';
public function saveCollectUser($data) {
$time = date("Y-m-d h:i:sa", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->insert($data);
}
/**
* 查询数据
* 朱伟 2018-07-04
*/
public function getCollectUser($field,$params)
{
$result = Db::table($this->table)
->field($field)
//->alias('a')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
/**
* 更新数据
* 朱伟 2018-07-04
*/
public function updateCollectUser($params)
{
$result = $this->update($params);
//dump($this->getLastSql());
return $result;
}
/**
* 查询收藏数据
* 朱伟 2018-07-04
*/
public function getCollectList($field,$params)
{
$result = Db::table($this->table)
->field($field)
->alias('CollectUser')
->join('u_users Users', 'CollectUser.user_id = Users.id', 'left')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
}
...@@ -164,4 +164,32 @@ class Evaluate extends Model ...@@ -164,4 +164,32 @@ class Evaluate extends Model
return $result; return $result;
} }
/**
* 经纪人列表计算-评价次数
* 朱伟 2018年07月03日
*/
public function getAgentEvaluateNum($params = '')
{
$result = $this
->alias('a')
->where($params)
->count();
//dump($this->getLastSql());
return $result;
}
/**
* 经纪人列表计算-分数
* 朱伟 2018年07月03日
*/
public function getAgentEvaluateFraction($field,$params = '')
{
$result = Db::table('u_evaluate')
->field($field)
->alias('a')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
} }
...@@ -915,6 +915,12 @@ class OBargainModel extends Model ...@@ -915,6 +915,12 @@ class OBargainModel extends Model
case 5 : case 5 :
$result[$k]['role_name'] = '合作方'; $result[$k]['role_name'] = '合作方';
break; break;
case 6 :
$result[$k]['role_name'] = 'APP盘下载方';
break;
case 7 :
$result[$k]['role_name'] = 'APP客下载方';
break;
default : default :
$result[$k]['role_name'] = '无'; $result[$k]['role_name'] = '无';
} }
......
<?php
namespace app\model;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/7/4
* Time : 10:15
* Intro:
*/
use think\Db;
use think\Exception;
use Think\Log;
class OImg extends BaseModel
{
protected $table = "o_imgs";
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
/**
* 新增图片一张
* @param $params
* @return int|string
* @throws Exception xx
*/
public function addImgOnce(array $params): int
{
$imgBin = $this->imgBin($params);
Db::startTrans();
try {
$id = $this->insertGetId($imgBin);
Db::commit();
return $id;
} catch (Exception $exception) {
Db::rollback();
throw $exception;
}
}
/**
* 新增多张图片
* @param $params
* @param $img_id
* @param $img_type
* @return int|string
* @throws Exception xx
*/
public function addImgAll(int $img_id, int $img_type, array $params): int
{
$imgBin = [];
foreach ($params as $item) {
$insert_["img_id"] = $img_id;
$insert_["img_type"] = $img_type;
$insert_["img_name"] = $item;
$insert_["img_status"] = 0;
array_push($imgBin, $this->imgBin($insert_));
}
Db::startTrans();
try {
$this->saveAll($imgBin);
Db::commit();
return 1;
} catch (Exception $exception) {
Db::rollback();
throw $exception;
}
}
/**
* 修改图片单张
* @param array $params
* @return int
* @throws Exception
*/
public function updateImgStatus(array $params): int
{
$imgBin = $this->imgBin($params);
Db::startTrans();
try {
$this->update($imgBin);
Db::commit();
return $params["id"];
} catch (Exception $exception) {
Db::rollback();
throw $exception;
}
}
/**
* 根据id和类型获取图片
* @param array $params
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
*/
public function getImgList(array $params, string $field = "id,img_name")
{
if (isset($params["img_id"])) {
$where_["img_id"] = $params["img_id"];
}
if (isset($params["img_type"])) {
$where_["img_type"] = $params["img_type"];
}
$where_["img_status"] = 0;
$data = $this->db_
->field($field)
->where($where_)
->select();
// echo $this->getLastSql();
return $data;
}
/**
* bin
* @param $params
* @return array
*/
private function imgBin($params)
{
$arr = [];
if (isset($params["id"])) {
$arr["id"] = $params["id"];
} else {
$arr["create_time"] = date("Y-m-d H:i:s", time());
}
if (isset($params["img_id"])) {
$arr["img_id"] = $params["img_id"];
}
if (isset($params["img_type"])) {
$arr["img_type"] = $params["img_type"];
}
if (isset($params["img_name"])) {
$arr["img_name"] = $params["img_name"];
}
if (isset($params["img_status"])) {
$arr["img_status"] = $params["img_status"];
}
$arr["update_time"] = date("Y-m-d H:i:s", time());
return $arr;
}
}
\ No newline at end of file
...@@ -74,6 +74,9 @@ class OPayLogModel extends Model ...@@ -74,6 +74,9 @@ class OPayLogModel extends Model
public function selectPayLogByOrderNo($filed , $params) public function selectPayLogByOrderNo($filed , $params)
{ {
$where_ = []; $where_ = [];
if (isset($params["id"])) {
$where_["id"] = $params["id"];
}
if (isset($params["report_id"])) { if (isset($params["report_id"])) {
$where_["report_id"] = $params["report_id"]; $where_["report_id"] = $params["report_id"];
} }
...@@ -267,8 +270,9 @@ class OPayLogModel extends Model ...@@ -267,8 +270,9 @@ class OPayLogModel extends Model
->join("o_order b","a.order_id = b.id","left") ->join("o_order b","a.order_id = b.id","left")
->join("o_report c","b.f_id = c.id","left") ->join("o_report c","b.f_id = c.id","left")
->join('g_houses d','b.house_id = d.id','left') ->join('g_houses d','b.house_id = d.id','left')
->join('a_agents e','a.agent_id=e.id','left') ->join('a_agents e','c.report_agent_id=e.id','left')
->join('a_store f','e.store_id=f.id','left') ->join('a_store f','e.store_id=f.id','left')
->join('a_district g','f.district_id=g.id','left')
->limit($pageSize) ->limit($pageSize)
->page($pageNo) ->page($pageNo)
->order($order_) ->order($order_)
...@@ -281,6 +285,9 @@ class OPayLogModel extends Model ...@@ -281,6 +285,9 @@ class OPayLogModel extends Model
->join("o_order b","a.order_id = b.id","left") ->join("o_order b","a.order_id = b.id","left")
->join("o_report c","b.f_id = c.id","left") ->join("o_report c","b.f_id = c.id","left")
->join('g_houses d','b.house_id = d.id','left') ->join('g_houses d','b.house_id = d.id','left')
->join('a_agents e','c.report_agent_id=e.id','left')
->join('a_store f','e.store_id=f.id','left')
->join('a_district g','f.district_id=g.id','left')
->limit($pageSize) ->limit($pageSize)
->page($pageNo) ->page($pageNo)
->order($order_) ->order($order_)
...@@ -326,4 +333,21 @@ class OPayLogModel extends Model ...@@ -326,4 +333,21 @@ class OPayLogModel extends Model
public function getMoneyTotal() { public function getMoneyTotal() {
return $this->sum('money'); return $this->sum('money');
} }
/**
* 收款列表-查询收款数据
* 朱伟 2018-07-04
*/
public function selectReceiptImgList($filed , $params)
{
$where_ = [];
if (isset($params["id"])) {
$where_["id"] = $params["id"];
}
return Db::table($this->table)
->field($filed)
->where($where_)
->select();
}
} }
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/7/3
* Time: 14:51
*/
namespace app\model;
class SLabel extends BaseModel
{
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/7/3
* Time: 14:21
*/
namespace app\model;
class SNews extends BaseModel
{
/**
* 商学院列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getListAgent($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '')
{
$data = $this->field($field)
->alias('a')
->join('a_agents b', 'a.publisher_id = b.id', 'left')
->join('s_label c', 'a.s_label_id = c.id', 'left')
->where($params)
->order($order_)
->limit($pageSize)
->page($pageNo)
->select();
foreach ($data as $k=>$v) {
if (isset($v['cover_plan'])) {
$data[$k]['cover_plan'] = CK_IMG_URL . 'images/' . $v['cover_plan'];
}
}
return $data;
}
/**
* 商学院列表总数
*
* @param $params
* @return int|string
*/
public function getListAgentTotal($params)
{
return $this->alias('a')
->join('a_agents b', 'a.publisher_id = b.id', 'left')
->where($params)
->count();
}
/**
* 商学院资讯详情
*
* @param string $field
* @param string $params
* @param string $order
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getNewsInfo($field = '', $params = '', $order = 'id ASC')
{
$data = $this->field($field)
->where($params)
->order($order)
->find();
$data['cover_plan'] = CK_IMG_URL . 'images/' . $data['cover_plan'];
return $data;
}
/**
* 增加评论数
*
* @param $id
* @return int
*/
public function setCommentNumber($id) {
$comment_number = $this->where('id',$id)->value('comment_number');
$comment_number += 1;
return $this->where('id', $id)->setField('comment_number', $comment_number);
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/7/3
* Time: 17:35
*/
namespace app\model;
class SNewsComment extends BaseModel
{
/**
* 商学院列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getListAgent($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '')
{
$data = $this->field($field)
->alias('a')
->join('a_agents b', 'a.agent_id = b.id', 'left')
->where($params)
->order($order_)
->limit($pageSize)
->page($pageNo)
->select();
foreach ($data as $k=>$v) {
if (isset($v['img'])) {
$data[$k]['img'] = AGENTHEADERIMGURL . $v['img'];
}
}
return $data;
}
/**
* 商学院列表总数
*
* @param $params
* @return int|string
*/
public function getListAgentTotal($params)
{
return $this->alias('a')
->join('a_agents b', 'a.publisher_id = b.id', 'left')
->where($params)
->count();
}
}
\ No newline at end of file
...@@ -497,7 +497,7 @@ class Users extends Model ...@@ -497,7 +497,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') ->field('id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand')
->select(); ->select();
} }
...@@ -575,6 +575,17 @@ class Users extends Model ...@@ -575,6 +575,17 @@ class Users extends Model
->where($params) ->where($params)
->select(); ->select();
} }
public function getAgentByReferrer($field, $params)
{
$result = Db::name($this->table)
->field($field)
->alias("a")
->join("a_agents b", "a.referrer_id=b.id", "left")
->where($params)
->select();
// echo $this->getLastSql();
return $result;
}
/** /**
* 跟进用户手机号查询信息 * 跟进用户手机号查询信息
......
...@@ -139,6 +139,8 @@ Route::group('index', [ ...@@ -139,6 +139,8 @@ Route::group('index', [
'saveAgent' => [ 'index/agent/saveAgent', [ 'method' => 'get|post' ] ], //修改经纪人【接口】 'saveAgent' => [ 'index/agent/saveAgent', [ 'method' => 'get|post' ] ], //修改经纪人【接口】
'updateStatus' => [ 'index/agent/updateStatus', [ 'method' => 'post' ] ], //状态修改【接口】 'updateStatus' => [ 'index/agent/updateStatus', [ 'method' => 'post' ] ], //状态修改【接口】
'updateRole' => [ 'index/agent/updateRole', [ 'method' => 'post' ] ], //经纪人角色修改【接口】 'updateRole' => [ 'index/agent/updateRole', [ 'method' => 'post' ] ], //经纪人角色修改【接口】
'deviceList' => [ 'index/agent/deviceList', [ 'method' => 'post|get' ] ], //经纪人设备id绑定列表
'updateDevice' => [ 'index/agent/updateDevice', [ 'method' => 'post|get' ] ],//解绑或绑定经纪人设备id
//客户标签 //客户标签
'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => 'get' ] ], //客户标签列表接口/界面 'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => 'get' ] ], //客户标签列表接口/界面
...@@ -230,6 +232,11 @@ Route::group('index', [ ...@@ -230,6 +232,11 @@ Route::group('index', [
'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' ] ], //财务结单
'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存
'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片
'receiptImgList' => [ 'index/Collection/receiptImgList', [ 'method' => 'post|get' ] ],//收款列表-收款图片列表
'getTaxesById' => [ 'index/Finance/getTaxesById', [ 'method' => 'POST|GET' ] ], //财务结单 'getTaxesById' => [ 'index/Finance/getTaxesById', [ 'method' => 'POST|GET' ] ], //财务结单
'financeUpdateLog' => [ 'index/Finance/financeUpdateLog', [ 'method' => 'POST|GET' ] ], //财务结单 'financeUpdateLog' => [ 'index/Finance/financeUpdateLog', [ 'method' => 'POST|GET' ] ], //财务结单
...@@ -244,8 +251,14 @@ Route::group('index', [ ...@@ -244,8 +251,14 @@ Route::group('index', [
'evaluationList' => [ 'index/Evaluation/evaluationList', [ 'method' => 'POST|GET' ] ], //评价列表 朱伟 2018-06-13 'evaluationList' => [ 'index/Evaluation/evaluationList', [ 'method' => 'POST|GET' ] ], //评价列表 朱伟 2018-06-13
'marchInList' => [ 'index/MarchIn/marchInList', [ 'method' => 'POST|GET' ] ], //进场记录列表 朱伟 2018-06-13 'marchInList' => [ 'index/MarchIn/marchInList', [ 'method' => 'POST|GET' ] ], //进场记录列表 朱伟 2018-06-13
'superviseList' => [ 'index/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-14 'superviseList' => [ 'index/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-14
'business_school' => [ 'index/news/index', [ 'method' => 'GET' ] ], //商学院资讯列表
'addNews' => [ 'index/news/addNews', [ 'method' => 'POST' ] ], //新增商学院资讯
'getNewsInfo' => [ 'index/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'index/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院资标签
'delNews' => [ 'index/news/delNews', [ 'method' => 'POST' ] ], //删除商学院文章
'new_text' => [ 'index/news/newText', [ 'method' => 'GET' ] ], //删除商学院文章
'agentEvaluateNumAndFraction' => [ 'index/agent/agentEvaluateNumAndFraction', [ 'method' => 'POST|GET' ] ],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg' => [ 'index/UploadImg/uploadImg', [ 'method' => 'POST' ] ],//全局图片上传
]); ]);
...@@ -373,7 +386,11 @@ Route::group('broker', [ ...@@ -373,7 +386,11 @@ Route::group('broker', [
'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ 'method' => 'get|post' ] ], 'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ 'method' => 'get|post' ] ],
'getIsAccountStatement' => [ 'api_broker/OrderLog/getIsAccountStatement', [ 'method' => 'get|post' ] ], 'getIsAccountStatement' => [ 'api_broker/OrderLog/getIsAccountStatement', [ 'method' => 'get|post' ] ],
'login' => [ 'api_broker/Broker/login', [ 'method' => 'post' ] ], //经纪人登陆 'login' => [ 'api_broker/Broker/login', [ 'method' => 'post' ] ], //经纪人登陆 废弃
'loginV2' => [ 'api_broker/Broker/loginV2', [ 'method' => 'post' ] ], //经纪人登陆
'verifyAgentStatus' => [ 'api_broker/Broker/verifyAgentStatus', [ 'method' => 'post' ] ], //判断经纪人是否被解绑
'updateDevice' => [ 'api_broker/Broker/updateDevice', [ 'method' => 'post' ] ], //解绑或者绑定经纪人
'editAgent' => [ 'api_broker/Broker/editAgent', [ 'method' => 'post' ] ], //经纪人修改密码 'editAgent' => [ 'api_broker/Broker/editAgent', [ 'method' => 'post' ] ], //经纪人修改密码
'forgetPwd' => [ 'api_broker/Broker/forgetPwd', [ 'method' => 'post' ] ], //经纪人忘记密码 'forgetPwd' => [ 'api_broker/Broker/forgetPwd', [ 'method' => 'post' ] ], //经纪人忘记密码
'uploadHeadImg' => [ 'api_broker/Broker/uploadHeadImg', [ 'method' => 'post' ] ], //经纪人上传头像 'uploadHeadImg' => [ 'api_broker/Broker/uploadHeadImg', [ 'method' => 'post' ] ], //经纪人上传头像
...@@ -477,6 +494,17 @@ Route::group('broker', [ ...@@ -477,6 +494,17 @@ Route::group('broker', [
'superviseListNew' => [ 'api_broker/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-15 'superviseListNew' => [ 'api_broker/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-15
'addSupervise' => [ 'api_broker/Supervise/addSupervise', [ 'method' => 'POST|GET' ] ], //新增-监督执行 朱伟 2018-06-20 'addSupervise' => [ 'api_broker/Supervise/addSupervise', [ 'method' => 'POST|GET' ] ], //新增-监督执行 朱伟 2018-06-20
'superviseUploadImg' => [ 'api_broker/Supervise/superviseUploadImg', [ 'method' => 'POST|GET' ] ], //监督执行-上传图片 朱伟 2018-06-20 'superviseUploadImg' => [ 'api_broker/Supervise/superviseUploadImg', [ 'method' => 'POST|GET' ] ], //监督执行-上传图片 朱伟 2018-06-20
'uploadImg' => [ 'api_broker/UploadImg/uploadImg', [ 'method' => 'POST|GET' ] ], //图片上传
'business_school' => [ 'api_broker/news/index', [ 'method' => 'GET' ] ], //商学院资讯列表
'getNewsInfo' => [ 'api_broker/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'api_broker/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院标签
'getComment' => [ 'api_broker/news/getComment', [ 'method' => 'GET' ] ], //商学院评论列表
'commentNews' => [ 'api_broker/news/commentNews', [ 'method' => 'POST' ] ], //评论商学院文章
'addCollectUser' => [ 'api_broker/CollectUser/addCollectUser', [ 'method' => 'POST|GET' ] ], //收藏或取消收藏客户 朱伟 2018-07-04
'addCollectHouse' => [ 'api_broker/CollectHouse/addCollectHouse', [ 'method' => 'POST|GET' ] ], //收藏或取消收藏商铺 朱伟 2018-07-04
'getCollectUserList' => [ 'api_broker/CollectUser/getCollectUserList', [ 'method' => 'POST|GET' ] ], //查询收藏数据 朱伟 2018-07-04
'getCollectHouseList' => [ 'api_broker/CollectHouse/getCollectHouseList', [ 'method' => 'POST|GET' ] ], //查询收藏数据 朱伟 2018-07-04
]); ]);
......
...@@ -129,4 +129,8 @@ body{ ...@@ -129,4 +129,8 @@ body{
} }
#main_list>li.main-li-first>.main-area>.right-area>h6{ #main_list>li.main-li-first>.main-area>.right-area>h6{
color: #ff9419; color: #ff9419;
} }
\ No newline at end of file
.sp-pay-log-div+.sp-pay-log-div{
padding-top: .3rem;
}
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
if(!doc.addEventListener) return; if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false); win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false); doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);</script><script type=text/javascript src=./vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script><link href=./static/css/app.2c71066ef70dbce04427e0ec71aee085.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.94d51f6620cb57f6116c.js></script><script type=text/javascript src=./static/js/app.db402c74b35141cf046c.js></script></body></html> })(document, window);</script><script type=text/javascript src=./static/js/vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script><link href=./static/css/app.cf2603707f2f5640ca6c8f596dac90c4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.94d51f6620cb57f6116c.js></script><script type=text/javascript src=./static/js/app.15b15c91d3fdb0957e28.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment