<!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="maintenanceLevel" id="maintenanceLevel" 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="maintenanceOrderNumber" id="maintenanceOrderNumber" 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="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="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="expiryDate" id="expiryDate" 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="inventoryQuantity" id="inventoryQuantity" 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="inspectionQuantity" id="inspectionQuantity" 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="qualifiedQuantity" id="qualifiedQuantity" 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="unqualifiedQuantity" id="unqualifiedQuantity" 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="conclusion" id="conclusion" 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="handlingMeasures" id="handlingMeasures" 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="inspector" id="inspector" 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="maintainer" id="maintainer" 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 maintenanceLevel = $("input[name='maintenanceLevel']").val();
           var productCode = $("input[name='productCode']").val();
           var productName = $("input[name='productName']").val();
           var maintenanceOrderNumber = $("input[name='maintenanceOrderNumber']").val();
           var specification = $("input[name='specification']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var batchNumber = $("input[name='batchNumber']").val();
           var productionDate = $("input[name='productionDate']").val();
           var expiryDate = $("input[name='expiryDate']").val();
           var inventoryQuantity = $("input[name='inventoryQuantity']").val();
           var inspectionQuantity = $("input[name='inspectionQuantity']").val();
           var qualifiedQuantity = $("input[name='qualifiedQuantity']").val();
           var unqualifiedQuantity = $("input[name='unqualifiedQuantity']").val();
           var conclusion = $("input[name='conclusion']").val();
           var handlingMeasures = $("input[name='handlingMeasures']").val();
           var inspectionDate = $("input[name='inspectionDate']").val();
           var inspector = $("input[name='inspector']").val();
           var maintainer = $("input[name='maintainer']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcbbmaintenanceorderitems/sKcBbMaintenanceorderitemsAdd",
            data : {
                "maintenanceLevel": maintenanceLevel,
                "productCode": productCode,
                "productName": productName,
                "maintenanceOrderNumber": maintenanceOrderNumber,
                "specification": specification,
                "manufacturer": manufacturer,
                "batchNumber": batchNumber,
                "productionDate": productionDate,
                "expiryDate": expiryDate,
                "inventoryQuantity": inventoryQuantity,
                "inspectionQuantity": inspectionQuantity,
                "qualifiedQuantity": qualifiedQuantity,
                "unqualifiedQuantity": unqualifiedQuantity,
                "conclusion": conclusion,
                "handlingMeasures": handlingMeasures,
                "inspectionDate": inspectionDate,
                "inspector": inspector,
                "maintainer": maintainer,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
