<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no">
    <th:block th:include="include :: header('门店资质表')" />
    <th:block th:include="include :: layout-latest-css" />
    <th:block th:include="include :: ztree-css" />
</head>

<body class="gray-bg">
<div class="ui-layout-center">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse" >
                <div class="query-condition-container">
                    <h4 class="query-condition-title">查询条件</h4>
                    <div class="query-buttons">
                        <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="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                    </div>
                </div>
                <form id="SXtszMdzhglStorequalification-form" class="customize-search-form">
                    <div class="customize-form-group-container">
                        <div class="customize-form-group">
                            <label>门店ID:</label>
                            <input type="text" class="styled-input" name="storeId" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>企业名称:</label>
                            <input type="text" class="styled-input" name="companyName" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>法定代表人/营业者:</label>
                            <input type="text" class="styled-input" name="legalRepresentative" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>营业执照注册号:</label>
                            <input type="text" class="styled-input" name="businessLicenseRegistrationNumber" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>地址:</label>
                            <input type="text" class="styled-input" name="businessLicenseAddress" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>营业范围:</label>
                            <input type="text" class="styled-input" name="businessScope" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>营业执照有效期:</label>
                            <input type="text" class="styled-input" name="businessLicenseValidityPeriod" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>营业执照:</label>
                            <input type="text" class="styled-input" name="businessLicenseUrl" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>互联网药品信息服务资格证书:</label>
                            <input type="text" class="styled-input" name="internetPharmaceuticalInformationServiceCertificate" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>互联网药品交易服务资格证书:</label>
                            <input type="text" class="styled-input" name="internetPharmaceuticalTransactionServiceCertificate" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>药品经营许可证:</label>
                            <input type="text" class="styled-input" name="pharmaceuticalOperationPermit" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>食品经营许可证:</label>
                            <input type="text" class="styled-input" name="foodOperationPermit" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>医疗器械经营许可证:</label>
                            <input type="text" class="styled-input" name="medicalDeviceOperationPermit" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>第二类医疗器械经营备案凭证:</label>
                            <input type="text" class="styled-input" name="secondClassMedicalDeviceFilingCertificate" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>药品经营质量管理规范认证证书:</label>
                            <input type="text" class="styled-input" name="pharmaceuticalQualityManagementStandardCertification" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>医疗器械网络销售备案凭证:</label>
                            <input type="text" class="styled-input" name="medicalDeviceNetworkSalesFilingCertificate" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>执业药师注册证:</label>
                            <input type="text" class="styled-input" name="pharmacistRegistrationCertificate" autocomplete="off"/>
                        </div>
                        <div class="customize-form-group">
                            <label>入驻药急送平台协议:</label>
                            <input type="text" class="styled-input" name="platformEntryAgreement" autocomplete="off"/>
                        </div>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped" style="width: 100%; overflow-x: hidden;">
                <table id="bootstrap-table" class="fixed-layout-table"></table>
            </div>
        </div>
    </div>
</div>

