123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- {extend name="public/layout"}
- {block name="body"}
- <style>
- .layui-table thead tr,
- .layui-table-header {
- background-color: #D8E6F1 !important;
- }
- .layui-tab-title .layui-this {
- background-color: #249EFB;
- color: #fff;
- }
- .layui-tab-title .layui-this:after {
- border-bottom: none;
- border: none;
- }
- .layui-tab-title li {
- background-color: #F2F2F2;
- margin: 0px 5px;
- padding: 0px 20px;
- }
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-row layui-col-space15">
- <div class="layui-col-md12" style="background-color:#ffffff">
- <div class="tplay-body-div">
- <div class="layui-tab">
- <ul class="layui-tab-title">
- <li style="margin-left: 0px;">
- <a href="{:url('broad/order')}">已支付订单</a>
- </li>
- <li class="layui-this">
- 下单未支付
- </li>
- <li>
- <a href="{:url('broad/present_order')}">进店礼订单</a>
- </li>
- <li>
- <a href="{:url('broad/gift')}">打赏订单</a>
- </li>
- <li>
- <a href="{:url('broad/order_course_pay')}">课程购买订单</a>
- </li>
- </ul>
- </div>
- <div class="layui-card-body">
- <div class="layui-form">
- <!-- <div class="layui-inline">
- <input class="layui-input" name="orderNo" id="orderNo" autocomplete="off" placeholder="订单号">
- </div> -->
- <div class="layui-inline">
- <input class="layui-input" name="course" id="course" autocomplete="off"
- placeholder="搜索活动名..">
- </div>
- <div class="layui-inline">
- <input class="layui-input" name="name" id="name" autocomplete="off" placeholder="搜索姓名..">
- </div>
- <div class="layui-inline">
- <input class="layui-input" name="mobile" id="mobile" autocomplete="off"
- placeholder="搜索手机号..">
- </div>
- <!-- <div class="layui-inline" style="width: 100px;">
- <select name="status" id='status'>
- <option value="">全部</option>
- <option value="0">未支付</option>
- <option value="1">已支付</option>
- </select>
- </div> -->
- <div class="layui-inline" style="width: 100px;">
- <select name="contact" id='contact'>
- <option value="">选择状态</option>
- <option value="0">未联系</option>
- <option value="1">已联系</option>
- </select>
- </div>
- <button class="layui-btn" data-type="reload"><i class="layui-icon layui-icon-search layuiadmin-button-btn"></i></button>
- </div>
- <table class="layui-hide" id="user" lay-filter="user"></table>
- </div>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="js"}
- <script type="text/html" id="switchTpl">
- <!-- {{# if(d.isContact == 1){ }}
- <a class="layui-btn layui-btn-xs sms" title="促单" data-course="{{d.cid}}" data-user="{{d.uid}}" data-goods="{{d.gid}}" data-name="{{d.name}}" data-mobile="{{d.mobile}}">促单</a>
- {{# }else{ }}
- {{# } }} -->
- {{# if(d.isContact == 1){ }}
- 已联系
- {{# }else{ }}
- <a class="layui-btn layui-btn-xs enter" title="确认促单" data-user="{{d.uid}}" data-course="{{d.cid}}"
- data-goods="{{d.gid}}" data-name="{{d.name}}" data-mobile="{{d.mobile}}">确认促单</a>
- {{# } }}
- </script>
- <script type="text/html" id="statusField">
- {{ d.status == 1 ? '支付成功' : '否' }}
- </script>
- <script type="text/html" id="mb">
- <div class="mb" data-type="评分原因:<br>在{{d.start}}<br>至{{d.end}}之间,<br>试图下单{{d.num}}次未支付成功">
- {{# if(d.num == 1){ }}
- <strong>C</strong>
- {{# }else if(d.num > 3){ }}
- <strong style="color:red">A</strong>
- {{# }else{ }}
- <strong style="color:#1e95f2">B</strong>
- {{# } }}
- </div>
- </script>
- <script>
- var indexurl = '{:url("broad/order_no_pay")}';
- var t;
- layui.use(['table', 'form'], function () {
- var form = layui.form
- , table = layui.table
- , $ = layui.jquery
- , active = {
- reload: function () {
- var name = $('#name');
- var mobile = $('#mobile');
- var orderNo = $('#orderNo');
- var course = $('#course');
- var contact = $('#contact');
- var status = $('#status');
- //执行重载
- table.reload('userTable', {
- page: {
- curr: 1 //重新从第 1 页开始
- }
- , where: {
- name: name.val(),
- mobile: mobile.val(),
- orderNo: orderNo.val(),
- course: course.val(),
- contact: contact.val(),
- status: status.val()
- }
- });
- }
- };
- //展示已知数据
- t = table.render({
- elem: '#user'
- , url: indexurl
- , page: true
- , autoSort: true
- , cols: [[ //标题栏
- { type: 'numbers', title: '序号', fixed: 'left' }
- , { field: 'share_team', title: '所属团队', width: 100 }
- , { field: 'share_nickname', title: '邀请人昵称', width: 100 }
- , { field: 'nickname', title: '客户昵称', width: 100 }
- , { field: 'name', title: '姓名', width: 100 }
- , { field: 'mobile', title: '电话', width: 140, style: "color:green", align: 'center' }
- , { field: 'course_name', title: '活动名', minWidth: 200 }
- , { field: 'title', title: '商品名称', width: 200 }
- , { field: 'num', templet: '#mb', title: '意向评分', width: 120, sort: true, align: 'center' }
- , { field: 'end', title: '最后触发时间', width: 170, sort: true }
- , { field: 'isContact', title: '操作', width: 100, templet: '#switchTpl', unresize: true, align: 'center' }
- ]]
- , id: 'userTable'
- });
- $('.layui-form>.layui-btn').on('click', function () {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- table.on('sort(user)', function (obj) {
- table.reload('userTable', {
- initSort: obj
- , where: obj
- });
- });
- $('table').on('click', '.enter', function () {
- var that = $(this);
- var user = that.data('user');
- var course = that.data('course');
- var goods = that.data('goods');
- var name = that.data('name');
- var mobile = that.data('mobile');
- $.post('{:url("broad/order_contact")}', { uid: user, cid: course, gid: goods, isContact: 1, name: name, mobile: mobile }, function (res) {
- var resp = JSON.parse(res);
- if (resp.code == 0) {
- that.before('已联系');
- that.remove();
- layer.msg('操作成功', { anim: 0 }, function () {
- });
- } else {
- layer.msg(resp.msg, { anim: 6 });
- }
- });
- });
- // $('table').on('click', '.sms', function () {
- // var that = $(this);
- // var user = that.data('user');
- // var course = that.data('course');
- // var goods = that.data('goods');
- // var name = that.data('name');
- // var mobile = that.data('mobile');
- // $.post('{:url("order/contact")}', { uid: user, cid: course, gid: goods, isContact: 1, name: name, mobile: mobile }, function (res) {
- // if (res.code == 0) {
- // that.before('已发送');
- // that.remove();
- // layer.msg('操作成功', { anim: 0 }, function () {
- // });
- // } else {
- // layer.msg(res.mgs, { anim: 6 });
- // }
- // });
- // });
- $('body').on('mouseover', '.mb', function () {
- var type = $(this).data('type');
- layer.tips(type, this, {
- tips: [1, '#3595CC'],
- time: 2000
- });
- });
- });
- </script>
- {/block}
|