rabin hace 3 años
padre
commit
813221f3e1
Se han modificado 3 ficheros con 13 adiciones y 6 borrados
  1. 3 3
      app/shop/database/sell_order.php
  2. 4 1
      app/shop/lib/Manage.php
  3. 6 2
      app/shop/lib/Sell.php

+ 3 - 3
app/shop/database/sell_order.php

@@ -117,9 +117,9 @@ if ($search_option_shop_type == 1) {
 }
 $mul = false;
 if (Dever::load('manage/auth')->checkFunc('menu_61.menu_85', 'piliangfafang', '批量收货')) {
-    $mul = '{status} == 4 && {shop_type} == 2';
+    $mul = '({status} == 4 || {status} == 2) && {shop_type} == 2';
 } elseif (Dever::load('manage/auth')->checkFunc('menu_61.menu_218', 'piliangfafang', '批量收货')) {
-    $mul = '{status} == 4 && {shop_type} == 2';
+    $mul = '({status} == 4 || {status} == 2) && {shop_type} == 2';
 }
 return array
 (
@@ -596,7 +596,7 @@ return array
             'list'      => true,
             'list_order' => 14,
             'mul'   => true,
-            'mul_option' => array(2 => '批量审核', 5 => '确认收货'),
+            'mul_option' => array(3 => '批量审核', 5 => '确认收货'),
         ),
 
         'audit'        => array

+ 4 - 1
app/shop/lib/Manage.php

@@ -335,11 +335,14 @@ class Manage
                         $id = $v;
                         $info = Dever::db('shop/sell_order')->one($id);
                     }
+                    if ($info['status'] != 4) {
+                        Dever::alert($info['order_num'] . '该订单无法确认收货');
+                    }
                     $info['status'] = 4;
                     Dever::load('shop/lib/sell')->finish($info, $info['shop_id']);
                 }
             }
-        } elseif ($status == 2) {
+        } elseif ($status == 3) {
             # 批量审核
             $list = explode(',', $id);
             if ($list) {

+ 6 - 2
app/shop/lib/Sell.php

@@ -2218,8 +2218,12 @@ class Sell
     {
         $order = Dever::db('shop/sell_order')->find($order_id);
 
-        if (!$order || ($order && $order['status'] != 2)) {
-            Dever::alert('当前订单状态无法拆单');
+        if (!$order) {
+            Dever::alert('订单不存在');
+        }
+
+        if ($order && $order['status'] != 2) {
+            Dever::alert($order['order_num'] . '当前订单状态无法拆单');
         }
 
         if ($order['shop_type'] != 2) {