<!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="returnDocumentNumber" id="returnDocumentNumber" 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="recallDocumentNumber" id="recallDocumentNumber" 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="reviewStatus" id="reviewStatus" 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="documentStatus" id="documentStatus" 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="warehouseArea" id="warehouseArea" 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 returnDocumentNumber = $("input[name='returnDocumentNumber']").val();
           var recallDocumentNumber = $("input[name='recallDocumentNumber']").val();
           var reviewStatus = $("input[name='reviewStatus']").val();
           var applicant = $("input[name='applicant']").val();
           var applicationTime = $("input[name='applicationTime']").val();
           var documentStatus = $("input[name='documentStatus']").val();
           var warehouseArea = $("input[name='warehouseArea']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkthshreturndocument/sKcCrkThshReturndocumentAdd",
            data : {
                "returnDocumentNumber": returnDocumentNumber,
                "recallDocumentNumber": recallDocumentNumber,
                "reviewStatus": reviewStatus,
                "applicant": applicant,
                "applicationTime": applicationTime,
                "documentStatus": documentStatus,
                "warehouseArea": warehouseArea,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
