Commit 360eeffa authored by agping's avatar agping

新增编辑客户

parent b7cc9e7f
......@@ -325,6 +325,12 @@
<table class="table table-striped table-bordered table-hover table-condensed text-center">
<thead>
<tr>
<td colspan="14" class="maintable-top-sub-tr">
<a class="btn btn-info liudan_pic_btn">找商铺</a>
<a class="btn btn-default liudan_pic_btn">办公楼</a>
</td>
</tr>
<tr>
<th class="text-center">客户ID</th>
<th class="text-center">客户姓名</th>
......
......@@ -77,6 +77,14 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
},
event: function() {
var _doc = $(document);
//收藏客户列表 区分商铺 办公楼
_doc.on('click', '.maintable-top-sub-tr>a', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
user.getList(1);
});
//约带看列表 点击新增商铺
var _iYJAAObj = $('.detail-modal-bargaininfo-commission-addarea');
_doc.on('click', '#bargaininfo_commission_add_btn>img', function(e) {
......
if(window === window.parent){//没有菜单 给提醒
alert('请清除缓存重新登录');
location.replace(location.origin);
};
// if(window === window.parent){//没有菜单 给提醒
// alert('请清除缓存重新登录');
// location.replace(location.origin);
// };
define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', "datetimepicker", 'pagination', 'bootstrapJs','blow-up','checkLogin'], function(doT, template) {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var _doc = $(document),
......@@ -162,6 +162,15 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
},
event: function() {
var _doc = $(document);
//办公楼 商铺 的客户列表切换
_doc.on('click', '.maintable-top-sub-tr>a', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
user.getList(1);
});
$('.J_preview').preview();//预览图片
//约带看列表 点击新增商铺
var _iYJAAObj = $('.detail-modal-bargaininfo-commission-addarea');
......@@ -1581,7 +1590,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
params.referrer_source = user.referrer_source;
}
params.user_label = $("#user_label_edit").val();
// checkLogin();
params.entrust_type = $('#find-shop-typeEdit').val();
params.weixin_nick = $("#weixin_nickEdit").val();//微信号
params.user_status = $("#edit-user-staus").val();//客户状态
params.concrete_industry = $("#concrete_industryEdit").val();//具体业态
$.ajax({
'type': 'POST',
'url': '/index/pcEditClient',
......@@ -1675,7 +1687,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
dataType: 'json',
success: function(data) {
if(data.code == 200) {
console.log(666);
}else{
alert(data.msg)
}
......@@ -1703,6 +1714,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
success: function(data) {
if(data.code == 200) {
if(data.data) {
$('#find-shop-typeEdit').val(data.data.user_info.entrust_type);//客户类型 商铺 办公楼
$("#weixin_nickEdit").val(data.data.user_info.weixin_nick);//微信号
$("#edit-user-staus").val(data.data.user_info.user_status);//客户状态
$("#concrete_industryEdit").val(data.data.user_info.concrete_industry);//具体业态
$(".cus_id").html(data.data.user_info.user_id); //客户编号
$(".cus_name").val(data.data.user_info.user_name); //姓名
$(".cus_nick").html(data.data.user_info.user_nick); //昵称
......@@ -2188,12 +2203,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
params.type = 'add';
params.referrer_id = user.user_id_new_introduce;
params.referrer_source = 10;
params.weixin_nick = $("#weixin_nick").val();//微信号
params.user_status = $("#add-user-staus").val();//客户状态
params.concrete_industry = $("#concrete_industry").val();//具体业态
//站点标签验证
var _siteTagArr = [];
$.each($('.roomTag'), function(i, item) {
item.checked && _siteTagArr.push(item.getAttribute('data-id'));
});
params.site_id = _siteTagArr.join(','),
params.site_id = _siteTagArr.join(',');
//客户类型
params.entrust_type = $('#find-shop-type').val();
params.disc = $("#user_area_add").val();
params.user_label = $("#user_label_add").val();
if(params.user_name == '') {
......@@ -2259,7 +2281,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
alert('请选择正确的客方');
return;
}
// checkLogin();
$.ajax({
url: '/index/pcEditClient',
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