<!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="peopleName" id="peopleName" 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="peopleDefinition" id="peopleDefinition" 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="totalPeopleCount" id="totalPeopleCount" 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="successPeopleCount" id="successPeopleCount" 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="failurePeopleCount" id="failurePeopleCount" 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="updateMethod" id="updateMethod" 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="updateTime" id="updateTime" 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="creator" id="creator" 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 peopleName = $("input[name='peopleName']").val();
           var peopleDefinition = $("input[name='peopleDefinition']").val();
           var totalPeopleCount = $("input[name='totalPeopleCount']").val();
           var successPeopleCount = $("input[name='successPeopleCount']").val();
           var failurePeopleCount = $("input[name='failurePeopleCount']").val();
           var updateMethod = $("input[name='updateMethod']").val();
           var updateTime = $("input[name='updateTime']").val();
           var createTime = $("input[name='createTime']").val();
           var creator = $("input[name='creator']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "hygl/shyglhyyxpeoplemanagement/sHyglHyyxPeoplemanagementAdd",
            data : {
                "peopleName": peopleName,
                "peopleDefinition": peopleDefinition,
                "totalPeopleCount": totalPeopleCount,
                "successPeopleCount": successPeopleCount,
                "failurePeopleCount": failurePeopleCount,
                "updateMethod": updateMethod,
                "updateTime": updateTime,
                "createTime": createTime,
                "creator": creator,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
