<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('选择商品')" />
    <style>
        .layui-layer-btn0 {
            padding: 0;
        }
        .paddings {
            padding: 0 !important;
        }
        #addClassify {
            display: none;
            width: 540px;
            padding: 20px;
        }
        #addClassify .selectClassify {
            display: flex;
            align-items: center;
        }
        #addClassify .selectClassify label {
            display: flex;
            margin-right: 20px;
            align-items: center;
        }
        #addClassify .selectClassify label input {
            margin: 0;
            margin-right: 2px;
        }
        .shadeCss,.layui-layer-shade {
            background-color: rgb(0, 0, 0, 0.5) !important;
        }
        .select-list ul {
            display: flex;
            justify-content: space-between;
        }
        .selectClassifyOne {
            display: flex;
            align-items: center;
            margin: 12px 0;
        }
        .selectClassifyOne span {
            width: 45px;
        }
        .tagStore .fixed-table-toolbar {
            display: flex;
        }
        .tagStore .fixed-table-toolbar .bs-bars {
            flex: 1;
        }
        .tagStore .fixed-table-toolbar .bs-bars .btn-group-sm {
            display: flex;
            justify-content: space-between;
        }
        .leftSearchBox {
            display: flex;
            align-items: center;
        }
        .leftSearchBox input, .leftSearchBox select {
            width: 200px;
            height: 34px;
            margin-right: 12px;
        }
        .ibox-content {
            border-style: none;
            padding: 0;
        }
        .kv-hidden {
            display: none !important;
        }
    </style>
</head>
<body class="tagStore">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="coupon-form">
                    <div class="select-list">
                        <ul>
                            <div class="leftSearchBox">
                                <input class="form-control" type="text" placeholder="请输入商品分类">
                                <input class="form-control" type="text" placeholder="请输入商品标签">
                                <input class="form-control" type="text" placeholder="请输入商品名称">
                                <li>
                                    <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                                </li>
                            </div>
                            <div>
                                
                            </div>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="selectGoodsTab"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer"/>
    <script th:inline="javascript">
        var dicCouponBusiType = [[${@dict.getType('zhengzai_coupon_busi_type')}]];
        var dicCouponBindType = [[${@dict.getType('zhengzai_coupon_bind_type')}]];
        var platformUrl = [[${platformUrl}]];
        var prefix = ctx + "candy/coupon/mgt";
        var prefix2 = ctx + "local";

        var viewMgtCouponFlag = [[${@permission.hasPermi('candy:coupon:mgt:detail')}]];
        var cancelMgtCouponFlag = [[${@permission.hasPermi('candy:coupon:mgt:cancel')}]];
        $(function () {
            var options = {
                id: 'selectGoodsTab',
                url: prefix + "/list",
                onCheck: onCheck,
                sortName: "createdAt",
                sortOrder: "desc",
                modalName: "活动",
                showSearch: false,
                showRefresh: false,
                showColumns: false,
                showToggle: false,
                columns: [
                    {
                        checkbox: true
                    },
                    {
                        field: 'valFace',
                        title: '商品'
                    },
                    {
                        field: 'bindType',
                        title: '商品分类',
                        formatter: function(value, row, index) {
                            // $('.pull-right').hide()
                            return $.table.selectDictLabel(dicCouponBindType, value);
                        }
                    },
                    {
                        field: 'bindType',
                        title: '价格',
                        formatter: function(value, row, index) {
                            return '2021年08月05日18:00:00 - 2021年08月30日18:00:00'
                        }
                    },
                    {
                        field: 'bindType',
                        title: '标签',
                        formatter: function(value, row, index) {
                            return '2021年08月05日18:00:00'
                        }
                    },
                    {
                        field: 'bindType',
                        title: '库存'
                    },
                    {
                        title: '售卖',
                        align: 'center'
                    }]
            };
            $.table.init(options);
        });
        $("#button-open-11").click(function(){
            $("button[name=refresh]").click()
	    })
        function onCheck (row, $element) {
            console.log(row, $element)
        }
        function yes(index, layero) {
            console.log(index, layero)
        }
        
    </script>
</body>
</html>