Explorar el Código

Merge branch 'version1.5' into master-online

wugg hace 2 años
padre
commit
85ea629506
Se han modificado 2 ficheros con 12 adiciones y 2 borrados
  1. 1 1
      app/admin/controller/Purchin.php
  2. 11 1
      app/admin/controller/Reorder.php

+ 1 - 1
app/admin/controller/Purchin.php

@@ -259,7 +259,7 @@ class Purchin extends BaseController
             return error_show(1004,"新建失败");
         }catch (\Exception $e){
             Db::rollback();
-            return error_show(1004,$e->getMessage());
+            return error_show(1004, $e->getMessage() . '|' . $e->getFile() . '|' . $e->getLine());
         }
     }
 

+ 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;
             }
         }