Commit 04b43c48 authored by agping's avatar agping

经纪人搜索二级联动

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