<!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="adjustmentSheetNo" id="adjustmentSheetNo" 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="adjustmentSheetName" id="adjustmentSheetName" 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="adjustmentType" id="adjustmentType" 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="adjustmentReason" id="adjustmentReason" 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="channel" id="channel" 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="priceType" id="priceType" 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="chainName" id="chainName" 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">门店编码:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="storeCode" id="storeCode" 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="notificationTime" id="notificationTime" 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="createdUser" id="createdUser" 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 adjustmentSheetNo = $("input[name='adjustmentSheetNo']").val();
           var adjustmentSheetName = $("input[name='adjustmentSheetName']").val();
           var adjustmentType = $("input[name='adjustmentType']").val();
           var adjustmentReason = $("input[name='adjustmentReason']").val();
           var channel = $("input[name='channel']").val();
           var priceType = $("input[name='priceType']").val();
           var chainName = $("input[name='chainName']").val();
           var storeName = $("input[name='storeName']").val();
           var storeCode = $("input[name='storeCode']").val();
           var effectiveTime = $("input[name='effectiveTime']").val();
           var notificationTime = $("input[name='notificationTime']").val();
           var createdUser = $("input[name='createdUser']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "jggl/sjgglpriceadjustmentsheet/sJgglPriceadjustmentsheetAdd",
            data : {
                "adjustmentSheetNo": adjustmentSheetNo,
                "adjustmentSheetName": adjustmentSheetName,
                "adjustmentType": adjustmentType,
                "adjustmentReason": adjustmentReason,
                "channel": channel,
                "priceType": priceType,
                "chainName": chainName,
                "storeName": storeName,
                "storeCode": storeCode,
                "effectiveTime": effectiveTime,
                "notificationTime": notificationTime,
                "createdUser": createdUser,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
