<!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">话术ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="scriptId" id="scriptId" 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="scriptTheme" id="scriptTheme" 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="scriptSummary" id="scriptSummary" 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="scriptContent" id="scriptContent" 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="keywords" id="keywords" 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="weight" id="weight" 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="lastOperationTime" id="lastOperationTime" 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="lastOperator" id="lastOperator" 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="themeId" id="themeId" 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="theme" id="theme" 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="applicableDrugType" id="applicableDrugType" 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="applicableFollowUpType" id="applicableFollowUpType" 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="taskTheme" id="taskTheme" 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="lastEditTime" id="lastEditTime" 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="lastEditor" id="lastEditor" 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 scriptId = $("input[name='scriptId']").val();
           var scriptTheme = $("input[name='scriptTheme']").val();
           var scriptSummary = $("input[name='scriptSummary']").val();
           var scriptContent = $("input[name='scriptContent']").val();
           var keywords = $("input[name='keywords']").val();
           var weight = $("input[name='weight']").val();
           var status = $("input[name='status']").val();
           var lastOperationTime = $("input[name='lastOperationTime']").val();
           var lastOperator = $("input[name='lastOperator']").val();
           var themeId = $("input[name='themeId']").val();
           var theme = $("input[name='theme']").val();
           var applicableDrugType = $("input[name='applicableDrugType']").val();
           var applicableFollowUpType = $("input[name='applicableFollowUpType']").val();
           var taskTheme = $("input[name='taskTheme']").val();
           var lastEditTime = $("input[name='lastEditTime']").val();
           var lastEditor = $("input[name='lastEditor']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpyypzverbaltrickt/sDtpYypzVerbalTricktAdd",
            data : {
                "scriptId": scriptId,
                "scriptTheme": scriptTheme,
                "scriptSummary": scriptSummary,
                "scriptContent": scriptContent,
                "keywords": keywords,
                "weight": weight,
                "status": status,
                "lastOperationTime": lastOperationTime,
                "lastOperator": lastOperator,
                "themeId": themeId,
                "theme": theme,
                "applicableDrugType": applicableDrugType,
                "applicableFollowUpType": applicableFollowUpType,
                "taskTheme": taskTheme,
                "lastEditTime": lastEditTime,
                "lastEditor": lastEditor,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
