Commit dd346f56 authored by hujun's avatar hujun

Merge branch 'test' of https://gitee.com/zwyjjc/tl_estate into test

parents c46f7703 50a3251a
database.php merge=ours
\ No newline at end of file
......@@ -183,7 +183,7 @@ class Shop extends Basic
//todo 这里的是否要更改成b端后台上传的类型
$param["imgtype"] = 2;
$result["images"] = $this->dbImg->getHouseImages($param, 15);
$param["imgtype"] = 4;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$param["imgtype"] = 3;//图片类型:1列表页封面图,2详情页轮播图,3楼层平面图,4独家合同,5,删除
$result["plan_images"] = $this->dbImg->getHouseImages($param, 4);
if ($result['room_num_left'] == 0) {
......
......@@ -258,7 +258,7 @@ class Shop extends Basic
//todo 这里的是否要更改成b端后台上传的类型
$param["img_type"] = 2;
$result["images"] = $this->gHousesImgModel->getHouseImages($param, 15);
$param["img_type"] = 4;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result["plan_images"] = $this->gHousesImgModel->getHouseImages($param, 1);
if ($result['status'] == 0) {
......
......@@ -40,11 +40,14 @@ class Statement extends Basic
"time_start" => date("Y-m-d", time()),
"time_end" => date("Y-m-d", time()) . " 23:59:59",
);*/
if (!isset($params["agent_id"]) || !isset($params["time_start"]) || !isset($params["time_end"])) {
return $this->response("101", "请求参数错误");
}
$time_end = $params["time_end"] . " 23:59:59";
try {
$result = $this->service_->selectStatementByAgentId($params["agent_id"], $params["time_start"], $params["time_end"]);
$result = $this->service_->selectStatementByAgentId($params["agent_id"], $params["time_start"], $time_end);
if (count($result) > 0) {
return $this->response("200", "request success", $result);
} else {
......
......@@ -434,8 +434,9 @@ class PerformanceService
if (count($list) > 0) {
foreach ($list as $key => $item) {
$fields = "a.name,b.store_name";
$fields = "c.name,b.store_name";
$where_["a.store_id"] = $item["store_id"];
$where_["c.id"] = $item["agent_id"];
$info = $this->agentModel->getStoreOrAgentInfo($fields, $where_);
if (count($info) > 0) {
$list[$key]["store_name"] = $info[0]["store_name"];
......
......@@ -5,6 +5,7 @@ namespace app\api_broker\service;
use app\model\AAgents;
use app\model\FollowUpLogModel;
use app\model\GHouses;
use app\model\OReportModel;
use app\model\Users;
/**
......@@ -21,6 +22,7 @@ class StatementService
private $houseModel;
private $userModel;
private $followUpModel;
private $reportModel;
const USER_LEVEL_FIST = 0; //经纪人
const USER_LEVEL_SECOND = 1; //店长
......@@ -32,6 +34,7 @@ class StatementService
$this->houseModel = new GHouses();
$this->userModel = new Users();
$this->followUpModel = new FollowUpLogModel();
$this->reportModel = new OReportModel();
}
/**
......@@ -127,7 +130,8 @@ class StatementService
$result["agent_total"] = $agent_total;
$result["house_num"] = $this->houseModel->getAddHouseNumByAgentId($conditions);
$result["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions);
$result["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions);
//$result["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions);
$result["follow_up_num"] = $this->reportModel->getAddFollowUpNumByAgentId($conditions);
//todo
$result["store_list"] = $store_list;
......@@ -153,7 +157,8 @@ class StatementService
$store_list["agent_name"] = $agent_name;
$store_list["house_num"] = $this->houseModel->getAddHouseNumByAgentId($conditions_);
$store_list["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions_);
$store_list["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions_);
//$store_list["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions_);
$store_list["follow_up_num"] = $this->reportModel->getAddFollowUpNumByAgentId($conditions_);
return $store_list;
}
......
......@@ -23,7 +23,7 @@
<tbody id="appendArea">
<tr>
<th>上传时间</th>
<th></th>
<th></th>
</tr>
<tr v-for="(item, index) in dataList" :key="item.id">
<td>{{item.create_time}}</td>
......
......@@ -25,7 +25,9 @@ return [
// 'password' => '123456',
// 端口
'hostport' => '3308',
// 'hostport' => '',
//'hostport' => '',
// 连接dsn
'dsn' => '',
// 数据库连接参数
......
......@@ -141,7 +141,7 @@ class Member extends Basic{
//注册时间
if (!empty($params['registration_end']) && empty($params['registration_start'])) {
$where['a.registration_time'] = ['< time',$params['registration_start']. ' 23:59:59'];
$where['a.registration_time'] = ['< time',$params['registration_end']. ' 23:59:59'];
}
//注册时间
......
......@@ -8,7 +8,7 @@
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li><a href="#">权限管理</a></li>
<li class="active">新增</li>
<li class="active">新增66</li>
<div class="pull-right">
<ul class="bread_btn">
<li>
......
......@@ -289,7 +289,8 @@
<div class="form-group">
<label class="col-sm-3 control-label">所属部门:</label>
<!--<input type="text" value="" name="ss-store" class="form-control btn6" placeholder="所属部门">-->
<select name="ss-store" class="form-control btn6" id="ss-store">
<select name="ss-store" class="form-control btn6" id="ss-store" >
<option value="" selected="selected">请选择</option>
</select>
</div>
......
......@@ -568,6 +568,7 @@ class AAgents extends BaseModel
->field($field)
->alias("a")
->join("a_store b", "a.store_id = b.id", "left")
->join("a_agents c", "a.store_id = c.store_id", "left")
->where($params)
->where('a.level', [ '=', 20 ], [ '=', 40 ], 'or')
->select();
......
......@@ -448,4 +448,22 @@ class OReportModel extends Model
->where($params)
->select();
}
/**
* 获取经纪人新增带看数量
* @param $params
* @return int|string
*/
public function getAddFollowUpNumByAgentId($params){
$where_ = [];
if(isset($params["agent_id"])){
$where_["report_agent_id"] = $params["agent_id"];
}
if(isset($params["create_time"])){
$where_["create_time"] = $params["create_time"];
}
return Db::name($this->table)
->where($where_)
->count();
}
}
\ No newline at end of file
......@@ -330,7 +330,7 @@ class Users extends Model
$field = "count(1) as num,DATE(create_time) as day";
$where_ = [];
if(isset($params["agent_id"])){
$where_["referrer_id"] = $params["agent_id"];
$where_["agent_id"] = $params["agent_id"];
}
if(isset($params["create_time"])){
$where_["create_time"] = $params["create_time"];
......@@ -346,7 +346,7 @@ class Users extends Model
$field = "count(1) as num";
$where_ = [];
if(isset($params["agent_id"])){
$where_["referrer_id"] = $params["agent_id"];
$where_["agent_id"] = $params["agent_id"];
}
if(isset($params["create_time"])){
$where_["create_time"] = $params["create_time"];
......
......@@ -42,9 +42,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
agent.Submit_edit();
});
$(document).delegate("#role", "click", function () {//变更角色
$(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();
agent.getRole(_tempVal);
});
$(document).delegate(".submit_user", "click", function () {//提交变更
......@@ -118,6 +120,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$("#remarks").val(data.data.remarks);
$("#password").val(data.data.password);
$("input[name='password']").attr('form-group');
// store.getDistrict(data.data.district_name);
if (data.data.sex == '0') {
$("#sex0").attr('checked', true);
} else if (data.data.sex == '1') {
......@@ -146,6 +150,7 @@ 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 == '') {
alert('手机号必填!');
return false;
......@@ -202,7 +207,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
}
})
},
getRole : function () {
getRole : function (tempval) {
$.ajax({
url: '/index/getAuth2',
type: 'GET',
......@@ -211,10 +216,16 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
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);
};
});
$("#edit_role").html(User_add);
console.log(_tempid);
$("#edit_role").html(User_add).val(_tempid);
}
});
......
......@@ -84,7 +84,7 @@ authRule={
dataType: "json",
success: function (data) {
$("input[name = id]").val(data.data.id);
$("input[name = title]").val(data.data.title);
$("input[name = title]").val(data.data.title2);
$("input[name = name]").val(data.data.name);
$("input[name = sort]").val(data.data.sort);
$("#pid").val(data.data.pid);
......
......@@ -360,10 +360,10 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var _html = '';
var _html = ' <option value="" selected="selected">请选择</option>';
$.each(data.data, function(i, n) {
if (n.district_name == name && (typeof name != undefined)) {
_html += '<option selected="selected" value="' + n.id + '">' + n.district_name + '</option>';
_html += '<option" value="' + n.id + '">' + n.district_name + '</option>';
} else {
_html += '<option value="' + n.id + '">' + n.district_name + '</option>';
}
......
<script id="agent_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr>
<tr data-groupname="[%= it[item]['groupname'] %]">
<td>[%= it[item]["create_time"] %]</td>
<td>[%= it[item]["id"] %]</td>
<td>[%= it[item]["name"] %]</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