<!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="date" id="date" 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="storeRange" id="storeRange" 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="storeName" id="storeName" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">会员日 (0: 否, 1: 是):</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="memberDay" id="memberDay" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">超级会员日 (0: 否, 1: 是):</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="superMemberDay" id="superMemberDay" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">大促日 (0: 否, 1: 是):</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="promotionDay" id="promotionDay" 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="allChannelSalesBudget" id="allChannelSalesBudget" 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="allChannelSalesPlan" id="allChannelSalesPlan" 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="allChannelProfitBudget" id="allChannelProfitBudget" 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="allChannelProfitPlan" id="allChannelProfitPlan" 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="offlineSalesBudget" id="offlineSalesBudget" 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="offlineSalesPlan" id="offlineSalesPlan" 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="offlineProfitBudget" id="offlineProfitBudget" 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="offlineProfitPlan" id="offlineProfitPlan" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">O2O销售额计划:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="o2oSalesPlan" id="o2oSalesPlan" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">O2O毛利额计划:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="o2oProfitPlan" id="o2oProfitPlan" 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="allChannelBrandSalesPlan" id="allChannelBrandSalesPlan" 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="allChannelBrandProfitPlan" id="allChannelBrandProfitPlan" 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="deliveryPickupTime" id="deliveryPickupTime" 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="remarks" id="remarks" 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 date = $("input[name='date']").val();
           var storeRange = $("input[name='storeRange']").val();
           var storeName = $("input[name='storeName']").val();
           var memberDay = $("input[name='memberDay']").val();
           var superMemberDay = $("input[name='superMemberDay']").val();
           var promotionDay = $("input[name='promotionDay']").val();
           var allChannelSalesBudget = $("input[name='allChannelSalesBudget']").val();
           var allChannelSalesPlan = $("input[name='allChannelSalesPlan']").val();
           var allChannelProfitBudget = $("input[name='allChannelProfitBudget']").val();
           var allChannelProfitPlan = $("input[name='allChannelProfitPlan']").val();
           var offlineSalesBudget = $("input[name='offlineSalesBudget']").val();
           var offlineSalesPlan = $("input[name='offlineSalesPlan']").val();
           var offlineProfitBudget = $("input[name='offlineProfitBudget']").val();
           var offlineProfitPlan = $("input[name='offlineProfitPlan']").val();
           var o2oSalesPlan = $("input[name='o2oSalesPlan']").val();
           var o2oProfitPlan = $("input[name='o2oProfitPlan']").val();
           var allChannelBrandSalesPlan = $("input[name='allChannelBrandSalesPlan']").val();
           var allChannelBrandProfitPlan = $("input[name='allChannelBrandProfitPlan']").val();
           var deliveryPickupTime = $("input[name='deliveryPickupTime']").val();
           var remarks = $("input[name='remarks']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "mdyygl/smdyyglmdysjqstoreweightsetting/sMdyyglMdysjqStoreweightsettingAdd",
            data : {
                "date": date,
                "storeRange": storeRange,
                "storeName": storeName,
                "memberDay": memberDay,
                "superMemberDay": superMemberDay,
                "promotionDay": promotionDay,
                "allChannelSalesBudget": allChannelSalesBudget,
                "allChannelSalesPlan": allChannelSalesPlan,
                "allChannelProfitBudget": allChannelProfitBudget,
                "allChannelProfitPlan": allChannelProfitPlan,
                "offlineSalesBudget": offlineSalesBudget,
                "offlineSalesPlan": offlineSalesPlan,
                "offlineProfitBudget": offlineProfitBudget,
                "offlineProfitPlan": offlineProfitPlan,
                "o2oSalesPlan": o2oSalesPlan,
                "o2oProfitPlan": o2oProfitPlan,
                "allChannelBrandSalesPlan": allChannelBrandSalesPlan,
                "allChannelBrandProfitPlan": allChannelBrandProfitPlan,
                "deliveryPickupTime": deliveryPickupTime,
                "remarks": remarks,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
