shish 2 лет назад
Родитель
Сommit
cec6cf4804
1 измененных файлов с 12 добавлено и 2 удалено
  1. 12 2
      app-ghs/controllers/ProductController.php

+ 12 - 2
app-ghs/controllers/ProductController.php

@@ -1128,7 +1128,7 @@ class ProductController extends BaseController
         $ptItemId = $respond['itemId'] ?? 0;
         $ptItemInfo = PtItemClass::getById($ptItemId);
         $respond['ptItemInfo'] = $ptItemInfo;
-
+        //通知提醒抹除
         if ($source == 'notify' && $respond['mainId'] == $this->mainId) {
             $staff = $this->shopAdmin;
             $staffId = $this->shopAdminId;
@@ -1146,7 +1146,17 @@ class ProductController extends BaseController
                 }
             }
         }
-
+        //重复花材
+        $repeatList = ProductClass::getAllByCondition(['mainId' => $this->mainId, 'itemId' => $ptItemId], null, '*', null, true);
+        $repeatId = 0;
+        if (!empty($repeatList)) {
+            foreach ($repeatList as $repeat) {
+                if ($repeat->id != $id) {
+                    $repeatId = $repeat->id;
+                }
+            }
+        }
+        $respond['repeatId'] = $repeatId;
         util::success($respond);
     }