Преглед изворни кода

Merge branch 'master' into dev

shish пре 8 месеци
родитељ
комит
996c83330e

+ 0 - 29
app-ghs/controllers/OrderController.php

@@ -64,35 +64,6 @@ class OrderController extends BaseController
         util::complete('打印成功');
     }
 
-    //复核 ssh 20241001
-    public function actionModifyReCheck()
-    {
-        $get = Yii::$app->request->get();
-        $id = $get['id'] ?? '';
-        $order = OrderClass::getById($id, true);
-        if (empty($order)) {
-            util::fail('没有找到订单');
-        }
-        if ($order->mainId != $this->mainId) {
-            util::fail('不是你的订单');
-        }
-        if ($order->reCheck == 1) {
-            util::fail('不需要重复操作');
-        }
-        $connection = Yii::$app->db;
-        $transaction = $connection->beginTransaction();
-        try {
-            $order->reCheck = 1;
-            $order->save();
-            $transaction->commit();
-            util::complete();
-        } catch (\Exception $e) {
-            $transaction->rollBack();
-            Yii::error("操作失败原因:" . $e->getMessage());
-            util::fail('操作失败');
-        }
-    }
-
     //修改平账标识状态 ssh 20240405
     public function actionModifyClearSign()
     {

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

@@ -36,6 +36,24 @@ class ProductController extends BaseController
 
     public $guestAccess = ['index'];
 
+    //修改平均成本 ssh 2025114
+    public function actionModifyAvCost()
+    {
+        $get = Yii::$app->request->get();
+        $id = $get['id'] ?? 0;
+        $amount = $get['amount'] ?? 0;
+        $product = ProductClass::getById($id, true);
+        if (empty($info)) {
+            util::fail('没有找到花材');
+        }
+        if ($product->mainId != $this->mainId) {
+            util::fail('不是你的花材');
+        }
+        $product->avCost = $amount;
+        $product->save();
+        util::complete('修改成功');
+    }
+
     //修改路上库存 ssh 20231219
     public function actionModifyOnStock()
     {

+ 1 - 0
app-hd/controllers/OrderController.php

@@ -638,6 +638,7 @@ class OrderController extends BaseController
         if (empty($productList) && empty($groupId)) {
             //商家手机上开单并生成制作单
             if (!empty($post['unitGoodsPrice'])) {
+                util::fail('此功能停用,有需要请联系管理员');
                 $unitGoodsPrice = $post['unitGoodsPrice'];
                 if (!is_numeric($unitGoodsPrice)) {
                     util::fail('请输入正确的单价');