<!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="smsName" id="smsName" 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="smsPlatform" id="smsPlatform" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">三方模版ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="thirdPartyTemplateId" id="thirdPartyTemplateId" 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="templateType" id="templateType" 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="status" id="status" 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="createTime" id="createTime" 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="smsContent" id="smsContent" 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="smsVariables" id="smsVariables" 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 smsName = $("input[name='smsName']").val();
           var smsPlatform = $("input[name='smsPlatform']").val();
           var thirdPartyTemplateId = $("input[name='thirdPartyTemplateId']").val();
           var templateType = $("input[name='templateType']").val();
           var status = $("input[name='status']").val();
           var createTime = $("input[name='createTime']").val();
           var smsContent = $("input[name='smsContent']").val();
           var smsVariables = $("input[name='smsVariables']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "hygl/shyglhyyxmouldmessage/sHyglHyyxMouldmessageAdd",
            data : {
                "smsName": smsName,
                "smsPlatform": smsPlatform,
                "thirdPartyTemplateId": thirdPartyTemplateId,
                "templateType": templateType,
                "status": status,
                "createTime": createTime,
                "smsContent": smsContent,
                "smsVariables": smsVariables,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
