<!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="comboProductName" id="comboProductName" 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="effectiveTime" id="effectiveTime" 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="eligibleUsers" id="eligibleUsers" 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="effectiveStore" id="effectiveStore" 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="totalQuantity" id="totalQuantity" 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="comboPrice" id="comboPrice" 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 comboProductName = $("input[name='comboProductName']").val();
           var effectiveTime = $("input[name='effectiveTime']").val();
           var status = $("input[name='status']").val();
           var eligibleUsers = $("input[name='eligibleUsers']").val();
           var effectiveStore = $("input[name='effectiveStore']").val();
           var totalQuantity = $("input[name='totalQuantity']").val();
           var comboPrice = $("input[name='comboPrice']").val();
           var createTime = $("input[name='createTime']").val();
           var creator = $("input[name='creator']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "yxgl/syxglzhspcombinationproduct/sYxglZhspCombinationproductAdd",
            data : {
                "comboProductName": comboProductName,
                "effectiveTime": effectiveTime,
                "status": status,
                "eligibleUsers": eligibleUsers,
                "effectiveStore": effectiveStore,
                "totalQuantity": totalQuantity,
                "comboPrice": comboPrice,
                "createTime": createTime,
                "creator": creator,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
