<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('领取核销记录修改')" />
</head>
<style>

</style>
<script>

</script>
<body>
<div class="ui-layout-center">
    <form class="form-horizontal" id="form-SYxglKjglHxjlRecord-edit" th:object="${user}">
        <h4 class="form-header h4">基本信息</h4>
        <input type="hidden" id="id" name="id" th:value="${id}">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                    <label class="col-sm-1 control-label">优惠券名称:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="couponName" placeholder="优惠券名称" th:value="${couponName}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">优惠券编号:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="couponNumber" placeholder="优惠券编号" th:value="${couponNumber}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">优惠券面值:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="faceValue" placeholder="优惠券面值" th:value="${faceValue}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">抵扣金额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="deductionAmount" placeholder="抵扣金额" th:value="${deductionAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">优惠券类型:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="type" placeholder="优惠券类型" th:value="${type}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">折扣率:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="discountRate" placeholder="折扣率" th:value="${discountRate}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">领券时间:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="getTime" placeholder="领券时间" th:value="${getTime}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">领取门店:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="issuingStore" placeholder="领取门店" th:value="${issuingStore}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">领取门店MDM编码:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="issuingStoreMDMCode" placeholder="领取门店MDM编码" th:value="${issuingStoreMDMCode}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">核销时间:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="redemptionTime" placeholder="核销时间" th:value="${redemptionTime}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">核销状态:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="redemptionStatus" placeholder="核销状态" th:value="${redemptionStatus}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">核销门店:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="redeemingStore" placeholder="核销门店" th:value="${redeemingStore}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">核销门店MDM编码:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="redeemingStoreMDMCode" placeholder="核销门店MDM编码" th:value="${redeemingStoreMDMCode}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">核销门店所在区域:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="storeRegion" placeholder="核销门店所在区域" th:value="${storeRegion}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">核销人:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="redemptionUser" placeholder="核销人" th:value="${redemptionUser}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">ERP会员卡号:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="erpMemberCardNo" placeholder="ERP会员卡号" th:value="${erpMemberCardNo}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">使用人:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="usedBy" placeholder="使用人" th:value="${usedBy}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">手机号:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="phoneNumber" placeholder="手机号" th:value="${phoneNumber}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">订单号:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="orderNo" placeholder="订单号" th:value="${orderNo}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">是否领销一致:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="sameStoreRedemption" placeholder="是否领销一致" th:value="${sameStoreRedemption}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </form>
</div>
<div class="main-content">
    <div class="col-sm-offset-5 col-sm-10">
        <!--<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>-->
    </div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>

<script>
    function edit() {
        var data = $("#form-SYxglKjglHxjlRecord-edit").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "yxgl/syxglkjglhxjlrecord/sYxglKjglHxjlRecordEdit",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }

    function submitHandler() {
        if ($.validate.form()) {
            edit();
        }
    }
</script>
