Commit 4d4dec0a authored by agping's avatar agping

经纪人修改手机号

parent cff1c8ac
......@@ -124,12 +124,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
});
$(document).on("click", ".edit-phone-btn", function() { //点击修改手机号
agent.agent_id = $(this).attr("data-id");
agent.Edit();//获取编辑内容
$('#edit-phone').val($(this).attr("data-phone"));
});
$(document).on("click", ".edit-phone-save", function() { //保存修改手机号
agent.Submit_edit_phone();//获取编辑内容
});
$(document).on("click", ".phone-bundling", function() { //点击绑定手机
agent.agent_id = $(this).attr("data-id");
agent.getPhoneBindingList(browser_version);
......@@ -576,19 +576,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
//提交编辑的信息
var params = {}
params.id = agent.agent_id;
params.name = agent.editObj.name;
params.password = agent.editObj.password;
params.district_id = agent.editObj.district_id;
params.store_id = agent.editObj.store_id;
params.phone = $("#edit-phone").val();
params.admin_off = agent.editObj.admin_off;
params.sex = agent.editObj.sex;
params.remarks = agent.editObj.remarks;
if(params.phone == '') {
alert('手机号必填!');
return false;
}
if(params.phone.length != 11) {
alert('手机号码错误!');
return false;
......@@ -596,13 +588,14 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$.ajax({
'type': 'POST',
'url': '/index/saveAgent',
'url': '/index/updatePhone',
data: params,
dataType: "json",
success: function(data) {
if(data.code == 200) {
alert('提交成功');
$("#modal-editPhone").modal('hide');
agent.getList(agent.pageNo);
}else if(data.code == 101){
alert(data.msg);
} else {
......
......@@ -75,7 +75,7 @@
<a class="btn1 btn-default btn-default-hide-caozuo btn-default-hide-display"><<<</a>
[% } else{ %]
<a class="btn1 btn-success edit-phone-btn" href="#modal-editPhone" data-toggle="modal" data-id='[%= it[item]["id"] %]'>修改手机号</a>
<a class="btn1 btn-success edit-phone-btn" href="#modal-editPhone" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-phone='[%= it[item]["phone"] %]'>修改手机号</a>
[% } %]
......
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