<!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="planUniqueIdentifier" id="planUniqueIdentifier" 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="planName" id="planName" 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="targetAudienceDescription" id="targetAudienceDescription" 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="executionMethods" id="executionMethods" 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="promotionChannels" id="promotionChannels" 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="startDate" id="startDate" 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="taskExecutionTime" id="taskExecutionTime" 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="groupBelongingName" id="groupBelongingName" 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="estimatedParticipants" id="estimatedParticipants" 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="actualParticipants" id="actualParticipants" 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="taskPushProgress" id="taskPushProgress" 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="taskCompletionProgress" id="taskCompletionProgress" 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="planStatus" id="planStatus" 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="createdByUser" id="createdByUser" 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 planUniqueIdentifier = $("input[name='planUniqueIdentifier']").val();
           var planName = $("input[name='planName']").val();
           var targetAudienceDescription = $("input[name='targetAudienceDescription']").val();
           var executionMethods = $("input[name='executionMethods']").val();
           var promotionChannels = $("input[name='promotionChannels']").val();
           var startDate = $("input[name='startDate']").val();
           var taskExecutionTime = $("input[name='taskExecutionTime']").val();
           var groupBelongingName = $("input[name='groupBelongingName']").val();
           var estimatedParticipants = $("input[name='estimatedParticipants']").val();
           var actualParticipants = $("input[name='actualParticipants']").val();
           var taskPushProgress = $("input[name='taskPushProgress']").val();
           var taskCompletionProgress = $("input[name='taskCompletionProgress']").val();
           var planStatus = $("input[name='planStatus']").val();
           var createdByUser = $("input[name='createdByUser']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "hygl/shyglhyxxjzyxmarketingplaninfo/sHyglHyxxJzyxMarketingplaninfoAdd",
            data : {
                "planUniqueIdentifier": planUniqueIdentifier,
                "planName": planName,
                "targetAudienceDescription": targetAudienceDescription,
                "executionMethods": executionMethods,
                "promotionChannels": promotionChannels,
                "startDate": startDate,
                "taskExecutionTime": taskExecutionTime,
                "groupBelongingName": groupBelongingName,
                "estimatedParticipants": estimatedParticipants,
                "actualParticipants": actualParticipants,
                "taskPushProgress": taskPushProgress,
                "taskCompletionProgress": taskCompletionProgress,
                "planStatus": planStatus,
                "createdByUser": createdByUser,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
