shish 1 سال پیش
والد
کامیت
ec910d17c4
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      app-ghs/controllers/OrderController.php

+ 6 - 4
app-ghs/controllers/OrderController.php

@@ -897,11 +897,13 @@ class OrderController extends BaseController
             util::fail('请选择客户');
             util::fail('请选择客户');
         }
         }
 
 
-        $actPrice = $post['actPrice'] ?? 0;
+        $modifyPrice = $post['modifyPrice'] ?? 0;
         $pattern = '/^\d+(\.\d{1,2})?$/';
         $pattern = '/^\d+(\.\d{1,2})?$/';
-        if (preg_match($pattern, $actPrice) == false) {
-            //容错前端
-            util::fail('金额不能超2位小数');
+        if ($modifyPrice > 0) {
+            if (preg_match($pattern, $modifyPrice) == false) {
+                //容错前端
+                util::fail('金额不能超2位小数');
+            }
         }
         }
 
 
         $custom = CustomClass::getCustom($customId);
         $custom = CustomClass::getCustom($customId);