<!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="applicationNumber" id="applicationNumber" 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="adjustmentQuantity" id="adjustmentQuantity" 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="applicant" id="applicant" 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="applicationTime" id="applicationTime" 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="approver" id="approver" 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="approvalTime" id="approvalTime" 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="approvalStatus" id="approvalStatus" 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="memberCardNumber" id="memberCardNumber" 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="memberPhone" id="memberPhone" 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="memberName" id="memberName" 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="pointsAdjusted" id="pointsAdjusted" 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="adjustmentType" id="adjustmentType" 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 applicationNumber = $("input[name='applicationNumber']").val();
           var adjustmentQuantity = $("input[name='adjustmentQuantity']").val();
           var applicant = $("input[name='applicant']").val();
           var applicationTime = $("input[name='applicationTime']").val();
           var approver = $("input[name='approver']").val();
           var approvalTime = $("input[name='approvalTime']").val();
           var approvalStatus = $("input[name='approvalStatus']").val();
           var memberCardNumber = $("input[name='memberCardNumber']").val();
           var memberPhone = $("input[name='memberPhone']").val();
           var memberName = $("input[name='memberName']").val();
           var pointsAdjusted = $("input[name='pointsAdjusted']").val();
           var adjustmentReason = $("input[name='adjustmentReason']").val();
           var adjustmentType = $("input[name='adjustmentType']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "hygl/shygljfglpointadjustment/sHyglJfglPointAdjustmentAdd",
            data : {
                "applicationNumber": applicationNumber,
                "adjustmentQuantity": adjustmentQuantity,
                "applicant": applicant,
                "applicationTime": applicationTime,
                "approver": approver,
                "approvalTime": approvalTime,
                "approvalStatus": approvalStatus,
                "memberCardNumber": memberCardNumber,
                "memberPhone": memberPhone,
                "memberName": memberName,
                "pointsAdjusted": pointsAdjusted,
                "adjustmentReason": adjustmentReason,
                "adjustmentType": adjustmentType,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
