Kaynağa Gözat

请输入正确的单价

shish 4 yıl önce
ebeveyn
işleme
0f0c297385
1 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  1. 8 0
      app-hd/controllers/OrderController.php

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

@@ -392,12 +392,20 @@ class OrderController extends BaseController
         if (empty($productList) && empty($groupId)) {
             //商家手机上开单并生成制作单
             if (isset($post['unitGoodsPrice']) && !empty($post['unitGoodsPrice'])) {
+                $unitGoodsPrice = $post['unitGoodsPrice'];
+                if (is_numeric($unitGoodsPrice) == false) {
+                    util::fail('请输入正确的单价');
+                }
                 $productList = GoodsClass::kdWorkGoods($post);
             }
         }
 
         if (empty($productList) && empty($groupId)) {
             if (isset($post['lsGoodsPrice']) == false || $post['lsGoodsPrice'] <= 0) {
+                $lsGoodsPrice = $post['lsGoodsPrice'];
+                if (is_numeric($lsGoodsPrice) == false) {
+                    util::fail('请输入正确的金额');
+                }
                 util::fail('请填写金额或选商品');
             }
         }