Commit 47765ed6 authored by zw's avatar zw

Merge branch 'test'

parents 57b8ed8d 6d82a647
...@@ -789,6 +789,14 @@ class Broker extends Basic ...@@ -789,6 +789,14 @@ class Broker extends Basic
$where['site_id'] = $this->params['site_id']; $where['site_id'] = $this->params['site_id'];
} }
if (!empty($this->params['store_id'])) {
$where['store_id'] = $this->params['store_id'];
}
if (!empty($this->params['district_id'])) {
$where['district_id'] = $this->params['district_id'];
}
try { try {
$m_agent = new AAgents(); $m_agent = new AAgents();
$m_store = new AStore(); $m_store = new AStore();
......
...@@ -118,6 +118,12 @@ ...@@ -118,6 +118,12 @@
<option value="10001">上海市</option> <option value="10001">上海市</option>
<option value="10002">杭州市</option> <option value="10002">杭州市</option>
</select> </select>
<select class="form-control btn2 input ld-Marheight" name="" id="district_id2">
<option value="">部门</option>
</select>
<select class="form-control btn2 input ld-Marheight" name="" id="guest_stores">
</select>
<div class="left-phone"> <div class="left-phone">
<input class="form-control margin-top-ld" data-rule-phoneus="false" data-rule-required="false" id="user_agent_name_text" placeholder="经纪人姓名" type="text" value=""> <input class="form-control margin-top-ld" data-rule-phoneus="false" data-rule-required="false" id="user_agent_name_text" placeholder="经纪人姓名" type="text" value="">
<!--<ul class="user-ul-agent"></ul>--> <!--<ul class="user-ul-agent"></ul>-->
......
...@@ -437,11 +437,11 @@ class AAgents extends BaseModel ...@@ -437,11 +437,11 @@ class AAgents extends BaseModel
$str_ids = " and a.id in ($ids)"; $str_ids = " and a.id in ($ids)";
} }
$sql = "select aa.id,aa.store_name,aa.name,aa.phone,aa.performance from $sql = "select aa.id,aa.store_name,aa.name,aa.phone,aa.performance from
(select a.id,c.store_name,a.name,a.phone,0 as performance from a_agents a (select a.id,c.store_name,a.name,a.phone,0.00 as performance from a_agents a
left join a_store c on a.store_id=c.id left join a_store c on a.store_id=c.id
where a.position=$position and a.site_id=$siteId and a.status in (0,3) $str_ids ) where a.position=$position and a.site_id=$siteId and a.status in (0,3) $str_ids )
as aa left join as aa left join
(select a.id,c.store_name,a.name,a.phone,0 as performance from a_agents a (select a.id,c.store_name,a.name,a.phone,0.00 as performance from a_agents a
left join t_agent_total b on a.id=b.agent_id left join a_store c on a.store_id=c.id left join t_agent_total b on a.id=b.agent_id left join a_store c on a.store_id=c.id
where b.total_time BETWEEN '$startTime' and '$endTime'and a.status in (0,3) $str_ids GROUP BY b.agent_id ) where b.total_time BETWEEN '$startTime' and '$endTime'and a.status in (0,3) $str_ids GROUP BY b.agent_id )
as bb on aa.id = bb.id where bb.id is null" ; as bb on aa.id = bb.id where bb.id is null" ;
......
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
.supporting-facilities{ .supporting-facilities{
width: 100%; width: 100%;
margin-bottom: 2.3rem; margin-bottom: 3.5rem;
} }
.supporting-facilities>li{ .supporting-facilities>li{
......
...@@ -21,6 +21,29 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor ...@@ -21,6 +21,29 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
}, },
event: function() { event: function() {
var _doc = $(document); var _doc = $(document);
//部门 门店
professional.getDistrict(function() {
_doc.on('input', '#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') {
professional.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
_objTemp.html(_str);
_this.next().html(_str);
});
} else {};
});
});
_doc.on("input", "#user_agent_name", function() { //客户列表 客方员工姓名 下拉式搜索 _doc.on("input", "#user_agent_name", function() { //客户列表 客方员工姓名 下拉式搜索
if($("#user_agent_name").val() == '') { if($("#user_agent_name").val() == '') {
professional.agent_id_choose=''; professional.agent_id_choose='';
...@@ -188,6 +211,9 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor ...@@ -188,6 +211,9 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
'phone':$('#user_agent_phone').val(), 'phone':$('#user_agent_phone').val(),
'position':professional.mainTabIndex, 'position':professional.mainTabIndex,
'site_id':$('.p_city_choose_site').val(), 'site_id':$('.p_city_choose_site').val(),
'district_id':$('#district_id2').val(),
'store_id':$('#guest_stores').val()
}; };
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
...@@ -224,6 +250,44 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor ...@@ -224,6 +250,44 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
}; };
} }
}); });
},
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$('#district_id2').append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
}, },
search_phone_agent: function() { //客户列表 客方员工 姓名的下拉式搜索 search_phone_agent: function() { //客户列表 客方员工 姓名的下拉式搜索
$.ajax({ $.ajax({
......
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