浏览代码

Merge remote-tracking branch 'origin/master'

Panda 2 月之前
父节点
当前提交
5a827601ea

+ 2 - 0
application/admin/controller/shopro/Category.php

@@ -205,6 +205,7 @@ class Category extends Common
                     $category->parent_id = $data['parent_id'];
                     $category->image = $data['image'];
                     $category->description = $data['description'] ?? null;
+                    $category->bean_rate = $data['bean_rate'] ?? 0;
                     $category->status = $data['status'];
                     $category->weigh = $data['weigh'];
                     $category->save();
@@ -216,6 +217,7 @@ class Category extends Common
                     $category->parent_id = $data['parent_id'];
                     $category->image = $data['image'];
                     $category->description = $data['description'] ?? null;
+                    $category->bean_rate = $data['bean_rate'] ?? 0;
                     $category->status = $data['status'];
                     $category->weigh = $data['weigh'];
                     $category->save();

+ 2 - 2
application/admin/controller/shopro/goods/Goods.php

@@ -115,7 +115,7 @@ class Goods extends Common
         $params = $this->request->only([
             'type', 'title', 'subtitle', 'category_ids', 'image', 'images', 'image_wh', 'params',
             'original_price', 'price', 'is_sku', 'limit_type', 'limit_num', 'sales_show_type',
-            'stock_show_type', 'show_sales', 'service_ids', 'dispatch_type', 'dispatch_id', 'is_offline','yushou', 'status', 'weigh',
+            'stock_show_type', 'show_sales','bean_rate', 'service_ids', 'dispatch_type', 'dispatch_id', 'is_offline','yushou', 'status', 'weigh',
         ]);         // likes, views, sales,
         $params['content'] = $this->request->param('content', '', null);      // content 不经过全局过滤
         $this->svalidate($params, ".add");
@@ -183,7 +183,7 @@ class Goods extends Common
         $params = $this->request->only([
             'type', 'title', 'subtitle', 'image', 'images', 'image_wh', 'params',
             'original_price', 'price', 'is_sku', 'limit_type', 'limit_num', 'sales_show_type',
-            'stock_show_type', 'show_sales', 'service_ids', 'dispatch_type', 'dispatch_id', 'is_offline', 'yushou', 'status', 'weigh',
+            'stock_show_type', 'show_sales','bean_rate', 'service_ids', 'dispatch_type', 'dispatch_id', 'is_offline', 'yushou', 'status', 'weigh',
         ]);         // likes, views, sales,
         $this->request->has('content') && $params['content'] = $this->request->param('content', '', null);      // content 不经过全局过滤
         $this->svalidate($params);

+ 9 - 1
application/admin/view/shopro/category/add.html

@@ -106,7 +106,11 @@
     }
 
     .category-form .template-item.description {
-        width: 240px;
+        width: 120px;
+    }
+
+    .category-form .template-item.bean_rate {
+        width: 120px;
     }
 
     .category-form .template-item.weigh {
@@ -181,6 +185,7 @@
                             <div class="template-item input">分类名称</div>
                             <div class="template-item image sa-flex sa-row-center"> 分类图片 </div>
                             <div class="template-item description">描述</div>
+                            <div class="template-item bean_rate">善豆抵扣比例%</div>
                             <div class="template-item weigh">
                                 <el-popover placement="bottom" title="" width="120" trigger="hover">
                                     <template #reference> 排序 </template>
@@ -239,6 +244,9 @@
                                         <div class="template-item description">
                                             <el-input v-model="data.description" placeholder="请输入分类描述" />
                                         </div>
+                                        <div class="template-item bean_rate">
+                                            <el-input v-model="data.bean_rate" type="number" :min="0" placeholder="请输入比例" />
+                                        </div>
                                         <div class="template-item weigh">
                                             <el-input v-model="data.weigh" type="number" :min="0" placeholder="请输入排序" />
                                         </div>

+ 8 - 0
application/admin/view/shopro/goods/goods/add.html

@@ -751,6 +751,14 @@
                                 <div class="warning"> 可以提高商品的销量排行榜,鼓励用户下单 </div>
                             </div>
                         </el-form-item>
+                        <el-form-item label="善豆抵扣比例%">
+                            <div class="sa-form-wrap">
+                                <el-input class="sa-w-360" v-model="form.model.bean_rate" placeholder="请输入善豆抵扣比例"
+                                    type="number" :min="0">
+                                </el-input>
+                                <div class="warning"> 可以使用善豆抵扣订单中此商品单价的百分比 </div>
+                            </div>
+                        </el-form-item>
                         <template v-if="form.model.is_sku == 0">
                             <el-form-item label="商品重量">
                                 <el-input class="sa-w-360" v-model="form.model.weight" placeholder="请输入商品重量"