<!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="receiptDocumentNumber" id="receiptDocumentNumber" 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="warehouseShipmentNumber" id="warehouseShipmentNumber" 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="receiver" id="receiver" 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="receiptTime" id="receiptTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">上级DC:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="parentDc" id="parentDc" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">SAP配送单单号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="sapDeliveryDocumentNumber" id="sapDeliveryDocumentNumber" 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="entrustedShipmentNumber" id="entrustedShipmentNumber" 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="receiptDocumentStatus" id="receiptDocumentStatus" 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 receiptDocumentNumber = $("input[name='receiptDocumentNumber']").val();
           var warehouseShipmentNumber = $("input[name='warehouseShipmentNumber']").val();
           var receiver = $("input[name='receiver']").val();
           var receiptTime = $("input[name='receiptTime']").val();
           var parentDc = $("input[name='parentDc']").val();
           var sapDeliveryDocumentNumber = $("input[name='sapDeliveryDocumentNumber']").val();
           var entrustedShipmentNumber = $("input[name='entrustedShipmentNumber']").val();
           var receiptDocumentStatus = $("input[name='receiptDocumentStatus']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkckreceiptinfo/sKcCrkCkReceiptinfoAdd",
            data : {
                "receiptDocumentNumber": receiptDocumentNumber,
                "warehouseShipmentNumber": warehouseShipmentNumber,
                "receiver": receiver,
                "receiptTime": receiptTime,
                "parentDc": parentDc,
                "sapDeliveryDocumentNumber": sapDeliveryDocumentNumber,
                "entrustedShipmentNumber": entrustedShipmentNumber,
                "receiptDocumentStatus": receiptDocumentStatus,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
