<!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="benefitUniqueIdentifier" id="benefitUniqueIdentifier" 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="benefitName" id="benefitName" 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="benefitDescription" id="benefitDescription" 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="benefitPurpose" id="benefitPurpose" 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="benefitType" id="benefitType" 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="benefitStatus" id="benefitStatus" 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="benefitDetails" id="benefitDetails" 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="totalStock" id="totalStock" 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="remainingStock" id="remainingStock" 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="auditStatus" id="auditStatus" 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="createdByUsername" id="createdByUsername" 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="creationTime" id="creationTime" 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="operationLog" id="operationLog" 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 benefitUniqueIdentifier = $("input[name='benefitUniqueIdentifier']").val();
           var benefitName = $("input[name='benefitName']").val();
           var benefitDescription = $("input[name='benefitDescription']").val();
           var benefitPurpose = $("input[name='benefitPurpose']").val();
           var benefitType = $("input[name='benefitType']").val();
           var benefitStatus = $("input[name='benefitStatus']").val();
           var benefitDetails = $("input[name='benefitDetails']").val();
           var totalStock = $("input[name='totalStock']").val();
           var remainingStock = $("input[name='remainingStock']").val();
           var auditStatus = $("input[name='auditStatus']").val();
           var createdByUsername = $("input[name='createdByUsername']").val();
           var creationTime = $("input[name='creationTime']").val();
           var operationLog = $("input[name='operationLog']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "hygl/shyglequities/sHyglEquitiesAdd",
            data : {
                "benefitUniqueIdentifier": benefitUniqueIdentifier,
                "benefitName": benefitName,
                "benefitDescription": benefitDescription,
                "benefitPurpose": benefitPurpose,
                "benefitType": benefitType,
                "benefitStatus": benefitStatus,
                "benefitDetails": benefitDetails,
                "totalStock": totalStock,
                "remainingStock": remainingStock,
                "auditStatus": auditStatus,
                "createdByUsername": createdByUsername,
                "creationTime": creationTime,
                "operationLog": operationLog,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
