<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('随访模板表修改')" />
</head>
<body>
<div class="ui-layout-center">
    <form id="form-SDtpYypzFollowUpTemplate-edit" class="customize-search-form">

        <div class="customize-form-group-container">
            <input type="hidden" id="id" name="id" th:value="${id}">
            <div class="customize-form-group">
                <label>药品:</label>
                <input name="drug" placeholder="药品" th:value="${drug}" class="styled-input" type="text" required>
            </div>
            <div class="customize-form-group">
                <label>事件标签:</label>
                <input name="eventTag" placeholder="事件标签" th:value="${eventTag}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>模版ID:</label>
                <input name="templateId" placeholder="模版ID" th:value="${templateId}" class="styled-input" type="number">
            </div>
            <div class="customize-form-group">
                <label>模板名称:</label>
                <input name="templateName" placeholder="模板名称" th:value="${templateName}" class="styled-input" type="text" required>
            </div>
            <div class="customize-form-group">
                <label>任务数:</label>
                <input name="taskCount" placeholder="任务数" th:value="${taskCount}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>业务域:</label>
                <input name="businessDomain" placeholder="业务域" th:value="${businessDomain}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>创建人:</label>
                <input name="createdBy" placeholder="创建人" th:value="${createdBy}" class="styled-input" type="text" disabled="true">
            </div>
            <div class="customize-form-group">
                <label>更新人:</label>
                <input name="updatedBy" placeholder="更新人" th:value="${updatedBy}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>状态:</label>
                <input name="status" placeholder="状态：" th:value="${status}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>创建时间:</label>
                <input name="createdTime" placeholder="创建时间" th:value="${createdTime}" class="styled-input" type="text" disabled="true">
            </div>
            <div class="customize-form-group select-time">
                <label>更新时间:</label>
                <input name="updatedTime" placeholder="更新时间" th:value="${updatedTime}" class="time-input2 time-input" type="text">
            </div>
        </div>
    </form>
</div>
<div class="main-content">
    <div class="col-sm-offset-5 col-sm-10">
    </div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>
<script>
    function edit() {
        var data = $("#form-SDtpYypzFollowUpTemplate-edit").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpyypzfollowuptemplate/sDtpYypzFollowUpTemplateEdit",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }

    function submitHandler() {
        if ($.validate.form()) {
            edit();
        }
    }
</script>
