<!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="djjgzwmc"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li class="select-time">
                                        <label>数据汇总日期：</label>
                                        <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginSjhzsj]"/>
                                        <span>-</span>
                                        <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endSjhzsj]"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>行业门类：</label>
                                        <input type="text" name="hyml"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>资金数额：</label>
                                        <input type="text" name="zjse"/>
                                    </li>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-3">
                                    <li>
                                        <label>统一社会信用代码：</label>
                                        <input type="text" name="tyshxydm"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li class="select-time">
                                        <label>经营(驻在)期限至：</label>
                                        <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginJyqxz]"/>
                                        <span>-</span>
                                        <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endJyqxz]"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>登记机关：</label>
                                        <input type="text" name="djjg"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>经营者：</label>
                                        <input type="text" name="jyz"/>
                                    </li>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3">
                                    <li>
                                        <label>经营场所邮政编码：</label>
                                        <input type="text" name="jycsyzbm"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>登记状态：</label>
                                        <input type="text" name="djzt"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>经营场所：</label>
                                        <input type="text" name="jycs"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li>
                                        <label>注册号：</label>
                                        <input type="text" name="zch"/>
                                    </li>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-3">
                                    <li>
                                        <label>字号名称：</label>
                                        <input type="text" name="zhmc"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li class="select-time">
                                        <label>注册日期：</label>
                                        <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginZcrq]"/>
                                        <span>-</span>
                                        <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endZcrq]"/>
                                    </li>
                                </div>
                                <div class="col-md-3">
                                    <li class="select-time">
                                        <label>经营(驻在)期限自：</label>
                                        <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginJyqxzi]"/>
                                        <span>-</span>
                                        <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endJyqxzi]"/>
                                    </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>
                            <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:gtxx:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:gtxx:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:gtxx:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:gtxx: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:gtxx:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:gtxx:remove')}]];
        var hymldmDict = [[${@dict.getType('hymldm')}]];
        var djztdmDict = [[${@dict.getType('djztdm')}]];
        var deptIdDatas = [[${@dict.getType('orhon_qyfl')}]];
        var prefix = ctx + "system/gtxx";

        $(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: 'id',
                    visible: false
                },
                {
                    field: 'deptId',
                    title: '企业区域',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(deptIdDatas, value);
                    }
                },
                {
                    field: 'djjgzwmc',
                    title: '登记机关名称'
                },
                {
                    field: 'djzt',
                    title: '登记状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(djztdmDict, value);
                    }
                },
                {
                    field: 'hyml',
                    title: '行业门类',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(hymldmDict, value);
                    }
                },
                {
                    field: 'zhmc',
                    title: '字号名称'
                },
                {
                    field: 'tyshxydm',
                    title: '统一社会信用代码'
                },
                {
                    field: 'zcrq',
                    title: '注册日期',
                    formatter: function(value, row, index) {
                       if ( value != null && value != '' && typeof(value) != "undefined") {

                            return value.split(" ")[0];
                       }
                       return 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>