123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- {extend name="public/layout" /} {block name="title"}拼团组{/block} {block name="body"}
- <link rel="stylesheet" href="__LAYUI__/common.css" media="all">
- <style type="text/css">
- .layui-form-item div.searchBox {
- width: 320px;
- background: #FFFFFF;
- border: 1px solid #B6CADE;
- border-radius: 24px;
- height: 38px;
- overflow: hidden;
- padding-left: 18px;
- position: relative;
- margin-bottom: 0px;
- float: right;
- }
- .searchBox .inputBox {
- width: 240px;
- float: left;
- height: 36px;
- line-height: 36px;
- border-width: 0;
- }
- .searchBtn {
- position: absolute;
- top: 0;
- right: 0;
- width: 51px;
- height: 38px;
- background-color: #fff;
- }
- .searchBtn img {
- position: absolute;
- width: 26px;
- top: 6px;
- left: 0;
- }
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-card-body">
- <table id="spellgroup-team" lay-filter="spellgroup-team"></table>
- <script type="text/html" id="img">
- {{# layui.each(d.headimgurl, function(index,v){ }}
- <img style="display: inline-block; width: 15%; height: 100%;border-radius: 50%;" src={{v}}>
- {{# }); }}
- </script>
- <script type="text/html" id="status">
- <a lay-event="getlist" style="color: #0091FF;">拼团成员</a>
- </script>
- </div>
- </div>
- </div>
- </body>
- {/block} {block name="js"}
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'form', 'table'], function() {
- var $ = layui.$,
- form = layui.form,
- table = layui.table;
- //监听搜索
- form.on('submit(LAY-user-front-search)', function(data) {
- var field = data.field;
- //执行重载
- table.reload('spellgroup-team', {
- where: field
- ,page: {curr:1}
- });
- });
- //事件
- var active = {};
- var id = {$id};
- var hour = {$hour};
- //领取列表
- table.render({
- elem: '#spellgroup-team',
- autoSort: false,
- url: "{:url('spellgroup/team')}?id="+id+"&hour="+hour,
- cols: [
- [{
- type: 'numbers',
- field: 'id',
- title: '序号',
- align: 'center',
- }, {
- field: 'open_time',
- align: 'center',
- title: '团队开启时间',
- }, {
- field: 'end',
- align: 'center',
- title: '结束时间',
- }, {
- title: '成员',
- align: 'center',
- templet:'#img'
- }, {
- title: '操作',
- align: 'center',
- toolbar: '#status'
- }]
- ],
- page: true,
- limit: 30,
- height: 'full-220',
- text: '对不起,加载出现异常!'
- });
- //监听审核
- table.on('tool(spellgroup-team)', function(obj) {
- var data = obj.data;
- if(obj.event === 'getlist') {
- layer.open({
- type: 2,
- title: '拼团成员',
- content: '{:url("spellgroup/receive")}?id=' + data.spellgroup_id +'&tid='+data.id,
- maxmin: false,
- area: ['80%', '90%'],
- });
- }
- });
-
- $('.layui-btn.layuiadmin-btn-course').on('click', function() {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- });
- </script>
- {/block}
|