瀏覽代碼

美仓快递处理

lvhao 3 月之前
父節點
當前提交
dea9e34d18
共有 2 個文件被更改,包括 14 次插入10 次删除
  1. 6 2
      core/CoreApp/controllers/Fullorder.php
  2. 8 8
      core/CoreApp/models/Model_logic_order.php

+ 6 - 2
core/CoreApp/controllers/Fullorder.php

@@ -1018,9 +1018,13 @@ class Fullorder extends Start_Controller {
     			}
 			}
 			
-			if((($post['express'] == 2 || $post['express'] == 63 || $post['express'] == 64) && $post['type'] != 5) || ($post['express'] != 2 && $post['express'] != 63 && $post['express'] != 64 && $post['type'] == 5))
+			if((($post['express'] == 2 || $post['express'] == 63 || $post['express'] == 64) && $post['type'] != 5) )
 			{
-				echo json_encode(array('msg'=>'此快递方式不可从美仓发货!','success'=>false));exit;
+				echo json_encode(array('msg'=>'此快递方式必须从美仓发货!','success'=>false));exit;
+			}
+
+			if( ($post['express'] != 2 && $post['express'] != 63 && $post['express'] != 64 && $post['type'] == 5)){
+				echo json_encode(array('msg'=>'此快递方式不能美仓发货!','success'=>false));exit;
 			}
 			//减少代码复用吧
 			$lo_ret = $this->logic_order->checkEditExpress($post);

+ 8 - 8
core/CoreApp/models/Model_logic_order.php

@@ -217,14 +217,14 @@ class Model_logic_order extends Lin_Model {
 
         }
 
-        if(in_array($post['express'],[2,63,64])){
-            if($post['type'] != 5){
-                return [
-                    'code'=>-1,
-                    "msg"=>"此快递只发美仓!"
-                ];
-            }
-        }
+        // if(in_array($post['express'],[2,63,64])){
+        //     if($post['type'] != 5){
+        //         return [
+        //             'code'=>-1,
+        //             "msg"=>"此快递只发美仓!"
+        //         ];
+        //     }
+        // }
         return [
             'code'=>1,
             "msg"=>"ok"