Commit 87371e77 authored by agping's avatar agping

修改职称 优化

parent bcf4f097
......@@ -195,12 +195,16 @@
×
</button>
<h4 class="modal-title">
编辑职称人员
修改职称
</h4>
</div>
<div class="modal-body" style="height: 350px;">
<div class="modal-body" style="height: 250px;">
<form class="form-horizontal" id="">
<div class="form-group">
<br />
<br />
<br />
<label class="col-sm-3 control-label">职称:</label>
<select id="professional_id_edit" class="form-control btn6">
<option value="-1">选择职称</option>
......@@ -211,13 +215,6 @@
<option value="0">新人</option>
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">经纪人:</label>
<div class="left-phone">
<input class="form-control" data-rule-phoneus="false" data-rule-required="false" id="user_agent_name_edit" placeholder="经纪人姓名" type="text" value="">
<ul class="user-ul-agent-edit"></ul>
</div>
</div>
</form>
</div>
<div class="modal-footer">
......
......@@ -8,7 +8,6 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
mainTabIndex: 0,
agent_id_choose:'',
agent_id_choose_add:'',
agent_id_choose_edit:'',
agent_id_choose_concel:'',
edit_professional:'',
edit_professional_id:'',
......@@ -39,24 +38,14 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
professional.search_phone_agent_add();
}
});
_doc.on("input", "#user_agent_name_edit", function() { //客户列表 客方员工姓名 下拉式搜索(编辑)
if($("#user_agent_name_edit").val() == '') {
professional.agent_id_choose_edit='';
$(".user-ul-agent-edit").html('');
} else {
professional.search_phone_agent_edit();
}
});
_doc.delegate(".addphone-agent", "click", function() { //客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失
professional.addphoneAgent(this);
});
_doc.delegate(".addphone-agent-add", "click", function() { //客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失(新增)
professional.addphoneAgentAdd(this);
});
_doc.delegate(".addphone-agent-edit", "click", function() { //客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失(编辑)
professional.addphoneAgentEdit(this);
});
//主页面 6个tab的点击事件
_doc.on('click', '.maintable-top-sub-tr>a', function(e){
e.preventDefault();
......@@ -105,8 +94,6 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
e.stopPropagation();
var _this = $(this);
professional.agent_id_choose_edit = _this.attr('data-id');
var professional_agent =_this.attr('data-id') + "-" +_this.attr('data-name') + '-' +_this.attr('data-phone')
$('#user_agent_name_edit').val(professional_agent);
$('#professional_id_edit').val(_this.attr('data-agent'));
});
_doc.on('click', '.concel-professional', function(e) {
......@@ -296,36 +283,6 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
$(".user-ul-agent-add").html('');
professional.agent_id_choose_add = $(obj).attr("data-id");
},
search_phone_agent_edit: function() { //客户列表 客方员工 姓名的下拉式搜索(编辑)
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"phone": $("#user_agent_name_edit").val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
user_ul += '<li class="addphone-agent-edit" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + '</li>';
});
$(".user-ul-agent-edit").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
addphoneAgentEdit: function(obj) {//客户列表 客方姓名 搜索 input赋值(编辑)
var user_ht = $(obj).html();
$("#user_agent_name_edit").val(user_ht);
$(".user-ul-agent-edit").html('');
professional.agent_id_choose_edit = $(obj).attr("data-id");
},
};
return professional;
});
\ No newline at end of file
......@@ -24,8 +24,8 @@
<a class="btn1 btn-info concel-professional" data-id='[%= it[item]["id"] %]'>
取消职称
</a>
<a class="btn1 btn-info edit-professional-detail" data-id='[%= it[item]["id"] %]' data-agent='[%= it[item]["position"] %]' data-name='[%= it[item]["name"] %]' data-phone='[%= it[item]["phone"] %]' href="#modal_edit" data-toggle="modal">
编辑职称
<a class="btn1 btn-info edit-professional-detail" data-id='[%= it[item]["id"] %]' data-agent='[%= it[item]["position"] %]' href="#modal_edit" data-toggle="modal">
修改职称
</a>
</td>
</tr>
......
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