dever 3 年之前
父节点
当前提交
116707486a
共有 1 个文件被更改,包括 46 次插入0 次删除
  1. 46 0
      app/shop/lib/Sell.php

+ 46 - 0
app/shop/lib/Sell.php

@@ -1422,6 +1422,52 @@ class Sell
             }
             }
         }
         }
 
 
+        $info['ps_info'] = Dever::db('shop/sell_order_ps')->find(array('order_id' => $info['id']));
+        if ($info['ps_info']) {
+            $info['ps_info']['service'] = Dever::array_decode($info['ps_info']['service']);
+            $info['ps_info']['cdate'] = date('Y-m-d H:i', $info['ps_info']['cdate']);
+            if ($info['ps_info']['qs_date']) {
+                $info['ps_info']['qs_date'] = date('Y-m-d H:i', $info['ps_info']['qs_date']);
+            } else {
+                $info['ps_info']['qs_date'] = '无';
+            }
+
+            $status = Dever::db('shop/sell_order_ps')->config['status'];
+            $info['ps_info']['status_name'] = $status[$info['ps_info']['status']];
+            
+            $service = array();
+            if ($info['ps_info']['service']) {
+                foreach ($info['ps_info']['service'] as $k => $v) {
+                    $info['ps_info']['service'][$k]['service_name'] = '商家自送';
+                    if ($v['service_id'] > 0) {
+                        $service_info = Dever::db('shop/service')->find($v['service_id']);
+                        $info['ps_info']['service'][$k]['service_name'] = $service_info['name'];
+                    }
+
+                    $service[] = array
+                    (
+                        array('名称', $info['ps_info']['service'][$k]['service_name']),
+                        array('单号', $v['order_num']),
+                    );
+                }
+            }
+
+            $result['物流信息'] = array
+            (
+                'type' => 'info',
+                'content' => array
+                (
+                    array
+                    (
+                        array('发货时间', $info['ps_info']['cdate']),
+                        array('收货时间', $info['ps_info']['qs_date']),
+                        array('查单', '<a href="https://www.kuaidi100.com/?from=openv" target="_blank">点此手动查单</a>'),
+                    ),
+                ),
+            );
+            $result['物流信息']['content'] = array_merge($result['物流信息']['content'], $service);
+        }
+
 
 
         if (!$info['refund_cash']) {
         if (!$info['refund_cash']) {
             $info['refund_cash'] = 0;
             $info['refund_cash'] = 0;