Ver código fonte

修改删除客户和供货商

shish 7 meses atrás
pai
commit
031795f0ce

+ 1 - 8
app-ghs/controllers/CustomController.php

@@ -1217,15 +1217,8 @@ class CustomController extends BaseController
         $delStatus = $get['delStatus'] ?? 0;
         $custom = CustomClass::getById($customId, true);
         CustomClass::valid($custom, $this->shopId);
-        $ghsId = $custom->ghsId ?? 0;
-        $ghs = GhsClass::getById($ghsId, true);
-        if (empty($ghs)) {
-            util::fail('客户信息有缺失');
-        }
         $custom->delStatus = $delStatus;
         $custom->save();
-        $ghs->delStatus = $delStatus;
-        $ghs->save();
         util::complete('删除成功');
     }
 
@@ -1269,7 +1262,7 @@ class CustomController extends BaseController
                 $buyAmount = bcadd($buyAmount, $order['actPrice'], 2);
             }
         }
-        
+
         $custom->buyAmount = $buyAmount;
         $custom->save();
 

+ 0 - 4
app-hd/controllers/GhsController.php

@@ -142,10 +142,6 @@ class GhsController extends BaseController
         }
         $ghs->delStatus = $delStatus;
         $ghs->save();
-        $customId = $ghs->customId ?? 0;
-        $custom = CustomClass::getById($customId, true);
-        $custom->delStatus = $delStatus;
-        $custom->save();
         util::complete('操作成功');
     }