Browse Source

fix:去掉商品的供应商

super-yimizi 1 month ago
parent
commit
a22a9edf65

+ 2 - 2
application/api/controller/inspection/Order.php

@@ -47,7 +47,7 @@ class Order extends Base
           // $order->append(['status_text']);
           // $order->append(['status_text']);
           // $order->hidden(explode(',', 'method,transactionid,updatetime,deletetime'));
           // $order->hidden(explode(',', 'method,transactionid,updatetime,deletetime'));
           // $order->expiretime = $order->expiretime - time();
           // $order->expiretime = $order->expiretime - time();
-          $order->order_status_text = OrderEnum::SHOW_INSPECTION_STATUS_TEXT_MAP[$order->order_status];
+          $order->order_status_text = OrderEnum::STATUS_TEXT_MAP[$order->order_status];
           $this->success('', $order);
           $this->success('', $order);
       }
       }
   
   
@@ -78,7 +78,7 @@ class Order extends Base
              // $item->append(['order_status_text']);
              // $item->append(['order_status_text']);
               $field = 'id,order_sn,amount,goods_price,order_amount,express_name,express_no,order_goods,order_status_text,order_status';
               $field = 'id,order_sn,amount,goods_price,order_amount,express_name,express_no,order_goods,order_status_text,order_status';
               $item->visible(explode(',', $field));
               $item->visible(explode(',', $field));
-              $item->order_status_text = OrderEnum::SHOW_INSPECTION_STATUS_TEXT_MAP[$item->order_status];
+              $item->order_status_text = OrderEnum::STATUS_TEXT_MAP[$item->order_status];
           }
           }
           $this->success('获取成功', $list);
           $this->success('获取成功', $list);
       }
       }

+ 1 - 14
application/common/Enum/OrderEnum.php

@@ -183,6 +183,7 @@ class OrderEnum
         ],
         ],
     ];
     ];
 
 
+    // 验货端 前端传的参数
     const SHOW_INSPECTION_TYPE_STATUS_MAP = [
     const SHOW_INSPECTION_TYPE_STATUS_MAP = [
         self::SHOW_TYPE_WAIT_PAY => [self::STATUS_CREATE],
         self::SHOW_TYPE_WAIT_PAY => [self::STATUS_CREATE],
         self::SHOW_TYPE_WAIT_DELIVERY => [self::STATUS_INSPECTION_PASS],
         self::SHOW_TYPE_WAIT_DELIVERY => [self::STATUS_INSPECTION_PASS],
@@ -190,19 +191,5 @@ class OrderEnum
         self::SHOW_TYPE_WAIT_COMMENT => [self::STATUS_CONFIRM],
         self::SHOW_TYPE_WAIT_COMMENT => [self::STATUS_CONFIRM],
     ];
     ];
 
 
-    const SHOW_INSPECTION_STATUS_TEXT_MAP = [
-        self::STATUS_CREATE => '未付款',
-        self::STATUS_CANCEL => "已取消",
-        self::STATUS_AUTO_CANCEL => "已取消(系统)",
-        self::STATUS_ADMIN_CANCEL => "已取消(管理员)",
-        self::STATUS_PAY => "待验货",
-        self::STATUS_INSPECTION_PASS => "验货通过",
-        self::STATUS_INSPECTION_FAIL => "验货不通过",      
-        self::STATUS_SHIP => "待收货",
-        self::STATUS_CONFIRM => "已完成",
-        self::STATUS_AUTO_CONFIRM => "已收货(系统)",
-        self::STATUS_COMMENT => "已评价",
-    ];
-
 
 
 }
 }

+ 1 - 2
application/common/Service/OrderService.php

@@ -209,7 +209,6 @@ class OrderService
                 // 添加分类和品牌信息用于优惠券计算 (临时字段,不会保存到数据库)
                 // 添加分类和品牌信息用于优惠券计算 (临时字段,不会保存到数据库)
                 // 'category_id'          => $item->goods->category_ids,
                 // 'category_id'          => $item->goods->category_ids,
                 'brand_id'             => $item->goods->brand_id,
                 'brand_id'             => $item->goods->brand_id,
-                'supplier_id'          => $item->goods->supplier_id,
             ];
             ];
             
             
             $orderItem[] = $orderItemData;
             $orderItem[] = $orderItemData;
@@ -288,7 +287,7 @@ class OrderService
         // 订单主表信息 (基于新表结构)
         // 订单主表信息 (基于新表结构)
         $orderInfo = [
         $orderInfo = [
             'type'                 => 1, // 1:普通订单
             'type'                 => 1, // 1:普通订单
-            'source'               => 'H5', // 订单来源 (暂定H5,可根据实际情况调整)
+            'source'               => request()->header('platform', 'H5'), // 订单来源 (暂定H5,可根据实际情况调整)
             'order_sn'             => $orderSn,
             'order_sn'             => $orderSn,
             'user_id'              => $userId,
             'user_id'              => $userId,
             'amount'               => 0, // 订单应付金额
             'amount'               => 0, // 订单应付金额

+ 1 - 2
application/common/service/OrderService.php

@@ -209,7 +209,6 @@ class OrderService
                 // 添加分类和品牌信息用于优惠券计算 (临时字段,不会保存到数据库)
                 // 添加分类和品牌信息用于优惠券计算 (临时字段,不会保存到数据库)
                 // 'category_id'          => $item->goods->category_ids,
                 // 'category_id'          => $item->goods->category_ids,
                 'brand_id'             => $item->goods->brand_id,
                 'brand_id'             => $item->goods->brand_id,
-                'supplier_id'          => $item->goods->supplier_id,
             ];
             ];
             
             
             $orderItem[] = $orderItemData;
             $orderItem[] = $orderItemData;
@@ -288,7 +287,7 @@ class OrderService
         // 订单主表信息 (基于新表结构)
         // 订单主表信息 (基于新表结构)
         $orderInfo = [
         $orderInfo = [
             'type'                 => 1, // 1:普通订单
             'type'                 => 1, // 1:普通订单
-            'source'               => 'H5', // 订单来源 (暂定H5,可根据实际情况调整)
+            'source'               => request()->header('platform', 'H5'), // 订单来源 (暂定H5,可根据实际情况调整)
             'order_sn'             => $orderSn,
             'order_sn'             => $orderSn,
             'user_id'              => $userId,
             'user_id'              => $userId,
             'amount'               => 0, // 订单应付金额
             'amount'               => 0, // 订单应付金额