<!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="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="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="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="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="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="stockQuantity" id="stockQuantity" 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="medicalInsuranceStock" id="medicalInsuranceStock" 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="medicalInsuranceLockedStock" id="medicalInsuranceLockedStock" 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="pharmacyStock" id="pharmacyStock" 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="pharmacyLockedStock" id="pharmacyLockedStock" 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="warehouseArea" id="warehouseArea" 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="pendingOutboundQuantity" id="pendingOutboundQuantity" 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="qualifiedPositionCode" id="qualifiedPositionCode" 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="qualifiedPositionStock" id="qualifiedPositionStock" 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="qualifiedPositionDispensedStock" id="qualifiedPositionDispensedStock" 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="pendingAcceptancePositionCode" id="pendingAcceptancePositionCode" 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="pendingAcceptancePositionStock" id="pendingAcceptancePositionStock" 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="unqualifiedPositionCode" id="unqualifiedPositionCode" 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="unqualifiedPositionStock" id="unqualifiedPositionStock" 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="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="entrustedManufacturer" id="entrustedManufacturer" 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="supplierName" id="supplierName" 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="retailPrice" id="retailPrice" 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="memberPrice" id="memberPrice" 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="dispensedPrice" id="dispensedPrice" 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">销售属性:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="salesAttribute" id="salesAttribute" 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 storeShortName = $("input[name='storeShortName']").val();
           var productCode = $("input[name='productCode']").val();
           var productName = $("input[name='productName']").val();
           var productionBatchNumber = $("input[name='productionBatchNumber']").val();
           var batch = $("input[name='batch']").val();
           var unit = $("input[name='unit']").val();
           var stockQuantity = $("input[name='stockQuantity']").val();
           var medicalInsuranceStock = $("input[name='medicalInsuranceStock']").val();
           var medicalInsuranceLockedStock = $("input[name='medicalInsuranceLockedStock']").val();
           var pharmacyStock = $("input[name='pharmacyStock']").val();
           var pharmacyLockedStock = $("input[name='pharmacyLockedStock']").val();
           var warehouseArea = $("input[name='warehouseArea']").val();
           var pendingOutboundQuantity = $("input[name='pendingOutboundQuantity']").val();
           var qualifiedPositionCode = $("input[name='qualifiedPositionCode']").val();
           var qualifiedPositionStock = $("input[name='qualifiedPositionStock']").val();
           var qualifiedPositionDispensedStock = $("input[name='qualifiedPositionDispensedStock']").val();
           var pendingAcceptancePositionCode = $("input[name='pendingAcceptancePositionCode']").val();
           var pendingAcceptancePositionStock = $("input[name='pendingAcceptancePositionStock']").val();
           var unqualifiedPositionCode = $("input[name='unqualifiedPositionCode']").val();
           var unqualifiedPositionStock = $("input[name='unqualifiedPositionStock']").val();
           var expirationDate = $("input[name='expirationDate']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var origin = $("input[name='origin']").val();
           var entrustedManufacturer = $("input[name='entrustedManufacturer']").val();
           var supplierName = $("input[name='supplierName']").val();
           var retailPrice = $("input[name='retailPrice']").val();
           var memberPrice = $("input[name='memberPrice']").val();
           var dispensedPrice = $("input[name='dispensedPrice']").val();
           var costPrice = $("input[name='costPrice']").val();
           var costAmount = $("input[name='costAmount']").val();
           var salesAttribute = $("input[name='salesAttribute']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcknmdkcstoreproductstock/sKcKnMdkcStoreproductstockAdd",
            data : {
                "storeShortName": storeShortName,
                "productCode": productCode,
                "productName": productName,
                "productionBatchNumber": productionBatchNumber,
                "batch": batch,
                "unit": unit,
                "stockQuantity": stockQuantity,
                "medicalInsuranceStock": medicalInsuranceStock,
                "medicalInsuranceLockedStock": medicalInsuranceLockedStock,
                "pharmacyStock": pharmacyStock,
                "pharmacyLockedStock": pharmacyLockedStock,
                "warehouseArea": warehouseArea,
                "pendingOutboundQuantity": pendingOutboundQuantity,
                "qualifiedPositionCode": qualifiedPositionCode,
                "qualifiedPositionStock": qualifiedPositionStock,
                "qualifiedPositionDispensedStock": qualifiedPositionDispensedStock,
                "pendingAcceptancePositionCode": pendingAcceptancePositionCode,
                "pendingAcceptancePositionStock": pendingAcceptancePositionStock,
                "unqualifiedPositionCode": unqualifiedPositionCode,
                "unqualifiedPositionStock": unqualifiedPositionStock,
                "expirationDate": expirationDate,
                "manufacturer": manufacturer,
                "origin": origin,
                "entrustedManufacturer": entrustedManufacturer,
                "supplierName": supplierName,
                "retailPrice": retailPrice,
                "memberPrice": memberPrice,
                "dispensedPrice": dispensedPrice,
                "costPrice": costPrice,
                "costAmount": costAmount,
                "salesAttribute": salesAttribute,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
