Commit 2bd10374 authored by agping's avatar agping

后台 职称列表 加城市 部门筛选

parent 655c97cf
...@@ -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>-->
......
...@@ -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