Commit d4c73460 authored by agping's avatar agping

上一条 同步客户列表

parent b8338b1a
...@@ -210,6 +210,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde ...@@ -210,6 +210,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
user.user_phone = $(this).attr("data-phone"); user.user_phone = $(this).attr("data-phone");
user.agent_id_infor = $(this).attr("data-agentId"); user.agent_id_infor = $(this).attr("data-agentId");
$('.call-user-five').html('');
$('.detail-modal-body-sec-2').show();
$('#take_look_name').html($(this).attr("data-name")); $('#take_look_name').html($(this).attr("data-name"));
$('#take_look_phone').html($(this).attr("data-phone")); $('#take_look_phone').html($(this).attr("data-phone"));
$('#take_look_id').html($(this).attr("data-id")); $('#take_look_id').html($(this).attr("data-id"));
...@@ -1044,11 +1046,18 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde ...@@ -1044,11 +1046,18 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200&&data.data) { if(data.code == 200 || data.code == 201) {
user.user_id=data.data.user_id; user.user_id=data.data.user_id;
if(data.code == 200){
$('.call-user-five').html('');
$('.detail-modal-body-sec-2').show();
}else{
$('.call-user-five').html(data.msg);
$('.detail-modal-body-sec-2').hide();
}
user.Caozuo(); user.Caozuo();
user.getGenjincon(); user.getGenjincon();
if(data.data.user_id==data.data.max_user_id){ if(data.data.user_id==data.data.max_user_id){
user.user_id=data.data.max_user_id-1; user.user_id=data.data.max_user_id-1;
}; };
if(data.data.user_id==data.data.min_user_id){ if(data.data.user_id==data.data.min_user_id){
...@@ -1057,6 +1066,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde ...@@ -1057,6 +1066,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
}else{ }else{
alert(data.msg) alert(data.msg)
} }
} }
}); });
}, },
......
...@@ -260,11 +260,10 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'ckfinder', 'ckfinderSta ...@@ -260,11 +260,10 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'ckfinder', 'ckfinderSta
user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
console.log(user.user_id); console.log(user.user_id);
if(user.user_id== 'null'){ if(user.user_id== 'null'){
// $("#modal-record").modal('hide');
alert('当前用户不存在'); alert('当前用户不存在');
} }
$('.call-user-five').html('');
$('.detail-modal-body-sec-2').show();
user.user_phone = $(this).attr("data-phone"); user.user_phone = $(this).attr("data-phone");
user.agent_id_infor = $(this).attr("data-agentId"); user.agent_id_infor = $(this).attr("data-agentId");
$('#take_look_name').html($(this).attr("data-name")); $('#take_look_name').html($(this).attr("data-name"));
...@@ -1054,11 +1053,18 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'ckfinder', 'ckfinderSta ...@@ -1054,11 +1053,18 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'ckfinder', 'ckfinderSta
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200&&data.data) { if(data.code == 200 || data.code == 201) {
user.user_id=data.data.user_id; user.user_id=data.data.user_id;
if(data.code == 200){
$('.call-user-five').html('');
$('.detail-modal-body-sec-2').show();
}else{
$('.call-user-five').html(data.msg);
$('.detail-modal-body-sec-2').hide();
}
user.Caozuo(); user.Caozuo();
user.getGenjincon(); user.getGenjincon();
if(data.data.user_id==data.data.max_user_id){ if(data.data.user_id==data.data.max_user_id){
user.user_id=data.data.max_user_id-1; user.user_id=data.data.max_user_id-1;
}; };
if(data.data.user_id==data.data.min_user_id){ if(data.data.user_id==data.data.min_user_id){
...@@ -1067,6 +1073,7 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'ckfinder', 'ckfinderSta ...@@ -1067,6 +1073,7 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'ckfinder', 'ckfinderSta
}else{ }else{
alert(data.msg) alert(data.msg)
} }
} }
}); });
}, },
......
...@@ -260,6 +260,8 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'ckfinder', 'ck ...@@ -260,6 +260,8 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'ckfinder', 'ck
user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
user.user_phone = $(this).attr("data-phone"); user.user_phone = $(this).attr("data-phone");
user.agent_id_infor = $(this).attr("data-agentId"); user.agent_id_infor = $(this).attr("data-agentId");
$('.call-user-five').html('');
$('.detail-modal-body-sec-2').show();
$('#take_look_name').html($(this).attr("data-name")); $('#take_look_name').html($(this).attr("data-name"));
$('#take_look_phone').html($(this).attr("data-phone")); $('#take_look_phone').html($(this).attr("data-phone"));
$('#take_look_id').html($(this).attr("data-id")); $('#take_look_id').html($(this).attr("data-id"));
...@@ -1060,11 +1062,18 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'ckfinder', 'ck ...@@ -1060,11 +1062,18 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'ckfinder', 'ck
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200&&data.data.length!=0) { if(data.code == 200 || data.code == 201) {
user.user_id=data.data.user_id; user.user_id=data.data.user_id;
if(data.code == 200){
$('.call-user-five').html('');
$('.detail-modal-body-sec-2').show();
}else{
$('.call-user-five').html(data.msg);
$('.detail-modal-body-sec-2').hide();
}
user.Caozuo(); user.Caozuo();
user.getGenjincon(); user.getGenjincon();
if(data.data.user_id==data.data.max_user_id){ if(data.data.user_id==data.data.max_user_id){
user.user_id=data.data.max_user_id-1; user.user_id=data.data.max_user_id-1;
}; };
if(data.data.user_id==data.data.min_user_id){ if(data.data.user_id==data.data.min_user_id){
...@@ -1073,6 +1082,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'ckfinder', 'ck ...@@ -1073,6 +1082,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'ckfinder', 'ck
}else{ }else{
alert(data.msg) alert(data.msg)
} }
} }
}); });
}, },
......
...@@ -264,9 +264,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -264,9 +264,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
user.agent_id_infor = $(this).attr("data-agentId"); user.agent_id_infor = $(this).attr("data-agentId");
$('.call-user-five').html(''); $('.call-user-five').html('');
$('.detail-modal-body-sec-2').show(); $('.detail-modal-body-sec-2').show();
$('.user_call').show();
$('#edit_add').show();
$('.save-look').show();
$('#take_look_name').html($(this).attr("data-name")); $('#take_look_name').html($(this).attr("data-name"));
$('#take_look_phone').html($(this).attr("data-phone")); $('#take_look_phone').html($(this).attr("data-phone"));
$('#take_look_id').html($(this).attr("data-id")); $('#take_look_id').html($(this).attr("data-id"));
...@@ -1132,15 +1129,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -1132,15 +1129,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
if(data.code == 200){ if(data.code == 200){
$('.call-user-five').html(''); $('.call-user-five').html('');
$('.detail-modal-body-sec-2').show(); $('.detail-modal-body-sec-2').show();
$('.user_call').show();
$('#edit_add').show();
$('.save-look').show();
}else{ }else{
$('.call-user-five').html(data.msg); $('.call-user-five').html(data.msg);
$('.detail-modal-body-sec-2').hide(); $('.detail-modal-body-sec-2').hide();
$('.user_call').hide();
$('#edit_add').hide();
$('.save-look').hide();
} }
user.Caozuo(); user.Caozuo();
user.getGenjincon(); user.getGenjincon();
......
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