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,10 +308,15 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -307,10 +308,15 @@ 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;
if(!user.isAjaxSaving){
user.isAjaxSaving = true;
$.ajax({ $.ajax({
url: '/broker/report', url: '/broker/report',
type: 'POST', type: 'POST',
async: true, async: true,
timeout: 30000,
data: { data: {
"AuthToken": user_info_obj.AuthToken, "AuthToken": user_info_obj.AuthToken,
"report_agent_id": user_info_obj.id, "report_agent_id": user_info_obj.id,
...@@ -322,18 +328,26 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -322,18 +328,26 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
"house_ids": arr_look.join(','), "house_ids": arr_look.join(','),
"report_agent_phone": user_info_obj.phone "report_agent_phone": user_info_obj.phone
}, },
beforeSend: function() {},
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
alert('提交成功'); alert('提交成功');
user.isAjaxSaving = false;//请求结束,再改为初始状态
$("#modal-takeLook").modal('hide');//提交成功后 关闭弹窗 $("#modal-takeLook").modal('hide');//提交成功后 关闭弹窗
} else { } else {
alert(data.msg); 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