<!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="requisitionOrderNumber" id="requisitionOrderNumber" 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="requisitionOrderType" id="requisitionOrderType" 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="generationTime" id="generationTime" 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="itemQuantity" id="itemQuantity" 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="requisitionOrderStatus" id="requisitionOrderStatus" 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 requisitionOrderNumber = $("input[name='requisitionOrderNumber']").val();
           var requisitionOrderType = $("input[name='requisitionOrderType']").val();
           var generationTime = $("input[name='generationTime']").val();
           var itemQuantity = $("input[name='itemQuantity']").val();
           var requisitionOrderStatus = $("input[name='requisitionOrderStatus']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkmdqhdrequisitionorder/sKcCrkMdqhdRequisitionorderAdd",
            data : {
                "requisitionOrderNumber": requisitionOrderNumber,
                "requisitionOrderType": requisitionOrderType,
                "generationTime": generationTime,
                "itemQuantity": itemQuantity,
                "requisitionOrderStatus": requisitionOrderStatus,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
