wugg 2 years ago
parent
commit
a3d6c5dda4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/admin/controller/CatPlat.php

+ 1 - 1
app/admin/controller/CatPlat.php

@@ -264,7 +264,7 @@ use think\App;class CatPlat extends Base{
             if ($good['is_stock'] == 0) return error_show(1010, "起订量不足{$nakelist['min_num']}");
         }
         $catinfo = Db::name("cat_plat")->where(["cat_id"=>$good['cat_id'],"is_del"=>0,"platform_id"=>$platid])->find();
-        if ($catinfo==false)  return error_show(1005,"分类未设置平台毛利率");
+        if ($catinfo==false || $catinfo['sale_rate']==0)  return error_show(1005,"分类未设置平台毛利率");
         $budget = isset($catinfo['sale_rate']) ? $catinfo['sale_rate']/100:0;
         $top_cat_id = made($catinfo['cat_id']);//获取所有分类
         $top_cat_id = isset($top_cat_id[0]['id']) ? $top_cat_id[0]['id'] : 0;//获取顶级分类id