<!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="type" th:with="type=${@dict.getType('prhon_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 class="col-md-3">
                                    <li>
                                        <label>资产总额：</label>
                                        <input type="text" name="zcze"/>
                                    </li>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-3">
                                    <li>
                                        <label>从业人员数量：</label>
                                        <input type="text" name="cyrs"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>社会组织负责人姓名：</label>
                                        <input type="text" name="shzzxm"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>社会组织负责人电话：</label>
                                        <input type="text" name="shzzdh"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <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>
                            </div>

                            <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="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 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>


                            <div class="row">
                                <div class="col-md-3">
                                    <li class="select-time">
                                        <label>党组织建立时间：</label>
                                        <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginDzzjlsj]"/>
                                        <span>-</span>
                                        <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endDzzjlsj]"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>上级党组织：</label>
                                        <input type="text" name="sjdzz"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>党组织书记姓名：</label>
                                        <input type="text" name="dzzsjxm"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>党组织书记电话：</label>
                                        <input type="text" name="dzzsjdh"/>
                                    </li>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-3">
                                    <li>
                                        <label>登记方式：</label>
                                        <input type="text" name="djfs"/>
                                    </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>
                                        <input type="text" name="dys"/>
                                    </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>

                            <div class="row">
                                <div class="col-md-3">
                                    <li>
                                        <label>党建指导员姓名：</label>
                                        <input type="text" name="djzdyxm"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>党建指导员电话：</label>
                                        <input type="text" name="djzdydh"/>
                                    </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>

                            <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:shzz:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:shzz:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:shzz:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:shzz: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:shzz:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:shzz:remove')}]];
        var typeDatas = [[${@dict.getType('prhon_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 deptIdDatas = [[${@dict.getType('orhon_qyfl')}]];
        var isdzzDatas = [[${@dict.getType('is_dzz')}]];
        var issqlhDatas = [[${@dict.getType('is_sqlh')}]];
        var prefix = ctx + "system/shzz";

        $(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: 'type',
                    title: '社会组织类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(typeDatas, value);
                    }
                },{
                        field: 'deptId',
                        title: '所属区域',
                        formatter: function(value, row, index) {
                            return $.table.selectDictLabel(deptIdDatas, value);
                        }
                    },

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

                {
                    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>
