<!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('待审核列表')" />
</head>
<body class="gray-bg">
    <input type="hidden" id="id" th:value="${state}" class="form-control" readonly/>

     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>申请来源：</p>
                                <input type="text" name="jingyingren"/>
                            </li>

                            <li>
                                <p>经营者：</p>
                                <input type="text" name="jingyingren"/>
                            </li>
                            <li>
                                <p>个体工商户名称：</p>
                                <input type="text" name="banfajigou"/>
                            </li>


                            <li class="select-time">
                                <p>申请时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginShenqingdate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endShenqingdate]"/>
                            </li>

                            <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>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:gtgsyw:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" data-mobile-responsive="true"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:gtgsyw:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:gtgsyw:remove')}]];
        var auditFlag = [[${@permission.hasPermi('system:gtgsyw:audit')}]];
        var giveupFlag = [[${@permission.hasPermi('system:gtgsyw:giveup')}]];
        var prefix = ctx + "system/gtgsyw";

        $(function() {
            var flg=$("#id").val();
            var options = {
                /*url: prefix + "/list? flg="+$("#id").val(),*/
                url: prefix + "/list/"+flg,
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                shenheUrl: prefix+"/audit/{id}",
                giveupUrl: prefix + "/export/{id}",

                modalName: "待审核",
                columns: [{
                    checkbox: true
                },

                    {
                        title: '序号',
                        formatter: function (value, row, index) {
                            return $.table.serialNumber(index);
                        }
                    },
                {
                        field : 'shenqinglaiyuan',
                        title : '申请来源'
                },
                {
                        field : 'jingyingren',
                        title : '经营者'
                    },
                    {
                        field : 'nsxzq',
                        title : '个体工商户名称'
                    },
                    {
                        field : 'jingyingchangsuo',
                        title : '经营场所'
                    },
                    {
                        field : 'shenhedate',
                        title : '申请时间'
                    },
                    {
                        field : 'shenherenname',
                        title : '审核人'
                    },

                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        /**  编辑删除原始按钮 **/
                        actions.push('<a class="btn btn-success btn-xs '  + '" href="javascript:void(0)" onclick="$.operate.shenhe(\'' + row.id + '\')"><i class="fa fa-edit"></i>审核</a> ');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>

</body>
</html>
