<!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="supplier" id="supplier" 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="productCode" id="productCode" 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="productName" id="productName" 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="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="receiptDate" id="receiptDate" 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="dosageForm" id="dosageForm" 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="specification" id="specification" 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="manufacturer" id="manufacturer" 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="origin" id="origin" 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="unit" id="unit" 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="shipmentQuantity" id="shipmentQuantity" 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="departureTime" id="departureTime" 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="departureTemperature" id="departureTemperature" 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="transportationMode" id="transportationMode" 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="arrivalTemperature" id="arrivalTemperature" 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="receiptQuantity" id="receiptQuantity" 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>
                </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 supplier = $("input[name='supplier']").val();
           var productCode = $("input[name='productCode']").val();
           var productName = $("input[name='productName']").val();
           var receiptDocumentNumber = $("input[name='receiptDocumentNumber']").val();
           var receiptDate = $("input[name='receiptDate']").val();
           var dosageForm = $("input[name='dosageForm']").val();
           var specification = $("input[name='specification']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var origin = $("input[name='origin']").val();
           var unit = $("input[name='unit']").val();
           var shipmentQuantity = $("input[name='shipmentQuantity']").val();
           var departureTime = $("input[name='departureTime']").val();
           var departureTemperature = $("input[name='departureTemperature']").val();
           var transportationMode = $("input[name='transportationMode']").val();
           var arrivalTime = $("input[name='arrivalTime']").val();
           var arrivalTemperature = $("input[name='arrivalTemperature']").val();
           var receiptQuantity = $("input[name='receiptQuantity']").val();
           var receiver = $("input[name='receiver']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcbbreceiptorderitems/sKcBbReceiptorderitemsAdd",
            data : {
                "supplier": supplier,
                "productCode": productCode,
                "productName": productName,
                "receiptDocumentNumber": receiptDocumentNumber,
                "receiptDate": receiptDate,
                "dosageForm": dosageForm,
                "specification": specification,
                "manufacturer": manufacturer,
                "origin": origin,
                "unit": unit,
                "shipmentQuantity": shipmentQuantity,
                "departureTime": departureTime,
                "departureTemperature": departureTemperature,
                "transportationMode": transportationMode,
                "arrivalTime": arrivalTime,
                "arrivalTemperature": arrivalTemperature,
                "receiptQuantity": receiptQuantity,
                "receiver": receiver,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
