Commit 04b43c48 authored by agping's avatar agping

经纪人搜索二级联动

parent 472738ae
......@@ -2,7 +2,7 @@
<input type="hidden" class="page-load" id="agent" />
<!--关联经纪人列表liudanjs文件-->
<style>
.J_preview{
.J_preview {
width: 30px;
height: 30px;
border-radius: 15px;
......@@ -22,8 +22,8 @@
<ul class="bread_btn">
<li>
<a href="#modal-edit" data-toggle="modal" class="btn btn-default agent_add">
<i class="icon-plus"></i>
新增</a>
<i class="icon-plus"></i> 新增
</a>
</li>
</ul>
</div>
......@@ -36,12 +36,16 @@
<tr>
<td colspan="11">
<form id="form_search">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="industry_type" placeholder="角色"
type="text" value="" name="groupname">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="dish" placeholder="门店"
type="text" value="" name="store_name">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="姓名/手机号"
name="search" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="industry_type" placeholder="角色" type="text" value="" name="groupname">
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="dish" placeholder="门店"
type="text" value="" name="store_name">-->
<select class="form-control btn2 input ld-Marheight" name="" id="district_id">
<option value="">客方所属部门</option>
</select>
<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>
......@@ -96,8 +100,7 @@
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">用户名:</label>
<input class="form-control btn6" data-rule-buga="false" data-rule-required="true" name="name" placeholder="登录账户所用名称" type="text"
value="" id="title">
<input class="form-control btn6" data-rule-buga="false" data-rule-required="true" name="name" placeholder="登录账户所用名称" type="text" value="" id="title">
</div>
<div class="form-group">
<label class="col-sm-3 control-label">电话(登录账号):</label>
......@@ -171,7 +174,6 @@
<!-- /.modal -->
</div>
<!--变更角色-->
<div class="modal fade" id="modal-user" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
......@@ -206,7 +208,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-unbundling" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
......
......@@ -12,11 +12,10 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
event: function () {
var _doc = $(document);
agent.getDistrict(function(){
_doc.on('input', '[name=district_id]', function(){
_doc.on('input', '#district_id', function(){
var _this = $(this);
var _id = _this.val();
var _objTemp = _this.parent().next().find('select');
_objTemp.html('');//先清空
_this.next().html('');//先清空
if(_id && _id != '0'){
agent.getDistrictStoreList(_id, function(_data){
// var _str = '';
......@@ -24,12 +23,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$.each(_data, function(i,item) {
_str += '<option value="'+item.id+'">'+item.store_name+'</option>';
});
_objTemp.html(_str);
_this.next().html(_str);//先清空
});
}else{
};
});
})
});
$('#search').click(function (pageNo) {
agent.getList(1);
});
......@@ -245,6 +244,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
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',
......@@ -298,7 +298,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$.each(data.data, function(i,item) {
str += '<option value="'+item.id+'">'+item.district_name+'</option>';
});
$('[name=district_id]').append(str);
$('#district_id').append(str);
fn && fn();
}
}
......
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