Commit b7a54c3c authored by agping's avatar agping

商学院修改

parent 220fbb00
......@@ -10,16 +10,8 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
//初始化dot
$ ("body").append (template);
user.getList ();
user.event ();
//时间控件初始化
/* $('#datetimepicker').datetimepicker({
format: 'yyyy-MM-dd',
language: 'zh-CN',
pickTime: false
}).on('changeDate',function(){
$(this).datetimepicker('hide');
});*/
},
event: function () {
var _doc = $(document);
......@@ -102,25 +94,15 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
user.search_phone();
}
});
$ (document).on ("input","#cus_fang", function () {//手机号搜索客方2
if($("#cus_fang").val()==''){
$(".user-ul2").html('');
}else{
user.search_phone2();
}
});
$ (document).delegate (".addphone", "click", function () {//list消失
user.addphone(this);
});
$ (document).delegate (".addphone2", "click", function () {//list2消失
user.addphone2(this);
});
// =============================下拉列表===================
$ (document).delegate (".submit_edit", "click", function () {//提交
user.Submit_follow();
});
// =============下拉列表========================
var _ajaxObjTel = null;
_doc.on('input', '.phone_jia' ,function(){
var _this = $(this),
......@@ -180,9 +162,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
_this.parent().prev().val(_this.html()).attr('data-id',_this.attr('data-id'));
_this.parent().html('').hide();
});
// ===================
//图片上传 2.2版本
//图片上传,附件上传处理事件
$(".upload-image-btn").click(function() {
var _this = $(this),
......@@ -276,29 +255,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
}
});
},
search_phone2:function(){//手机号
$.ajax ({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"phone":$("#cus_fang").val()
},
dataType: 'json',
success: function (data) {
if (data.code == 200) {
var user_ul2 = "";
$.each(data.data, function(i,item) {
user_ul2+='<li class="addphone2" data-id="'+item.id+'">'+item.id+'-'+item.name+'-'+item.phone+'</li>';
});
$(".user-ul2").html(user_ul2);
} else {
alert(data.msg);
}
}
});
},
Submit_follow: function() { //提交
var params = {};
params.id = user.user_id;
......@@ -455,10 +411,8 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
return false;
};
var _data = {};
console.log(55);
if(getUrlParam('id')){
_data.id = getUrlParam('id');
};
_data.title = $("#announcement_title").val();
_data.s_label_id = $("#district_id2").val();//商学院标签id
......@@ -475,7 +429,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
$ ("#modal_add_user").modal ('hide');//提交成功 关闭模态框
user.getList(1);
alert('提交成功')
// window.open('/index/business_school.html');
window.location.href='/index/business_school';
console.log(66);
} else {
......@@ -484,7 +437,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
}
});
},
delete_user : function(params) {
delete_user : function(params) {//删除文章
$.ajax ({
url: '/index/delNews',
type: 'POST',
......
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