<!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-SDtpYypzFollowUpTemplate-add" class="customize-search-form">
        <div class="customize-form-group-container">
            <div class="customize-form-group">
                <label>药品:</label>
                <input name="drug" placeholder="药品"  id="drug" class="styled-input" type="text" required>
            </div>
            <div class="customize-form-group">
                <label>事件标签:</label>
                <select name="eventTag"  class="styled-input">
                    <option value="普通模版">普通模版</option>
                    <option value="销售订单完成登记">销售订单完成登记</option>
                    <option value="进入慈善援助">进入慈善援助</option>
                </select>
            </div>
            <div class="customize-form-group">
                <label>任务数:</label>
                <select name="taskCount"  class="styled-input">
                    <option value="单任务">单任务</option>
                    <option value="多任务">多任务</option>
                </select>
            </div>
            <div class="customize-form-group">
                <label>模版ID:</label>
                <input name="templateId" placeholder="模版ID"  id="templateId" class="styled-input" type="number">
            </div>
            <div class="customize-form-group">
                <label>模板名称:</label>
                <input name="templateName" placeholder="模板名称"  id="templateName" class="styled-input" type="text" required>
            </div>

            <div class="customize-form-group">
                <label>业务域:</label>
                <input name="businessDomain" placeholder="业务域"  id="businessDomain" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>创建人:</label>
                <input name="createdBy" placeholder="创建人"  id="createdBy" class="styled-input" type="text">
            </div>

            <div class="customize-form-group">
                <label>状态:</label>
                <select name="status"  class="styled-input">
                    <option value="启用">启用</option>
                    <option value="停用">停用</option>
                </select>
            </div>
            <div class="customize-form-group select-time">
                <label>创建时间:</label>
                <input name="createdTime" placeholder="创建时间"  id="createdTime" class="time-input time-input2" 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-SDtpYypzFollowUpTemplate-add").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpyypzfollowuptemplate/sDtpYypzFollowUpTemplateAdd",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
