Commit 54183ce0 authored by agping's avatar agping

跟进详情优化

parent e8109a82
......@@ -474,6 +474,8 @@
color: #fff;
background-image: linear-gradient(-146deg, #FFDC0F 0%, #FF750E 91%);
border-radius: 3px;
position: relative;
top: -36px;
}
.btn-info-rent{
display: inline-block;
......@@ -530,7 +532,7 @@
</style>
<div>
<div class="modal-header">
<div class="modal-header" style="padding: 3px;">
<h4 class="modal-title text-info detail-modal-header-tab">
<span class="btn-info-liu" style="margin-right: 20px;">客户详情/跟进</span>
<span class="btn-default-liu caozuo-yue" style="margin-right: 20px;">约带看</span>
......@@ -729,10 +731,10 @@
<div class="clear margin-top-ld">
</div>
<div class="col-sm-12">
<textarea class="form-control" rows="2" id="genj_text" placeholder="请输入客户跟进信息(必填)"></textarea>
<textarea class="form-control" id="genj_text" placeholder="请输入客户跟进信息(必填)" style="height: 50px;padding: 2px;"></textarea>
</div>
<div class="col-sm-12" style="height: 80px;">
<div>上传图片(最多张,选填)</div>
<div>上传图片(最多1张,选填)</div>
<div class="form-group full-width-100 full-pic-area">
<!--input上传图片-->
<div id="container_body">
......
......@@ -154,8 +154,9 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
//直接跟进 上传图片相关
$('#file_input_pic').on('change', function(){
var _this = $(this);
var formData = new FormData();
formData.append('type', 'house_img');
formData.append('type', 'chat');
formData.append('image', _this[0].files[0]);
$.ajax({
type: 'post',
......@@ -170,7 +171,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
if(_data.code == 200) {
$('#container_body_img_area').append('<div class="result"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del">删除</span></div>'.stringFormatObj({
'0': _data.data.img_path,
'1': ServerHostImageLiu+'/resource/lib/Attachments/images/'+_data.data.internet_img_name
'1': _data.data.internet_img_name
}));
} else {
alert(_data.msg);
......@@ -1497,7 +1498,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
}else{
var follow_status = '电话跟进:'
};
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="/resource/image/genjing_copy2.png" alt="" style="width: 30px;height: 30px;" class="diagram-image J_preview" /></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="'+ ServerHostImageLiu + '/static/chat_image/' + item.img_str +'" alt="" style="width: 20px;height: 20px;" class="diagram-image J_preview" /></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
});
if(data.data.length<10){//第一个接口 数据条数小于10 加载第二个接口
......@@ -1564,7 +1565,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
}else{
var follow_status = '电话跟进:'
};
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="/resource/image/genjing_copy2.png" alt="" style="width: 30px;height: 30px;"/></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="'+ ServerHostImageLiu + '/static/chat_image/' + item.img_str +'" alt="" style="width: 20px;height: 20px;"/></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
});
if(caozuo_table){
......@@ -1760,10 +1761,15 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
alert('请填写内容');
return false;
}
var imgname1 = [];//客户跟进上传图片
for(var i = 0; i < $('.result').length; i++) {
imgname1[i] = $('.result>img').eq(i).attr('data-imgname');
};
var img_str = $('.result>img').eq(0).attr('data-imgname');
if($('.result>img').eq(1).attr('data-imgname')){
alert('图片最多上传一张');
return;
}
// var imgname1 = [];
// for(var i = 0; i < $('.result').length; i++) {
// imgname1[i] = $('.result>img').eq(i).attr('data-imgname');
// };
if(!user.isAjaxSaving){
user.isAjaxSaving = true;
$.ajax({
......@@ -1774,7 +1780,8 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
data: {
"user_id": user.user_id,
"content": genj_text,
"entrust_type": user.entrustType
"entrust_type": user.entrustType,
"img_str": img_str
},
beforeSend: function() {},
dataType: 'json',
......
......@@ -35,7 +35,12 @@
[%= labelKeyWords(dealPunctuation(it[item]['content'])) %]
</div>
</td>
<td>[%= it[item]['admin'] %]<img src="/resource/image/tupian_copy@2x.png" style="width: 20px;margin-left: 5px;"></td>
<td>[%= it[item]['admin'] %]
[% if(it[item]['img_str']){ %]
<img src="/resource/image/tupian_copy@2x.png" style="width: 20px;margin-left: 5px;">
[% } %]
</td>
<td>
[% if((it[item]['agent_id']*1 == 0) || (check_auth('index/useraction_search'))) { %]
......
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