Browse Source

(客户端-批发商)复制花材,去除无用的字段

shizhongqi 4 years ago
parent
commit
1578f048bf
1 changed files with 9 additions and 0 deletions
  1. 9 0
      app-ghs/controllers/ProductController.php

+ 9 - 0
app-ghs/controllers/ProductController.php

@@ -684,6 +684,15 @@ class ProductController extends BaseController
         $cost = bcsub($price, $addPrice, 2);
         $post['cost'] = $cost;
         $post['copy'] = 1; //复制标识
+
+        //去除无用的字段
+        unset($post['stock']); //库存去掉
+        unset($post['viewNum']);
+        unset($post['actualSold']);
+        unset($post['itemId']);
+        unset($post['id']);
+        unset($post['delStatus']);
+
         ProductClass::addProduct($post);
         util::complete('复制成功');
     }