<!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="period" id="period" 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="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="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="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="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="initialStockQuantity" id="initialStockQuantity" 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="initialStockCost" id="initialStockCost" 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="warehouseDeliveryQuantity" id="warehouseDeliveryQuantity" 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="warehouseDeliveryCost" id="warehouseDeliveryCost" 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="transferInQuantity" id="transferInQuantity" 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="transferInCost" id="transferInCost" 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="storeReceiptQuantity" id="storeReceiptQuantity" 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="storeReceiptCost" id="storeReceiptCost" 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="storeReturnQuantity" id="storeReturnQuantity" 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="storeReturnAmount" id="storeReturnAmount" 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="transferOutQuantity" id="transferOutQuantity" 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="transferOutCost" id="transferOutCost" 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="storeReturnWarehouseQuantity" id="storeReturnWarehouseQuantity" 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="storeReturnWarehouseCost" id="storeReturnWarehouseCost" 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="offlineSalesQuantity" id="offlineSalesQuantity" 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="offlineSalesCost" id="offlineSalesCost" 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="offlineSalesReturnQuantity" id="offlineSalesReturnQuantity" 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="offlineSalesReturnAmount" id="offlineSalesReturnAmount" 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="onlineSalesQuantity" id="onlineSalesQuantity" 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="onlineSalesCost" id="onlineSalesCost" 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="onlineSalesReturnQuantity" id="onlineSalesReturnQuantity" 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="onlineSalesReturnAmount" id="onlineSalesReturnAmount" 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="lossQuantity" id="lossQuantity" 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="lossCost" id="lossCost" 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="gainQuantity" id="gainQuantity" 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="gainCost" id="gainCost" 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="finalStockQuantity" id="finalStockQuantity" 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="finalStockCost" id="finalStockCost" 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="initialImportQuantity" id="initialImportQuantity" 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="initialImportCost" id="initialImportCost" 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 period = $("input[name='period']").val();
           var productCode = $("input[name='productCode']").val();
           var productName = $("input[name='productName']").val();
           var specification = $("input[name='specification']").val();
           var unit = $("input[name='unit']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var dosageForm = $("input[name='dosageForm']").val();
           var batchNumber = $("input[name='batchNumber']").val();
           var batch = $("input[name='batch']").val();
           var initialStockQuantity = $("input[name='initialStockQuantity']").val();
           var initialStockCost = $("input[name='initialStockCost']").val();
           var warehouseDeliveryQuantity = $("input[name='warehouseDeliveryQuantity']").val();
           var warehouseDeliveryCost = $("input[name='warehouseDeliveryCost']").val();
           var transferInQuantity = $("input[name='transferInQuantity']").val();
           var transferInCost = $("input[name='transferInCost']").val();
           var storeReceiptQuantity = $("input[name='storeReceiptQuantity']").val();
           var storeReceiptCost = $("input[name='storeReceiptCost']").val();
           var storeReturnQuantity = $("input[name='storeReturnQuantity']").val();
           var storeReturnAmount = $("input[name='storeReturnAmount']").val();
           var transferOutQuantity = $("input[name='transferOutQuantity']").val();
           var transferOutCost = $("input[name='transferOutCost']").val();
           var storeReturnWarehouseQuantity = $("input[name='storeReturnWarehouseQuantity']").val();
           var storeReturnWarehouseCost = $("input[name='storeReturnWarehouseCost']").val();
           var offlineSalesQuantity = $("input[name='offlineSalesQuantity']").val();
           var offlineSalesCost = $("input[name='offlineSalesCost']").val();
           var offlineSalesReturnQuantity = $("input[name='offlineSalesReturnQuantity']").val();
           var offlineSalesReturnAmount = $("input[name='offlineSalesReturnAmount']").val();
           var onlineSalesQuantity = $("input[name='onlineSalesQuantity']").val();
           var onlineSalesCost = $("input[name='onlineSalesCost']").val();
           var onlineSalesReturnQuantity = $("input[name='onlineSalesReturnQuantity']").val();
           var onlineSalesReturnAmount = $("input[name='onlineSalesReturnAmount']").val();
           var lossQuantity = $("input[name='lossQuantity']").val();
           var lossCost = $("input[name='lossCost']").val();
           var gainQuantity = $("input[name='gainQuantity']").val();
           var gainCost = $("input[name='gainCost']").val();
           var finalStockQuantity = $("input[name='finalStockQuantity']").val();
           var finalStockCost = $("input[name='finalStockCost']").val();
           var initialImportQuantity = $("input[name='initialImportQuantity']").val();
           var initialImportCost = $("input[name='initialImportCost']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcbbinventoryvariation/sKcBbInventoryvariationAdd",
            data : {
                "sequenceNumber": sequenceNumber,
                "period": period,
                "productCode": productCode,
                "productName": productName,
                "specification": specification,
                "unit": unit,
                "manufacturer": manufacturer,
                "dosageForm": dosageForm,
                "batchNumber": batchNumber,
                "batch": batch,
                "initialStockQuantity": initialStockQuantity,
                "initialStockCost": initialStockCost,
                "warehouseDeliveryQuantity": warehouseDeliveryQuantity,
                "warehouseDeliveryCost": warehouseDeliveryCost,
                "transferInQuantity": transferInQuantity,
                "transferInCost": transferInCost,
                "storeReceiptQuantity": storeReceiptQuantity,
                "storeReceiptCost": storeReceiptCost,
                "storeReturnQuantity": storeReturnQuantity,
                "storeReturnAmount": storeReturnAmount,
                "transferOutQuantity": transferOutQuantity,
                "transferOutCost": transferOutCost,
                "storeReturnWarehouseQuantity": storeReturnWarehouseQuantity,
                "storeReturnWarehouseCost": storeReturnWarehouseCost,
                "offlineSalesQuantity": offlineSalesQuantity,
                "offlineSalesCost": offlineSalesCost,
                "offlineSalesReturnQuantity": offlineSalesReturnQuantity,
                "offlineSalesReturnAmount": offlineSalesReturnAmount,
                "onlineSalesQuantity": onlineSalesQuantity,
                "onlineSalesCost": onlineSalesCost,
                "onlineSalesReturnQuantity": onlineSalesReturnQuantity,
                "onlineSalesReturnAmount": onlineSalesReturnAmount,
                "lossQuantity": lossQuantity,
                "lossCost": lossCost,
                "gainQuantity": gainQuantity,
                "gainCost": gainCost,
                "finalStockQuantity": finalStockQuantity,
                "finalStockCost": finalStockCost,
                "initialImportQuantity": initialImportQuantity,
                "initialImportCost": initialImportCost,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
