<!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="exchangeCode" id="exchangeCode" 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 exchangeCode = $("input[name='exchangeCode']").val();
           var productName = $("input[name='productName']").val();
           var productType = $("input[name='productType']").val();
           var orderTotalPrice = $("input[name='orderTotalPrice']").val();
           var externalPointsPaid = $("input[name='externalPointsPaid']").val();
           var isPromotionOrder = $("input[name='isPromotionOrder']").val();
           var redemptionQuantity = $("input[name='redemptionQuantity']").val();
           var redemptionChannel = $("input[name='redemptionChannel']").val();
           var paymentMethod = $("input[name='paymentMethod']").val();
           var redemptionStatus = $("input[name='redemptionStatus']").val();
           var orderTime = $("input[name='orderTime']").val();
           var memberPhoneOrCardNo = $("input[name='memberPhoneOrCardNo']").val();
           var userRole = $("input[name='userRole']").val();
           var pickupOrRedemptionStore = $("input[name='pickupOrRedemptionStore']").val();
           var recommendingEmployee = $("input[name='recommendingEmployee']").val();
           var recommendingStore = $("input[name='recommendingStore']").val();
           var verificationStore = $("input[name='verificationStore']").val();
           var verifiedBy = $("input[name='verifiedBy']").val();
           var verificationTime = $("input[name='verificationTime']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "hygl/shygljfglorderinfo/sHyglJfglOrderinfoAdd",
            data : {
                "exchangeCode": exchangeCode,
                "productName": productName,
                "productType": productType,
                "orderTotalPrice": orderTotalPrice,
                "externalPointsPaid": externalPointsPaid,
                "isPromotionOrder": isPromotionOrder,
                "redemptionQuantity": redemptionQuantity,
                "redemptionChannel": redemptionChannel,
                "paymentMethod": paymentMethod,
                "redemptionStatus": redemptionStatus,
                "orderTime": orderTime,
                "memberPhoneOrCardNo": memberPhoneOrCardNo,
                "userRole": userRole,
                "pickupOrRedemptionStore": pickupOrRedemptionStore,
                "recommendingEmployee": recommendingEmployee,
                "recommendingStore": recommendingStore,
                "verificationStore": verificationStore,
                "verifiedBy": verifiedBy,
                "verificationTime": verificationTime,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
