From 1e56643468a59f9ebacfbc6235bb6e717bfb71da Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 16 Aug 2023 11:24:13 +0800
Subject: [PATCH] 后台修改

---
 src/main/resources/templates/febs/views/goods/goodsUpdateNew.html |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/templates/febs/views/goods/goodsUpdateNew.html b/src/main/resources/templates/febs/views/goods/goodsUpdateNew.html
index 5621422..a896684 100644
--- a/src/main/resources/templates/febs/views/goods/goodsUpdateNew.html
+++ b/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,

--
Gitblit v1.9.1