123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482 |
- {extend name="public/layout" /} {block name="title"}装修推荐官列表{/block} {block name="body"}
- <style type="text/css">
- html,
- body {
- display: block;
- min-width: 1100px;
- }
- body::-webkit-scrollbar {
- /*滚动条整体样式*/
- width: 4px;
- /*高宽分别对应横竖滚动条的尺寸*/
- height: 1px;
- }
- body::-webkit-scrollbar-thumb {
- /*滚动条里面小方块*/
- border-radius: 10px;
- box-shadow: inset 0 0 5px rgba(97, 184, 179, 0.1);
- background: #78b4b4;
- }
- body::-webkit-scrollbar-track {
- /*滚动条里面轨道*/
- box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
- border-radius: 10px;
- background: #ededed;
- }
- .layui-table thead tr,
- .layui-table-header {
- background-color: #D8E6F1 !important;
- }
- .layui-fluid {
- display: block;
- box-shadow: 0 0 4px 0 #B6CADE;
- border-radius: 5px;
- margin: 15px;
- background-color: #ffffff;
- }
- .layui-form-label {
- width: auto;
- }
- .layui-card .layui-tab-brief .layui-tab-title li.layui-this {
- color: #249EFB;
- }
- .layui-tab-brief>.layui-tab-more li.layui-this:after, .layui-tab-brief>.layui-tab-title .layui-this:after {
- border: none;
- }
- .layui-card .layui-tab-brief .layui-tab-title .layui-this:after {
- width: 50px;
- height: 4px;
- background-color: #249EFB;
- top: 37px;
- left: 50%;
- transform: translateX(-50%);
- }
- .layui-tab-title li {
- margin: 0px 5px;
- }
- .layui-btn-xs,
- .layui-btn-xs:hover {
- border: 1px solid #249EFB;
- background-color: #fff;
- color: #249EFB;
- padding: 0px 10px;
- }
- .layui-btn-danger,
- .layui-btn-danger:hover {
- color: #FF5722;
- background-color: #fff;
- border: 1px solid #FF5722;
- padding: 0px 10px;
- }
- .layui-btn-primary {
- color: #249EFB;
- border: 1px solid #249EFB;
- }
- .layui-btn-primary:hover {
- background-color: #E3F7FF;
- color: #249EFB;
- }
- .layui-form-item .layui-inline {
- margin-bottom: 0px;
- margin-right: 0px !important;
- }
- .block {
- display: inline-block;
- width: 100%;
- height: 100%;
- }
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-card">
- <!-- <div class="layui-tab layui-tab-brief">
- <ul class="layui-tab-title">
- <li class="layui-this switchTab" data-index="1">
- 普通推荐官
- </li>
- <li class="switchTab" data-index="2">
- 网红推荐官
- </li>
- </ul>
- </div> -->
- <div class="layui-form layui-card-header layuiadmin-card-header-auto">
- <div class="layui-form-item">
- <div style="float: left;">
- <div class="layui-inline">
- <button class="layui-btn layui-btn-primary layuiadmin-btn-course"
- data-type="stay_wiped_list">待核销</button>
- </div>
- </div>
- <div style="float:right;" class="flexRow">
- <div class="layui-inline">
- <!-- <div class="layui-input-inline" style="width: auto;">
- <button class="layui-btn layui-btn-primary layuiadmin-btn-course"
- data-type="integral_setting">积分设置</button>
- </div>
- <div class="layui-input-inline" style="width: auto;">
- <button class="layui-btn layui-btn-primary layuiadmin-btn-course"
- data-type="nuclear_setting">核销设置</button>
- </div> -->
- <div class="layui-input-inline">
- <input type="text" name="keyword" id="" class="layui-input keyword" placeholder="请输入装企销售" autocomplete="off"/>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn layuiadmin-btn-useradmin searchBtn submitbtn" lay-submit lay-filter="search">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-card-body">
- <table lay-filter="management" id="management"></table>
- </div>
- </div>
- </div>
- </body>
- {/block} {block name="js"}
- <script type="text/html" id="table-train-action">
- <!-- <a class="layui-btn layui-btn-xs" lay-event="train-nuclear">积分核销</a> -->
- </script>
- <script type="text/html" id="agent_name">
- {{# if(d.agent_name){ }}
- <span>{{d.agent_name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="agent_wechat">
- {{# if(d.wechat){ }}
- <span>{{d.wechat}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="addtimetpl">
- {{# if(d.addtime){ }}
- <span>{{d.addtime}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="employee_name">
- {{# if(d.employee){ }}
- <span>{{d.employee.name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="cusdatatpl">
- <a href="javascript:void(0)" lay-event="client" style="color:blue;">
- {{# if(d.customer_count){ }}
- <span>{{d.customer_count}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">0</span>
- {{# } }}
- </a>
- </script>
- <script type="text/html" id="daodiannumtpl">
- <a href="javascript:void(0)" lay-event="visitNumber" style="color:blue;">
- {{# if(d.daodiannum){ }}
- <span>{{d.daodiannum}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">0</span>
- {{# } }}
- </a>
- </script>
- <script type="text/html" id="jiaodingnumtpl">
- <a href="javascript:void(0)" lay-event="makeupNumber" style="color:blue;">
- {{# if(d.jiaodingnum){ }}
- <span>{{d.jiaodingnum}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">0</span>
- {{# } }}</a>
- </script>
- <script type="text/html" id="qiandannumtpl">
- <a href="javascript:void(0)" lay-event="numberSigns" style="color:blue;">
- {{# if(d.qiandannum){ }}
- <span>{{d.qiandannum}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">0</span>
- {{# } }}</a>
- </script>
- <script type="text/html" id="now_integraltpl">
- {{# if(d.now_integral){ }}
- <span>{{d.now_integral}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">0</span>
- {{# } }}
- </script>
- <script type="text/html" id="agent_type">
- {{# if(d.agenttype){ }}
- <span>{{d.agenttype.type_name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="show">
- <input type="checkbox" name="show" value="{{d.id}}" lay-skin="switch" lay-filter="show" {{ d.status == 1 ? 'checked' : '' }} id="clickshow">
- </script>
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index'
- }).use(['index', 'table', 'layedit', 'element'], function () {
- var $ = layui.$,
- table = layui.table,
- element = layui.element,
- form = layui.form;
- var field = {};
- var is_review = '{$is_review}';
- var root_id = '{$employee.root_id}';
- var jiaoding = '定金';
- var qiandan = '合同';
- form.on('submit(search)', function (data) {
- var keyword = $('.keyword').val();
- field['keyword'] = keyword;
- //执行重载
- table.reload('management', {
- where: field
- , page: { curr: 1}
- });
- });
- form.on('switch(show)', function (obj) {
- var id = obj.value;
- $.ajax({
- type: "post",
- url: '{:url("agents/up_agt_accnumb")}',
- data: {
- id: id
- },
- success: function (res) {
- layer.msg(res.msg, { time: 2000 });
- }
- });
- });
- //事件
- var active = {
- stay_wiped_list: function() {
- let type = '';//$('.layui-this')[0].dataset.index;
- layer.open({
- type: 2,
- title: ['核销积分', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("agents/stay_wiped_list")}?type=1',
- resize: false,
- area: ['60%', '80%'],
- btn: ['一键核销', '取消'],
- yes: function(index, layero) {
- //点击确认触发 iframe 内容中的按钮提交
- var submit = layero.find('iframe').contents().find("#spellgroup-submit");
- submit.click();
- }
- });
- },
- // nuclear_setting: function() {
- // layer.open({
- // type: 2,
- // title: ['核销设置', 'color:#333333;background-color:#D8E6F1;'],
- // content: '{:url("agents/integral_setting")}?type=2',
- // resize: false,
- // area: ['80%', '80%'],
- // // btn: ['确定', '取消'],
- // yes: function(index, layero) {
- // //点击确认触发 iframe 内容中的按钮提交
- // // var submit = layero.find('iframe').contents().find("#activity-submit");
- // // submit.click();
- // }
- // });
- // }
- };
- if(is_review != 0){
- active.stay_wiped_list();
- }
- //话术列表
- table.render({
- elem: '#management',
- autoSort: false,
- url: "{:url('agents/agent_list')}",
- cols: [
- [{
- type: 'numbers',
- field: 'id',
- width: 80,
- title: '序号',
- sort: true
- }, {
- field: 'title',
- title: '装修推荐官',
- templet: '#agent_name',
- },{
- field: 'type',
- title: '类别',
- templet: '#agent_type',
- },{
- field: 'employee_count',
- title: '时间',
- templet: '#addtimetpl'
- }, {
- title: '装企人员',
- field: 'employee_count',
- templet: '#employee_name'
- }, {
- title: '客户总览',
- field: 'employee_count',
- templet: '#cusdatatpl'
- },{
- title: '到访人数',
- field: 'addtime',
- templet: '#daodiannumtpl'
- },{
- title: jiaoding+'人数',
- field: 'addtime',
- templet: '#jiaodingnumtpl'
- },{
- title: qiandan+'人数',
- field: 'employee_count',
- templet: '#qiandannumtpl'
- },{
- title: '可核销积分',
- field: 'employee_count',
- templet: '#now_integraltpl'
- },{
- title: '账号启停',
- templet: '#show',
- },
- // {
- // title: '操作',
- // width: 120,
- // align: 'center',
- // fixed: 'right',
- // toolbar: '#table-train-action'
- // }
- ]
- ],
- page: true,
- limit: 30,
- height: 'full-200',
- text: '对不起,加载出现异常!'
- });
- $('.switchTab').click((e) => {
- let type = e.target.dataset.index;
- console.log(type);
- field['type'] = type;
- //执行重载
- table.reload('management', {
- where: field,
- page: {
- curr: 1
- }
- });
- })
- //监听列表
- table.on('tool(management)', function(obj) {
- console.log(obj);
- //return false;
- switch(obj.event) {
- case 'train-nuclear':
- layer.open({
- type: 2,
- title: ['积分核销', 'color:#333333;background-color:#D8E6F1;'],
- content: "{:url('agents/integral_nuclear')}?agentid="+obj.data.id,
- resize: false,
- area: ['80%', '80%'],
- // btn: ['确定', '取消'],
- yes: function (index, layero) {
- //点击确认触发 iframe 内容中的按钮提交
- // var submit = layero.find('iframe').contents().find("#talkskill-submit");
- // submit.click();
- }
- });
- break;
- case 'client':
- layer.open({
- type: 2,
- title: ['客户总览', 'color:#333333;background-color:#D8E6F1;'],
- content: "{:url('agents/agent_customer_list')}?agentid="+obj.data.id,
- resize: false,
- area: ['80%', '80%'],
- // btn: ['确定', '取消'],
- yes: function (index, layero) {
- //点击确认触发 iframe 内容中的按钮提交
- // var submit = layero.find('iframe').contents().find("#talkskill-submit");
- // submit.click();
- }
- });
- break;
- case 'visitNumber':
- layer.open({
- type: 2,
- title: ['到访人数', 'color:#333333;background-color:#D8E6F1;'],
- content: "{:url('agents/agent_kehu_list')}?agentid="+obj.data.id+'&type=1',
- resize: false,
- area: ['80%', '80%'],
- // btn: ['确定', '取消'],
- yes: function (index, layero) {
- //点击确认触发 iframe 内容中的按钮提交
- // var submit = layero.find('iframe').contents().find("#talkskill-submit");
- // submit.click();
- }
- });
- break;
- case 'makeupNumber':
- layer.open({
- type: 2,
- title: [jiaoding+'人数', 'color:#333333;background-color:#D8E6F1;'],
- content: "{:url('agents/agent_kehu_list')}?agentid="+obj.data.id+'&type=2',
- resize: false,
- area: ['80%', '80%'],
- // btn: ['确定', '取消'],
- yes: function (index, layero) {
- //点击确认触发 iframe 内容中的按钮提交
- // var submit = layero.find('iframe').contents().find("#talkskill-submit");
- // submit.click();
- }
- });
- break;
- case 'numberSigns':
- layer.open({
- type: 2,
- title: [qiandan+'人数', 'color:#333333;background-color:#D8E6F1;'],
- content: "{:url('agents/agent_kehu_list')}?agentid="+obj.data.id+'&type=3',
- resize: false,
- area: ['80%', '80%'],
- // btn: ['确定', '取消'],
- yes: function (index, layero) {
- //点击确认触发 iframe 内容中的按钮提交
- // var submit = layero.find('iframe').contents().find("#talkskill-submit");
- // submit.click();
- }
- });
- break;
- }
- });
- $('.layui-btn.layuiadmin-btn-course').on('click', function() {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- });
- </script>
- {/block}
|