Commit 1c2776ae authored by agping's avatar agping

后台

parent d9343011
{layout name="global/frame_tpl" /} {layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="reportList" /> <input type="hidden" class="page-load" id="reportList" />
<style type="text/css">
.clear{
clear: both;
}
</style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
...@@ -49,6 +53,10 @@ ...@@ -49,6 +53,10 @@
</select> </select>
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_name" placeholder="约带看人姓名" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_name" placeholder="约带看人姓名" type="text" value="">
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_phone" placeholder="约带看人手机号" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_phone" placeholder="约带看人手机号" type="text" value="">
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="分佣方姓名" type="text" value="">
<div class="clear">
</div>
<span class="btn btn-info btn3 search" id="maintable_search">搜索</span> <span class="btn btn-info btn3 search" id="maintable_search">搜索</span>
<span class="btn btn-info btn3" id="maintable_reset">重置</span> <span class="btn btn-info btn3" id="maintable_reset">重置</span>
<!--<span class="btn btn-info btn3" id="maintable_export">导出excel</span>--> <!--<span class="btn btn-info btn3" id="maintable_export">导出excel</span>-->
......
...@@ -262,6 +262,10 @@ ...@@ -262,6 +262,10 @@
overflow-y: scroll; overflow-y: scroll;
} }
/*查看过的 客户详情 按钮变色*/
.btn-user-details{
background-color: orange;
}
</style> </style>
<!--导航star--> <!--导航star-->
......
...@@ -122,6 +122,7 @@ $(function() { ...@@ -122,6 +122,7 @@ $(function() {
if(data.code == 200) { if(data.code == 200) {
localStorage.setItem('pcUserInfo', encodeURIComponent(JSON.stringify(data.data))); //存储PC后台登录用户所有信息 localStorage.setItem('pcUserInfo', encodeURIComponent(JSON.stringify(data.data))); //存储PC后台登录用户所有信息
location.href = '/admin.php/index/getHouseList'; location.href = '/admin.php/index/getHouseList';
localStorage.removeItem('id_details_str');
} else { } else {
alert(data['msg']); alert(data['msg']);
}; };
......
...@@ -125,7 +125,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function ...@@ -125,7 +125,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
$('.btn-default-show-caozuo').show(); $('.btn-default-show-caozuo').show();
}); });
layerTipsX=function(n){layer.open({content:n,skin:"msg",time:2})};//注册一个layer自定义全局函数 layerTipsX=function(n){layer.open({content:n,skin:"msg",time:2})};//注册一个layer自定义全局函数
...@@ -144,6 +144,7 @@ function getUrlParam(name) { ...@@ -144,6 +144,7 @@ function getUrlParam(name) {
if(r != null) return unescape(r[2]); if(r != null) return unescape(r[2]);
return null; return null;
} }
//字符串格式化 //字符串格式化
String.prototype.stringFormat = function(){ String.prototype.stringFormat = function(){
...@@ -214,11 +215,21 @@ function hideTel(str){ ...@@ -214,11 +215,21 @@ function hideTel(str){
return str; return str;
} }
} }
// //显示商铺名称的前四个 字
function hideStr(str){ function hideStr(str){
if (str.length > 4) { str = str.substring(0,4)+"***"}; if (str.length > 4) { str = str.substring(0,4)+"***"};
return str; return str;
} }
//判断数组里有没有 某个字段 返回类名
function getLoaclId(id){
var tempArr = JSON.parse(localStorage.getItem('id_details_str'));
if(tempArr == null){
return 'btn-success';
}else{
var _index = tempArr.indexOf(String(id));
return _index>=0?'btn-warning':'btn-success';
}}
//处理url信息,改为当前域名的协议 //处理url信息,改为当前域名的协议
function urlDeal(urlStr, httpStr) { function urlDeal(urlStr, httpStr) {
//处理 //处理
......
...@@ -1341,7 +1341,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -1341,7 +1341,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
'district_id' : $("select[name='district_id'] option:selected").val(), 'district_id' : $("select[name='district_id'] option:selected").val(),
'store_id' : $("select[name='store_id'] option:selected").val(), 'store_id' : $("select[name='store_id'] option:selected").val(),
'agent_name': $.trim($('#agent_name').val()), 'agent_name': $.trim($('#agent_name').val()),
'agent_phone': $.trim($('#agent_phone').val()) 'agent_phone': $.trim($('#agent_phone').val()),
'partial_name': $.trim($('#partical_name').val())
}; };
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
......
define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', 'css!style/home.css', "datetimepicker", 'pagination', 'bootstrapJs','blow-up'], function(doT, template) { define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', 'css!style/home.css', "datetimepicker", 'pagination', 'bootstrapJs','blow-up'], function(doT, template) {
var user = { var user = {
pageNo: 1, pageNo: 1,
...@@ -171,6 +172,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -171,6 +172,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
user.user_phone = $(this).attr("data-phone"); user.user_phone = $(this).attr("data-phone");
user.Caozuo(); user.Caozuo();
}); });
// 点击缓存
$(document).delegate(".caozuo-add-color", "click", function() { //点击操作跟进详情
user.user_id = $(this).attr("data-id");
$(this).removeClass('btn-success');
$(this).addClass('btn-warning');
//数组去重 的方法
function unique1(arr){
var hash=[];
for (var i = 0; i < arr.length; i++) {
if(hash.indexOf(arr[i])==-1){
hash.push(arr[i]);
}
}
return hash;
}
if(JSON.parse(localStorage.getItem('id_details_str')) == null){
var id_details_arr=[];
id_details_arr.push(user.user_id);
localStorage.setItem('id_details_str',JSON.stringify(id_details_arr));
}else{
var id_details_arr=JSON.parse(localStorage.getItem('id_details_str'));
id_details_arr.push(user.user_id);
localStorage.setItem('id_details_str',JSON.stringify(unique1(id_details_arr)));
}
});
$(document).on("input", "#set_father_id3", function() { //手机号新增搜索客方 $(document).on("input", "#set_father_id3", function() { //手机号新增搜索客方
if($("#set_father_id3").val() == '') { if($("#set_father_id3").val() == '') {
user.agent_id=''; user.agent_id='';
......
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
</td> </td>
<td width="16%"> <td width="16%">
[% if((check_auth('auth_vip') && it[item]['vip']) || (it[item]['agent_id'] == 0) || (it[item]['agent_id'] == it[item]['current_agent_id']) || check_auth('index/useraction_search') ) { %] [% if((check_auth('auth_vip') && it[item]['vip']) || (it[item]['agent_id'] == 0) || (it[item]['agent_id'] == it[item]['current_agent_id']) || check_auth('index/useraction_search') ) { %]
<a class="btn1 btn-success caozuo genj_ure" href="#modal-record" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["id"] %]'>详情/跟进</a>&nbsp;
<a class="btn1 caozuo genj_ure caozuo-add-color [%= getLoaclId(it[item]['id']) %]" href="#modal-record" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["id"] %]'>详情/跟进</a>&nbsp;
<a class="btn1 btn-success caozuo" href="#modal-record-edit" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["id"] %]'>客户编辑</a>&nbsp; <a class="btn1 btn-success caozuo" href="#modal-record-edit" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["id"] %]'>客户编辑</a>&nbsp;
<!--<a class="btn1 btn-success genj_ure" href="#modal-add" data-toggle="modal" data-id='[%= it[item]["id"] %]'>跟进</a>&nbsp;--> <!--<a class="btn1 btn-success genj_ure" href="#modal-add" data-toggle="modal" data-id='[%= it[item]["id"] %]'>跟进</a>&nbsp;-->
...@@ -59,4 +61,5 @@ ...@@ -59,4 +61,5 @@
<td colspan="11" style="text-align:center;"> 暂无数据</td> <td colspan="11" style="text-align:center;"> 暂无数据</td>
</tr> </tr>
[% } %] [% } %]
</script> </script>
\ No newline at end of file <!--arr.indexOf("c")-->
\ No newline at end of file
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