wugg 2 years ago
parent
commit
d39bebb548
1 changed files with 11 additions and 1 deletions
  1. 11 1
      app/admin/controller/Reorder.php

+ 11 - 1
app/admin/controller/Reorder.php

@@ -209,6 +209,17 @@ class Reorder extends \app\BaseController
             $customerinfo = Db::name("customer_info")->where(['companyNo'=>$orderinfo['customer_code']])->find();
             $info['customer_name'] = isset($customerinfo['companyName']) ? $customerinfo['companyName']:"";
         }
+        $info['supplierNo'] = isset($orderinfo['supplierNo'])?$orderinfo['supplierNo']:'';
+        $info['supplier_name']='';
+        if(isset($orderinfo['supplierNo'])&&$orderinfo['supplierNo']!=''){
+            $customerinfo = Db::name("business")->where(['companyNo'=>$orderinfo['supplierNo']])->find();
+            $info['supplier_name'] = isset($customerinfo['company']) ? $customerinfo['company']:"";
+        }
+        $info['platform_name']='';
+        if($info['platform_id']!=0){
+            $plat=Db::name("platform")->where(['id'=>$info['platform_id']])->find();
+            $info['platform_name']=isset($plat['platform_name'])?$plat['platform_name']:"";
+        }
         $info['cgd_wsend']="";
         $info['cgd_send']="";
         $info['cgd_total']="";
@@ -243,7 +254,6 @@ class Reorder extends \app\BaseController
                 $send = Db::name("order_out")->where(["wsm_code" => $value['wsm_code'], 'orderCode' => $info['orderCode']])->sum("send_num");
                 $value['wsm_send'] = $send ?? 0;
                 $value['wsm_wsend'] = $value['wsm_total'] - $value['wsm_send'];
-
                 $wsm[]=$value;
             }
         }