<!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">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>姓名：</label>
                            <input type="text" name="username"/>
                        </li>
                        <li>
                            <label>身份证号码：</label>
                            <input type="text" name="cardid"/>
                        </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-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:tjxx: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:tjxx:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:tjxx:remove')}]];
    var prefix = ctx + "system/tjxx";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            detailUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "体检信息表",
            columns: [
                {
                    field: 'id',
                    title: '序号',
                    visible: false
                },
                {
                    field: 'cdBatch',
                    title: '批次号',
                    visible: false
                },
                {
                    field: 'cdOperation',
                    title: '标志位',
                    visible: false
                },
                {
                    field: 'cdSource',
                    title: '数据来源',
                    visible: false
                },
                {
                    field: 'username',
                    title: '姓名'
                },
                {
                    field: 'sex',
                    title: '性别'
                },
                {
                    field: 'age',
                    title: '年龄'
                },
                {
                    field: 'cardid',
                    title: '身份证号'
                },
                {
                    field: 'persontype',
                    title: '人员类型',
                    visible: false
                },
                {
                    field: 'unitname',
                    title: '单位名称',
                    visible: false
                },
                {
                    field: 'nature',
                    title: '民族',
                    visible: false
                },
                {
                    field: 'education',
                    title: '学历',
                    visible: false
                },
                {
                    field: 'cellphone',
                    title: '联系电话'
                },
                {
                    field: 'worktype',
                    title: '工种',
                    visible: false
                },
                {
                    field: 'workage',
                    title: '工龄',
                    visible: false
                },
                {
                    field: 'unitnatrue',
                    title: '单位性质',
                    visible: false
                },
                {
                    field: 'photourl',
                    title: '照片地址',
                    visible: false
                },
                {
                    field: 'licenseurl',
                    title: '营业执照图片地址',
                    visible: false
                },
                {
                    field: 'adddate',
                    title: '添加日期',
                    visible: false
                },
                {
                    field: 'apptime',
                    title: '预约时间',
                    visible: false
                },
                {
                    field: 'iChecked',
                    title: '资料审核',
                    visible: false
                },
                {
                    field: 'iCheckuser',
                    title: '资料审核人',
                    visible: false
                },
                {
                    field: 'yChecked',
                    title: '信息审核',
                    visible: false
                },
                {
                    field: 'yCheckuser',
                    title: '信息审核人',
                    visible: false
                },
                {
                    field: 'hLevlgm',
                    title: 'LEVlgM',
                    visible: false
                },
                {
                    field: 'hJiagan',
                    title: '甲肝lgm',
                    visible: false
                },
                {
                    field: 'hXqzym',
                    title: '血清丙氨酸氨基转移酶'
                },
                {
                    field: 'hLijiganjun',
                    title: '痢疾杆菌',
                    visible: false
                },
                {
                    field: 'hShanghan',
                    title: '伤寒副伤寒',
                    visible: false
                },
                {
                    field: 'hMeidu',
                    title: '梅毒',
                    visible: false
                },
                {
                    field: 'hHiv',
                    title: '艾滋',
                    visible: false
                },
                {
                    field: 'hConclusion',
                    title: '检验结论'
                },
                {
                    field: 'hChecked',
                    title: '化验检查结果',
                    visible: false
                },
                {
                    field: 'hCheckuser',
                    title: '化验检查人',
                    visible: false
                },
                {
                    field: 'tHasganyan',
                    title: '肝炎病史',
                    visible: false
                },
                {
                    field: 'tGanyan',
                    title: '肝炎患病时间',
                    visible: false
                },
                {
                    field: 'tHasshanghan',
                    title: '伤寒病史',
                    visible: false
                },
                {
                    field: 'tShanghan',
                    title: '伤寒患病时间',
                    visible: false
                },
                {
                    field: 'tHasliji',
                    title: '痢疾病史',
                    visible: false
                },
                {
                    field: 'tLiji',
                    title: '痢疾患病时间',
                    visible: false
                },
                {
                    field: 'tHasfeijiehe',
                    title: '肺结核病史',
                    visible: false
                },
                {
                    field: 'tFeijiehe',
                    title: '肺结核患病时间',
                    visible: false
                },
                {
                    field: 'tHaspifubing',
                    title: '皮肤病病史',
                    visible: false
                },
                {
                    field: 'tPifubing',
                    title: '皮肤病患病时间',
                    visible: false
                },
                {
                    field: 'tHasotherdisease',
                    title: '其他疾病',
                    visible: false
                },
                {
                    field: 'tOtherdisease',
                    title: '其他疾病患病时间',
                    visible: false
                },
                {
                    field: 'tXin',
                    title: '心',
                    visible: false
                },
                {
                    field: 'tGan',
                    title: '肝',
                    visible: false
                },
                {
                    field: 'tPi',
                    title: '脾',
                    visible: false
                },
                {
                    field: 'tFei',
                    title: '肺',
                    visible: false
                },
                {
                    field: 'tPifu',
                    title: '皮肤',
                    visible: false
                },
                {
                    field: 'tOther',
                    title: '其他',
                    visible: false
                },
                {
                    field: 'tX',
                    title: 'X光检查结果',
                    visible: false
                },
                {
                    field: 'tPhenomenon',
                    title: 'X光现象',
                    visible: false
                },
                {
                    field: 'xChecked',
                    title: 'X光审核',
                    visible: false
                },
                {
                    field: 'xCheckuser',
                    title: 'X光审核人',
                    visible: false
                },
                {
                    field: 'tConclusion',
                    title: '体检结论',
                    visible: false
                },
                {
                    field: 'tChecked',
                    title: '检查结果',
                    visible: false
                },
                {
                    field: 'tCheckuser',
                    title: '检查结果审核人',
                    visible: false
                },
                {
                    field: 'bChecked',
                    title: '采血审核',
                    visible: false
                },
                {
                    field: 'bCheckuser',
                    title: '采血审核人',
                    visible: false
                },
                {
                    field: 'cChecked',
                    title: '查体审核',
                    visible: false
                },
                {
                    field: 'cCheckuser',
                    title: '查体审核人',
                    visible: false
                },
                {
                    field: 'createTime',
                    title: '数据归集时间',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            var time = new Date(value);
                            var year = time.getFullYear();
                            var month = time.getMonth() + 1;
                            var date = time.getDate();
                            var hours = time.getHours();
                            if (hours == '') {
                                hours = "00"
                            }
                            var minute = time.getMinutes();
                            if (minute == '') {
                                minute = "00"
                            }
                            var second = time.getSeconds();
                            if (second == '') {
                                second = "00"
                            }
                            // return year + '-' + month + '-' + date + ' ' + hours + ":" + minute + ":" + second;
                            return year + '-' + month + '-' + date;
                        }
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-warning btn-xs  ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\''
                            + row.id + '\')"><i class="fa fa-search"></i>详细</a> ');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>