<!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="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="storeShortName" id="storeShortName" 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="inspectionDocumentNumber" id="inspectionDocumentNumber" 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="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="barcode" id="barcode" 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="businessScope" id="businessScope" 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="approvalNumber" id="approvalNumber" 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="batchNumber" id="batchNumber" 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="batch" id="batch" 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="inspectionDate" id="inspectionDate" 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="productionDate" id="productionDate" 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="validityPeriod" id="validityPeriod" 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="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="arrivalQuantity" id="arrivalQuantity" 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="inspectionQualifiedQuantity" id="inspectionQualifiedQuantity" 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="costPrice" id="costPrice" 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="costAmount" id="costAmount" 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="consignmentDeliveryDocumentNumber" id="consignmentDeliveryDocumentNumber" 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="inspector" id="inspector" 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 productCode = $("input[name='productCode']").val();
           var storeShortName = $("input[name='storeShortName']").val();
           var productName = $("input[name='productName']").val();
           var inspectionDocumentNumber = $("input[name='inspectionDocumentNumber']").val();
           var dosageForm = $("input[name='dosageForm']").val();
           var specification = $("input[name='specification']").val();
           var unit = $("input[name='unit']").val();
           var barcode = $("input[name='barcode']").val();
           var businessScope = $("input[name='businessScope']").val();
           var approvalNumber = $("input[name='approvalNumber']").val();
           var batchNumber = $("input[name='batchNumber']").val();
           var batch = $("input[name='batch']").val();
           var inspectionDate = $("input[name='inspectionDate']").val();
           var productionDate = $("input[name='productionDate']").val();
           var validityPeriod = $("input[name='validityPeriod']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var supplier = $("input[name='supplier']").val();
           var arrivalQuantity = $("input[name='arrivalQuantity']").val();
           var inspectionQualifiedQuantity = $("input[name='inspectionQualifiedQuantity']").val();
           var costPrice = $("input[name='costPrice']").val();
           var costAmount = $("input[name='costAmount']").val();
           var sapDeliveryDocumentNumber = $("input[name='sapDeliveryDocumentNumber']").val();
           var consignmentDeliveryDocumentNumber = $("input[name='consignmentDeliveryDocumentNumber']").val();
           var inspector = $("input[name='inspector']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcbbproductinspection/sKcBbProductinspectionAdd",
            data : {
                "productCode": productCode,
                "storeShortName": storeShortName,
                "productName": productName,
                "inspectionDocumentNumber": inspectionDocumentNumber,
                "dosageForm": dosageForm,
                "specification": specification,
                "unit": unit,
                "barcode": barcode,
                "businessScope": businessScope,
                "approvalNumber": approvalNumber,
                "batchNumber": batchNumber,
                "batch": batch,
                "inspectionDate": inspectionDate,
                "productionDate": productionDate,
                "validityPeriod": validityPeriod,
                "manufacturer": manufacturer,
                "supplier": supplier,
                "arrivalQuantity": arrivalQuantity,
                "inspectionQualifiedQuantity": inspectionQualifiedQuantity,
                "costPrice": costPrice,
                "costAmount": costAmount,
                "sapDeliveryDocumentNumber": sapDeliveryDocumentNumber,
                "consignmentDeliveryDocumentNumber": consignmentDeliveryDocumentNumber,
                "inspector": inspector,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
