xiaoyong931011
2023-08-16 1e56643468a59f9ebacfbc6235bb6e717bfb71da
src/main/resources/templates/febs/views/goods/goodsUpdateNew.html
@@ -48,6 +48,15 @@
                                            </div>
                                        </div>
                                        <div class="layui-col-lg6 layui-form-item">
                                            <label class="layui-form-label">父类:</label>
                                            <div class="layui-input-inline">
                                                <select name="categoryId" class="categary-update-category" id="categarySelect">
                                                    <option value="">请选择</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">商品介绍:</label>
                                            <div class="layui-input-block">
@@ -239,6 +248,20 @@
            })
        }
        //(下拉框)
        $.get(ctx + 'admin/goods/categorys/tree', function (data) {
            for (var k in data)
            {
                $(".categary-update-category").append("<option value='" + data[k].parentId + "'>" + data[k].name + "</option>");
            }
            layui.use('form', function () {
                var form = layui.form;
                $("#categarySelect").val(goodsInfo.categoryId)
                form.render();
            });
        });
        initGoodsValue();
        function initGoodsValue() {
            form.val("goods-update-form", {
@@ -246,6 +269,7 @@
                "goodsName": goodsInfo.goodsName,
                "goodsNo": goodsInfo.goodsNo,
                "volume": goodsInfo.volume,
                "categoryId": goodsInfo.categoryId,
                "goodsParameter": goodsInfo.goodsParameter,
                "goodsIntrodution": goodsInfo.goodsIntrodution,
                "originalPrice": goodsInfo.originalPrice,