wugg 2 years ago
parent
commit
0e35f8c56e
1 changed files with 10 additions and 4 deletions
  1. 10 4
      app/admin/controller/Sale.php

+ 10 - 4
app/admin/controller/Sale.php

@@ -845,14 +845,14 @@ class Sale extends Base
         if ($zxinfo == false) {
             return error_show(1003, "未找到咨询单商品信息");
         }
-        if ($zxinfo['status'] != 6) {
-            return error_show(1003, "咨询单状态有误无法转单");
-        }
+//        if ($zxinfo['status'] != 6) {
+//            return error_show(1003, "咨询单状态有误无法转单");
+//        }
         $zx = Db::name("consult_info")->where(["infoNo" => $zxinfo['infoNo'], "is_del" => 0])->find();
         if ($zx == false) {
             return error_show(1003, "未找到咨询单信息");
         }
-        if ($zx['status'] != 4) {
+        if (in_array($zx['status'],[2,3])) {
             return error_show(1003, "咨询单状态有误无法转单");
         }
         $zxorder = Db::name("consult_order")->where(["zxNo" => $zx["zxNo"], "is_del" => 0])->find();
@@ -964,6 +964,12 @@ class Sale extends Base
                     return error_show(1003, "咨询单更新业务公司失败");
                 }
             }
+            $bidsup =[
+            	    "status"=>6,
+            	    "updatetime"=>datetime("Y-m-d H:i:s")
+			];
+            $updateinfp =Db::name("consult_bids")->where(["bidNo" => $bidNo, "is_del" => 0])->update($bidsup);
+            if($updateinfp==false) throw new Exception("反馈单转单失败");
 
             $data = [
                 "orderCode" => $orderCode,