<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('医院信息新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form id="form-SSpglJfspProductinfo-add" class="customize-search-form">
        <div class="customize-form-group-container">
            <div class="customize-form-group">
                <label>医院名称:</label>
                <input name="standardName" placeholder="请输入医院名称" id="standardName" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>医院地址:</label>
                <input name="address" placeholder="请输入医院地址" id="address" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>医院电话:</label>
                <input name="phone" placeholder="请输入医院电话" id="phone" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>所属门店:</label>
                <input name="storeName" placeholder="请输入所属门店" id="storeName" class="styled-input" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
        var data = $("#form-SSpglJfspProductinfo-add").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "gxhpz/hospital/saveHospital",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
