<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('门店库存查询信息表修改')" />
</head>
<style>

</style>
<script>

</script>
<body>
<div class="ui-layout-center">
    <form class="form-horizontal" id="form-SKcKnMdkcStoreproductstock-edit" th:object="${user}">
        <h4 class="form-header h4">基本信息</h4>
        <input type="hidden" id="id" name="id" th:value="${id}">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                    <label class="col-sm-1 control-label">门店简称:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="storeShortName" placeholder="门店简称" th:value="${storeShortName}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">商品编码:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="productCode" placeholder="商品编码" th:value="${productCode}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">商品名称:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="productName" placeholder="商品名称" th:value="${productName}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">生产批号:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="productionBatchNumber" placeholder="生产批号" th:value="${productionBatchNumber}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">批次:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="batch" placeholder="批次" th:value="${batch}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">单位:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="unit" placeholder="单位" th:value="${unit}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">库存数量:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="stockQuantity" placeholder="库存数量" th:value="${stockQuantity}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">医保库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="medicalInsuranceStock" placeholder="医保库存" th:value="${medicalInsuranceStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">医保锁定库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="medicalInsuranceLockedStock" placeholder="医保锁定库存" th:value="${medicalInsuranceLockedStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">门市库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="pharmacyStock" placeholder="门市库存" th:value="${pharmacyStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">门市锁定库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="pharmacyLockedStock" placeholder="门市锁定库存" th:value="${pharmacyLockedStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">库区:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="warehouseArea" placeholder="库区" th:value="${warehouseArea}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">待出库数量:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="pendingOutboundQuantity" placeholder="待出库数量" th:value="${pendingOutboundQuantity}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">合格品区货位编码:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="qualifiedPositionCode" placeholder="合格品区货位编码" th:value="${qualifiedPositionCode}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">合格品区库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="qualifiedPositionStock" placeholder="合格品区库存" th:value="${qualifiedPositionStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">合格品区拆零库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="qualifiedPositionDispensedStock" placeholder="合格品区拆零库存" th:value="${qualifiedPositionDispensedStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">待验收区货位编码:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="pendingAcceptancePositionCode" placeholder="待验收区货位编码" th:value="${pendingAcceptancePositionCode}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">待验收区库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="pendingAcceptancePositionStock" placeholder="待验收区库存" th:value="${pendingAcceptancePositionStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">不合格品区货位编码:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="unqualifiedPositionCode" placeholder="不合格品区货位编码" th:value="${unqualifiedPositionCode}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">不合格品区库存:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="unqualifiedPositionStock" placeholder="不合格品区库存" th:value="${unqualifiedPositionStock}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">有效期至:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="expirationDate" placeholder="有效期至" th:value="${expirationDate}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">生产厂家:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="manufacturer" placeholder="生产厂家" th:value="${manufacturer}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">产地:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="origin" placeholder="产地" th:value="${origin}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">委托厂家:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="entrustedManufacturer" placeholder="委托厂家" th:value="${entrustedManufacturer}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">供应商名称:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="supplierName" placeholder="供应商名称" th:value="${supplierName}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">零售价/元:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="retailPrice" placeholder="零售价/元" th:value="${retailPrice}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">会员价/元:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="memberPrice" placeholder="会员价/元" th:value="${memberPrice}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">拆零价/元:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="dispensedPrice" placeholder="拆零价/元" th:value="${dispensedPrice}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">成本价/元:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="costPrice" placeholder="成本价/元" th:value="${costPrice}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">成本金额/元:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="costAmount" placeholder="成本金额/元" th:value="${costAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">销售属性:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="salesAttribute" placeholder="销售属性" th:value="${salesAttribute}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </form>
</div>
<div class="main-content">
    <div class="col-sm-offset-5 col-sm-10">
        <!--<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>-->
    </div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>

<script>
    function edit() {
        var data = $("#form-SKcKnMdkcStoreproductstock-edit").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcknmdkcstoreproductstock/sKcKnMdkcStoreproductstockEdit",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }

    function submitHandler() {
        if ($.validate.form()) {
            edit();
        }
    }
</script>
