<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:include="include :: header('修改商品规格')"/>
    <th:block th:include="include :: select2-css"/>
</head>

<body>

<div class="main-content">
    <form class="form-horizontal" id="form-goods-edit" th:object="${goodsStandardList}">
        <!-- 遍历goodsStandardList -->
        <th:block th:each="goodsStandard : ${goodsStandardList}" th:key="${goodsStandard.goodsStandardId}">
            <div class="row">
                <input id="goodsId" name="goodsId" type="hidden" th:field="*{goodsStandard.goodsId}"/>
                <div class="form-group"  th:each="goodsStandard : ${goodsStandardList}">
                    <label class="col-sm-2 control-label">规格名称</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="goodsStandardName"
                               th:field="*{goodsStandard.goodsStandardName}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">商品价格</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="goodsPrice"
                               th:field="*{goodsStandard.goodsPrice}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">优惠价</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="discountPrice"
                               th:field="*{goodsStandard.discountPrice}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">团购价</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="groupPrice"
                               th:field="*{goodsStandard.groupPrice}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">库存</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="goodsNum"
                               th:field="*{goodsStandard.goodsNum}"/>
                    </div>
                </div>
            </div>
        </th:block>

    </form>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>

<script type="text/javascript">
    const prefix = ctx + "goods/standard";

</script>
</body>
</html>