Commit 5eadd69f authored by xishifeng's avatar xishifeng

客户列表约带看

parent 0fa911d3
...@@ -1138,7 +1138,9 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -1138,7 +1138,9 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
if(_id != null) { if(_id != null) {
_data['id'] = _id; _data['id'] = _id;
_data['upload_id'] = _objThis.upload_id; _data['upload_id'] = _objThis.upload_id;
}; }else{
_data['id'] = '';//新增时id传空
}
//当为委托转铺新增时,需要传这两个参数 //当为委托转铺新增时,需要传这两个参数
if(_source) { if(_source) {
_data['source'] = _source; _data['source'] = _source;
......
...@@ -9,6 +9,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -9,6 +9,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
urls: '', urls: '',
agent_id_two: '', agent_id_two: '',
agent_id2: 0, agent_id2: 0,
isAjaxSaving: false,
init: function() { init: function() {
//初始化dot //初始化dot
$("body").append(template); $("body").append(template);
...@@ -307,33 +308,46 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -307,33 +308,46 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
var start_ = $("#look_shop_date").val()+" 00:00:00"; var start_ = $("#look_shop_date").val()+" 00:00:00";
date_start =new Date(Date.parse(start_.replace(/-/g, "/"))); date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
var start_time =date_start.getTime()*0.001; var start_time =date_start.getTime()*0.001;
$.ajax({
url: '/broker/report',
type: 'POST', if(!user.isAjaxSaving){
async: true, user.isAjaxSaving = true;
data: { $.ajax({
"AuthToken": user_info_obj.AuthToken, url: '/broker/report',
"report_agent_id": user_info_obj.id, type: 'POST',
"report_store_id": user_info_obj.store_id, async: true,
"vehicle": 10, timeout: 30000,
"intro": $("#note_look").val(), data: {
"predict_see_time": start_time, "AuthToken": user_info_obj.AuthToken,
"user_id": $("#take_look_id").html(), "report_agent_id": user_info_obj.id,
"house_ids": arr_look.join(','), "report_store_id": user_info_obj.store_id,
"report_agent_phone": user_info_obj.phone "vehicle": 10,
}, "intro": $("#note_look").val(),
dataType: 'json', "predict_see_time": start_time,
success: function(data) { "user_id": $("#take_look_id").html(),
if(data.code == 200) { "house_ids": arr_look.join(','),
alert('提交成功'); "report_agent_phone": user_info_obj.phone
$("#modal-takeLook").modal('hide');//提交成功后 关闭弹窗 },
beforeSend: function() {},
} else { dataType: 'json',
alert(data.msg); success: function(data) {
} if(data.code == 200) {
alert('提交成功');
} user.isAjaxSaving = false;//请求结束,再改为初始状态
}); $("#modal-takeLook").modal('hide');//提交成功后 关闭弹窗
} else {
alert(data.msg);
}
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
}
});
}
}, },
search_phone: function() { //手机号 search_phone: function() { //手机号
$.ajax({ $.ajax({
......
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