<!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="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="reportDocumentNumber" id="reportDocumentNumber" 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="productionBatchNumber" id="productionBatchNumber" 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="reportDate" id="reportDate" 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="expirationDate" id="expirationDate" 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="quantity" id="quantity" 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="reason" id="reason" 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="reporter" id="reporter" 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 productName = $("input[name='productName']").val();
           var reportDocumentNumber = $("input[name='reportDocumentNumber']").val();
           var specification = $("input[name='specification']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var productionBatchNumber = $("input[name='productionBatchNumber']").val();
           var reportDate = $("input[name='reportDate']").val();
           var productionDate = $("input[name='productionDate']").val();
           var expirationDate = $("input[name='expirationDate']").val();
           var quantity = $("input[name='quantity']").val();
           var unit = $("input[name='unit']").val();
           var reason = $("input[name='reason']").val();
           var conclusion = $("input[name='conclusion']").val();
           var handlingMeasures = $("input[name='handlingMeasures']").val();
           var reporter = $("input[name='reporter']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcbbqualityreportitems/sKcBbQualityreportitemsAdd",
            data : {
                "productCode": productCode,
                "productName": productName,
                "reportDocumentNumber": reportDocumentNumber,
                "specification": specification,
                "manufacturer": manufacturer,
                "productionBatchNumber": productionBatchNumber,
                "reportDate": reportDate,
                "productionDate": productionDate,
                "expirationDate": expirationDate,
                "quantity": quantity,
                "unit": unit,
                "reason": reason,
                "conclusion": conclusion,
                "handlingMeasures": handlingMeasures,
                "reporter": reporter,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
