<!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="couponName" id="couponName" 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="couponNumber" id="couponNumber" 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="faceValue" id="faceValue" 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="deductionAmount" id="deductionAmount" 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="type" id="type" 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="discountRate" id="discountRate" 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="getTime" id="getTime" 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="issuingStore" id="issuingStore" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">领取门店MDM编码:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="issuingStoreMDMCode" id="issuingStoreMDMCode" 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="redemptionTime" id="redemptionTime" 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="redemptionStatus" id="redemptionStatus" 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="redeemingStore" id="redeemingStore" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">核销门店MDM编码:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="redeemingStoreMDMCode" id="redeemingStoreMDMCode" 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="storeRegion" id="storeRegion" 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="redemptionUser" id="redemptionUser" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">ERP会员卡号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="erpMemberCardNo" id="erpMemberCardNo" 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="usedBy" id="usedBy" 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="phoneNumber" id="phoneNumber" 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="orderNo" id="orderNo" 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="sameStoreRedemption" id="sameStoreRedemption" 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 couponName = $("input[name='couponName']").val();
           var couponNumber = $("input[name='couponNumber']").val();
           var faceValue = $("input[name='faceValue']").val();
           var deductionAmount = $("input[name='deductionAmount']").val();
           var type = $("input[name='type']").val();
           var discountRate = $("input[name='discountRate']").val();
           var getTime = $("input[name='getTime']").val();
           var issuingStore = $("input[name='issuingStore']").val();
           var issuingStoreMDMCode = $("input[name='issuingStoreMDMCode']").val();
           var redemptionTime = $("input[name='redemptionTime']").val();
           var redemptionStatus = $("input[name='redemptionStatus']").val();
           var redeemingStore = $("input[name='redeemingStore']").val();
           var redeemingStoreMDMCode = $("input[name='redeemingStoreMDMCode']").val();
           var storeRegion = $("input[name='storeRegion']").val();
           var redemptionUser = $("input[name='redemptionUser']").val();
           var erpMemberCardNo = $("input[name='erpMemberCardNo']").val();
           var usedBy = $("input[name='usedBy']").val();
           var phoneNumber = $("input[name='phoneNumber']").val();
           var orderNo = $("input[name='orderNo']").val();
           var sameStoreRedemption = $("input[name='sameStoreRedemption']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "yxgl/syxglkjglhxjlrecord/sYxglKjglHxjlRecordAdd",
            data : {
                "couponName": couponName,
                "couponNumber": couponNumber,
                "faceValue": faceValue,
                "deductionAmount": deductionAmount,
                "type": type,
                "discountRate": discountRate,
                "getTime": getTime,
                "issuingStore": issuingStore,
                "issuingStoreMDMCode": issuingStoreMDMCode,
                "redemptionTime": redemptionTime,
                "redemptionStatus": redemptionStatus,
                "redeemingStore": redeemingStore,
                "redeemingStoreMDMCode": redeemingStoreMDMCode,
                "storeRegion": storeRegion,
                "redemptionUser": redemptionUser,
                "erpMemberCardNo": erpMemberCardNo,
                "usedBy": usedBy,
                "phoneNumber": phoneNumber,
                "orderNo": orderNo,
                "sameStoreRedemption": sameStoreRedemption,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
