| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391 |
- <include file="public@header"/>
- </head>
- <style>
- .form-inline .form-control {
- margin: 10px 0;
- vertical-align: middle;
- }
- .form-inline span {
- margin-left: 5px;
- vertical-align: middle;
- }
- .margin-left-10 {
- margin-left: 10px;
- }
- .profile em {
- font-style: normal;
- color: #0b6cbc;
- }
- .profile em.red {
- color: red;
- }
- span.sort {
- color: red;
- display: inline-block;
- margin-left: 2px;
- vertical-align: middle;
- }
- td img.avatar, td img.sex {
- width: 24px;
- height: 24px;
- vertical-align: middle;
- border-radius: 100%;
- }
- .form .form-control {
- margin-bottom: 20px;
- }
- .form .control-label {
- text-align: center;
- }
- .form label {
- text-align: left;
- margin-bottom: 10px;
- margin-right: 10px;
- }
- .radio-inline+.radio-inline, .checkbox-inline+.checkbox-inline {
- margin-left: 0;
- }
- .table-actions span {
- margin-right: 10px;
- font-weight: bold;
- }
- .table-actions span em {
- font-style: normal;
- color: red;
- }
- .layui-layer-page .layui-layer-content {
- overflow: hidden !important;
- }
- span.expired {
- color: red;
- }
- </style>
- <body>
- <div class="wrap js-check-wrap">
- <ul class="nav nav-tabs">
- <li class="active"><a>标签分类资源</a>
- </li>
- </ul>
- <form id="search" class="well form-inline margin-top-20" method="post" action="{:url('admin/sales/tips')}">
- <span>会员ID:</span>
- <input class="form-control" type="text" name="uid" style="width: 150px;" value="{:input('request.uid')}"
- placeholder="会员ID">
- <span>用户昵称:</span>
- <input class="form-control" type="text" name="user_nickname" style="width: 200px;"
- value="{:input('request.user_nickname')}" placeholder="用户昵称"><br>
- <span>用户姓名:</span>
- <input class="form-control" type="text" name="real_name" style="width: 200px;"
- value="{:input('request.real_name')}" placeholder="用户姓名">
- <span>手机号:</span>
- <input class="form-control" type="text" name="mobile" style="width: 200px;" value="{:input('request.mobile')}"
- placeholder="手机号">
- <input id="sort" type="hidden" name="sort" value="{$params.sort?$params.sort: 1}">
- <input id="sortType" type="hidden" name="sort_type" value="{$params.sort_type?$params.sort_type: 'desc'}">
- <input type="submit" class="btn btn-primary margin-left-10 " value="搜索"/>
- <a class="btn btn-default margin-left-10" href="{:url('admin/sales/tips')}">清空</a>
- <!-- <a class="btn btn-warning margin-left-10" href="{:url('admin/sales/export')}">导出</a>-->
- </form>
- <form class="form-horizontal js-ajax-form margin-top-20" role="form">
- <div class="table-actions tags">
- <foreach name="tagCounts" item="vo" key="k">
- <if condition="$k gt 0">
- <a href="{:url('admin/sales/tips',['intention'=> $k])}" <if condition="$k eq $params.intention">class="btn btn-primary margin-left-10"<else>class="btn btn-default margin-left-10"</if>>{$vo.name}({$vo.num})</a>
- <else>
- <a href="{:url('admin/sales/tips',['intention'=> $k])}" <if condition="$k eq $params.intention">class="btn btn-primary margin-left-10"<else>class="btn btn-default margin-left-10"</if>>全部({$total})</a>
- </if>
- </foreach>
- </div>
- <table class="table table-hover table-bordered">
- <thead>
- <tr>
- <!-- <th width="60"><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>-->
- <th>ID</th>
- <th width="120">用户名</th>
- <th>基本资料</th>
- <th>姓名</th>
- <th>手机号</th>
- <th width="100">VIP会员</th>
- <th width="100">充值过</th>
- <th width="100">消费过</th>
- <th width="100">跟进</th>
- <th width="100">意向标签</th>
- <th width="180">加入时间 <span class="row sort join-time" data-status="{$params.sort == 1? $params.sort_type : 'desc'}" onclick="sort(this,1)"><if condition="$params.sort eq 1 && $params.sort_type eq 'asc'">↓<else>↑</if></span></th>
- <th width="140">坠海倒计时 <span class="row sort pool-time" data-status="{$params.sort == 2? $params.sort_type : 'desc'}" onclick="sort(this,2)"><if condition="$params.sort eq 2 && $params.sort_type eq 'asc'">↓<else>↑</if></span></th>
- <th width="150">最后联系<span class="row sort last-time" data-status="{$params.sort == 3? $params.sort_type : 'desc'}" onclick="sort(this,3)"><if condition="$params.sort eq 3 && $params.sort_type eq 'asc'">↓<else>↑</if></span></th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <foreach name="list" item="vo">
- <tr>
- <!-- <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}"></td>-->
- <td>{$vo.user_id}</td>
- <td>
- <img class="avatar" src="{$vo.avatar}"> <if condition="$vo['sex'] eq 1"><img class="sex" src="/static/images/male.png" alt=""><else><img class="sex" src="/static/images/fmale.png" alt=""></if> <span>{$vo['user_nickname']}</span>
- </td>
- <td>
- <p class="profile">{$vo.profile_text}</p>
- </td>
- <td>{$vo['real_name']}</td>
- <td><span <if condition="$vo.is_expired">class="expired"</if>>{$vo['mobile']? $vo['mobile']:'无'}</span></td>
- <td>
- <if condition="$vo['is_vip'] eq 1">
- <span style="color: green;">是</span>
- <else>
- <span style="color: red;">否</span>
- </if>
- </td>
- <td>
- <if condition="$vo['is_recharge'] eq 1">
- <span style="color: green;">是</span>
- <else>
- <span style="color: red;">否</span>
- </if>
- </td>
- <td>
- <if condition="$vo['is_cost'] eq 1">
- <span style="color: green;">是</span>
- <else>
- <span style="color: red;">否</span>
- </if>
- </td>
- <td><span id="follow-num{$vo.pool_id}">{$vo['followup_num']}</span></td>
- <td>
- <a onclick="setTag('{$vo.pool_id}','{$vo.real_name}','{$vo.intention}')" >{$vo.intention_text? $vo.intention_text: '设置'}</a>
- </td>
- <td>{$vo['create_time']}</td>
- <td><span <if condition="$vo.is_expired">class="expired"</if>>{$vo['expire_text']}</span></td>
- <td><span id="follow-time{$vo.pool_id}">{$vo['last_follow_time']? $vo['last_follow_time'] : '-'}</span></td>
- <td>
- <a onclick="setAgency('{$vo.pool_id}','{$vo.real_name}','{$vo.remark}','{$vo.agency}')" >跟进</a>
- </td>
- </foreach>
- </tbody>
- </table>
- <div class="pagination">{$page}</div>
- <div id="tag" class="dialog" style="display: none; margin-top: 20px;">
- <div class="form">
- <form method="post" class="form-horizontal js-ajax-form margin-top-20" >
- <div class="form-group">
- <label class="col-sm-3 control-label"><span class="form-required">*</span>选择标签</label>
- <div class="col-sm-8">
- <foreach name="tags" item="vo" key="k">
- <label for="input-tag{$k}" class="radio-inline">
- <input type="radio" id="input-tag{$k}" name="tag" onchange="selectTag(this)" value="{$k}" data-name="{$vo}">{$vo}
- </label>
- </foreach>
- </div>
- </div>
- </form>
- </div>
- </div>
- <div id="agency" class="dialog" style="display: none; margin-top: 20px;">
- <div class="form">
- <form method="post" class="form-horizontal js-ajax-form margin-top-20" >
- <div class="form-group">
- <label class="col-sm-3 control-label"><span class="form-required"></span>真实姓名</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="real_name" name="real_name" readonly value="">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label"><span class="form-required">*</span>跟进情况</label>
- <div class="col-sm-8">
- <foreach name="agencys" item="vo" key="k">
- <label for="input-agency{$k}" class="radio-inline">
- <input type="radio" id="input-agency{$k}" name="agency" onchange="selectAgency(this)" value="{$k}">{$vo}
- </label>
- </foreach>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label"><span class="form-required"></span>备注</label>
- <div class="col-sm-8">
- <textarea class="form-control" id="remark" name="content" maxlength="150" style="height: 80px;" placeholder="跟进备注"></textarea>
- </div>
- </div>
- </form>
- </div>
- </div>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script src="__STATIC__/js/clipboard.min.js"></script>
- <script src="__STATIC__/js/layer/layer.js"></script>
- <script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
- <script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
- <script>
- var tagId = 0;
- var agencyId = 0;
- /**
- * 排序
- * @param type
- */
- function sort(ele,type){
- $("#sort").val(type);
- var status = $(ele).attr('data-status');
- $("#sortType").val(status=='desc'? 'asc': 'desc');
- $(ele).html(status == 'desc'? '↓' : '↑');
- $(ele).attr('data-status', status=='desc'? 'asc': 'desc');
- $("#search").submit();
- }
- /**
- * 选择销售用户
- * @param ele
- */
- function selectTag(ele){
- tagId = $(ele).val();
- }
- /**
- * 跟进
- * */
- function selectAgency(ele){
- agencyId = $(ele).val();
- }
- /**
- * 设置标签
- * @returns {boolean}
- */
- function setTag(pool_id,real_name,tagId){
- $("input[name=tag]").attr('checked', false);
- $("#input-tag"+tagId).attr('checked', "checked");
- layer.open({
- type: 1, //1:页面层,2:iframe层,3:加载层,4:tips层。
- title: '设置[ID:'+pool_id+'-'+real_name+']用户资源的标签',
- shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
- shade: 0.8, //遮罩
- offset: 'auto',
- area: ['600px', '260px'],
- content: $("#tag"),
- btn: ['确定设置','取消'],
- btnAlign: 'c',
- yes: function(){
- if(tagId<=0){
- layer.msg('请选择标签')
- return false;
- }
- if (confirm('确定设置标签吗?请谨慎操作')) {
- $.post('/admin/sales/setTag', {pool_id: pool_id, tagId: tagId}, function (res) {
- if (res.code == 1) {
- layer.msg(res.msg)
- var tagName = $("input-tag"+tagId).attr('data-name');
- $("#tag-row"+pool_id).text(tagName);
- /*setTimeout(function () {
- location.reload();
- }, 2000)*/
- } else {
- layer.msg(res.msg);
- }
- }, "json")
- }
- },
- cancel: function(){
- }
- });
- return false;
- }
- /**
- * 设置跟进情况
- * @returns {boolean}
- */
- function setAgency(pool_id,real_name,remark,agencyId){
- console.log(5346)
- $("input[name=agency]").attr('checked', false);
- $("#input-agency"+agencyId).prop('checked', "true");
- console.log(agency)
- console.log($("#real_name"))
- $("#real_name").val(real_name);
- $("#remark").text(remark);
- layer.open({
- type: 1, //1:页面层,2:iframe层,3:加载层,4:tips层。
- title: '设置[ID:'+pool_id+'-'+real_name+']用户跟进情况',
- shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
- shade: 0.8, //遮罩
- offset: 'auto',
- area: ['780px', '480px'],
- content: $("#agency"),
- btn: ['确定设置','取消'],
- btnAlign: 'c',
- yes: function(){
- if(agencyId<=0){
- layer.msg('请选择跟进情况')
- return false;
- }
- remark = $("#remark").val();
- console.log(remark)
- if (confirm('确定设置跟进情况吗?请谨慎操作')) {
- $.post('/admin/sales/setAgency', {pool_id: pool_id, agencyId: agencyId, remark: remark}, function (res) {
- if (res.code == 1) {
- layer.msg(res.msg)
- $("#follow-num"+pool_id).text(res.data.num);
- $("#follow-time"+pool_id).text(res.data.time);
- } else {
- layer.msg(res.msg);
- }
- }, "json")
- }
- },
- cancel: function(){
- }
- });
- return false;
- }
- /**
- * 清除
- * @returns {boolean}
- */
- function doDelete() {
- var ids = [];
- $(".js-check:checked").each(function () {
- var id = $(this).val();
- if (id > 0) {
- ids.push(id);
- }
- });
- if (ids.length <= 0) {
- layer.msg('请先选择操作项');
- return false;
- }
- if (confirm('确定批量清除选择项?不可恢复')) {
- $.post('/admin/pools/clear', {ids: ids}, function (res) {
- if (res.code == 1) {
- layer.msg(res.msg);
- setTimeout(function () {
- location.reload();
- }, 800)
- } else {
- layer.msg(res.msg);
- }
- }, "json")
- }
- }
- </script>
- </body>
- </html>
|