Commit 2dd269da authored by hujun's avatar hujun

Merge remote-tracking branch 'remotes/origin/test' into chat_0705

parents fa4b714b 7031c521
......@@ -15,25 +15,29 @@ use app\api\untils\MessageUntils;
use app\api_broker\extend\Basic;
use app\api_broker\service\OrderLogService;
use app\model\AAgents;
use app\model\ABindingDevice;
use app\model\GOperatingRecords;
use app\model\NoteLog;
use app\model\UPhoneFollowPp;
use app\model\Users;
use think\Exception;
use think\Request;
class Broker extends Basic
{
protected $a_agents;
protected $aBD;
public function __construct(Request $request = null)
{
parent::__construct($request);
$this->a_agents = new AAgents();
$this->aBD = new ABindingDevice();
}
/**
* 经纪人登录
*
* 废弃by zw0702
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
......@@ -91,6 +95,182 @@ class Broker extends Basic
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;
use app\model\OMarchInModel;
use app\model\ORefundModel;
use think\Exception;
use Think\Log;
/**
* Created by PhpStorm.
......@@ -80,6 +81,52 @@ class OrderLog extends Basic
}
/**
* 收款
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function collectingBillV2()
{
$params = $this->params;
if (!isset($params["agent_id"]) || !isset($params["agent_id"]) || !isset($params["report_id"]) || !isset($params["order_id"]) || !isset($params["order_no"])
|| !isset($params["collecting_bill"]) || !isset($params["house_number"]) || !isset($params["industry_type"])) {
return $this->response("101", "请求参数错误");
}
/* $params = array(
"agent_id" => 1,//收款经纪人id
"agent_name" => 1,//收款经纪人id
"report_id" => 111,//报备id
"order_id" => 2, //关联order表id
"order_no" => "123123123", //订单no
// `type` '付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他',
//`pay_type` '支付方式 10支付宝 20 微信 30pos机器 40转账 50现金',
// `money` '入账金额 存分',
"collecting_bill" => [ { "type" : 10, "pay_type" : 10, "money" : 1100 }, { "type" :10, "pay_type" : 10, "money": 1200 } ],
"house_number" => "3301号",
"industry_type" => "asdasdasd",
"remark" => "没什么备注",
"transfer_img" => "12312312312"
);*/
$params["collecting_bill"] = json_decode($params["collecting_bill"], true);
$remark = isset($params["remark"]) ? $params["remark"] : "";
$transfer_img = isset($params["transfer_img"]) ? json_decode($params["transfer_img"] ,true): "";
Log::record("********************transfer_img**". json_encode($transfer_img));
$source = isset($params["source"]) ? $params["source"] : 0;
$is_ok = $this->service_->addCollectingBillV2($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);
if ($is_ok > 0) {
return $this->response("200", "request success", [ "bill_id" => $is_ok ]);
}
return $this->response("101", "request faild");
}
/**
* 收款
* @return \think\Response
......@@ -126,6 +173,7 @@ class OrderLog extends Basic
return $this->response("101", "request faild");
}
/**
* 获取上次提交付款的门牌号业态等
* @return \think\Response
......@@ -219,7 +267,8 @@ class OrderLog extends Basic
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["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"])) {
return $this->response("101", "请求参数错误");
}
......@@ -234,8 +283,8 @@ class OrderLog extends Basic
"trade_type" => 10, //成交类型 10出租 20 增佣 30 代理 40 好处费
"price" => 112131, //成交价格 存分
"commission" => 111, //佣金 存分
//`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方',
"estimated_receipt_date" => '2018-07-15',
//`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方 6APP盘下载方 7APP客下载方',
//`agent_id`'分佣经纪人id',
//`scale`'分佣比例 如 5表示百分之5',
// `scale_fee` '应分佣金 存分 ',
......@@ -247,12 +296,14 @@ class OrderLog extends Basic
$house_number = !isset($params["house_number"]) ? null : $params["house_number"];
$is_open = !isset($params["is_open"]) ? 0 : $params["is_open"];
$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);
$is_ok = $this->service_->addBargain($params["submit_agent_id"], $params["submit_agent_name"], $params["report_id"], $params["order_id"], $params["order_no"],
$params["trade_type"], $params["price"], $params["commission"], $params["commission_arr"], $house_number, $is_open, $industry_type);
$is_ok = $this->service_->addBargain($params["submit_agent_id"], $params["submit_agent_name"], $params["report_id"],
$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) {
//todo 更改用户信息 求租->已租
......@@ -328,7 +379,7 @@ class OrderLog extends Basic
{
$params = $this->params;
/* $params = array(
"order_id" => 2,
"order_id" => 38024,
);*/
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
......@@ -337,6 +388,22 @@ class OrderLog extends Basic
return $this->response("200", "request success", $data);
}
/**
* 报备时间轴
* @return \think\Response
*/
public function selectReportAllV2()
{
$params = $this->params;
/* $params = array(
"order_id" => 38024,
);*/
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
}
$data = $this->service_->selectListByOrderNoV2($params["order_id"]);
return $this->response("200", "request success", $data);
}
/**
* 修改成单状态
......
<?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
public function searchUser()
{
$params = $this->params;
/* $params = array(
"user_status" => 1,//客户状态(0:求租;1:已租;-1:无效)
/*$params = array(
"user_status" => 0,//客户状态(0:求租;1:已租;-1:无效)
"yetai" => "休闲娱乐",
"area_start" => 45,//面积起始范围 room_area2
"area_start" => 1,//面积起始范围 room_area2
"area_end" => 65,//面积结束范围
"money_start" => 1000,//租金 price2
"money_start" => 1,//租金 price2
"money_end" => 10000,//租金
"start_time" => "2018-05-25",
"start_time" => "2016-05-25",
"end_time" => "2018-05-30",
"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";
......@@ -111,6 +112,10 @@ class User extends Basic
$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");
if (empty($userList)) {
......
......@@ -39,6 +39,7 @@ class Basic extends Controller
protected $timeStamp_;
protected $filterVerify = array(
'broker/login',
'broker/loginV2',
'broker/token',
'broker/getShopList',
'broker/getShopDetail',
......
......@@ -8,6 +8,7 @@ use app\model\FollowUpLogModel;
use app\model\GHousesFollowUp;
use app\model\GHousesToAgents;
use app\model\OBargainModel;
use app\model\OImg;
use app\model\OMarchInModel;
use app\model\OPartialCommission;
use app\model\OPayLogModel;
......@@ -40,6 +41,56 @@ class OrderLogService
$this->bargainModel = new OBargainModel();
}
/**
* 批量插入收款记录
* @param $agent_id
* @param $agent_name
* @param $report_id
* @param $order_id
* @param $order_no
* @param $collecting_bill
* @param $house_number
* @param $industry_type
* @param $remark
* @param $transfer_img
* @param $source
* @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function addCollectingBillV2($agent_id, $agent_name, $report_id, $order_id, $order_no, $collecting_bill, $house_number,
$industry_type, $remark, $transfer_img, $source)
{
$bill_arr = $params = [];
$father_id = 0;
foreach ($collecting_bill as $collecting) {
if (isset($collecting["type"]) && isset($collecting["pay_type"]) && isset($collecting["money"])) {
if ($father_id == 0) {
$params = $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $order_id, $order_no,
$house_number, $industry_type, $remark, $transfer_img, $source);
$father_id = $this->payLogModel->insertPayLog($params);
} else {
array_push($bill_arr, $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $order_id, $order_no,
$house_number, $industry_type, $remark, $transfer_img, $source));
}
}
}
if ($father_id > 0) {
//保存图片
$oImgModel = new OImg();
$oImgModel->addImgAll($father_id, 2, $transfer_img);
$pushMarchIn = new PushMessageService($params["report_id"], 2);
$pushMarchIn->pushMarchInMessage($params["report_id"], 2); //推送
}
//todo if bill_arr not null, save database table
if (!empty($bill_arr)) {
return $this->payLogModel->addPayLog($bill_arr);
}
return $father_id;
}
/**
* 批量插入收款记录
* @param $agent_id
......@@ -124,13 +175,14 @@ class OrderLogService
* @param $house_number
* @param $is_open
* @param $industry_type
* @param $estimated_receipt_date
* @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function addBargain($submit_agent_id, $submit_agent_name, $report_id, $order_id, $order_no, $trade_type, $price,
$commission, $commission_arr, $house_number, $is_open, $industry_type)
$commission, $commission_arr, $house_number, $is_open, $industry_type, $estimated_receipt_date)
{
$bargain_arr = [];
$father_id = 0;
......@@ -140,11 +192,11 @@ class OrderLogService
&& isset($commission_val["scale_fee"])) {
if ($father_id == 0) {
$params = $this->bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id, $order_id,
$order_no, $trade_type, $price, $commission, $house_number, $is_open, $industry_type);
$order_no, $trade_type, $price, $commission, $house_number, $is_open, $industry_type, $estimated_receipt_date);
$father_id = $this->bargainModel->insertBargain($params);
} else {
array_push($bargain_arr, $this->bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id,
$order_id, $order_no, $trade_type, $price, $commission, $house_number, $is_open, $industry_type));
$order_id, $order_no, $trade_type, $price, $commission, $house_number, $is_open, $industry_type, $estimated_receipt_date));
}
}
array_push($agent_arr, [ $commission_val["agent_id"] ]);
......@@ -166,7 +218,7 @@ class OrderLogService
}
private function bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id, $order_id,
$order_no, $trade_type, $price, $commission, $house_number, $is_open, $industry_type)
$order_no, $trade_type, $price, $commission, $house_number, $is_open, $industry_type, $estimated_receipt_date)
{
$arr["report_id"] = $report_id;
$arr["father_id"] = $father_id;
......@@ -185,6 +237,7 @@ class OrderLogService
$arr["is_open"] = $is_open;
$arr["create_time"] = date("Y-m-d H:i:s", time());
$arr["update_time"] = date("Y-m-d H:i:s", time());
$arr["estimated_receipt_date"] = date("Y-m-d H:i:s", $estimated_receipt_date);
$arr["industry_type"] = $industry_type;
return $arr;
}
......@@ -197,7 +250,7 @@ class OrderLogService
public function selectOrderDetail($where_)
{
$orderModel = new OrderModel();
$field = "a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_nick,c.user_phone,
$field = "a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_name as user_nick,c.user_phone,
c.user_pic,c.sex";
$result = $orderModel->selectOrderDetail($field, $where_);
foreach ($result as $k => $v) {
......@@ -301,7 +354,105 @@ class OrderLogService
//成交报告
$field_bargain = "a.id,a.house_number,a.is_open,a.report_id,a.order_id,a.trade_type,a.submit_agent_id,a.industry_type,
a.submit_agent_name, a.price,a.commission,a.role,a.agent_id,a.scale,a.scale_fee,a.create_time,b.name,b.phone";
a.estimated_receipt_date,a.submit_agent_name, a.price,a.commission,a.role,a.agent_id,a.scale,a.scale_fee,a.create_time,b.name,b.phone";
$bargainData = $oBargainModel->selectBargainListByOrderNo($field_bargain, [ "order_id" => $order_id ]);
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$v["step_name"] = "bargain";
$result[$sort++] = $v;
}
}
return $this->sortByTime($result);
}
public function selectListByOrderNoV2($order_id)
{
$result = [];
$sort = 0;
//todo 1.验证订单是否存在
$orderModel = new OrderModel();
$oReportModel = new OReportModel();
$oMarchInModel = new OMarchInModel();
$followUpLogModel = new FollowUpLogModel();
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$orderData = $orderModel->selectOrderByOrderId("f_id,house_title", [ "order_id" => $order_id ]);
//dump($orderData);
if (count($orderData) <= 0) {
return [ "101", "找不到此订单编号" ];
}
$report_id = $orderData[0]["f_id"];
$field_report = "a.id,a.report_agent_id,a.report_agent_phone,a.report_agent_name,a.report_store_id,
a.user_id,a.user_phone,a.user_name,a.vehicle,a.intro,a.predict_see_time,a.create_time,b.store_name,c.district_name";
$reportData = $oReportModel->selectReportInfoById($field_report, [ "id" => $report_id ]);
if (count($reportData) == 0) {
return [ "101", "报备记录未找到" ];
}
//报备
$reportData[0]["step_name"] = "report";
$reportData[0]["house_title"] = $orderData[0]["house_title"];
$result[$sort++] = $reportData[0];
//进场 march in
$field_march_in = "id,reception_id,reception_name,report_id,order_no,march_in_remark,march_in_img,march_in_area,create_time";
$marchInData = $oMarchInModel->selectMarchInByOrderNo($field_march_in, [ "order_id" => $order_id ]);
if (count($marchInData) > 0) {
foreach ($marchInData as $k => $v) {
$v["step_name"] = "march_in";
$v["img_path"] = CHAT_IMG_URL;
$result[$sort++] = $v;
}
}
//跟进
$field_follow_up = "id,agent_id,agent_name,user_type,decision_maker,industry_type,area_requirement,price_requirement,province,city,
district,business_area,explain,explain_img,create_time";
$followUpLogData = $followUpLogModel->selectFollowUpListByReportId($field_follow_up, [ "report_id" => $report_id ]);
if (count($followUpLogData) > 0) {
foreach ($followUpLogData as $k => $v) {
$v["step_name"] = "follow_up_log";
$v = $this->convertFollowUp($v);
$v["img_path"] = CHAT_IMG_URL;
$result[$sort++] = $v;
}
}
//收款
$field_pay_log = "id,order_no,father_id,order_id,agent_id,agent_name,type,pay_type,money,house_number,industry_type,
remark,transfer_img,real_money,source,create_time";
$payLogData = $oPayLogModel->selectPayLogByOrderNo($field_pay_log, [ "order_id" => $order_id ]);
if (count($payLogData) > 0) {
$sortPayLogData = $this->arr2tree($payLogData);
foreach ($sortPayLogData as $k => $v) {
$v["step_name"] = "pay_log";
$v["img_path"] = CHAT_IMG_URL;
$result[$sort++] = $v;
}
}
//退款
$field_refund = "id,report_id,agent_id,agent_name,order_no,order_id,refund_money,status,name,bank,card_no,
remark,remark_img,create_time";
$refundData = $oRefundModel->selectRefundByOrderNo($field_refund, [ "order_id" => $order_id ]);
if (count($refundData) > 0) {
foreach ($refundData as $k => $v) {
$v["step_name"] = "refund";
$v["img_path"] = CHAT_IMG_URL;
$result[$sort++] = $v;
}
}
//成交报告
$field_bargain = "a.id,a.house_number,a.is_open,a.report_id,a.order_id,a.trade_type,a.submit_agent_id,a.industry_type,
a.estimated_receipt_date,a.submit_agent_name, a.price,a.commission,a.role,a.agent_id,a.scale,a.scale_fee,a.create_time,b.name,b.phone";
$bargainData = $oBargainModel->selectBargainListByOrderNo($field_bargain, [ "order_id" => $order_id ]);
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
......@@ -313,6 +464,34 @@ class OrderLogService
return $this->sortByTime($result);
}
public function arr2tree($list)
{
$tree = $trees = [];
foreach ($list as $key => $item) {
if ($item["father_id"] == 0) {
$list[$key]["father_id"] = $item["id"];
}
}
foreach ($list as $value) {
$tree[$value["father_id"]][] = $value;
}
foreach ($tree as $i => $v) {
//查询图片
$oImgModel = new OImg();
$params["img_id"] = $v[0]["father_id"];
$params["img_type"] = 2;
$img_arr = $oImgModel->getImgList($params);
$trees[$i]["img"] = $img_arr;
$trees[$i]["list"] = $v;
$trees[$i]["create_time"] = $v[0]["create_time"];
}
unset($tree);
sort($trees);
return $trees;
}
/**
* 查询流程 客户动态
......@@ -834,7 +1013,7 @@ class OrderLogService
$arr["cash"] = $value["cash"];
$arr["practical_fee"] = $value["practical_fee"];
$arr["service_charge"] = $value["service_charge"];
if(!empty($value["real_fee"]) && !empty($value["create_time"])){ //过滤掉空的
if (!empty($value["real_fee"]) && !empty($value["create_time"])) { //过滤掉空的
$cent_commission["info"][$key] = $arr;
}
......@@ -864,7 +1043,7 @@ class OrderLogService
$bargainModel = new OBargainModel();
$bargain_info_filed = "a.id,a.house_number,a.account_time,a.account_statement,a.father_id,a.is_open,a.trade_type,
a.price,a.industry_type,a.commission,c.id,c.internal_title,c.internal_address,d.user_id,d.user_phone,d.user_name";
a.price,a.industry_type,a.estimated_receipt_date,a.commission,c.id,c.internal_title,c.internal_address,d.user_id,d.user_phone,d.user_name";
$result = [];
$bargainInfo = $bargainModel->selectBargainDetail($bargain_info_filed, $params);
......@@ -992,6 +1171,17 @@ class OrderLogService
case 5:
return null;
break;
case 6:
return null;
break;
case 7:
$userModel = new Users();
$params["a.id"] = $result[0]["user_id"];
$params["a.referrer_source"] = 20;
$params["a.status"] = 0;
$params["b.status"] = 0;
$list = $userModel->getAgentByReferrer($field, $params);
break;
default:
return null;
......@@ -1000,10 +1190,13 @@ class OrderLogService
}
/**
* 1盘方,2客方,3反签,4独家,5合作
* 1盘方,2客方,3反签,4独家,5合作方(不返回),6APP盘下载方(不返回) 7APP客下载
*
* @param $order_id
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function searchBargainAllAgents($order_id)
{
......@@ -1072,6 +1265,21 @@ class OrderLogService
$list[$key]['name'] = $report_data[0]['name'];
$list[$key]['role'] = 3;
$list[$key]['role_name'] = '反签';
$key++;
}
$params["a.id"] = $result[0]["user_id"];
$params["a.referrer_source"] = 20;
$params["a.status"] = 0;
$params["b.status"] = 0;
$referrer = $userModel->getAgentByReferrer($field, $params);
if ($referrer[0]['id']) {
$list[$key]['id'] = $referrer[0]['id'];
$list[$key]['phone'] = $referrer[0]['phone'];
$list[$key]['name'] = $referrer[0]['name'];
$list[$key]['role'] = 7;
$list[$key]['role_name'] = 'APP客下载方';
}
return $list;
......
......@@ -11,6 +11,7 @@ namespace app\api_broker\service;
use app\api\untils\GeTuiUntils;
use app\model\AAgents;
use app\model\ABindingDevice;
use app\model\AStore;
use app\model\GHouses;
use app\model\GHousesToAgents;
......@@ -22,6 +23,7 @@ use app\model\PushFeed;
class PushMessageService
{
private $push;
public function __construct()
{
$this->push = new GeTuiUntils();
......@@ -37,19 +39,21 @@ class PushMessageService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushReportMessage($house_id, $agent_id, $type = 1) {
public function pushReportMessage($house_id, $agent_id, $type = 1)
{
$house_agent = new GHousesToAgents();
$agent = new AAgents();
$house = new GHouses();
$data = $house_agent->getHousesAgents($house_id, 'b.id,device_id', ['type'=> $type]);
$agent_name = $agent->getAgentsStoreById(['a.id'=>$agent_id], 'name,store_name');
$house_data = $house->getHouseDetail('internal_title',['id'=>$house_id]);
$data = $house_agent->getHousesAgents($house_id, 'b.id', [ 'type' => $type ]);
$agent_name = $agent->getAgentsStoreById([ 'a.id' => $agent_id ], 'name,store_name');
$house_data = $house->getHouseDetail('internal_title', [ 'id' => $house_id ]);
foreach ($data as $k => $v) {
$content = "【{$agent_name['store_name']}】店【{$agent_name['name']}】约带看【{$house_data['internal_title']}】商铺";
$this->push->public_push_message_for_one($v['id'], $v['device_id'], '报备', $content);
// $this->push->public_push_message_for_one($v['id'], $v['device_id'], '报备', $content);
$this->pushAgentAllDeviceId($v['id'], '报备', $content);
}
return ;
return;
}
/**
......@@ -61,14 +65,15 @@ class PushMessageService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushMarchInMessage($report_id = 0, $type = 1) {
public function pushMarchInMessage($report_id = 0, $type = 1)
{
$report = new OReportModel();
$field = 'house_title,user_name,report_store_id,report_agent_id';
$report_data = $report->getReportOrder($field, [ 'a.id' => $report_id ]);
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('id,device_id', $report_data['report_agent_id']);
$agent_data = $agent->getAgentInfo('id', $report_data['report_agent_id']);
if ($type == 1) {
$content = "客户{$report_data['user_name']}进场【{$report_data['house_title']}】商铺";
......@@ -82,9 +87,12 @@ class PushMessageService
$where['level'] = 20;
$agent_store = $agent->getAgentInfo('id,device_id', '', $where);
$this->push->public_push_message_for_one($report_data['report_agent_id'], $agent_data['device_id'], $title, $content);
$this->push->public_push_message_for_one($agent_store['id'], $agent_store['device_id'], $title, $content);
return ;
// $this->push->public_push_message_for_one($report_data['report_agent_id'], $agent_data['device_id'], $title, $content);
// $this->push->public_push_message_for_one($agent_store['id'], $agent_store['device_id'], $title, $content);
$this->pushAgentAllDeviceId($report_data['report_agent_id'], $title, $content);
$this->pushAgentAllDeviceId($agent_store['id'], $title, $content);
return;
}
/**
......@@ -95,7 +103,8 @@ class PushMessageService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushBargainMessage($report_id = 0){
public function pushBargainMessage($report_id = 0)
{
$report = new OReportModel();
$feed = new PushFeed();
$agent = new AAgents();
......@@ -103,14 +112,14 @@ class PushMessageService
$report_data = $report->getReportOrder($field, [ 'a.id' => $report_id ]);
$house_arr = [1,4,3031,3032]; //剔除测试楼盘推送
$house_arr = [ 1, 4, 3031, 3032 ]; //剔除测试楼盘推送
if (in_array($report_data['house_id'], $house_arr)) {
return ;
return;
}
//查询经纪人门店和部门信息
$agent_store = $agent->verifyUser('store_id', '', ['id'=>$report_data['report_agent_id']]);
$agent_store = $agent->verifyUser('store_id', '', [ 'id' => $report_data['report_agent_id'] ]);
$store = new AStore();
$store_name = $store->getStoreDistrictName($agent_store['store_id']);
$title = '成交就是这么简单';
......@@ -130,12 +139,12 @@ class PushMessageService
'click_num' => 10 //不要问什么,就是产品要加的。
]);
$content = "恭喜【{$store_name}】店【{$report_data['report_agent_name']}】成交【{$report_data['house_title']}】商铺一套";
$url = $this->push->http_host(). '/app/dist/index.html#/feeds?id='.$feed->id;
$feed->editData(['link'=>$url], $feed->id);
$url = $this->push->http_host() . '/app/dist/index.html#/feeds?id=' . $feed->id;
$feed->editData([ 'link' => $url ], $feed->id);
$this->push->push_message_for_all($title, $content, $url);
return ;
return;
}
/**
......@@ -145,10 +154,11 @@ class PushMessageService
* @param string $content
* @param string $url
*/
public function pushAll(string $title = '', string $content = '', string $url = '') {
$url = $this->push->http_host(). '/'. $url;
public function pushAll(string $title = '', string $content = '', string $url = '')
{
$url = $this->push->http_host() . '/' . $url;
$this->push->push_message_for_all($title, $content, $url);
return ;
return;
}
/**
......@@ -161,18 +171,19 @@ class PushMessageService
* @param string $user_id
* @return array|bool
*/
public function pushMessageById($id, $title,$content, $type = 'other' ,$user_id = '') {
public function pushMessageById($id, $title, $content, $type = 'other', $user_id = '')
{
if (empty($id)) {
return false;
}
$result = [];
$agent = new AAgents();
$device_id = $agent->getAgentsById($id, 'device_id');
// $agent = new AAgents();
// $device_id = $agent->getAgentsById($id, 'device_id');
// $result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
$result = $this->pushAgentAllDeviceId($id, $title, $content, $type, $user_id);
if (!empty($device_id)) {
$result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
}
return $result;
}
......@@ -187,12 +198,38 @@ class PushMessageService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushBargainCommissionMessage($submit_agent_name, $agent_id, $order_id) {
public function pushBargainCommissionMessage($submit_agent_name, $agent_id, $order_id)
{
$agent = new AAgents();
$order = new OrderModel();
$house = $order->getHouseInfoByOrderIdOne('internal_title', ['a.id'=>$order_id]);
$agent_data = $agent->getAgentInfo('id,device_id,name', $agent_id);
$house = $order->getHouseInfoByOrderIdOne('internal_title', [ 'a.id' => $order_id ]);
$agent_data = $agent->getAgentInfo('id,name', $agent_id);
$content = "{$submit_agent_name}新增成交报告,分佣方:{$agent_data['name']}[{$house['internal_title']}]商铺";
return $this->push->public_push_message_for_one($agent_data['id'], $agent_data['device_id'], '新增分佣', $content);
// return $this->push->public_push_message_for_one($agent_data['id'], $agent_data['device_id'], '新增分佣', $content);
return $this->pushAgentAllDeviceId($agent_data['id'], '新增分佣', $content);
}
/**
* @param $id
* @param $device_id
* @param $title
* @param $content
* @param null $type
* @param null $user_id
* @return bool
*/
public function pushAgentAllDeviceId($id, $title, $content, $type = null, $user_id = null)
{
$m_agent_device = new ABindingDevice();
$device_id_array = $m_agent_device->getDeviceByAgentId([ 'agent_id' => $id ], 'id,push_id');
foreach ($device_id_array as $k => $v) {
if (!empty($v['push_id'])) {
$this->push->public_push_message_for_one($id, $v['push_id'], $title, $content, $type, $user_id);
}
}
return true;
}
}
\ No newline at end of file
<?php
namespace app\api_broker\service;
/**
* Created by PhpStorm.
* User: hu jun
......@@ -6,9 +7,6 @@
* Time: 16:21
*/
namespace app\api_broker\service;
use think\File;
class UploadFileService
......@@ -22,7 +20,7 @@ class UploadFileService
* @param array $ext
* @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
$path = ROOT_PATH . 'public/';
switch ($type) {
case 'chat':
$path .= 'static/chat_image/';
$internet_path = CHAT_IMG_URL;
break;
case 'user_header' :
$path .= 'static/user_header/';
$internet_path = '';
break;
case 'agent_header' :
$path .= 'static/head_portrait/';
$internet_path = '';
break;
case 'house_img':
$path .= 'resource/lib/Attachments/images/';
$internet_path = '';
break;
case 'business_school' :
$path .= 'static/business_school/';
$internet_path = '';
break;
default :
$path .= 'static/';
$data['code'] = 101;
$data['msg'] = "上传图片类型错误";
return $data;
}
$path .= date('Ymd');
$name_str = date('YmdHis') . mt_rand(1000);
$date = date('Ymd');
$path .= $date;
$name_str = date('YmdHis') . mt_rand(10,1000);
if (is_array($_upload_file['tmp_name'])) {
foreach ($_upload_file['tmp_name'] as $k => $v) {
......@@ -80,12 +91,13 @@ class UploadFileService
$info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']);
if ($info) {
$data[$k]['code'] = 200;
$data[$k]['img_path'] = $info->getSaveName(); //生成的图片路径
$data[$k]['img_ext'] = $info->getExtension();
$data['code'] = 200;
$data["msg"][$k]['img_path'] = $date .'/'. $info->getSaveName(); //生成的图片路径
$data["msg"][$k]['internet_img_name'] = $internet_path . $data["msg"][$k]['img_path'];
$data["msg"][$k]['img_ext'] = $info->getExtension();
} else {
$data[$k]['code'] = 101;
$data[$k]['error'] = $_file->getError();
$data['code'] = 101;
$data["msg"][$k]['error'] = $_file->getError();
}
}
......@@ -96,11 +108,12 @@ class UploadFileService
$info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']);
if ($info) {
$data['code'] = 200;
$data['img_path'] = $info->getSaveName(); //生成的图片路径
$data['img_ext'] = $info->getExtension();
$data["msg"]['img_path'] = $date .'/'. $info->getSaveName(); //生成的图片路径
$data["msg"]['internet_img_name'] = $internet_path . $data["msg"]['img_path'];
$data["msg"]['img_ext'] = $info->getExtension();
} else {
$data['code'] = 101;
$data['error'] = $_file->getError();
$data['msg'] = $_file->getError();
}
}
......@@ -116,7 +129,7 @@ class UploadFileService
* @param $ext
* @return array
*/
public function checkUploadFile($_upload_file, $size, $ext)
private function checkUploadFile($_upload_file, $size, $ext)
{
$data = [];
if (is_array($_upload_file['tmp_name'])) {
......@@ -126,13 +139,13 @@ class UploadFileService
if (filesize($v) > $size) {
$data['code'] = 101;
$data['error'] = '文件太大无法上传';
$data['msg'] = '文件太大无法上传';
break;
}
if (!in_array($file_info['extension'], $ext)) {
$data['code'] = 101;
$data['error'] = '文件类型不符无法上传';
$data['msg'] = '文件类型不符无法上传';
break;
}
......@@ -141,13 +154,13 @@ class UploadFileService
if (filesize($_upload_file['tmp_name']) > $size) {
$data['code'] = 101;
$data['error'] = '文件太大无法上传';
$data['msg'] = '文件太大无法上传';
}
$file_info = pathinfo($_upload_file['name']);
if (!in_array($file_info['extension'], $ext)) {
$data['code'] = 101;
$data['error'] = '文件类型不符无法上传';
$data['msg'] = '文件类型不符无法上传';
}
}
......
......@@ -16,6 +16,12 @@ class PerformanceValidate extends Validate
protected $rule = [
'type' => '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 = [
......@@ -23,10 +29,23 @@ class PerformanceValidate extends Validate
'type.number' => 'type只能为数字',
'agent_id.require' => '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 = [
'verify' => [ 'type', '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 @@
<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.area_detail+' '+item.business_area}}</span></p>
<p v-if="item.step_name==='pay_log'">入账类型:<span>{{switchRzType(item.type)}}</span></p>
<p v-if="item.step_name==='pay_log'">支付方式:<span>{{switchPayType(item.pay_type)}}</span></p>
<p v-if="item.step_name==='pay_log'">入账金额:<span class="span-active">{{item.money}}元</span></p>
<p v-if="item.step_name==='pay_log'">商铺号:<span class="span-active">{{item.house_number}}</span></p>
<p v-if="item.step_name==='pay_log'">业态/品牌:<span>{{item.industry_type}}</span></p>
<div v-if="item.step_name==='pay_log'">
<div class="sp-pay-log-div" v-for="(item2, idnex2) in item.list">
<p>入账类型:<span>{{switchRzType(item2.type)}}</span></p>
<p>支付方式:<span>{{switchPayType(item2.pay_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'" class="yinhangka-info">退款银行卡信息</p>
<p v-if="item.step_name==='refund'">姓名:<span>{{item.agent_name}}</span></p>
......@@ -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==='follow_up_log'">补充说明:<span class="buchongshuoming">{{item.explain}}</span></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>
<a href="javascript:;"><img :src="item.img_path+item.march_in_img"></a>
</li>
</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==='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==='bargain'" class="li-caozuoren">操作人:<span>{{item.submit_agent_name}}</span></p>
</div>
......@@ -75,3 +89,13 @@
</body>
</html>
<!--
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')) {
if (!empty($config)) {
$_config = array_merge($_config, $config);
}
$CKEditor->editor("describe", $value, $_config);
$CKEditor->editor($id,$value,$_config);
}
}
......
......@@ -23,9 +23,12 @@ namespace app\index\controller;
use app\index\extend\Basic;
use app\model\AAgents;
use app\model\ABindingDevice;
use app\model\Agents;
use app\model\AStore;
use app\model\Evaluate;
use app\model\Regions;
use think\Exception;
use think\Session;
use think\Db;
......@@ -114,6 +117,61 @@ class Agent extends Basic
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查看
* $group_id !=0为查看
......@@ -246,4 +304,48 @@ class Agent extends Basic
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
......@@ -11,6 +11,7 @@ namespace app\index\controller;
use app\index\extend\Basic;
use app\index\untils\ExportExcelUntil;
use app\model\OImg;
use app\model\OPayLogModel;
class Collection extends Basic
......@@ -50,6 +51,10 @@ class Collection extends Basic
$where['d.internal_title'] = ['like', '%'.$this->params['internal_title'].'%'];
}
if (!empty($this->params['internal_address'])) {
$where['d.internal_address'] = ['like', '%'.$this->params['internal_address'].'%'];
}
if (!empty($this->params['user_name'])) {
$where['c.user_name'] = ['like','%'.$this->params['user_name'].'%'];
}
......@@ -76,58 +81,23 @@ class Collection extends Basic
}
if (empty($this->params['excel'])) {
$field = 'a.id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,a.house_number,a.type,d.internal_title,d.internal_address';
$field = 'a.id,a.father_id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,a.house_number,a.type,d.internal_title,d.internal_address,a.source';
$data['data']['list'] = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data['data']['total'] = $order->getAddPayLogOrderListLmitTotal($where);
$data['data']['money_total'] = $order->getMoneyTotal(); //总额
$data['data']['list'] = $this->numberTransitionString($data['data']['list']);
return $this->response(200, "", $data['data']);
} else {
$pageNo = 1;
$pageSize = 50000; //最多5万条数据
$field = 'a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,a.type,d.internal_address,a.house_number';
$field = 'a.create_time,c.user_name,c.user_phone,e.name,e.phone,f.store_name,g.district_name,a.money,a.real_money,a.type,a.pay_type,d.internal_address,a.house_number,a.source';
$data = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
//付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
//支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
foreach ($data as $k => $v) {
switch ($v['pay_type']) {
case 10 :
$data[$k]['pay_type'] = '意向金';break;
case 20 :
$data[$k]['pay_type'] = '定金';break;
case 30 :
$data[$k]['pay_type'] = '保管金';break;
case 40 :
$data[$k]['pay_type'] = '押金';break;
case 50 :
$data[$k]['pay_type'] = '租金';break;
case 60 :
$data[$k]['pay_type'] = '进场费';break;
case 70 :
$data[$k]['pay_type'] = '转让费';break;
default :
$data[$k]['pay_type'] = '其他';
}
switch ($v['type']) {
case 10 :
$data[$k]['type'] = '支付宝';break;
case 20 :
$data[$k]['type'] = '微信';break;
case 30 :
$data[$k]['type'] = 'POS机器';break;
case 40 :
$data[$k]['type'] = '转账';break;
case 50 :
$data[$k]['type'] = '现金';break;
default :
$data[$k]['type'] = '其他';
}
}
$data = $this->numberTransitionString($data);
$export = new ExportExcelUntil();
$title = [ '收款时间', '客户姓名', '客户手机号', '收款金额(元)', '实付金额(元)', '入账类型','入账方式','商铺地址','商铺号' ];
$title = [ '收款时间', '客户姓名', '客户手机号', '约带看人姓名', '约带看人手机号', '约带看人所属门店', '约带看人所属部门', '收款金额(元)', '实付金额(元)', '入账类型','入账方式','商铺地址','商铺号' ];
$export->exportTable('收款记录', $data, 9, '收款记录', $title);
}
......@@ -135,6 +105,7 @@ class Collection extends Basic
return view('getCollection');
}
}
public function addRealMoney(){
$params = $this->params;
/* $params = array(
......@@ -158,4 +129,169 @@ class Collection extends Basic
}
}
/**
* 收款列表-收款图片列表
* 朱伟 2018-07-04
*/
public function receiptImgList(){
$params = $this->params;
/*$params = array(
"id" => 6,
);*/
if(!isset($params["id"])){
return $this->response("101","请求参数错误");
}
$params['id'] = $params["id"];
$field = 'id,father_id';
//先查询收款表
$order = new OPayLogModel();
$order_res = $order->selectReceiptImgList($field , $params);
//判断收款表数据father_id是否大于o,如果大于0图片需要按img_id=father_id查询
if(!empty($order_res[0]['father_id']) && ($order_res[0]['father_id'] > 0)){
$params_img['img_id'] = $order_res[0]['father_id'];
}else{
$params_img['img_id'] = $params['id'];
}
$field = 'id,img_name';
$order = new OImg();
$res = $order->getImgList($params_img,$field);
foreach ($res as $k => $v) {
$res[$k]['img_name'] = CHAT_IMG_URL . $v['img_name'];
}
if($res){
return $this->response("200","成功",$res);
}else{
return $this->response("200","成功",$res);
}
}
/**
* 收款列表记录上传图片
* 朱伟 2018-07-04
*/
public function addReceiptImg(){
$params = $this->params;
/*$params = array(
"img_id" => 1,
"img_name" => 123,
);*/
if(!isset($params["img_id"])){
return $this->response("101","请求参数错误");
}
if(!isset($params["img_name"])){
return $this->response("101","请求参数错误");
}
$order = new OImg();
foreach (explode(',',$params["img_name"]) as $k => $v){
$time = date("Y-m-d H:i:s", time());
$save_data["img_id"] = $params["img_id"];//id根据img_type区分是收款还是进场还是其他'
$save_data["img_type"] = 2 ;//图片类型:1进场,2收款
$save_data["img_name"] = $v;//图片名称
$save_data["img_status"] = 0 ;//删除状态 0正常 1删除
$save_data["update_time"] = $time;//更新时间
$save_data["create_time"] = $time;//创建时间
$res = $order->addImgOnce($save_data);
}
if($res){
return $this->response("200","成功");
}else{
return $this->response("101","失败");
}
}
/**
* 收款列表-删除上传图片
* 朱伟 2018-07-04
*/
public function deleteReceiptImg(){
$params = $this->params;
/*$params = array(
"id" => 3,
"img_name" => 123,
);*/
if(!isset($params["id"])){
return $this->response("101","请求参数错误");
}
$time = date("Y-m-d H:i:s", time());
$save_data["id"] = $params["id"];//id根据img_type区分是收款还是进场还是其他'
$save_data["img_status"] = 1 ;//删除状态 0正常 1删除
$save_data["update_time"] = $time;//更新时间
$order = new OImg();
$res = $order->updateImgStatus($save_data);
if($res){
return $this->response("200","成功");
}else{
return $this->response("101","失败");
}
}
/**
* @param $data
* @return mixed
*/
public function numberTransitionString($data) {
//付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他 90佣金
//支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
foreach ($data as $k => $v) {
switch ($v['type']) {
case 10 :
$data[$k]['type'] = '意向金';break;
case 20 :
$data[$k]['type'] = '定金';break;
case 30 :
$data[$k]['type'] = '保管金';break;
case 40 :
$data[$k]['type'] = '押金';break;
case 50 :
$data[$k]['type'] = '租金';break;
case 60 :
$data[$k]['type'] = '进场费';break;
case 70 :
$data[$k]['type'] = '转让费';break;
case 80 :
$data[$k]['type'] = '其他';break;
case 90 :
$data[$k]['type'] = '佣金';break;
}
switch ($v['pay_type']) {
case 10 :
$data[$k]['pay_type'] = '支付宝';break;
case 20 :
$data[$k]['pay_type'] = '微信';break;
case 30 :
if ($v['source'] == 0) {
$data[$k]['pay_type'] = 'POS机器';
} elseif ($v['source'] == 1){
$data[$k]['pay_type'] = '智能POS机器';
}
break;
case 40 :
$data[$k]['pay_type'] = '转账';break;
case 50 :
$data[$k]['pay_type'] = '现金';break;
default :
$data[$k]['pay_type'] = '其他';
}
unset($data[$k]['source']);
}
return $data;
}
}
\ No newline at end of file
......@@ -71,7 +71,7 @@ class Evaluation extends Basic
}
//搜索条件 end
$fields_evaluate = 'user_nick,user_phone,evaluate_grade/2 as evaluate_grade,evaluate_content,a.create_time,c.name,c.phone,IF(d.report_id>0, d.report_id, e.report_id) AS report_id';
$fields_evaluate = 'user_nick,user_phone,evaluate_grade/2 as evaluate_grade,evaluate_content,a.create_time,c.name,c.phone,IF(d.order_id>0, d.order_id, e.order_id) AS order_id';
$data['list'] = $this->evaluateModel->findEvaluationList($pageNo, $pageSize, 'a.id desc', $fields_evaluate, $where);
$data['total'] = $this->evaluateModel->findEvaluationListCount($fields_evaluate, $where);
......
......@@ -203,7 +203,7 @@ class Finance extends Basic
} else {
$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.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'];
$data['data'] = $bargain->getBargainInfo($fields, $where);
}
......@@ -237,6 +237,10 @@ class Finance extends Basic
return $this->response('101', '实收佣金数量超过限制');
}
if (empty($this->params['estimated_receipt_date'])) {
return $this->response(101,'预计收款时间为空');
}
//应收总佣金
if (!empty($this->params['commission'])) {
$update_data['commission'] = $this->params['commission'];
......@@ -266,6 +270,8 @@ class Finance extends Basic
$update_data['price'] = $this->params['price'];
}
$update_data['estimated_receipt_date'] = $this->params['estimated_receipt_date']; //预计收款时间
$m_bargain = new OBargainModel();
$m_real = new ORealIncome();
......@@ -280,10 +286,12 @@ class Finance extends Basic
$log_data = $add_real_arr = $update_real_arr = [];
$i = $j = 0;
foreach ($practical_fee_arr as $item) {
if (!$item['fee'] || !$item['operation_date']) {
continue;
}
if ($item["fee_id"] > 0) {
if (empty($item['fee']) || empty($item['operation_date'])) {
$update_real_arr[$i]['id'] = $item['fee_id'];
$update_real_arr[$i]['is_del'] = 1;
$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]['bargain_id'] = $bargain_id;
$update_real_arr[$i]['operation_id'] = $this->userId;
......@@ -296,7 +304,7 @@ class Finance extends Basic
$add_real_arr[$j]['operation_id'] = $this->userId;
$add_real_arr[$j]['money'] = $item['fee'];
$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++;
}
}
......@@ -432,7 +440,7 @@ class Finance extends Basic
}
$service_ = new OrderLogService();
$data = $service_->selectListByOrderNo($params["order_id"]);
$data = $service_->selectListByOrderNoV2($params["order_id"]);
return $this->response("200", "request success", $data);
}
......@@ -888,7 +896,7 @@ class Finance extends Basic
/**
* 根据成交报告order_id查询经纪人
* 1盘方,2客方,3反签,4独家,5合作
* 1盘方,2客方,3反签,4独家,5合作方,6APP盘下载方,7APP客下载
*
* @return \think\Response
*/
......
......@@ -60,7 +60,13 @@ class Member extends Basic{
//客户手机号
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
......@@ -93,7 +93,7 @@ class Notice extends Basic
$service_push = new PushMessageService();
$url = 'app/dist/index.html#/announcementDetails?id='.$this->m_push->id;
$this->m_push->editData(['link'=> CURRENT_URL . $url], $this->m_push->id);
$service_push->pushAll($data['title'], $data['content'], $url);
$service_push->pushAll($data['title'], mb_substr($data['content'],0,10).'...' , $url);
return $this->response(200, '新增成功!');
}
......
<?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
namespace app\index\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/6/13
* Time: 上午11:02
*/
class VerifyValidate extends Validate
{
protected $rule = [
'id' => 'require|number',
// 'wx_open_id' => 'require|length:10,50',
// 'source' => 'require|number',
// 'user_id' => 'require|number|gt:0',
'agent_id' => 'require|number',
'is_forbidden' => 'require|in:0,1',
'operator_id' => 'require|number',
];
protected $message = [
'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 = [
'select' => [ 'id' ],
'verifyIsForbidden' => [ 'agent_id', 'is_forbidden', 'operator_id', 'id' ],
];
}
\ No newline at end of file
......@@ -46,10 +46,27 @@
<select class="form-control btn2 input ld-Marheight" name="" id="guest_stores">
</select>
<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>
<span class="btn btn-default btn3 ld-Marheight" id="reset">重置</span>
<!--变更角色-->
</form>
</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>
</td>
......@@ -206,7 +223,7 @@
<!-- /.modal -->
</div>
<!--绑定手机 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-content">
<div class="modal-header">
......@@ -220,10 +237,20 @@
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
绑定手机
<!--<label class="col-sm-3 control-label">权限角色:</label>
<select name="status" class="form-control btn6" id="edit_role">
</select>-->
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th>绑定手机</th>
<th>请求时间</th>
<th>手机绑定状态</th>
</tr>
</thead>
<tbody id='agent_phone_binding'>
</tbody>
</table>
</div>
</form>
</div>
......
......@@ -97,36 +97,104 @@
margin-top: -350px;
}
/*上传图片列表 样式*/
.form-group {
margin: 10px;
}
}
.input-100-width {
.input-100-width {
width: 100px!important;
}
}
.input-360-width {
.input-360-width {
width: 360px!important;
}
}
.textarea-500-width {
.textarea-500-width {
width: 500px!important;
}
}
.list-group-item>.full-width-100+.full-width-100 {
.list-group-item>.full-width-100+.full-width-100 {
padding-top: 10px;
}
}
.list-group-item>.full-width-100>label {
.list-group-item>.full-width-100>label {
width: 60px;
}
}
.list-group-item>.full-pic-area>label {
.list-group-item>.full-pic-area>label {
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>
<div id="page-content-wrapper">
<div class="container">
......@@ -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">
<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 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="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="">
......@@ -258,10 +326,13 @@
<li class="list-group-item">
<div class="form-group full-width-100 full-pic-area">
<!--<label for="">详情页轮播图(至少4张)</label>-->
<input readonly="readonly" type="text" name="xiangqing_pic_input" class="form-control" style="display: none" id="xiangqing_pic_input" placeholder="请选择图片">
<button class="btn btn-default upload-image-btn" id="xiangqing_pic_btn" type="button" data-limittop="20">上传图片</button>
<span class="tip"></span>
<!--input上传图片-->
<div id="container_body">
<label>请选择一个图像文件:</label>
<button type="button btn2" class="btn btn-default">上传图片</button>
<input type="file" id="file_input"/>
<div id="container_body_img_area"></div>
</div>
</div>
<ul class="img-pre-ul" id="xiangqing_pic_ul">
</ul>
......@@ -272,7 +343,7 @@
<div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</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>
</div>
......@@ -283,4 +354,4 @@
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</div>
\ No newline at end of file
</div>
\ No newline at end of file
......@@ -71,7 +71,7 @@
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="手机号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="姓名" type="text" value="">
<!-- <span class="fore-span ld-Marheight">进场平均分数:</span><span class="fore-span ld-Marheight evaluation-score" id='average_score'>空</span>-->
<span class="fore-span ld-Marheight">评价平均分数:</span><span class="fore-span ld-Marheight evaluation-score" id='average_score_evaluation'></span>
<!-- <span class="fore-span ld-Marheight">评价平均分数:</span><span class="fore-span ld-Marheight evaluation-score" id='average_score_evaluation'>空</span>-->
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
......
......@@ -118,6 +118,8 @@
<option value="1"></option>
</select> <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_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number">
......@@ -300,17 +302,15 @@
<option value="3">反签</option>
<option value="4">独家</option>
<option value="5">合作方</option>
<option value="6">APP盘下载方</option>
<option value="7">APP客下载方</option>
</select>
</div>
<div class="po-relative">
<span>业务员:</span><input class="form-control" type="text" id="addmaid_input_ywy" />
<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>
</div>
<div>
......
......@@ -150,6 +150,7 @@
</select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></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>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number">
</div>
......
......@@ -150,6 +150,7 @@
</select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></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>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number">
</div>
......
......@@ -355,7 +355,7 @@
<label for="" style="width: 100%;">大讲堂(选填)</label>
<div class="input-group" style="width: 100%;" id="dajiangtang">
<?php
create_editor('describe');
create_editor('da_jiang_tang','');
?>
</div>
</div>
......
......@@ -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"> -->
<!-- <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="">
......
{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
......@@ -207,7 +207,7 @@
<label for="inputEmail3" class="col-sm-3 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>
<span class="use-span text-danger">50字以内,显示在首页列表)</span>
</div>
</div>
......
......@@ -55,7 +55,8 @@
</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>
......
......@@ -631,9 +631,11 @@ class AAgents extends BaseModel
} else {
$where = $params;
}
return $this->field($field)
$result = $this->field($field)
->where($where)
->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
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
case 5 :
$result[$k]['role_name'] = '合作方';
break;
case 6 :
$result[$k]['role_name'] = 'APP盘下载方';
break;
case 7 :
$result[$k]['role_name'] = 'APP客下载方';
break;
default :
$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
public function selectPayLogByOrderNo($filed , $params)
{
$where_ = [];
if (isset($params["id"])) {
$where_["id"] = $params["id"];
}
if (isset($params["report_id"])) {
$where_["report_id"] = $params["report_id"];
}
......@@ -267,8 +270,9 @@ class OPayLogModel extends Model
->join("o_order b","a.order_id = b.id","left")
->join("o_report c","b.f_id = c.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_district g','f.district_id=g.id','left')
->limit($pageSize)
->page($pageNo)
->order($order_)
......@@ -281,6 +285,9 @@ class OPayLogModel extends Model
->join("o_order b","a.order_id = b.id","left")
->join("o_report c","b.f_id = c.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)
->page($pageNo)
->order($order_)
......@@ -326,4 +333,21 @@ class OPayLogModel extends Model
public function getMoneyTotal() {
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
//->where('create_time','< time',$Two_days_ago)//小于两天前,即排除48小时内受保护的客户
->limit($pagesize)
->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();
}
......@@ -575,6 +575,17 @@ class Users extends Model
->where($params)
->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', [
'saveAgent' => [ 'index/agent/saveAgent', [ 'method' => 'get|post' ] ], //修改经纪人【接口】
'updateStatus' => [ 'index/agent/updateStatus', [ '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' ] ], //客户标签列表接口/界面
......@@ -230,6 +232,11 @@ Route::group('index', [
'carryOut' => [ 'index/Supervise/carryOut', [ 'method' => 'get' ] ],//监督执行
'toReportListOne' => [ 'index/Finance/toReportListOne', [ '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' ] ], //财务结单
'financeUpdateLog' => [ 'index/Finance/financeUpdateLog', [ 'method' => 'POST|GET' ] ], //财务结单
......@@ -244,8 +251,14 @@ Route::group('index', [
'evaluationList' => [ 'index/Evaluation/evaluationList', [ '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
'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' ] ],//全局图片上传
]);
......@@ -368,12 +381,17 @@ Route::group('broker', [
'getBeforeBillInfo' => [ 'api_broker/OrderLog/getBeforeBillInfo', [ 'method' => 'get|post' ] ],
'savePosBillMessage' => [ 'api_broker/OrderLog/savePosBillMessage', [ 'method' => 'get|post' ] ],
'collectingBill' => [ 'api_broker/OrderLog/collectingBill', [ 'method' => 'get|post' ] ],
'collectingBillV2' => [ 'api_broker/OrderLog/collectingBillV2', [ 'method' => 'get|post' ] ],
'refund' => [ 'api_broker/OrderLog/refund', [ 'method' => 'get|post' ] ],
'bargain' => [ 'api_broker/OrderLog/bargain', [ 'method' => 'get|post' ] ],
'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ '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' ] ], //经纪人修改密码
'forgetPwd' => [ 'api_broker/Broker/forgetPwd', [ 'method' => 'post' ] ], //经纪人忘记密码
'uploadHeadImg' => [ 'api_broker/Broker/uploadHeadImg', [ 'method' => 'post' ] ], //经纪人上传头像
......@@ -411,6 +429,7 @@ Route::group('broker', [
'agentsPhone' => [ 'api_broker/CellPhone/agentsPhone', [ 'method' => 'get|post' ] ], //获取经纪人拨打界面手机号
'dayStatement' => [ 'api_broker/Statement/dayStatement', [ 'method' => 'get|post' ] ],
'selectReportAll' => [ 'api_broker/OrderLog/selectReportAll', [ 'method' => 'get|post' ] ],
'selectReportAllV2' => [ 'api_broker/OrderLog/selectReportAllV2', [ 'method' => 'get|post' ] ],
'searchOrder' => [ 'api_broker/OrderLog/searchOrder', [ 'method' => 'get|post' ] ],
'bargainList' => [ 'api_broker/OrderLog/bargainList', [ 'method' => 'get|post' ] ],
'bargainDetail' => [ 'api_broker/OrderLog/bargainDetail', [ 'method' => 'get|post' ] ],
......@@ -477,6 +496,17 @@ Route::group('broker', [
'superviseListNew' => [ 'api_broker/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-15
'addSupervise' => [ 'api_broker/Supervise/addSupervise', [ '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
]);
......
......@@ -130,3 +130,7 @@ body{
#main_list>li.main-li-first>.main-area>.right-area>h6{
color: #ff9419;
}
.sp-pay-log-div+.sp-pay-log-div{
padding-top: .3rem;
}
......@@ -23,4 +23,4 @@
if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, 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>
\ No newline at end of file
})(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.12de191f0b94b89f051001ba714ad048.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.0d2bc365866a1d047bd1.js></script></body></html>
\ 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 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.
{"version":3,"sources":["webpack:///webpack/bootstrap 7befbe63d01516c8269f"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7befbe63d01516c8269f"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 26c00d0d80f37ccae02a"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 26c00d0d80f37ccae02a"],"sourceRoot":""}
\ No newline at end of file
......@@ -277,6 +277,14 @@ function loadMain(){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
if((_this.attr('data-markid') == '1') || (_this.attr('data-markid') == '4')){
//如果选择了未打通,或取消拨打,则直接关闭
if(_this.parent().parent().index() === 0){
//只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
_genjinModal.hide();//跟进模态框关闭
return false;
}
};
if(!_this.hasClass('genjin-mark-active')){
_this.addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
};
......@@ -286,14 +294,18 @@ function loadMain(){
_btnSave.click(function(e){
e.preventDefault();
e.stopPropagation();
var _genjinMarkOBj = $('.genjin-mark-area-zhuangtai .genjin-mark-active'),
_genjinMarkOBj2 = $('.genjin-mark-area-putong .genjin-mark-active'),
_beizhuObjVal = $.trim(_beizhuObj.val()),
_isFreeFlag = true;//是否释放
// if(_beizhuObjVal == '' && _genjinMarkOBj.length == 0){
// layerTipsX('请填写跟进内容或选择跟进标签');
// return false;
// };
if((_genjinMarkOBj2.attr('data-markid') == '1') || (_genjinMarkOBj2.attr('data-markid') == '4')){
//如果选择了未打通,或取消拨打,则直接关闭
_genjinModal.hide();//跟进模态框关闭
return false;
};
if(_genjinMarkOBj.length == 0){
layerTipsX('请选择状态跟进标签');
return false;
......@@ -329,9 +341,6 @@ function loadMain(){
if(_isFreeFlag) {
freePhone();
};
layer.close(_index);
return false;
//如果是电话跟进,选择了没打通或者取消拨打,则关掉不进行提交
}else{
$.ajax({
type: 'POST',
......
......@@ -59,8 +59,6 @@
userid: '',
initTabNumMain: 0,
mainData: [{
'titlet': '人员排行1',
'title': '人员排行',
'isLoad': false,
'topLineNum': 5,
......@@ -69,8 +67,6 @@
'index_': 4
}
}, {
'titlet': '人员排行2',
'title': '门店排行',
'isLoad': false,
'topLineNum': 5,
......@@ -79,8 +75,6 @@
'index_': 4
}
}, {
'titlet': '人员排行3',
'title': '部门排行',
'isLoad': false,
'topLineNum': Number.POSITIVE_INFINITY,
......
......@@ -77,6 +77,7 @@
color: #1A1A1A;
line-height: .56rem;
margin-top: .5rem;
padding-bottom:1rem;
}
.sec-right{
margin-left: .32rem;
......
<template>
<li>
<div class="flex">
<div class="flex">
<img-error :datasrc="data.img" :imgtype="'avatar'"></img-error>
</div>
<div>
<p>{{data.name}}</p>
<p>{{data.create_time}}</p>
<div>
<p class="comment-real-p">{{showContent}}</p>
<a class="comment-a-lookmore oh" href="javascript:;" @click="lookMore" v-show="!isLookMore"><span class="fl">查看更多</span></a>
<a class="comment-a-shouqi oh" href="javascript:;" @click="shouqi" v-show="isLookMore"><span>收起</span></a>
</div>
</div>
</div>
</li>
</template>
<script>
import '@/assets/js/layer041002.js';
export default {
name: '',
props: {
data: {
type: Object,
default: () => ({
message: 'hello'
})
},
dataindex: {
type: [Number, String],
default: 0
}
},
components: {
},
data: () => ({
dealContent: '',
showContent: '',
isLookMore: false,
limitNumberNum: 40
}),
created() {
let _this = this;
let _str = _this.data.comment_content;
let _len = _str.length;
let _lim = _this.limitNumberNum;
_this.showContent = _this.dealContent = _len>_lim ? _str.slice(0,_lim)+'...' : _str;
},
mounted() {
let _this = this;
},
methods: {
lookMore() {
let _this = this;
_this.isLookMore = true;
_this.showContent = _this.data.comment_content;
},
shouqi() {
let _this = this;
_this.isLookMore = false;
_this.showContent = _this.dealContent;
}
},
computed: {
}
}
</script>
<style scoped>
li>div{
padding: .3rem 0;
}
li>div>div:nth-of-type(1){
padding-right: .24rem;
}
li>div>div:nth-of-type(1)>img{
width: .75rem;
height: .75rem;
border-radius: .375rem;
}
li>div>div:nth-of-type(2){}
li>div>div:nth-of-type(2)>p:nth-of-type(1){
color: #808080;
font-size: .3rem;
}
li>div>div:nth-of-type(2)>p:nth-of-type(2){
color: #808080;
font-size: .24rem;
padding-top: .1rem;
}
li>div>div:nth-of-type(2)>div{
padding: .2rem 0 .2rem;
color: #1a1a1a;
position: relative;
}
.comment-real-p{
word-break: break-all;
}
.comment-a-lookmore,.comment-a-shouqi{
display: block;
line-height: .4rem;
color: #FF9419;
font-size: .26rem;
position: relative;
}
.comment-a-lookmore{
width: 1.4rem;
position: absolute;
right: 0;
bottom: .2rem;
}
.comment-a-shouqi{
text-align: right;
}
.comment-a-lookmore::after{
content: '';
float: right;
width: .18rem;
height: .4rem;
padding-left: .18rem;
background: url(images/icon_down@2x.png) no-repeat center center/.18rem .13rem;
transform: rotate(180deg);
}
.comment-a-shouqi::after{
content: '';
width: .18rem;
height: .4rem;
padding-left: .36rem;
background: url(images/icon_down@2x.png) no-repeat center center/.18rem .13rem;
}
</style>
\ No newline at end of file
<template>
<div>
<header-pulic :data="headerData"></header-pulic>
<article>
<div class="article-bar">
<h1>{{articleTitle}}</h1>
<p>{{articleTime}}</p>
</div>
<div class="oh article-content-area" v-html="articleContent">{{articleContent}}</div>
</article>
<div class="list-commnet-area">
<h2>最新评论</h2>
<pagination-load :canload="!isStop" :distance="10" @load="getCommentList">
<ul>
<li is="self-defined-li" v-for="(item, index) in commentDataList" :data="item" :dataindex="index"></li>
</ul>
</pagination-load>
<div class="loading-gif-block" v-show="isLoading">正在加载...</div>
<div class="no-data-block" v-if="noDataFlag">暂无数据</div>
<div class="no-more-block" v-if="!noDataFlag&&isStop">没有更多了...</div>
</div>
<div class="comment-area-seat"></div>
<div class="txt-comment-area" v-show="isCommentingFlag">
<div class="mask-comment-area" @click="isCommentingFlag = false"></div>
<div class="real-comment-area">
<div class="flex-center">
<textarea v-model="commentContent"></textarea>
</div>
<div class="oh">
<a class="fl flex-center" href="javascript:;" @click="isCommentingFlag = false">取消</a>
<a class="fr flex-center" href="javascript:;" @click="commentSend" v-show="!isSending">发送</a>
<a class="fr flex-center" href="javascript:;" v-show="isSending">发送ing</a>
</div>
</div>
</div>
<div class="btn-comment-area flex-center" v-show="!isCommentingFlag">
<a href="javascript:;" class="flex-center" @click="isCommentingFlag = true"><img :src="commentIcon" />我来说两句</a>
</div>
</div>
</template>
<script>
import '@/assets/js/layer041002.js';
import paginationLoad from '@/components/publicEg/paginationLoad';
import selfDefinedLi from '@/components/businessCollege/articleCommentLi';
import commentIcon from '@/components/businessCollege/images/icon_comment_2x.png';
export default {
name: '',
props: {
data: {
type: Object,
default: () => ({
message: 'hello'
})
},
dataindex: {
type: [Number, String],
default: 0
}
},
components: {
'pagination-load': paginationLoad,
'self-defined-li': selfDefinedLi
},
data() {
let _this = this;
return {
headerData: {
'title': '',
'noborder': false,
'isBack': true
},
articleId: _this.$route.query.id,
token: localStorage.getItem('token'),
articleTitle: '',
articleTime: '',
articleContent: '',
commentIcon,
isCommentingFlag: false,//是否正在写评论
commentContent: '',//评论的内容
isSending: false,//是否正在提交评论
isStop: false,
isLoading: false,
noDataFlag: false,
pageSize: 10,
page: 1,
commentDataList: []
};
},
created() {
let _this = this;
_this.common.duringRequest({
'urlStr': '/broker/getComment',
startAction() {
_this.isLoading = true;
},
endAction() {
_this.isLoading = false;
}
},{
'urlStr': '/broker/commentNews',
startAction() {
_this.isSending = true;
},
endAction() {
_this.isSending = false;
}
});
_this.axios({
method: 'get',
url: '/broker/getNewsInfo',
responseType: 'json',
data: {
'id': _this.articleId,
'AuthToken': _this.token
}
})
.then(function(response) {
if(response.data.code == 200) {
let _news = response.data.data.news;
_this.articleTitle = _news.title;
_this.articleTime = _news.create_time;
_this.articleContent = _this.common.urlDeal(_news.content);
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
//获取评论列表
_this.getCommentList();
},
methods: {
commentSend() {
let _this = this;
let _len = _this.commentContent.length;
if(_len<100 || _len>500){
layer.tipsX('评论字数需在100~500之间,当前字数为'+_len);
}else{
_this.axios({
method: 'POST',
url: '/broker/commentNews',
responseType: 'json',
data: {
'content': _this.commentContent,
'news_id': _this.articleId,
'AuthToken': _this.token
}
})
.then(function(response) {
if(response.data.code == 200) {
_this.resetCommentList();
_this.getCommentList();
_this.isCommentingFlag = false;
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
}
},
getCommentList() {
let _this = this;
_this.axios({
method: 'get',
url: '/broker/getComment',
responseType: 'json',
data: {
'pageNo': _this.page,
'pageSize': _this.pageSize,
'news_id': _this.articleId,
'AuthToken': _this.token
}
})
.then(function(response) {
if(response.data.code == 200) {
let _list = response.data.data;
if(Array.isArray(_list)){
if(_list.length === 0) {
_this.page === 1 && (_this.noDataFlag = true);
_this.isStop = true;
} else {
_this.commentDataList.push(..._list); //这里使用push要注意,先把数组展开
_list.length < _this.pageSize && (_this.isStop = true);
_this.page++;
};
};
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
},
resetCommentList() {
//重置评论列表的内容
let _this = this;
_this.commentDataList = [];
_this.page = 1;
_this.noDataFlag = false;
}
},
computed: {
}
}
</script>
<style scoped>
article,.list-commnet-area{
background-color: white;
padding: .3rem;
}
/*而如果在组件中使用了v-html,要为myHtml中的标签添加CSS样式,我们需要在写样式的时候添加>>>:*/
.article-content-area >>> img{
width: 100%;
max-width: 6.9rem;
}
.article-content-area >>> iframe{
width: 100%;
max-width: 6.9rem;
}
.article-content-area >>> embed{
width: 100%;
max-width: 6.9rem;
}
.article-content-area >>> video{
width: 100%;
max-width: 6.9rem;
}
.article-bar>h1{
font-size: .4rem;
color: #1a1a1a;
}
.article-bar>p{
font-size: .3rem;
color: #999;
}
.article-bar+div{
padding-top: .3rem;
}
.list-commnet-area{
margin-top: .2rem;
}
.list-commnet-area>h2{
font-size: .32rem;
color: #1a1a1a;
}
.comment-area-seat{
height: .98rem;
}
/*按钮区域样式*/
.btn-comment-area{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: .98rem;
border-top: 1px solid #ccc;
background-color: white;
}
.btn-comment-area>a{
height: .7rem;
width: 6.86rem;
border-radius: .35rem;
border: 1px solid #ccc;
color: #ccc;
}
.btn-comment-area>a>img{
width: .3rem;
padding-right: .6em;
}
.txt-comment-area{
position: fixed;
left: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .3);
width: 100%;
height: 100%;
}
.mask-comment-area{
width: 100%;
height: 100%;
}
/*评论输入框区域*/
.real-comment-area{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 2.6rem;
background-color: #f4f4f4;
}
.real-comment-area>div:nth-of-type(1){
height: 1.8rem;
}
.real-comment-area>div:nth-of-type(1)>textarea{
width: 6.86rem;
height: 1.4rem;
border: 1px solid #e0e0e0;
border-radius: .1rem;
background-color: white;
}
.real-comment-area>div:nth-of-type(2){
padding: 0 .3rem;
}
.real-comment-area>div:nth-of-type(2)>a{
box-sizing: border-box;
width: 1.2rem;
height: .6rem;
border-radius: .1rem;
font-size: .28rem;
color: #999;
border: 1px solid #e0e0e0;
}
.real-comment-area>div:nth-of-type(2)>a:nth-of-type(2){
background-color: #FA903F;
color: white;
}
.real-comment-area>div:nth-of-type(2)>a:nth-of-type(3){
background-color: #999;
color: white;
}
</style>
\ No newline at end of file
<template>
<div>
<header-pulic :data="headerData"></header-pulic>
<nav>
<div class="nav-main">
<ul class="oh" :style="'width: '+ulWid+'rem'">
<li v-for="(item, index) in mainData" :key="item.labelName" :data-id="item.id" class="pointer-click-item" :class="{active:index === initTabNumMain}" @click="tabMain(index)">{{item.labelName}}</li>
</ul>
<div class="nav-bg-right"></div>
</div>
<div class="nav-seat"></div>
</nav>
<main>
<section v-for="(item, index) in mainData" v-show="index === initTabNumMain">
<pagination-load :canload="!item.isStop" :distance="30" @load="getList">
<ul>
<li is="self-defined-li" v-for="(item2, index2) in item.dataList" :data="item2" :dataindex="index2"></li>
</ul>
</pagination-load>
<div class="no-data-block" v-show="item.noDataFlag">暂无数据</div>
<div class="no-more-block" v-show="!item.noDataFlag&&item.isStop">没有更多了...</div>
<div class="loading-gif-block" v-show="isLoading">正在加载...</div>
</section>
</main>
</div>
</template>
<script>
import '@/assets/js/layer041002.js';
import paginationLoad from '@/components/publicEg/paginationLoad';
import selfDefinedLi from '@/components/businessCollege/articleListLi';
export default {
name: '',
props: {
data: {
type: Object,
default: () => ({
message: 'hello'
})
},
dataindex: {
type: [Number, String],
default: 0
}
},
components: {
'pagination-load': paginationLoad,
'self-defined-li': selfDefinedLi
},
data() {
let _this = this;
let _token = _this.$route.query.token;
if(!_token) {
layer.tipsX('token获取出错');
return false;
};
return {
headerData: {
'title': '商学院',
'noborder': true,
'isBack': false
},
token: _token,
ulWid: 6.9,
pageSize: 10,
initTabNumMain: 0,
isLoading: false,//是否正在加载
mainData: [{
'dataList': [],
'id': 0,
'page': 1,//页码
'isLoadOnce': false,//是否请求过一次数据
'isStop': false,//是否所有页的数据加载完毕
'noDataFlag': false,//是否是无数据
'labelName': '全部'
}]
}
},
created() {
let _this = this;
_this.common.duringRequest({
'urlStr': '/broker/business_school',
startAction() {
_this.isLoading = true;
},
endAction() {
_this.isLoading = false;
}
});
_this.common.h5PageC(_this.token, () => {
_this.loadMain();
});
},
methods: {
loadMain() {
let _this = this;
_this.token = localStorage.getItem('token');
_this.getLabel(()=>{
_this.getList();
});
},
tabMain(index) {
let _this = this;
_this.initTabNumMain = index;
if(!_this.mainData[index].isLoadOnce) {
_this.getList();
};
},
getLabel(fn) {
let _this = this;
_this.axios({
method: 'get',
url: '/broker/getNewsLabel',
responseType: 'json',
data: {
'AuthToken': _this.token,
}
})
.then(function(response) {
if(response.data.code == 200) {
let _data = response.data.data;
let _len = _data.length;//标签个数
let _txtLen = 0;//记录总字数
for(let i = 0;i<_len;i++){
_this.mainData.push({
'isLoadOnce': false,
'dataList': [],
'id': _data[i].id,
'page': 1,//页码
'isLoadOnce': false,//是否请求过一次数据
'isStop': false,//是否所有页的数据加载完毕
'noDataFlag': false,//是否是无数据
'labelName': _data[i].label_name
});
_txtLen += _data[i].label_name.length;
};
let _sunLen = (_txtLen+2+_len+1)*0.29;//粗略计算长度,因为有一个全部,多两个字,以及一个标签
_this.ulWid = (_sunLen>_this.ulWid)?_sunLen:_this.ulWid;
fn && fn();
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
},
getList() {
let _this = this;
let _index = _this.initTabNumMain;
if(!_this.isLoading && !_this.mainData[_index].isStop) {
_this.axios({
method: 'get',
url: '/broker/business_school',
responseType: 'json',
data: {
'AuthToken': _this.token,
'pageNo': _this.mainData[_index].page,
'pageSize': _this.pageSize,
'label_id': _index
}
})
.then(function(response) {
_this.mainData[_index].isLoadOnce = true;
if(response.data.code == 200) {
let _list = response.data.data.list;
if(Array.isArray(_list)){
if(_list.length === 0) {
_this.mainData[_index].page === 1 && (_this.mainData[_index].noDataFlag = true);
_this.mainData[_index].isStop = true;
} else {
_this.mainData[_index].dataList.push(..._list); //这里使用push要注意,先把数组展开
_list.length < _this.pageSize && (_this.mainData[_index].isStop = true);
_this.mainData[_index].page += 1;
};
};
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
};
}
},
computed: {
}
}
</script>
<style scoped>
nav{
width: 7.5rem;
}
nav>.nav-main {
background-color: white;
width: 6.9rem;
height: .9rem;
line-height: .9rem;
padding: 0 .3rem;
border-bottom: 1px solid #eee;
position: fixed;
left: 0;
top: .88rem;
overflow-x: scroll;
}
nav>.nav-main>ul{
/*width: 10rem;*/
}
nav>.nav-main>.nav-bg-right{
position: fixed;
right: 0;
top: .88rem;
width: .8rem;
height: .9rem;
background: url(images/img_more@2x.png) repeat-y center center/.8rem .27rem;
}
nav>.nav-seat {
height: .9rem;
}
nav>.nav-main>ul>li {
float: left;
font-size: .28rem;
text-align: center;
color: #4c4c4c;
padding: 0 .15rem;
/*width: 1.8rem;*/
}
nav>.nav-main>ul>li.active {
color: rgb(255, 148, 25);
position: relative;
}
nav>.nav-main>ul>li.active::after {
content: '';
position: absolute;
left: 50%;
bottom: 0;
width: .4rem;
margin-left: -.2rem;
height: .06rem;
border-radius: .03rem;
background-color: rgb(255, 161, 50);
}
</style>
\ No newline at end of file
<template>
<li @click="goPage">
<div class="flex">
<div class="flex">
<p>{{data.title}}</p>
<p>{{data.create_time}}</p>
</div>
<div class="flex-center">
<img-error :datasrc="data.cover_plan" :imgtype="'div'"></img-error>
</div>
</div>
</li>
</template>
<script>
import '@/assets/js/layer041002.js';
export default {
name: '',
props: {
data: {
type: Object,
default: () => ({
message: 'hello'
})
},
dataindex: {
type: [Number, String],
default: 0
}
},
components: {
},
data: () => ({
}),
created() {
let _this = this;
},
mounted() {
let _this = this;
},
methods: {
goPage() {
let _this = this;
_this.$router.push({
path: '/articleDetail',
query: {
'id': _this.data.id
}
});
}
},
computed: {
}
}
</script>
<style scoped>
li{
padding: 0 .3rem;
background-color: white;
}
li>div{
height: 2.2rem;
border-bottom: 1px solid #eee;
}
li>div>div:nth-of-type(1){
flex-direction: column;
justify-content: center;
padding-right: .5rem;
flex: 1;
}
li>div>div:nth-of-type(1)>p:nth-of-type(1){
color: #343434;
font-size: .3rem;
}
li>div>div:nth-of-type(1)>p:nth-of-type(2){
color: #999;
font-size: .24rem;
padding-top: .2rem;
}
li>div>div:nth-of-type(2){
flex: 2.2rem 0 0;
}
li>div>div:nth-of-type(2)>img{
width: 2.2rem;
height: 1.6rem;
object-fit: cover;
}
</style>
\ No newline at end of file
......@@ -10,6 +10,7 @@
<script>
let _token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1NzQyLCJuYW1lIjoiXHU0ZThlXHU3NmZjXHU3NmZjIiwicGhvbmUiOiIxMzkxODkzNzc0MSIsImxldmVsIjoyMH0sInRpbWVTdGFtcF8iOjE1Mjg5NDIzNTh9.-HlJUkvPCCrfhacC9WKcWEiNzUHhL0PujDGONcwPtA0';
let _token2 = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1NzM5LCJuYW1lIjoiXHU2MDNiXHU2ZDRiXHU4YmQ1MSIsInBob25lIjoiMTU2MDE2NTIzNTMiLCJsZXZlbCI6MzB9LCJ0aW1lU3RhbXBfIjoxNTMwNjA2ODU4fQ.8jL49CjtBMV6BqmaKdJfd4pkGBazrAgQQrutb53Z3mY';
export default {
name: '',
data() {
......@@ -21,6 +22,13 @@
'token': _token
}
},
{
'path': '/businessCollege',
'nameCustom': '商学院',
'query': {
'token': _token2
}
},
{
'path': '/feeds',
'nameCustom': 'feed流',
......
......@@ -14,7 +14,7 @@
},
imgtype: {
type: String,
default: () => 'avatar'
default: () => 'div'
}
},
data() {
......
......@@ -71,8 +71,9 @@
parentNode = this.$el.parentNode
}
if(parentNode) {
const rect = parentNode.getBoundingClientRect()
if((rect.bottom <= viewHeight + this.distance)) {
//const rect = parentNode.getBoundingClientRect();
//if((rect.bottom <= viewHeight + this.distance)) {
if((this.getScrollTop() + this.getClientHeight() + this.distance >= this.getScrollHeight())) {
//DOM 更新循环结束之后执行
this.$nextTick(() => {
this.load()
......@@ -80,6 +81,30 @@
}
}
},
//获取滚动条当前的位置
getScrollTop() {
let scrollTop = 0;
if(document.documentElement && document.documentElement.scrollTop) {
scrollTop = document.documentElement.scrollTop;
} else if(document.body) {
scrollTop = document.body.scrollTop;
}
return scrollTop;
},
//获取当前可视范围的高度
getClientHeight() {
let clientHeight = 0;
if(document.body.clientHeight && document.documentElement.clientHeight) {
clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight);
} else {
clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
}
return clientHeight;
},
//获取文档完整的高度
getScrollHeight() {
return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
},
/**
* 加载一组数据的方法
*/
......
......@@ -46,7 +46,10 @@
</li>
<li class="main-sec-li">
<div>应收佣金<span class="left">{{commission}}</span></div>
<div class="bottom-border">应收佣金<span class="left">{{commission}}</span></div>
</li>
<li class="main-sec-li" v-if="!(estimated_receipt_date==''||estimated_receipt_date==null)">
<div>预计收款时间<span class="left">{{estimated_receipt_date}}</span></div>
</li>
</ul>
<ul v-for="(item, index) in list">
......@@ -77,8 +80,8 @@
<li class="main-sec-li">
<div class="bottom-border">分佣比例<span class="left">{{(item.scale*1).toFixed(2)}}%</span></div>
</li>
<li class="main-sec-li li-border-bottom">
<div>应分佣金<span class="left">{{item.should_commission}}</span></div>
<li class="main-sec-li li-border-bottom" >
<div>应分佣金<span class="left">{{(item.should_commission==''||item.should_commission==null)?0:item.should_commission}}</span></div>
</li>
<ul v-for="(items, index) in item.info">
<li class="main-sec-li color paid-in">
......@@ -179,6 +182,7 @@
house_number: '',
price: '',
commission: '',
estimated_receipt_date:'',
is_open: '',
trade_type: '',
token: '',
......@@ -227,7 +231,14 @@
}
if(e =='5') {
return '合作方'
}else{
}if(e =='6') {
return 'APP盘下载方'
}
if(e =='7') {
return 'APP客下载方'
}
else{
layer.tipsX('分佣方类型判断错误');
}
},
......@@ -257,6 +268,7 @@
_this.house_number = response.data.data.bargainInfo.house_number;
_this.commission = response.data.data.bargainInfo.commission;
_this.price = response.data.data.bargainInfo.price;
_this.estimated_receipt_date=response.data.data.bargainInfo.estimated_receipt_date;
_this.list = response.data.data.bargainInfo.realIncome;
_this.Datas = response.data.data.cent_commission;
_this.taxDatas = response.data.data.taxes;
......
......@@ -14,6 +14,8 @@ import reportDetails from '@/components/reportDetails/reportDetails'
import announcementDetails from '@/components/announcementDetails/announcementDetails'
import inviteRegister from '@/components/inviteRegister/inviteRegister'
import agreement from '@/components/inviteRegister/agreement'
import businessCollege from '@/components/businessCollege/articleList'
import articleDetail from '@/components/businessCollege/articleDetail'
Vue.use(Router)
......@@ -92,6 +94,16 @@ export default new Router({
path: '/agreement',
name: 'v-agreement',
component: agreement
},
{
path: '/businessCollege',
name: 'v-business-college',
component: businessCollege
},
{
path: '/articleDetail',
name: 'v-article-detail',
component: articleDetail
}
]
})
\ No newline at end of file
......@@ -239,3 +239,7 @@ a:hover{
max-width: 750px;
height: 600px;
}
.menu-sub-alink.active-a{
background-color: #ff9419!important;
}
......@@ -46,9 +46,13 @@ addtax_
display: inline-block;
}
#bargaininfo_expect_payback_time{
height: 32px;
}
.detail-modal-bargaininfo-main-right {
line-height: 36px;
width: 580px;
width: 700px;
}
#bargaininfo_yetai{
......
define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagination', 'bootstrapJs','ckfinder', 'ckfinderStart', 'blow-up'], function (doT, template) {
define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_template_tpl.html', 'css!style/home.css', 'pagination', 'bootstrapJs', 'ckfinder', 'ckfinderStart', 'blow-up'], function(doT, template, template_binding) {
var agent = {
pageNo : 1,
pageSize : 15,
agent_id : 0,
init: function () {
pageNo: 1,
pageSize: 15,
agent_id: 0,
idArray: '',
init: function() {
//初始化dot
$("body").append(template);
$("body").append(template + template_binding);
agent.getList();
agent.event();
},
event: function () {
event: function() {
var _doc = $(document);
agent.getDistrict(function(){
_doc.on('input', '#district_id2,[name=district_id]', function(){
agent.getDistrict(function() {
_doc.on('input', '[name=district_id],#district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html('');//先清空
//新增 编辑
var _objTemp = _this.parent().next().find('select');
_objTemp.html('');//先清空
if(_id && _id != '0'){
agent.getDistrictStoreList(_id, function(_data){
// var _str = '';
_objTemp.html(''); //先清空
if(_id && _id != '0') {
agent.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="0">全部</option>';
$.each(_data, function(i,item) {
_str += '<option value="'+item.id+'">'+item.store_name+'</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
_this.next().html(_str);//先清空
_objTemp.html(_str);
_this.next().html(_str);
});
}else{
};
} else {};
});
});
//新增 编辑
......@@ -54,52 +55,56 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
// };
// });
// })
$('#search').click(function (pageNo) {
$('#search').click(function(pageNo) {
agent.getList(1);
});
$("#reset").click(function () {//重置
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
});
$(document).delegate(".agent_add", "click", function () {//新增
$(document).delegate(".agent_add", "click", function() { //新增
$("#title").html("新增经纪人");
$("#password").parent().addClass('hide'); //新增不显示密码
$(".form-horizontal")[0].reset(); //重置表单
agent.emptyInput();//清空表单
agent.emptyInput(); //清空表单
});
$(document).delegate(".edit", "click", function () {//点击编辑
$(document).delegate(".edit", "click", function() { //点击编辑
$("#title").html("编辑经纪人");
$(".form-horizontal")[0].reset(); //重置表单
agent.agent_id = $(this).attr("data-id");
$("#password").parent().removeClass('hide'); //编辑显示密码
$("#password").attr('type','text');
agent.emptyInput();//清空表单
$("#password").attr('type', 'text');
agent.emptyInput(); //清空表单
agent.Edit();
});
$(document).delegate("#password", "click",function () {
$(this).val('').attr('type','password');
$(document).delegate("#password", "click", function() {
$(this).val('').attr('type', 'password');
});
$(document).delegate(".submit_edit", "click", function () {//提交编辑
$(document).on("click", ".phone-bundling", function() {
agent.agent_id = $(this).attr("data-id");
agent.getPhoneBindingList();
});
$(document).delegate(".submit_edit", "click", function() { //提交编辑
agent.Submit_edit();
});
$(document).delegate("#role", "click", function (e) {//变更角色
$(document).delegate("#role", "click", function(e) { //变更角色
var _this = $(this);
var _tempVal = _this.closest('tr').attr('data-groupname');
agent.agent_id = $(this).attr("data-id");
agent.getRole(_tempVal);
});
$(document).delegate(".submit_user", "click", function () {//提交变更
$(document).delegate(".submit_user", "click", function() { //提交变更
agent.Submit_user();
});
$(document).delegate(".is_show", "click", function () {//点击禁用
if (!confirm('是否继续?')) {
$(document).delegate(".is_show", "click", function() { //点击禁用
if(!confirm('是否继续?')) {
return;
}
agent.id = $(this).attr("data-id");
......@@ -108,39 +113,91 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
};
params.id = $(this).attr("data-id");
var str = $.trim($(this).html());
if (str === "正常") {
$(this).attr('class','btn1 btn-default is_show');
if(str === "正常") {
$(this).attr('class', 'btn1 btn-default is_show');
params.type = 1;
$(this).html('冻结');
} else if (str === "冻结") {
$(this).attr('class','btn1 btn-info is_show');
} else if(str === "冻结") {
$(this).attr('class', 'btn1 btn-info is_show');
params.type = 0;
$(this).html('正常');
} else {
params.type = 2;
}
$.ajax({//禁用
$.ajax({ //禁用
'type': 'POST',
'url': '/index/updateStatus',
data: { "ids": agent.id, "status": params.type },
data: {
"ids": agent.id,
"status": params.type
},
dataType: "json",
success: function (data) {
if (data.code != 200) {
success: function(data) {
if(data.code != 200) {
alert("禁用失败!")
}
}
});
});
//手机绑定状态切换
$(document).delegate(".is_show2", "click", function() { //点击禁用
if(!confirm('是否继续?')) {
return;
}
agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj);
var params = {
};
params.id = $(this).attr("data-id");
var str = $.trim($(this).html());
if(str === "允许") {
$(this).attr('class', 'btn1 btn-default is_show2');
params.type = 0;
$(this).html('解绑');
} else if(str === "解绑") {
$(this).attr('class', 'btn1 btn-info is_show2');
params.type = 1;
$(this).html('允许');
};
$.ajax({ //禁用
'type': 'POST',
'url': '/index/updateDevice',
data: {
"agent_id": agent.agent_id,
"id": params.id,
"operator_id": user_info_obj.id,
"is_forbidden": params.type
},
Submit_user: function () {//提交变更的信息
/* $params = array(
"agent_id" => 1,//解绑或者绑定的经纪人id
"id" => 1, //关系id
"operator_id" => 12,//操作人id 登陆后台的经纪人id
"is_forbidden" => 0,//0正常 1禁止
);*/
dataType: "json",
success: function(data) {
if(data.code != 200) {
alert("禁用失败!")
}
}
});
});
},
Submit_user: function() { //提交变更的信息
var group_id = $("#edit_role").val();
$.ajax({
'type': 'POST',
'url': '/index/updateRole',
data: { 'ids': agent.agent_id, 'group_id': group_id },
data: {
'ids': agent.agent_id,
'group_id': group_id
},
dataType: "json",
success: function (data) {
if (data.code == 200) {
success: function(data) {
if(data.code == 200) {
agent.getList(1);
} else {
alert("重复提交");
......@@ -148,39 +205,41 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
}
});
},
Edit: function () {//获取
Edit: function() { //获取
$.ajax({
'type': 'GET',
'url': '/index/saveAgent',//获取编辑数据
data: { "id": agent.agent_id },
'url': '/index/saveAgent', //获取编辑数据
data: {
"id": agent.agent_id
},
dataType: "json",
success: function (data) {
success: function(data) {
if (data.code == 200) {
if(data.data){
if(data.code == 200) {
if(data.data) {
$("input[name = id]").val(data.data.id);
$("input[name = phone]").val(data.data.phone);
$("input[name = name]").val(data.data.name);
$("[name = district_id]").val(data.data.district_id);
if(data.data.district_id){
agent.getDistrictStoreList(data.data.district_id, function(_data){
// var _str = '';
if(data.data.district_id) {
agent.getDistrictStoreList(data.data.district_id, function(_data) {
// var _str = '';
var _str = '<option value="0">全部</option>';
$.each(_data, function(i,item) {
_str += '<option value="'+item.id+'">'+item.store_name+'</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
$("[name = store_id]").html(_str).val(data.data.store_id);
});
}else{
} else {
}
$("#remarks").val(data.data.remarks);
$("#password").val(data.data.password);
$("input[name='password']").attr('form-group');
if (data.data.sex == '0') {
if(data.data.sex == '0') {
$("#sex0").attr('checked', true);
} else if (data.data.sex == '1') {
} else if(data.data.sex == '1') {
$("#sex1").attr('checked', true);
} else {
$("#sex2").attr('checked', true);
......@@ -194,7 +253,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
}
});
},
Submit_edit: function () {
Submit_edit: function() {
//提交编辑的信息
var params = {}
params.id = agent.agent_id;
......@@ -209,26 +268,24 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
params.status = $("#status").val();
params.password = $("input[name='password']").val();
if (params.phone == '') {
if(params.phone == '') {
alert('手机号必填!');
return false;
}
if (params.district_id == '') {
if(params.district_id == '') {
alert('所属部门必填');
$("#modal-edit").show();
return false;
}
if (params.store_id == '') {
if(params.store_id == '') {
alert('所属门店必填');
$("#modal-edit").show();
return false;
}
if (params.phone.length != 11) {
if(params.phone.length != 11) {
alert('手机号码错误!');
$("#modal-edit").show();
return false;
......@@ -239,8 +296,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
'url': '/index/saveAgent',
data: params,
dataType: "json",
success: function (data) {
if (data.code == 200) {
success: function(data) {
if(data.code == 200) {
$("#modal-edit").modal('hide');
agent.getList(1);
} else {
......@@ -250,7 +307,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
});
},
emptyInput: function(){
emptyInput: function() {
console.count('emptyInput');
$("input[name = name]").val('');
$("input[name = phone]").val('');
......@@ -261,47 +318,79 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$("#admin_off").val('0');
$("#remarks").val('');
},
getList: function (pageNo) {
getList: function(pageNo) {
agent.pageNo = pageNo;
var params = {};
params.pageNo = agent.pageNo;
params.pageSize = agent.pageSize;
params.search = $("input[name='search']").val();
params.group_name = $("input[name='groupname']").val();
params.store_name = $("input[name='store_name']").val();
//后端加入两个字段搜索
params.district_id=$("#district_id").val();
params.store_id=$("#guest_stores").val();
params.groupname = $("input[name='groupname']").val();
params.district_id = $("#district_id2").val();
params.store_id = $("#guest_stores").val();
$.ajax({
url: '/index/AgentList',
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function (data) {
success: function(data) {
console.log(666);
console.log(data.data.list.length);
//获取对应的id
agent.idArray = new Array();
for(var m = 0; m < data.data.list.length; m++) {
agent.idArray[m] = data.data.list[m].id;
}
// console.log(agent.idArray);
//获取对应的id
var temp = document.getElementById('agent_tpl').innerHTML;
var doTempl = doT.template(temp);
$("#agentlist").html(doTempl(data.data.list));
agent.getEvaluationList(agent.idArray);
/*分页代码*/
add_page(data.data.total, pageNo, agent.pageSize, agent.getList);
$ ('.J_preview').preview ();
$('.J_preview').preview();
}
});
},
//手机绑定权限
getPhoneBindingList: function(pageNo) {
var params = {};
params.agent_id = agent.agent_id;
console.log(agent.agent_id);
$.ajax({
url: '/index/deviceList',
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function(data) {
var temp = document.getElementById('phone_binding_tpl').innerHTML;
var doTempl = doT.template(temp);
$("#agent_phone_binding").html(doTempl(data.data));
/*分页代码*/
add_page(data.data.total, pageNo, agent.pageSize, agent.getList);
$('.J_preview').preview();
}
})
},
getRole : function (tempval) {
getRole: function(tempval) {
$.ajax({
url: '/index/getAuth2',
type: 'GET',
data:{},
data: {},
async: true,
dataType: 'json',
success: function (data) {
var User_add="";
success: function(data) {
var User_add = "";
var _tempid;
$.each(data.data.list,function(i,item){
User_add+='<option value="'+item.id+'">'+item.title+'</option>';
if(item.title == tempval){
$.each(data.data.list, function(i, item) {
User_add += '<option value="' + item.id + '">' + item.title + '</option>';
if(item.title == tempval) {
_tempid = item.id;
console.log(item.id);
};
......@@ -312,439 +401,74 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
}
});
},
getDistrict : function (fn) {
$.ajax ({
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {"pageSize":1000},
data: {
"pageSize": 1000
},
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i,item) {
str += '<option value="'+item.id+'">'+item.district_name+'</option>';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$('#district_id2').append(str);
$('[name=district_id]').append(str);
$('#district_id2').append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn){
$.ajax ({
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id':id,
"pageSize":1000
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
},
getEvaluationList: function(n) {
console.log(n);
// var _data={};
// for(var i=0;i<n.length;i++){
// _data['agents_id['+i+']']=n[i];
// }
var _data = {
'agents_id': n.join(',')
}
console.log('经纪人列表加载完成');
$.ajax({
url: '/index/agentEvaluateNumAndFraction',
type: 'GET',
async: true,
data: _data,
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
// console.log(data.data[0].agent_evaluate_num);
$("#agentlist tr").each(function(e) {
//e代表索引 从0开始 eq(0)就是第一行
$("#agentlist").find("tr").eq(e).find("td").eq(6).html(data.data[e].agent_evaluate_num); //获取一列的值
$("#agentlist").find("tr").eq(e).find("td").eq(7).html(data.data[e].agent_evaluate_fraction);
})
}
}
});
}
};
return agent;
});
//define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_template_tpl.html','css!style/home.css', 'pagination', 'bootstrapJs','ckfinder', 'ckfinderStart', 'blow-up'], function (doT, template,template_binding) {
// var agent = {
// pageNo : 1,
// pageSize : 15,
// agent_id : 0,
// init: function () {
// //初始化dot
// $("body").append(template+template_binding);
// agent.getList();
// agent.event();
// },
// event: function () {
// var _doc = $(document);
// agent.getDistrict(function(){
// _doc.on('input', '[name=district_id]', function(){
// var _this = $(this);
// var _id = _this.val();
// var _objTemp = _this.parent().next().find('select');
// _objTemp.html('');//先清空
// if(_id && _id != '0'){
// agent.getDistrictStoreList(_id, function(_data){
//// var _str = '';
// var _str = '<option value="0">全部</option>';
// $.each(_data, function(i,item) {
// _str += '<option value="'+item.id+'">'+item.store_name+'</option>';
// });
// _objTemp.html(_str);
// });
// }else{
// };
// });
// })
// $('#search').click(function (pageNo) {
// agent.getList(1);
// });
//
// $("#reset").click(function () {//重置
// document.getElementById("form_search").reset();
// });
//
// $(document).delegate(".agent_add", "click", function () {//新增
// $("#title").html("新增经纪人");
// $("#password").parent().addClass('hide'); //新增不显示密码
// $(".form-horizontal")[0].reset(); //重置表单
// agent.emptyInput();//清空表单
// });
//
// $(document).delegate(".edit", "click", function () {//点击编辑
// $("#title").html("编辑经纪人");
// $(".form-horizontal")[0].reset(); //重置表单
// agent.agent_id = $(this).attr("data-id");
// $("#password").parent().removeClass('hide'); //编辑显示密码
// $("#password").attr('type','text');
// agent.emptyInput();//清空表单
// agent.Edit();
// });
//
// $(document).delegate("#password", "click",function () {
// $(this).val('').attr('type','password');
// });
//
// $(document).on("click", ".phone-bundling",function () {
// agent.agent_id = $(this).attr("data-id");
// agent.getPhoneBindingList();
// });
// $(document).delegate(".submit_edit", "click", function () {//提交编辑
// agent.Submit_edit();
// });
//
// $(document).delegate("#role", "click", function (e) {//变更角色
// var _this = $(this);
// var _tempVal = _this.closest('tr').attr('data-groupname');
// agent.agent_id = $(this).attr("data-id");
// agent.getRole(_tempVal);
// });
//
// $(document).delegate(".submit_user", "click", function () {//提交变更
// agent.Submit_user();
// });
//
// $(document).delegate(".is_show", "click", function () {//点击禁用
// if (!confirm('是否继续?')) {
// return;
// }
// agent.id = $(this).attr("data-id");
// var params = {
//
// };
// params.id = $(this).attr("data-id");
// var str = $.trim($(this).html());
// if (str === "正常") {
// $(this).attr('class','btn1 btn-default is_show');
// params.type = 1;
// $(this).html('冻结');
// } else if (str === "冻结") {
// $(this).attr('class','btn1 btn-info is_show');
// params.type = 0;
// $(this).html('正常');
// } else {
// params.type = 2;
// }
// $.ajax({//禁用
// 'type': 'POST',
// 'url': '/index/updateStatus',
// data: { "ids": agent.id, "status": params.type },
// dataType: "json",
// success: function (data) {
// if (data.code != 200) {
// alert("禁用失败!")
// }
// }
// });
// });
// //手机绑定状态切换
// $(document).delegate(".is_show2", "click", function () {//点击禁用
// if (!confirm('是否继续?')) {
// return;
// }
// agent.id = $(this).attr("data-id");
// var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存
//// console.log(user_info_obj);
// var params = {
//
// };
// params.id = $(this).attr("data-id");
// var str = $.trim($(this).html());
// if (str === "允许") {
// $(this).attr('class','btn1 btn-default is_show2');
// params.type = 0;
// $(this).html('解绑');
// } else if (str === "解绑") {
// $(this).attr('class','btn1 btn-info is_show2');
// params.type = 1;
// $(this).html('允许');
// };
// $.ajax({//禁用
// 'type': 'POST',
// 'url': '/index/updateDevice',
// data: { "agent_id": agent.agent_id, "id": params.id,"operator_id": user_info_obj.id,"is_forbidden": params.type },
// /* $params = array(
// "agent_id" => 1,//解绑或者绑定的经纪人id
// "id" => 1, //关系id
// "operator_id" => 12,//操作人id 登陆后台的经纪人id
// "is_forbidden" => 0,//0正常 1禁止
// );*/
//
// dataType: "json",
// success: function (data) {
// if (data.code != 200) {
// alert("禁用失败!")
// }
// }
// });
// });
// },
// Submit_user: function () {//提交变更的信息
// var group_id = $("#edit_role").val();
// $.ajax({
// 'type': 'POST',
// 'url': '/index/updateRole',
// data: { 'ids': agent.agent_id, 'group_id': group_id },
// dataType: "json",
// success: function (data) {
// if (data.code == 200) {
// agent.getList(1);
// } else {
// alert("重复提交");
// }
// }
// });
// },
// Edit: function () {//获取
// $.ajax({
// 'type': 'GET',
// 'url': '/index/saveAgent',//获取编辑数据
// data: { "id": agent.agent_id },
// dataType: "json",
// success: function (data) {
//
// if (data.code == 200) {
// if(data.data){
// $("input[name = id]").val(data.data.id);
// $("input[name = phone]").val(data.data.phone);
// $("input[name = name]").val(data.data.name);
// $("[name = district_id]").val(data.data.district_id);
// if(data.data.district_id){
// agent.getDistrictStoreList(data.data.district_id, function(_data){
//// var _str = '';
// var _str = '<option value="0">全部</option>';
// $.each(_data, function(i,item) {
// _str += '<option value="'+item.id+'">'+item.store_name+'</option>';
// });
// $("[name = store_id]").html(_str).val(data.data.store_id);
// });
// }else{
//
// }
//
// $("#remarks").val(data.data.remarks);
// $("#password").val(data.data.password);
// $("input[name='password']").attr('form-group');
// if (data.data.sex == '0') {
// $("#sex0").attr('checked', true);
// } else if (data.data.sex == '1') {
// $("#sex1").attr('checked', true);
// } else {
// $("#sex2").attr('checked', true);
// }
// }
//
// } else {
// alert('获取经纪人数据失败');
// }
//
// }
// });
// },
// Submit_edit: function () {
// //提交编辑的信息
// var params = {}
// params.id = agent.agent_id;
// params.name = $("input[name = name]").val();
// params.password = $("#password").val();
// params.district_id = $("[name = district_id]").val();
// params.store_id = $("[name = store_id]").val();
// params.phone = $("input[name = phone]").val();
// params.admin_off = $("#admin_off").val();
// params.sex = $("input[name =sex]:checked").val();
// params.remarks = $("#remarks").val();
// params.status = $("#status").val();
// params.password = $("input[name='password']").val();
//
//
// if (params.phone == '') {
// alert('手机号必填!');
// return false;
// }
//
// if (params.district_id == '') {
// alert('所属部门必填');
// $("#modal-edit").show();
// return false;
// }
//
//
// if (params.store_id == '') {
// alert('所属门店必填');
// $("#modal-edit").show();
// return false;
// }
//
// if (params.phone.length != 11) {
// alert('手机号码错误!');
// $("#modal-edit").show();
// return false;
// }
//
// $.ajax({
// 'type': 'POST',
// 'url': '/index/saveAgent',
// data: params,
// dataType: "json",
// success: function (data) {
// if (data.code == 200) {
// $("#modal-edit").modal('hide');
// agent.getList(1);
// } else {
// alert(data.msg);
// }
// }
// });
//
// },
// emptyInput: function(){
// console.count('emptyInput');
// $("input[name = name]").val('');
// $("input[name = phone]").val('');
// $("#password").val('');
// $("[name = district_id]").val('');
// $("[name = store_id]").html('');
// $("input[name =sex]").val('0');
// $("#admin_off").val('0');
// $("#remarks").val('');
// },
// getList: function (pageNo) {
// agent.pageNo = pageNo;
// var params = {};
// params.pageNo = agent.pageNo;
// params.pageSize = agent.pageSize;
// params.search = $("input[name='search']").val();
// params.groupname = $("input[name='groupname']").val();
// params.store_name = $("input[name='store_name']").val();
// $.ajax({
// url: '/index/AgentList',
// type: 'GET',
// async: true,
// data: params,
// dataType: 'json',
// success: function (data) {
// var temp = document.getElementById('agent_tpl').innerHTML;
// var doTempl = doT.template(temp);
// $("#agentlist").html(doTempl(data.data.list));
// /*分页代码*/
// add_page(data.data.total, pageNo, agent.pageSize, agent.getList);
// $ ('.J_preview').preview ();
//
// }
// })
// },
// //手机绑定权限
// getPhoneBindingList: function (pageNo) {
// var params = {};
// params.agent_id =agent.agent_id;
// console.log(agent.agent_id);
// $.ajax({
// url: '/index/deviceList',
// type: 'GET',
// async: true,
// data: params,
// dataType: 'json',
// success: function (data) {
// var temp = document.getElementById('phone_binding_tpl').innerHTML;
// var doTempl = doT.template(temp);
// $("#agent_phone_binding").html(doTempl(data.data));
// /*分页代码*/
// add_page(data.data.total, pageNo, agent.pageSize, agent.getList);
// $ ('.J_preview').preview ();
// }
// })
// },
//
// getRole : function (tempval) {
// $.ajax({
// url: '/index/getAuth2',
// type: 'GET',
// data:{},
// async: true,
// dataType: 'json',
// success: function (data) {
// var User_add="";
// var _tempid;
// $.each(data.data.list,function(i,item){
// User_add+='<option value="'+item.id+'">'+item.title+'</option>';
// if(item.title == tempval){
// _tempid = item.id;
// console.log(item.id);
// };
// });
// console.log(_tempid);
// $("#edit_role").html(User_add).val(_tempid);
//
// }
// });
// },
// getDistrict : function (fn) {
// $.ajax ({
// url: '/index/getDistrict',
// type: 'GET',
// async: true,
// data: {"pageSize":1000},
// dataType: 'json',
// success: function (data) {
// if (data.code == 200 && data.data != null) {
// var str = '';
// $.each(data.data, function(i,item) {
// str += '<option value="'+item.id+'">'+item.district_name+'</option>';
// });
// $('[name=district_id]').append(str);
// fn && fn();
// }
// }
// });
// },
// getDistrictStoreList: function(id, fn){
// $.ajax ({
// url: '/index/getDistrictStoreList',
// type: 'GET',
// async: true,
// data: {
// 'id':id,
// "pageSize":1000
// },
// dataType: 'json',
// success: function (data) {
// if (data.code == 200 && data.data != null) {
// fn && fn(data.data);
// }
// }
// });
// }
// };
// return agent;
//});
//
......@@ -472,6 +472,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_s
$("#bargaininfo_type").val(data.data.trade_type);
$("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time);
$("#bargaininfo_expect_payback_time").val(data.data.estimated_receipt_date);
$("#bargaininfo_yetai").val(data.data.industry_type);
$("#bargaininfo_chengjiao_price").val(data.data.price);
......
define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
follow = {
pageNo: 1,
......@@ -7,11 +6,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
/*每页显示多少条*/
id: '',
house_id: '',
type: '',
valueCurrent: '',
ajaxObj: '',
stopstatus: true,
boxphoto: '',
house_fatherid: '',
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -20,172 +15,138 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
},
event: function() {
var _doc = $(document);
var _imgMaskObj = $('#img_mask_area'); //预览大图的mask
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
_doc.on('click', 'a[href="#modal-time"]', function(e){
follow.house_id = $ (this).attr ("data-id");
//时间轴点击出现
_doc.on('click', 'a[href="#modal-time"]', function(e) {
follow.house_id = $(this).attr("data-id");
e.preventDefault();
e.stopPropagation();
// console.log('follow.house_id');
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id='+follow.house_id);
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id=' + follow.house_id);
});
//搜索按钮点击事件
$("#search").click(function() {
follow.getList(1);
});
//收款图片按钮点击的事件
_doc.on('click', '.add-pic', function() {//区分收款记录的id 和 father-id 获取图片 和保存图片 都区分
var _this = $(this);
follow.house_id = _this.attr("data-id");
follow.house_fatherid = _this.attr("father-id");
//点击收款图片 2.2版本
// $(".add-pic").click(function() {
// follow.getaddPicList();
// });
_doc.on('click', '.add-pic', function(){
follow.getaddPicList();
follow.getaddPicList();//获取已经上传的图片信息
});
//重置按钮的事件
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
});
//导出列表事件
$("#export").click(function() { //导出列表
follow.exportList();
});
$ (document).delegate (".submit_edit2", "click", function () {//提交
follow.house_id2 = $ (this).attr ("data-id");
console.log(follow.house_id2);
$("#real_money").val($(this).attr ("data-money"));
//编辑按钮点击事件
$(document).delegate(".submit_edit2", "click", function() { //提交
var _this = $(this);
follow.house_id2 = _this.attr("data-id");
console.log(follow.house_id2);
$("#real_money").val(_this.attr("data-money"));
});
$ (document).delegate (".submit_edit", "click", function () {//提交
follow.Submit_follow();
});
$ (document).on ("input","#cus_fang", function () {//手机号搜索客方2
if($("#cus_fang").val()==''){
$(".user-ul2").html('');
}else{
follow.search_phone2();
}
});
$ (document).delegate (".addphone2", "click", function () {//list2消失
follow.addphone2(this);
});
//图片上传 2.2版本
//图片上传,附件上传处理事件
$(".upload-image-btn").click(function() {
var _this = $(this),
_spFile = _this.data('spfile'),
_limitTop = _this.data('limittop'),
_fileNum = _this.parent().next().find('.delet-pic-btn').length; //根据删除按钮的个数,确定文件的个数
if(_limitTop && (_fileNum < _limitTop)) {
BrowseServer(_this.prev().attr('id'), function(url) {
console.log(url);
if(_spFile == 'pdf') {
if(/(\.pdf)$/i.test(url)) {
_this.parent().next().prepend('<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url,
'1': dealFileName(decodeURI(url.slice(url.lastIndexOf('/') + 1)))
}));
} else {
alert('所选择的格式不是pdf,请重新选择');
return false;
}
} else {
if(/(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.test(url)) {
_this.parent().next().prepend('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url
}));
} else {
alert('所选择的格式不正确,请重新选择');
return false;
}
};
});
} else {
alert('上传上限为 ' + _limitTop);
return false;
};
//编辑-收付金额-保存
$(document).delegate(".submit_edit", "click", function() {
follow.Submit_follow();
});
//图片上传删除键事件
_doc.on('click', '.delet-pic-btn', function(e) {
//收款图片-点击添加图片事件
$('#file_input').on('change', function(){
var _this = $(this);
e.preventDefault();
e.stopPropagation();
if(confirm('确定删除该文件吗?')){
var _imgId = _this.parent().attr('data-imgid');
if(_imgId){
var formData = new FormData();
formData.append('type', 'chat');
formData.append('image', _this[0].files[0]);
$.ajax({
type: 'POST',
url: '/index/delHouseFile',
data: {
'id': _imgId,
'house_id': 3104,
},
timeout: 30000,
type: 'post',
url: '/index/uploadImg',
data: formData,
dataType: 'json',
contentType: false,
cache: false,
processData: false,
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
_this.parent().remove();
} else {
alert(_data['msg']);
}
if(_data.code == 200) {
$('#container_body_img_area').append('<div class="result"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del">删除</span></div>'.stringFormatObj({
'0': _data.data.img_path,
'1': _data.data.internet_img_name?urlDeal(_data.data.internet_img_name):_data.data.internet_img_name
}));
} else {
alert('数据错误');
alert(_data.msg);
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus){
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
});
}else{
_this.parent().remove();
}
};
});
//图片预览点击放大事件
_doc.on('click', '.img-pre-ul>li>img', function(e) {
_imgMaskObj.show().find('img').attr('src', this.src);
//图片删除事件
_doc.on('click', '.span-del', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).parent().remove();
});
_imgMaskObj.click(function(e) {
this.style.display = 'none';
//图片删除,已有的则调用接口删除
_doc.on('click', '.span-del2', function(e) {
var _this = $(this);
e.preventDefault();
e.stopPropagation();
if(confirm('确认删除吗?')){
_this.parent().remove();
follow.spandelList(_this.prev().attr('data-imgid'));
};
});
//保存上传的图片
_doc.on('click', '#saveBtn', function(e) {
var _this = $(this);
var _data={
id:3104,
};
e.preventDefault();
e.stopPropagation();
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _xiangqingPicObj = _imgUploadLunbo.find('li>img');
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
$.each(_xiangqingPicObj, function(i, item) {
_data['slide_show[' + i + ']'] = item.src.replace(_urlCut, '');
});
var _imgId = _this.parent().attr('data-imgid');
var imgname = [];
for(var i = 0; i < $('.result').length; i++) {
imgname[i] = $('.result>img').attr('data-imgname');
};
console.log(imgname.join(','));
var id_pic = follow.house_fatherid > 0?follow.house_fatherid:follow.house_id;
var _data = {
img_id: id_pic
};
//无新的图片上传 不调用接口
if(imgname.join(',')) {
_data['img_name'] = imgname.join(',');
} else {
return
};
$.ajax({
type: 'POST',
url: '/index/houseEdit',
type: 'GET',
url: '/index/addReceiptImg',
data: _data,
// timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
alert('保存成功');
follow.getList(0);
} else {
alert('数据错误');
};
......@@ -193,7 +154,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus){
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
......@@ -201,42 +162,8 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
});
});
//图片上传 2.2版本
},
addphone2:function(obj){
var user_ht=$(obj).html();
$("#cus_fang").val(user_ht);
$(".user-ul2").html('');
follow.agent_id = $ (obj).attr ("data-id");
},
search_phone2:function(){//手机号
$.ajax ({
url: '/index/select_by_phone',
type: 'POST',
async: true,
data: {
"phone":$("#cus_fang").val()
},
dataType: 'json',
success: function (data) {
if (data.code == 200) {
var user_ul2 = "";
$.each(data.data, function(i,item) {
user_ul2+='<li class="addphone2" data-id="'+item.id+'">'+item.id+'-'+item.realname+'-'+item.phone+'</li>';
});
$(".user-ul2").html(user_ul2);
} else {
alert(data.msg);
}
}
});
},
//编辑-收付金额-保存
Submit_follow: function() { //提交
$.ajax({
'type': 'POST',
......@@ -249,74 +176,146 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
success: function(data) {
if(data.code == 200) {
follow.getList(0);
} else {
} else {}
}
});
},
spandelList: function(n) { //删除已经保存的图片都调用
$.ajax({
'type': 'POST',
'url': '/index/deleteReceiptImg',
data: {
id: n
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
} else {}
}
});
},
//点击收款图片 调用的接口
getaddPicList: function() { //提交
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
_imgUploadLunbo.empty();
getaddPicList: function() {
//获取收款图片
$('#container_body_img_area').html('');//每回先清空所有图片
var id_pic = follow.house_fatherid > 0?follow.house_fatherid:follow.house_id;
$('.result2,.result').remove(); //删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的
$.ajax({
'type': 'GET',
'url': '/index/houseEdit',
'url': '/index/receiptImgList',
data: {
"id": 3104,
"id": id_pic,
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
var _data = data['data'];
for(var i in _data['slide_show']) {
_imgUploadLunbo.append('<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['slide_show'][i]['img_name'],
'id': _data['slide_show'][i]['id']
//渲染已经有的列表
for(i = 0; i < data.data.length; i++) {
$('#container_body_img_area').append('<div class="result2"><img data-imgid="{0}" src="{1}" alt=""/> <span class="span-del2">删除</span></div>'.stringFormatObj({
'0': data.data[i].id,
'1': data.data[i].img_name?urlDeal(data.data[i].img_name):data.data[i].img_name
}));
};
} else {}
}
});
},
//点击收款图片 上传新的图片 掉用全局上传图片
//点击input的时候 调用全局上传图片 然后渲染到页面
getaddPicList2: function() {
var input = document.getElementById("file_input");
var result, div;
if(typeof FileReader === 'undefined') {
result.innerHTML = "抱歉,你的浏览器不支持 FileReader";
input.setAttribute('disabled', 'disabled');
} else {
input.addEventListener('change', readFile, false);
};
function readFile() {
console.log(this.files);
for(var i = 0; i < this.files.length; i++) {
if(!input['value'].match(/.jpg|.gif|.png|.bmp/i)) {   //判断上传文件格式
return alert("上传的图片格式不正确,请重新选择")    
}
var reader = new FileReader();
reader.readAsDataURL(this.files[i]);
var formData = new FormData();
formData.append('type', 'chat');
formData.append('image', this.files[0]);
console.log(this.files[0]);
console.log(formData);
reader.onload = function(e) {
var result2 = this.result;
$.ajax({
type: 'post',
url: '/index/uploadImg',
data: formData,
dataType: 'json',
contentType: false,
cache: false,
processData: false,
beforeSend: function() {},
success: function(_data) {
if(_data.code == 200) {
result = '<div class="result"><img class="' + _data.data.img_path + '" src="' + result2 + '" alt=""/> <span class="span-del">删除</span></div>';
div = document.createElement('div');
div.innerHTML = result;
document.getElementById('container_body').appendChild(div); 
// follow.getList(0);
} else {
alert(_data.msg);
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
}); 
}
});
};
};
},
// 导出列表
// 导出列表
exportList: function(pageNo) {
console.log(2);
follow.pageNo = pageNo;
var params = {};
var excel_two = 1;
var user_name = $.trim($('#customer_name').val());
var start_time = $('#start_date').val();
var end_time = $('#end_date').val();
var internal_title = $('#shop_name').val();
var internal_address = $('#shop_name').val();
var user_phone = $('#customer_phone').val();
var id = $('#shop_num').val() * 1;
var id = $('#shop_num').val();
var store_name = $('#store_name').val();
var report_phone = $('#applicant_phone').val();
var report_name = $('#applicant_name').val();
window.open('/index/getCollection?'+
'excel='+ excel_two +'&user_name=' + user_name + '&start_time=' + start_time + '&end_time=' + end_time + '&internal_title=' + internal_title + '&user_phone=' + user_phone + '&id=' + id+ '&store_name=' + store_name+ '&report_phone=' + report_phone+ '&report_name=' + report_name);
window.open('/index/getCollection?' +
'excel=' + excel_two + '&user_name=' + user_name + '&start_time=' + start_time + '&end_time=' + end_time + '&internal_address=' + internal_address + '&user_phone=' + user_phone + '&id=' + id + '&store_name=' + store_name + '&report_phone=' + report_phone + '&report_name=' + report_name);
},
getList: function(pageNo) {
console.log($('#customer_name').val());
console.log($('#start_date').val());
console.log($('#shop_name').val());
follow.pageNo = pageNo;
var params = {};
params.user_name =$.trim($('#customer_name').val());
params.start_time =$('#start_date').val();
params.end_time =$('#end_date').val();
params.internal_title =$('#shop_name').val();
params.user_phone =$('#customer_phone').val();
params.id =$('#shop_num').val()*1;
params.store_name =$('#store_name').val();
params.report_phone =$('#applicant_phone').val();
params.report_name =$('#applicant_name').val();
params.user_name = $.trim($('#customer_name').val());
params.start_time = $('#start_date').val();
params.end_time = $('#end_date').val();
params.internal_address = $('#shop_name').val();
params.user_phone = $('#customer_phone').val();
params.id = $('#shop_num').val();
params.store_name = $('#store_name').val();
params.report_phone = $('#applicant_phone').val();
params.report_name = $('#applicant_name').val();
params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize;
......@@ -329,95 +328,26 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if (data.code == 200) {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('get_collection_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
// 支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
$("#follow_list tr").each(function (e) {
//e代表索引 从0开始 eq(0)就是第一行
var temp = $("#follow_list").find("tr").eq(e).find("td").eq(5).html(); //获取一列的值
var temp_two = $("#follow_list").find("tr").eq(e).find("td").eq(6).html();
// null
var temp_one = $("#follow_list").find("tr").eq(e).find("td").eq(1).html();
if(temp_two*1==10){
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("支付宝")
}
if(temp_two*1==20){
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("微信")
}
if(temp_two*1==30){
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("pos机器")
}
if(temp_two*1==40){
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("转账")
}
if(temp_two*1==50){
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("现金")
}
if(temp_two*1==60){
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("其他")
}
// 付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
if(temp*1==10){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("意向金")
}
if(temp*1==20){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("定金")
}
if(temp*1==30){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("保管金")
}
if(temp*1==40){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("押金")
}
if(temp*1==50){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("租金")
}
if(temp*1==60){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("进场费")
}
if(temp*1==70){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("转让费")
}
if(temp*1==80){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("其他")
}
if(temp*1==90){
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("佣金")
}
// null 佣金
if(temp_one=='null'){
$("#follow_list").find("tr").eq(e).find("td").eq(1).html(" ")
}
});
$("#money_total").html(data.data.money_total)
/*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
/* $("#pagediv").pagination({
length:data.data.total,
current: pageNo,
every: follow.pageSize,
onClick: function(el) {
follow.getList(el.num.current);
}
});*/
}else {
add_page(data.data.total, pageNo, follow.pageSize, follow.getList);
} else {
alert(data['msg']);
};
}else{
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
......
......@@ -52,8 +52,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
var d = myDate.getDate();
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
var day_start = getPreMonth(day_end);
$('#start_date').val(day_start);
$('#end_date').val(day_end);
// $('#start_date').val(day_start);
// $('#end_date').val(day_end);//去掉默认时间
business.getList(1);
business.event();
business.resetLoad();
......
......@@ -319,21 +319,21 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
$("#announcement_title").focus();
return ;
}
if (params.title.length > 20) {
alert('标题字数20以内');
$("#announcement_title").focus();
return ;
}
// if (params.title.length > 20) {
// alert('标题字数20以内');
// $("#announcement_title").focus();
// return ;
// }
if (params.content == '') {
alert('内容不能为空');
$("#announcement_content").focus();
return ;
}
if (params.content.length > 250) {
alert('公告内容字数250以内');
$("#announcement_content").focus();
return ;
}
// if (params.content.length > 250) {
// alert('公告内容字数250以内');
// $("#announcement_content").focus();
// return ;
// }
$.ajax ({
url: '/index/addNotice',
type: 'POST',
......
......@@ -26,9 +26,16 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
});
}
menu_bar();
menu_bar(function(){
//回调部分
//记录tab的点击状态,对应的标签内容展开,并高亮显示
var _hash = location.pathname.replace('/admin.php/', '/');
var _tempObj = $('[data-href="'+_hash+'"]');
_tempObj.addClass('active-a').siblings().removeClass('active-a');
_tempObj.closest('.dropdown-menu').prev().attr('aria-expanded', true).parents().addClass('open').siblings().removeClass('open');
});
function menu_bar() {
function menu_bar(fn) {
var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存
......@@ -40,6 +47,8 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
$ ("#dropdownMenu1").append(user_info_obj['name']);
$ ("#menu_bar").html (doTtmpl (user_info_obj['menu']));
//回调
fn && fn();
} else {
$.ajax ({
url: '/index/getMenu',
......@@ -48,11 +57,12 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
data: "",
dataType: 'json',
success: function (data) {
var _indexMain = sessionStorage.getItem('menuMainIndex');
var _indexSub = sessionStorage.getItem('menuSubIndex');
var temp = document.getElementById ('menu_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#menu_bar").html (doTtmpl (data.data.menu));
//回调
fn && fn();
}
});
......@@ -68,8 +78,6 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
e.preventDefault();
e.stopPropagation();
var _this = $(this);
sessionStorage.setItem('menuMainIndex',_this.parent().index());
sessionStorage.setItem('menuSubIndex',_this.closest('.menu-main-li').index());
window.open(_this.data('href'));//改为在新标签页打开
//location.href = _this.data('href');
});
......@@ -160,3 +168,9 @@ function hideTel(str){
return str;
}
}
//处理url信息,改为当前域名的协议
function urlDeal(urlStr, httpStr) {
//处理
return urlStr.replace(/(http|https):\/\//g, (httpStr ? (httpStr + ':') : location.protocol) + '//');
}
\ No newline at end of file
......@@ -295,7 +295,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
var _addmaid_input_servantObj = $('#addmaid_input_servant');
_doc.on('input', '#addmaid_input_ywy', function() {
var _this = $(this);
if(_addmaid_input_servantObj.val() == '5'){
//当分佣方的值为5,合作方的时候,才能查询
var _thisVal = $.trim(_this.val());
_this.removeAttr('data-id'); //移除之前携带的信息
......@@ -345,7 +345,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}else{
_this.next().hide();
}
}else{}
});
......@@ -363,12 +363,16 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
getDefaultRadio: function(v){
switch (Number(v)){
case 1:
return 25;
return 20;
case 2:
return 30;
return 25;
case 3:
return 35;
case 4:
return 100;
case 6:
return 10;
case 7:
return 10;
default:
return 25;
......@@ -446,6 +450,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
$("#bargaininfo_type").val(data.data.trade_type);
$("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time);
$("#bargaininfo_expect_payback_time").val(data.data.estimated_receipt_date);
$("#bargaininfo_yetai").val(data.data.industry_type);
$("#bargaininfo_chengjiao_price").val(data.data.price);
......@@ -485,6 +490,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
'trade_type': $('#bargaininfo_type').val(),
'industry_type': $.trim($('#bargaininfo_yetai').val()),
'price': $('#bargaininfo_chengjiao_price').val(),
'estimated_receipt_date': $('#bargaininfo_expect_payback_time').val(),
'step': bargain.mainTabIndex+1
};
......@@ -505,7 +511,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
alert('修改成功');
bargain.bargaininfoShow();
bargain.getList(0);
//bargain.getList(0);
} else {
alert(data.msg);
}
......@@ -588,7 +594,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(data.code == 200) {
if(data.data) {
bargain.getList(1);
//bargain.getList(1);
}
} else {
alert('获取失败!');
......@@ -957,7 +963,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(typeof _data === 'object') {
if(_data['code'] == '200') {
alert('修改成功');
bargain.getList(1);
//bargain.getList(1);
} else {
layerTipsX(_data['msg']);
}
......@@ -976,6 +982,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}
});
},
//结单
account: function(){
$.ajax({
type: 'POST',
......@@ -990,7 +997,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(typeof _data === 'object') {
if(_data['code'] == '200') {
alert('结单成功!');
bargain.getList(1);
//bargain.getList(1);
} else {
layerTipsX(_data['msg']);
}
......
define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinderStart', 'css!style/home.css',"datetimepicker",'pagination','bootstrapJs'], function (doT, template) {
var user = {
pageNo: 1, /*第几页*/
pageSize: 15, /*每页显示多少条*/
user_id : 0,
urls: '',
agent_id_two:'',
agent_id2 : 0,
init: function () {
//初始化dot
$ ("body").append (template);
user.event ();
user.getList ();
//时间控件初始化
},
event: function () {
var _doc = $(document);
var _imgMaskObj = $('#img_mask_area'); //预览大图的mask
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
//获取学院标签
user.getDistrict(function(){
_doc.on('input', '#district_id, #district_id2', function(){
var _this = $(this);
var _id = _this.val();
_this.next().html('');//先清空
if(_id && _id != '0'){
}else{
};
});
});
$ (".Bannertu").click (function () {
BrowseServer ('cover_image');
});
_doc.on('click', '.add-pic', function(){
follow.getaddPicList();
});
$("#search").click(function(){
user.getList(1);
});
$("#reset").click(function () {
document.getElementById("form_search").reset();
});
$("#close").click(function () {
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
$(".close").click(function(){
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
$("#confirm_delete").click(function(){
var params = {};
params.id = user.announcementdel_id;
console.log(user.announcementdel_id);
if(!params.id || params.id == null){
alert ("要删除的id不能为空");
return false;
}
user.delete_text(params);
});
$ (document).delegate (".announcement-del", "click", function () {
user.announcementdel_id = $ (this).attr ("data-id");
console.log(user.announcementdel_id);
});
$ (document).delegate (".add_alert", "click", function () {//新增客户
document.getElementById("add_user_form").reset();
});
// ===========================新增文章====================
$ (document).delegate ("#add_news", "click", function () {//新增文章
user.user_id = $ (this).attr ("data-id");
user.add_news();
});
$ (document).delegate (".announcement-details", "click", function () {//点击公告详情
$('.notice-title').html($ (this).attr ("data-title"));
$('.notice-time').html($ (this).attr ("data-createTime"));
$('.notice-text').html($ (this).attr ("data-content"));
user.news_id = $ (this).attr ("data-id");
console.log(user.news_id);
user.announcement_details();
});
_doc.on('click', '.jian_class>ul>li', function(){
var _this = $(this);
_this.parent().prev().val(_this.html()).attr('data-id',_this.attr('data-id'));
_this.parent().html('').hide();
});
//图片上传,附件上传处理事件
$(".upload-image-btn").click(function() {
var _this = $(this),
_spFile = _this.data('spfile'),
_limitTop = _this.data('limittop'),
_fileNum = _this.parent().next().find('.delet-pic-btn').length; //根据删除按钮的个数,确定文件的个数
if(_limitTop && (_fileNum < _limitTop)) {
BrowseServer(_this.prev().attr('id'), function(url) {
console.log(url);
if(_spFile == 'pdf') {
if(/(\.pdf)$/i.test(url)) {
_this.parent().next().prepend('<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url,
'1': dealFileName(decodeURI(url.slice(url.lastIndexOf('/') + 1)))
}));
} else {
alert('所选择的格式不是pdf,请重新选择');
return false;
}
} else {
if(/(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.test(url)) {
_this.parent().next().prepend('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url
}));
} else {
alert('所选择的格式不正确,请重新选择');
return false;
}
};
});
} else {
alert('上传上限为 ' + _limitTop);
return false;
};
});
//图片预览点击放大事件
_doc.on('click', '.img-pre-ul>li>img', function(e) {
_imgMaskObj.show().find('img').attr('src', this.src);
});
_imgMaskObj.click(function(e) {
this.style.display = 'none';
});
},
//筛选 获取文章列表
getList: function (pageNo) {
user.pageNo = pageNo;
var params = {};
params.start_time = $("#start_date").val();
params.end_time = $("#end_date").val();
params.title = $("#release_title").val();
params.label_id = $("#district_id").val();
params.pageNo = user.pageNo;
params.pageSize = user.pageSize;
$.ajax ({
url: '/index/business_school',
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function (data) {
console.log('公告');
var temp = document.getElementById ('schoolBusiness_list_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#users_list").html (doTtmpl (data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,user.pageSize,user.getList);
$("#total_page").html(data.data.total);
}
});
},
getDistrict : function (fn) {
$.ajax ({
url: '/index/getNewsLabel',
type: 'GET',
async: true,
data: {},
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i,item) {
str += '<option value="'+item.id+'">'+item.label_name+'</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
fn && fn();
}
}
});
},
delete_text : function(params) {//删除文章
$.ajax ({
url: '/index/delNews',
type: 'POST',
async: true,
data: params,
dataType: 'json',
success: function (data) {
$ ("#modal-delete").modal ('hide');
if (data.code == "101") {
alert (data.msg);
return false;
}
user.getList (user.pageNo);
}
});
},
};
return user;
});
define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfinderStart', 'css!style/home.css', "datetimepicker", 'pagination', 'bootstrapJs'], function(doT, template) {
var user = {
pageNo: 1,
/*第几页*/
pageSize: 15,
/*每页显示多少条*/
user_id: 0,
urls: '',
agent_id_two: '',
agent_id2: 0,
init: function() {
//初始化dot
$("body").append(template);
//判断 是点击编辑按钮跳转的 还是新增文章 跳转的 通过id判断
user.event();
//获取学院标签
user.getDistrict(function() {
$(document).on('input', '#district_id, #district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
if(_id && _id != '0') {} else {};
//77777
});
});
},
event: function() {
var _doc = $(document);
var _imgMaskObj = $('#img_mask_area'); //预览大图的mask
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
$(".Bannertu").click(function() {
BrowseServer('cover_image');
});
_doc.on('click', '.add-pic', function() {
follow.getaddPicList();
});
$("#search").click(function() {
user.getList(1);
});
$("#reset").click(function() {
document.getElementById("form_search").reset();
});
$("#close").click(function() {
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
$(".close").click(function() {
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
$(document).delegate(".announcement-del", "click", function() {
user.announcementdel_id = $(this).attr("data-id");
console.log(user.announcementdel_id);
});
$(document).delegate(".add_alert", "click", function() { //新增客户
document.getElementById("add_user_form").reset();
});
// 新增文章
$(document).delegate("#add_news", "click", function() { //保存新增文章
user.user_id = $(this).attr("data-id");
user.add_news();
});
_doc.on('click', '.jian_class>ul>li', function() {
var _this = $(this);
_this.parent().prev().val(_this.html()).attr('data-id', _this.attr('data-id'));
_this.parent().html('').hide();
});
//图片上传,附件上传处理事件
$(".upload-image-btn").click(function() {
var _this = $(this),
_spFile = _this.data('spfile'),
_limitTop = _this.data('limittop'),
_fileNum = _this.parent().next().find('.delet-pic-btn').length; //根据删除按钮的个数,确定文件的个数
if(_limitTop && (_fileNum < _limitTop)) {
BrowseServer(_this.prev().attr('id'), function(url) {
console.log(url);
if(_spFile == 'pdf') {
if(/(\.pdf)$/i.test(url)) {
_this.parent().next().prepend('<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url,
'1': dealFileName(decodeURI(url.slice(url.lastIndexOf('/') + 1)))
}));
} else {
alert('所选择的格式不是pdf,请重新选择');
return false;
}
} else {
if(/(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.test(url)) {
_this.parent().next().prepend('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url
}));
} else {
alert('所选择的格式不正确,请重新选择');
return false;
}
};
});
} else {
alert('上传上限为 ' + _limitTop);
return false;
};
});
//图片上传删除键事件
_doc.on('click', '.delet-pic-btn', function(e) {
var _this = $(this);
e.preventDefault();
e.stopPropagation();
_this.parent().remove();
if(confirm('确定删除该文件吗?')) {
var _imgId = _this.parent().attr('data-imgid');
};
});
//图片预览点击放大事件
_doc.on('click', '.img-pre-ul>li>img', function(e) {
_imgMaskObj.show().find('img').attr('src', this.src);
});
_imgMaskObj.click(function(e) {
this.style.display = 'none';
});
},
//筛选 获取文章列表
getList: function(pageNo) {
user.pageNo = pageNo;
var params = {};
params.start_time = $("#start_date").val();
params.end_time = $("#end_date").val();
params.title = $("#release_title").val();
params.label_id = $("#district_id").val();
params.pageNo = user.pageNo;
params.pageSize = user.pageSize;
$.ajax({
url: '/index/business_school',
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function(data) {
console.log('公告');
var temp = document.getElementById('schoolBusiness_list_tpl').innerHTML;
var doTtmpl = doT.template(temp);
$("#users_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total, pageNo, user.pageSize, user.getList);
$("#total_page").html(data.data.total);
}
});
},
//点击编辑 调用的接口
text_details: function() {
var news_id = getUrlParam('id'); //地址栏获取的商铺或者街铺id
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _imgUploadLiebiao = $('#liebiao_pic_ul'); //列表页封面图ul
var _urlCut = location.origin + '/resource/lib/Attachments/images/'; //要截取的部分url
var _dajiangtangObj = $('#dajiangtang'); //大讲堂
$.ajax({
'type': 'GET',
'url': '/index/getNewsInfo',
data: {
'id': news_id,
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
$("#announcement_title").val(data.data.title);
$("#district_id2").val(data.data.s_label_id * 1); //商学院标签id
var _data = data['data'];
if(_data['cover_plan']) {
_imgUploadLiebiao.html('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _data['cover_plan']
}));
};
//获取编辑器里的内容
// setCKeditorValue(id,content)
setCKeditorValue("goods_sup_id", _data['content']);
} else {}
}
});
},
getDistrict: function(fn) {
$.ajax({
url: '/index/getNewsLabel',
type: 'GET',
async: true,
data: {},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.label_name + '</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
if(getUrlParam('id')) {
user.text_details();
}
fn && fn();
}
}
});
},
add_news: function() { //新增文章 编辑文章
var _imgUploadLiebiao = $('#liebiao_pic_ul'); //列表页封面图ul
var _liebiaoPicObj = _imgUploadLiebiao.find('li>img');
var _urlCut = location.origin + '/resource/lib/Attachments/images/'; //要截取的部分url
var _dajiangtangObj = $('#dajiangtang'); //大讲堂
var _dajiangtangVal = getCKeditorValue("goods_sup_id");
console.log(_dajiangtangVal);
if(_liebiaoPicObj.length < 1) {
alert('列表页封面图需要上传');
return false;
};
var _data = {};
if(getUrlParam('id')) {
_data.id = getUrlParam('id');
};
_data.title = $("#announcement_title").val();
_data.s_label_id = $("#district_id2").val(); //商学院标签id
_data.file_img = _liebiaoPicObj[0].src.replace(_urlCut, ''); //封面图 剪切后的字符串
_data.content = _dajiangtangVal;
$.ajax({
url: '/index/addNews',
type: 'POST',
async: true,
data: _data,
dataType: 'json',
success: function(data) {
if(data.code == 200) {
$("#modal_add_user").modal('hide'); //提交成功 关闭模态框
// user.getList(1);
alert('提交成功')
window.location.href = '/index/business_school';
console.log(66);
} else {
alert(data.msg);
}
}
});
},
};
return user;
});
\ No newline at end of file
......@@ -291,7 +291,9 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_internalYoushiObj.val(_data['internal_item_advantage']); //对内项目优势
_qianyueRuleObj.val(_data['sign_rule']); //签约规则
_weilouLinkObj.val(_data['tiny_brochure_url']); //微楼书
_dajiangtangObj.find('iframe').contents().find('body').html(_data['auditorium']); //大讲堂
//大讲堂调用共用方法赋值与取值
setCKeditorValue('da_jiang_tang', _data['auditorium']); //大讲堂
//列表页封面图
if(_data['cover']){
......@@ -844,7 +846,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
});
//保存按钮点击事件
$('#saveBtn').click(function(e) {
$('#saveBtn').click(function(e) {//保存大讲堂
e.preventDefault();
e.stopPropagation();
//多个input输入框验证标记
......@@ -1025,8 +1027,8 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
var _fujianObj = _pdfUploadFujian.find('li>a.pdf-pre-a'); //附件看的是删除按钮的个数
var _dujiaPicObj = _imgUploadDujia.find('li>img');
//大讲堂验证
var _dajiangtangVal = _dajiangtangObj.find('iframe').contents().find('body').html();
//大讲堂验证, 大讲堂调用共用方法赋值与取值
var _dajiangtangVal = getCKeditorValue('da_jiang_tang');
//大讲堂不是必填项
// if(_dajiangtangVal == '' || _dajiangtangVal == '<p><br></p>' || _dajiangtangVal == '<p><br /></p>' || _dajiangtangVal == '<p></p>'){
// alert('请填写大讲堂内容!');
......
......@@ -468,6 +468,7 @@ define(['doT', 'text!temp/tax_template_tpl.html', 'text!temp/reportList_shuiFee2
$("#bargaininfo_type").val(data.data.trade_type);
$("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time);
$("#bargaininfo_expect_payback_time").val(data.data.estimated_receipt_date);
$("#bargaininfo_yetai").val(data.data.industry_type);
$("#bargaininfo_chengjiao_price").val(data.data.price);
......
......@@ -413,8 +413,10 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
// console.log($("#guest_stores").val());
// };
// 输入 name
// params.name = $("input[name='user']").val();
// 增加客户id的搜索 客户姓名和手机号搜索分开
params.user_nick = $("input[name='user']").val();
params.phone = $("input[name='phone']").val();
params.id = $("input[name='userID']").val();
params.phone = $("input[name='phone']").val();
params.invite_phone = $("input[name='invite_phone']").val();
params.start_date = $("#start_date").val();
......
......@@ -42,7 +42,7 @@ require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php";
* @package CKFinder
* @subpackage Config
* @copyright CKSource - Frederico Knabben
* @global string $GLOBALS['config']
* @global string $GLOBALS ['config']
*/
class CKFinder_Connector_Core_Config
{
......@@ -157,7 +157,7 @@ class CKFinder_Connector_Core_Config
* @var array
* @access private
*/
private $_htmlExtensions = array('html', 'htm', 'xml', 'xsd', 'txt', 'js');
private $_htmlExtensions = array( 'html', 'htm', 'xml', 'xsd', 'txt', 'js' );
/**
* Chmod files after upload to the following permission
*
......@@ -178,14 +178,14 @@ class CKFinder_Connector_Core_Config
* @var array
* @access private
*/
private $_hideFolders = array(".svn", "CVS");
private $_hideFolders = array( ".svn", "CVS" );
/**
* Hide files
*
* @var integer
* @access private
*/
private $_hideFiles = array(".*");
private $_hideFiles = array( ".*" );
/**
* If set to true, force ASCII names
*
......@@ -285,12 +285,11 @@ class CKFinder_Connector_Core_Config
if (!isset($folderRegex)) {
if (is_array($this->_hideFolders) && $this->_hideFolders) {
$folderRegex = join("|", $this->_hideFolders);
$folderRegex = strtr($folderRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__"));
$folderRegex = strtr($folderRegex, array( "?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__" ));
$folderRegex = preg_quote($folderRegex, "/");
$folderRegex = strtr($folderRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|"));
$folderRegex = strtr($folderRegex, array( "__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|" ));
$folderRegex = "/^(?:" . $folderRegex . ")$/uim";
}
else {
} else {
$folderRegex = "";
}
}
......@@ -311,12 +310,11 @@ class CKFinder_Connector_Core_Config
if (!isset($fileRegex)) {
if (is_array($this->_hideFiles) && $this->_hideFiles) {
$fileRegex = join("|", $this->_hideFiles);
$fileRegex = strtr($fileRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__"));
$fileRegex = strtr($fileRegex, array( "?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__" ));
$fileRegex = preg_quote($fileRegex, "/");
$fileRegex = strtr($fileRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|"));
$fileRegex = strtr($fileRegex, array( "__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|" ));
$fileRegex = "/^(?:" . $fileRegex . ")$/uim";
}
else {
} else {
$fileRegex = "";
}
}
......@@ -465,7 +463,15 @@ class CKFinder_Connector_Core_Config
}
reset($GLOBALS['config']['ResourceType']);
while (list($_key,$_resourceTypeNode) = each($GLOBALS['config']['ResourceType'])) {
/* while (list($_key,$_resourceTypeNode) = each($GLOBALS['config']['ResourceType'])) {
if ($_resourceTypeNode['name'] === $resourceTypeName) {
$this->_resourceTypeConfigCache[$resourceTypeName] = new CKFinder_Connector_Core_ResourceTypeConfig($_resourceTypeNode);
return $this->_resourceTypeConfigCache[$resourceTypeName];
}
}*/
foreach ($GLOBALS['config']['ResourceType'] as $_key => $_resourceTypeNode) {
if ($_resourceTypeNode['name'] === $resourceTypeName) {
$this->_resourceTypeConfigCache[$resourceTypeName] = new CKFinder_Connector_Core_ResourceTypeConfig($_resourceTypeNode);
......@@ -531,10 +537,10 @@ class CKFinder_Connector_Core_Config
if (function_exists('CheckAuthentication')) {
$this->_isEnabled = CheckAuthentication();
}
if(isset($GLOBALS['config']['Resource_Root_Dir'])){
if (isset($GLOBALS['config']['Resource_Root_Dir'])) {
$this->_resource_root_dir = (string)$GLOBALS['config']['Resource_Root_Dir'];
}
if(isset($GLOBALS['config']['Resource_Space_Size'])){
if (isset($GLOBALS['config']['Resource_Space_Size'])) {
$this->_resource_space_size = (array)$GLOBALS['config']['Resource_Space_Size'];
}
if (isset($GLOBALS['config']['LicenseName'])) {
......@@ -631,22 +637,24 @@ class CKFinder_Connector_Core_Config
/**
* Get X-Sendfile option
*/
public function getXSendfile(){
public function getXSendfile()
{
return $this->_xsendfile;
}
/**
* Get the dditional Nginx X-Sendfile configuration (location => root)
*/
public function getXSendfileNginx(){
public function getXSendfileNginx()
{
$xsendfileNginx = array();
foreach ( $this->_xsendfileNginx as $location => $root ){
foreach ($this->_xsendfileNginx as $location => $root) {
$root = (string)$root;
$location = rtrim((string)$location,'/').'/';
if ( substr($root,-1,1) != '/' && substr($root,-1,1) != '\\') {
$location = rtrim((string)$location, '/') . '/';
if (substr($root, -1, 1) != '/' && substr($root, -1, 1) != '\\') {
// root and location paths are concatenated
// @see http://wiki.nginx.org/XSendfile
$root = CKFinder_Connector_Utils_FileSystem::combinePaths(rtrim($root,'/'),$location);
$root = CKFinder_Connector_Utils_FileSystem::combinePaths(rtrim($root, '/'), $location);
}
$xsendfileNginx[$location] = $root;
}
......
var global = {
'attach_prefix' : '/public/resource/lib/Attachments/'
}
function BrowseServer(input_image,fun )
{
......
<script id="agent_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr data-groupname="[%= it[item]['groupname'] %]">
<tr data-groupname="[%= it[item]['groupname'] %]" class="text-center">
<td>[%= it[item]["create_time"] %]</td>
<td>[%= it[item]["id"] %]</td>
<td>
......@@ -12,10 +12,8 @@
<td>[%= it[item]["name"] %]</td>
<td>[%= it[item]["phone"] %]</td>
<td>[%= it[item]["groupname"] %]</td>
<!--增加评价次数 分数2.2-->
<!--<td>[%= it[item]["groupname"] %]</td>
<td>[%= it[item]["groupname"] %]</td>-->
<!--<td><span class="fa fa-check text-success"></span></td>-->
<td class="number-evaluation text-center" data-id='[%= it[item]["id"] %]'>--</td>
<td class="score-evaluation text-center" data-id='[%= it[item]["id"] %]'>--</td>
<td>
<a class="btn1 btn-success edit" href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>编辑</a>
......@@ -30,8 +28,12 @@
[% if(check_auth('index/updateRole')) {%]
<a href="#modal-user" class="btn1 btn-danger" id='role' href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>角色设置</a>
[% } %]
<!--增加绑定手机号按钮 2.2版本-->
<!--<a class="btn1 btn-success" href="#modal-unbundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定手机</a>-->
<!--绑定手机权限-->
[% if(check_auth('index/updateDevice')) {%]
<a class="btn1 btn-success phone-bundling" href="#modal-phonebundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定手机</a>
[% } %]
</td>
</tr>
......
......@@ -14,8 +14,8 @@
<td class="pay_type">[%= it[item]['evaluate_grade'] %]</td>
<td>[%= it[item]['evaluate_content'] %]</td>
<td>
<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>删除</a>
<a class="btn1 btn-info timeline2" href="#modal-time2" data-toggle="modal" data-id='[%= it[item]["report_id"] %]'>时间轴</a>
<!--<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>删除</a>-->
<a class="btn1 btn-info timeline2" href="#modal-time2" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
</td>
</tr>
[% } %]
......
<script id="get_collection_tpl" type="text/template">
[% if(it) { %]
[% if(it&&it.length!=0) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['create_time'] %]</td>
......@@ -7,13 +7,13 @@
<td>[%= it[item]['user_phone'] %]</td>
<td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['real_money'] %]</td>
<td class="pay_type">[%= it[item]['type'] %]</td>
<td>[%= it[item]['type'] %]</td>
<td>[%= it[item]['pay_type'] %]</td>
<td>[%= it[item]['internal_address'] %]</td>
<td>[%= it[item]['house_number'] %]</td>
<td>
<!--增加收款图片 2.2版本-->
<a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>收款图片</a>
<a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' father-id='[%= it[item]["father_id"] %]'>收款图片</a>
<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
<a class="btn1 btn-info submit_edit2" href="#modal-linetime" data-toggle="modal" data-id='[%= it[item]["id"]%]' data-money='[%= it[item]["real_money"] %]'>编辑</a>
</td>
......@@ -21,7 +21,7 @@
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
<td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
......
<script id="phone_binding_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]["model"] %]</td>
<td>[%= it[item]["create_time"] %]</td>
<td>
[% if(it[item]["is_forbidden"] == 0) { %]
<a class="btn1 btn-default is_show2" data-toggle="modal" data-id='[%= it[item]["id"] %]'>解绑</a>
[% }else if(it[item]["is_forbidden"] == 1) { %]
<a class="btn1 btn-info is_show2" data-toggle="modal" data-id='[%= it[item]["id"] %]'>允许</a>
[% }else{ %]
<a class="btn1 btn-default" data-toggle="modal" data-id='[%= it[item]["id"] %]'>离职</a>
[% } %]
<!--<a class="btn1 btn-info review-images" href="#modal-time" data-toggle="modal" data-img='[%= it[item]["scene_photo"] %]'>允许</a>-->
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
\ No newline at end of file
<script id="schoolBusiness_list_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr>
<td>[%= it[item]['create_time'] %]</td>
<!--<td>[%= hideTel(it[item]["name"]) %]</td>-->
<td>[% if(it[item]["name"] != null) { %]
[%= it[item]["name"] %]
[% } %]
</td>
<td>[%= it[item]["title"] %]</td>
<td>[% if(it[item]["label_name"] != null) { %]
[%= it[item]["label_name"] %]
[% } %]
</td>
<!--<td>[%= it[item]["label_name"] %]</td>-->
<!--没有评论数字段-->
<td>[%= it[item]["comment_number"] %]</td>
<td>
<!--<a class="btn1 btn-success" href="new_text.html?id=[%= it[item]['id'] %]" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-id='[%= it[item]["id"] %]' data-content='[%= it[item]["content"] %]' target="_self">-->
<a class="btn1 btn-success" href="new_text.html?id=[%= it[item]['id'] %]" data-id="[%= it[item]['id'] %]">
编辑
</a>
[% if(check_auth('index/delNews')) { %]
<!--删除权限-->
<a class="btn1 btn-danger announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
[% } %]
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="7" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
......@@ -2,6 +2,7 @@
[% if(it) { %]
[% for(var item in it){ %]
<tr>
<td>[%= it[item]['house_id'] %]</td>
<td>[%= it[item]['house_title'] %]</td>
<td>[%= it[item]['appellation'] %]</td>
<td>[%= it[item]["phone"] %]</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment