<!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>
        #searchDiv{
            display: none
        }
        .select-list li p, .select-list li label:not(.radio-box){
	        float: left;
	        width: 130px;
	        margin: 5px 0px 0px 0px;
	        text-align:right;
        }
    </style>
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse" id="searchDiv">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <div class="row">
                            <div class="col-md-3">
                                <li>
                                    <label>企业名称：</label>
                                    <input type="text" name="mc"/>
                                </li>
                            </div>

                            <div class="col-md-3">
                                <li>
                                <label>企业区域：</label>
                                <select name="deptId" th:with="type=${@dict.getType('orhon_qyfl')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                                </li>
                            </div>

                            <div class="col-md-3">
                                <li>
                                    <label>企业类型：</label>
                                    <select name="type" th:with="type=${@dict.getType('orhon_qylx')}">
                                        <option value="">所有</option>
                                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    </select>
                                </li>
                            </div>

                            <div class="col-md-3">
                                <li>
                                    <label>所在地：</label>
                                    <input type="text" name="szd"/>
                                </li>
                            </div>
                            </div>
                            <!-- second -->
                            <div class="row">
                            <div class="col-md-3">
                                <li class="select-time">
                                    <label>资产总额：</label>

                                    <input type="text" class="qj-input" id="startZcze" placeholder="最小值" name="params[beginZcze]"/>
                                    <span>-</span>
                                    <input type="text"  class="qj-input" id="endZcze" placeholder="最大值" name="params[endZcze]"/>
                                </li>
                            </div>
                            <div class="col-md-3">
                                <li class="select-time">
                                    <label>年营业收入：</label>
                                    <input type="text" class="qj-input" id="startNyysr" placeholder="最小值" name="params[beginNyysr]"/>
                                    <span>-</span>
                                    <input type="text"  class="qj-input" id="endNyysr" placeholder="最大值" name="params[endNyysr]"/>
                                </li>
                            </div>
                            <div class="col-md-3">
                                <li class="select-time">
                                    <label>从业人员数量：</label>

                                    <input type="text" class="qj-input" id="startCyrs" placeholder="最小值" name="params[beginCyrs]"/>
                                    <span>-</span>
                                    <input type="text"  class="qj-input" id="endCyrs" placeholder="最大值" name="params[endCyrs]"/>
                                </li>
                            </div>
                            <div class="col-md-3">
                                <li class="select-time">
                                    <label>党员数：</label>

                                    <input type="text" class="qj-input" id="startDys" placeholder="最小值" name="params[beginDys]"/>
                                    <span>-</span>
                                    <input type="text"  class="qj-input" id="endDys" placeholder="最大值" name="params[endDys]"/>
                                </li>
                            </div>
                            </div>
                            <!-- third -->
                            <div class="row">
                            <div class="col-md-3">
                                <li>
                                    <label>是否建立工会：</label>
                                    <select name="isgh" th:with="type=${@dict.getType('is_gh')}">
                                        <option value="">所有</option>
                                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    </select>
                                </li>
                            </div>
                            <div class="col-md-3">
                                <li>
                                    <label>是否建立团组织：</label>
                                    <select name="istzz" th:with="type=${@dict.getType('is_tzz')}">
                                        <option value="">所有</option>
                                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    </select>
                                </li>
                            </div>
                            <div class="col-md-3">
                                <li>
                                    <label>是否建立党组织：</label>
                                    <select name="isdzz" th:with="type=${@dict.getType('is_dzz')}">
                                        <option value="">所有</option>
                                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    </select>
                                </li>
                            </div>
                            <div class="col-md-3">
                                <li>
                                    <label>党组织类型：</label>
                                    <select name="dzzlx" th:with="type=${@dict.getType('orhon_dzzlx')}">
                                        <option value="">所有</option>
                                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    </select>
                                </li>
                            </div>
                            </div>
                            <!-- forth -->
                            <div class="row">
                            <div class="col-md-3">
                                <li>
                                    <label>是否有活动阵地：</label>
                                    <select name="ishdzd" th:with="type=${@dict.getType('is_hdzd')}">
                                        <option value="">所有</option>
                                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    </select>
                                </li>
                            </div>
                            <div class="col-md-3">
                                <li>
                                    <label >是否"双强六好"：</label>
                                    <select name="issqlh" th:with="type=${@dict.getType('is_sqlh')}">
                                        <option value="">所有</option>
                                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    </select>
                                </li>
                            </div>
                            </div>
<!--                            <li>-->
<!--                                <label>是否党员：</label>-->
<!--                                <select name="isdy" th:with="type=${@dict.getType('orhon_isdy')}">-->
<!--                                    <option value="">所有</option>-->
<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--                                </select>-->
<!--                            </li>-->
                            <div class="row">
                                <div class="col-md-6"></div>
                                <div class="col-md-6">
                                <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>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:fgqy:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:fgqy:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:fgqy:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:fgqy:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:fgqy:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:fgqy:remove')}]];
        var deptIdDatas = [[${@dict.getType('orhon_qyfl')}]];
        var typeDatas = [[${@dict.getType('orhon_qylx')}]];
        var isdyDatas = [[${@dict.getType('orhon_isdy')}]];
        var isghDatas = [[${@dict.getType('is_gh')}]];
        var istzzDatas = [[${@dict.getType('is_tzz')}]];
        var dzzlxDatas = [[${@dict.getType('orhon_dzzlx')}]];
        var ishdzdDatas = [[${@dict.getType('is_hdzd')}]];
        var prefix = ctx + "system/fgqy";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "非公企业信息",
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'id',
                        title: 'null',
                        visible: false
                    },
                {
                    field: 'mc',
                    title: '非公企业名称'
                },
                {
                    field: 'deptId',
                    title: '非公企业区域',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(deptIdDatas, value);
                    }
                },
                {
                    field: 'type',
                    title: '企业类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(typeDatas, value);
                    }
                },

                {
                    field: 'shzzxm',
                    title: '法定代表人姓名'
                },
                {
                    field: 'shzzdh',
                    title: '法定代表人电话'
                },

                {
                    field: 'dzzlx',
                    title: '党组织类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(dzzlxDatas, value);
                    }
                },


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

        });
    </script>
</body>
</html>
