<!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 class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">标题:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="title" id="title" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">分类:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="category" id="category" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">关联药品，可以存储多个药品，用逗号分隔:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="associatedDrugs" id="associatedDrugs" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">关联疾病，可以存储多个疾病，用逗号分隔:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="associatedDiseases" id="associatedDiseases" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">疾病病程，用于描述疾病的进展过程:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="diseaseCourse" id="diseaseCourse" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">创建人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="createdBy" id="createdBy" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">创建时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="createdTime" id="createdTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">更新人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="updatedBy" id="updatedBy" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">更新时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="updatedTime" id="updatedTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </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 title = $("input[name='title']").val();
           var category = $("input[name='category']").val();
           var associatedDrugs = $("input[name='associatedDrugs']").val();
           var associatedDiseases = $("input[name='associatedDiseases']").val();
           var diseaseCourse = $("input[name='diseaseCourse']").val();
           var createdBy = $("input[name='createdBy']").val();
           var createdTime = $("input[name='createdTime']").val();
           var updatedBy = $("input[name='updatedBy']").val();
           var updatedTime = $("input[name='updatedTime']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpzskcxfollowupguidance/sDtpZskcxFollowUpGuidanceAdd",
            data : {
                "title": title,
                "category": category,
                "associatedDrugs": associatedDrugs,
                "associatedDiseases": associatedDiseases,
                "diseaseCourse": diseaseCourse,
                "createdBy": createdBy,
                "createdTime": createdTime,
                "updatedBy": updatedBy,
                "updatedTime": updatedTime,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
