<!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="sequenceNumber" id="sequenceNumber" 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="arrivalStore" id="arrivalStore" 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="arrivalDocumentNumber" id="arrivalDocumentNumber" 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="sourceDocumentNumber" id="sourceDocumentNumber" 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="arrivalTime" id="arrivalTime" 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="submissionTime" id="submissionTime" 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="arrivalItemCount" id="arrivalItemCount" 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="discrepancyItemCount" id="discrepancyItemCount" 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 sequenceNumber = $("input[name='sequenceNumber']").val();
           var arrivalStore = $("input[name='arrivalStore']").val();
           var arrivalDocumentNumber = $("input[name='arrivalDocumentNumber']").val();
           var sourceDocumentNumber = $("input[name='sourceDocumentNumber']").val();
           var sapDeliveryDocumentNumber = $("input[name='sapDeliveryDocumentNumber']").val();
           var arrivalTime = $("input[name='arrivalTime']").val();
           var submissionTime = $("input[name='submissionTime']").val();
           var arrivalItemCount = $("input[name='arrivalItemCount']").val();
           var discrepancyItemCount = $("input[name='discrepancyItemCount']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkarrivalinfo/sKcCrkArrivalinfoAdd",
            data : {
                "sequenceNumber": sequenceNumber,
                "arrivalStore": arrivalStore,
                "arrivalDocumentNumber": arrivalDocumentNumber,
                "sourceDocumentNumber": sourceDocumentNumber,
                "sapDeliveryDocumentNumber": sapDeliveryDocumentNumber,
                "arrivalTime": arrivalTime,
                "submissionTime": submissionTime,
                "arrivalItemCount": arrivalItemCount,
                "discrepancyItemCount": discrepancyItemCount,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