<th:block th:include="include :: footer" />
<th:block th:include="include :: layout-latest-js" />
<th:block th:include="include :: bootstrap-table-fixed-columns-js" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('dtp:pmService:edit')}]];
    var removeFlag = [[${@permission.hasPermi('dtp:pmService:remove')}]];
    var prefix = ctx + "xtsz/sxtszmdzhglstorequalification";
    $(function() {
        var panehHidden = false;
        if ($(this).width() < 1590) {
            panehHidden = true;
        }
        $('body').layout({ initClosed: panehHidden, west__size: 185, resizeWithWindow: false });
        // 回到顶部绑定
        if ($.fn.toTop !== undefined) {
            var opt = {
                win:$('.ui-layout-center'),
                doc:$('.ui-layout-center')
            };
            $('#scroll-up').toTop(opt);
        }
        queryArchivesList();
    });

    function queryArchivesList() {
        var options = {
            url: prefix + "/sXtszMdzhglStorequalificationList",
            viewUrl: prefix + "/sXtszMdzhglStorequalificationView/{id}",
            createUrl: prefix + "/sXtszMdzhglStorequalificationAdd",
            updateUrl: prefix + "/sXtszMdzhglStorequalificationEdit/{id}",
            removeUrl: prefix + "/sXtszMdzhglStorequalificationRemove",
            /*exportUrl: prefix + "/export",
            importUrl: prefix + "/importData",
            importTemplateUrl: prefix + "/importTemplate",*/
            sortName: "id",
            sortOrder: "asc",
            modalName: "门店资质表",
            fitColumns: true,
            striped: true,
            autoRowHeight: true,
            rowNumbers: true,
            showFooter:true,  //是否显示表格底部区域。
            clickToSelect: true, //是否启用点击行时选中整行的功能。
            singleSelect: false, //是否仅允许选择一行
            fixedColumns: true,
            //fixedNumber: 3,
            fixedRightNumber: 1,
            columns: [
                    { field: 'id', title: '主键', align: 'center' ,visible:false},
                    { field: 'storeId', title: '门店ID', align: 'center' },
                    { field: 'companyName', title: '企业名称', align: 'center' },
                    { field: 'legalRepresentative', title: '法定代表人/营业者', align: 'center' },
                    { field: 'businessLicenseRegistrationNumber', title: '营业执照注册号', align: 'center' },
                    { field: 'businessLicenseAddress', title: '地址', align: 'center' },
                    { field: 'businessScope', title: '营业范围', align: 'center' },
                    { field: 'businessLicenseValidityPeriod', title: '营业执照有效期', align: 'center' },
                    { field: 'businessLicenseUrl', title: '营业执照', align: 'center' },
                    { field: 'internetPharmaceuticalInformationServiceCertificate', title: '互联网药品信息服务资格证书', align: 'center' },
                    { field: 'internetPharmaceuticalTransactionServiceCertificate', title: '互联网药品交易服务资格证书', align: 'center' },
                    { field: 'pharmaceuticalOperationPermit', title: '药品经营许可证', align: 'center' },
                    { field: 'foodOperationPermit', title: '食品经营许可证', align: 'center' },
                    { field: 'medicalDeviceOperationPermit', title: '医疗器械经营许可证', align: 'center' },
                    { field: 'secondClassMedicalDeviceFilingCertificate', title: '第二类医疗器械经营备案凭证', align: 'center' },
                    { field: 'pharmaceuticalQualityManagementStandardCertification', title: '药品经营质量管理规范认证证书', align: 'center' },
                    { field: 'medicalDeviceNetworkSalesFilingCertificate', title: '医疗器械网络销售备案凭证', align: 'center' },
                    { field: 'pharmacistRegistrationCertificate', title: '执业药师注册证', align: 'center' },
                    { field: 'platformEntryAgreement', title: '入驻药急送平台协议', align: 'center' },

                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        if (row.id) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick=""><i class="fa fa-search"></i>查看</a> ');
                            return actions.join('');
                        } else {
                            return "";
                        }
                    }
                }]
        };
        $.table.init(options);
    }

    /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
    function resetPre() {
        resetDate();
        $("#SXtszMdzhglStorequalification-form")[0].reset();
        $("#deptId").val("");
        $("#parentId").val("");
        $(".curSelectedNode").removeClass("curSelectedNode");
        $.table.search();
        _refresh();
    }
    function edit_page(id){
        table.set();
        var url = "/404.html";
        if ($.common.isNotEmpty(id)) {
            url = table.options.updateUrl.replace("{id}", id);
        } else {
            var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
            if (id.length == 0) {
                $.modal.alertWarning("请至少选择一条记录");
                return;
            }
            url = table.options.updateUrl.replace("{id}", id);
        }
        $.modal.openTab("修改" + table.options.modalName, url + "?status=1" );
    }

    /* 用户状态显示 */
    function statusTools(row) {
        if (row.status == 1) {
            return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.userId + '\')"></i> ';
        } else {
            return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.userId + '\')"></i> ';
        }
    }
</script>
</body>

</html>
