wufeng 2 years ago
parent
commit
96a7ca69d7
1 changed files with 15 additions and 15 deletions
  1. 15 15
      app/admin/controller/After.php

+ 15 - 15
app/admin/controller/After.php

@@ -1244,7 +1244,7 @@ class After extends Base
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      */
-    private function createSaleNotZixun(int $orid=0,string $spuCode = '', array $info = [], array $old_sale = [], int $rm = 0, string $ri = '', array $old_out = [], string $token = '')
+    private function createSaleNotZixun(int $orid = 0, string $spuCode = '', array $info = [], array $old_sale = [], int $rm = 0, string $ri = '', array $old_out = [], string $token = '')
     {
         $goodinfo = Db::name('good')
             ->alias('g')
@@ -1402,12 +1402,12 @@ class After extends Base
 //                "zxNo" => "",
 //                "platform_order" => $old_sale['platform_order'],
 //                "platform_id" => $old_sale['platform_id'],
-//                "remark" => $old_sale['remark'] . $old_sale['orderCode'],
+                "remark" => $old_sale['orderCode'],
 //                "is_stock" => $is_stock,
                 "is_activity" => $is_activity,
                 "activity_code" => $actcode,
 //                "order_type" => $is_stock == 1 ? 1 : 2,
-//                "order_source" => 1,//1直接下单
+//                "order_source" => 6,//6售后补换货
 //                "poNo"=>$poNo,
 //                'good_weight' => $ct['noble_weight'],
 //                'gold_price' => isset($ct['cgd_gold_price']) ? $ct['cgd_gold_price'] : 0,
@@ -1421,6 +1421,7 @@ class After extends Base
 //                'total_price' => round($sale_price * $good_num, 2),
 //                'proof_id' => $old_sale['proof_id'],
 //                'paytime' => $old_sale['paytime'],
+                'returnCode' => $info['returnCode'],
 
             ]);
 
@@ -1496,11 +1497,11 @@ class After extends Base
                 $old_out_addr_info = Db::name('order_out')
                     ->alias('oo')
                     ->field('oo.id,oa.addr,oa.addr_code,oa.contactor,oa.mobile,oa.customer_code,oa.post_fee,oa.arrive_time')
-                    ->leftJoin('order_addr oa','oa.id=oo.addrid')
-                    ->where(['oo.outCode'=>$info['outCode'],'oo.orderCode'=>$info['orderCode']])
+                    ->leftJoin('order_addr oa', 'oa.id=oo.addrid')
+                    ->where(['oo.outCode' => $info['outCode'], 'oo.orderCode' => $info['orderCode']])
                     ->find();
 
-                if(empty($old_out_addr_info)) throw new Exception('发货单对应的地址信息查不到');
+                if (empty($old_out_addr_info)) throw new Exception('发货单对应的地址信息查不到');
 
                 $temp = [
                     'orderCode' => $orderCode,
@@ -1509,7 +1510,7 @@ class After extends Base
                     'contactor' => $old_out_addr_info['contactor'],
                     'mobile' => $old_out_addr_info['mobile'],
                     'customer_code' => $old_out_addr_info['customer_code'],
-                    'receipt_quantity'=>$good_num,
+                    'receipt_quantity' => $good_num,
                     'arrive_time' => $old_out_addr_info['arrive_time'],
                     'addtime' => date("Y-m-d H:i:s"),
                     'updatetime' => date("Y-m-d H:i:s"),
@@ -1590,7 +1591,6 @@ class After extends Base
     }
 
 
-
     /**
      * 咨询类商品处理
      * @param int $orid 对应售后记录的id
@@ -1600,12 +1600,12 @@ class After extends Base
      * @param int $rm 操作人id
      * @param string $ri 操作人名称
      * @param int $addrid 原始发货单的地址id
-     * @param string $token  当前用户的token
+     * @param string $token 当前用户的token
      * @throws \think\db\exception\DataNotFoundException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      */
-    private function createSaleZixun(int $orid=0,string $spuCode = '', array $info = [], array $old_sale = [], int $rm = 0, string $ri = '', int $addrid = 0, string $token = '')
+    private function createSaleZixun(int $orid = 0, string $spuCode = '', array $info = [], array $old_sale = [], int $rm = 0, string $ri = '', int $addrid = 0, string $token = '')
     {
 //        $bidNo =isset($this->post['bidNo'])&&$this->post['bidNo']!="" ?  trim($this->post['bidNo']):"";
 //        if($bidNo==""){
@@ -1671,7 +1671,7 @@ class After extends Base
             "orderCode" => $orderCode,
 //            "good_name"=>$zxinfo['good_name'],
             "sale_price" => $old_cgd['good_price'],//采购单价格不为0,取原采购单的价格
-            "total_fee"=>round($old_cgd['good_price']* $good_num, 2),
+            "total_fee" => round($old_cgd['good_price'] * $good_num, 2),
 //            "pakge_fee"=>$zxinfo['pakge_fee'],
 //            "cert_fee"=>$zxinfo['cert_fee'],
 //            "open_fee"=>$zxinfo['open_fee'],
@@ -1902,11 +1902,11 @@ class After extends Base
                 $old_out_addr_info = Db::name('order_out')
                     ->alias('oo')
                     ->field('oo.id,oa.addr,oa.addr_code,oa.contactor,oa.mobile,oa.customer_code,oa.post_fee,oa.arrive_time')
-                    ->leftJoin('order_addr oa','oa.id=oo.addrid')
-                    ->where(['oo.outCode'=>$info['outCode'],'oo.orderCode'=>$info['orderCode']])
+                    ->leftJoin('order_addr oa', 'oa.id=oo.addrid')
+                    ->where(['oo.outCode' => $info['outCode'], 'oo.orderCode' => $info['orderCode']])
                     ->find();
 
-                if(empty($old_out_addr_info)) throw new Exception('发货单对应的地址信息查不到');
+                if (empty($old_out_addr_info)) throw new Exception('发货单对应的地址信息查不到');
 
                 $temp = [
                     'orderCode' => $orderCode,
@@ -1915,7 +1915,7 @@ class After extends Base
                     'contactor' => $old_out_addr_info['contactor'],
                     'mobile' => $old_out_addr_info['mobile'],
                     'customer_code' => $old_out_addr_info['customer_code'],
-                    'receipt_quantity'=>$good_num,
+                    'receipt_quantity' => $good_num,
                     'arrive_time' => $old_out_addr_info['arrive_time'],
                     'addtime' => date("Y-m-d H:i:s"),
                     'updatetime' => date("Y-m-d H:i:s"),