wuggemail@foxmail.com 3 months ago
parent
commit
af0fa6df0a
2 changed files with 4 additions and 4 deletions
  1. 1 1
      app/cxinv/controller/FinancialManager.php
  2. 3 3
      app/cxinv/model/FinancialCheck.php

+ 1 - 1
app/cxinv/controller/FinancialManager.php

@@ -324,7 +324,7 @@ class FinancialManager extends Base{
 
     public function CheckInfo(){
         $id = $this->request->param('id',0);
-        $info = FinancialCheck::where('id',$id)->findOrEmpty();
+        $info = FinancialCheck::with(['FinancialTz'=>['ProductTz'=>['Product']],'ProductCheck'=>['Product']])->where('id',$id)->findOrEmpty();
         if($info->isEmpty()) return error("数据不存在");
         return success("获取成功",$info);
     }

+ 3 - 3
app/cxinv/model/FinancialCheck.php

@@ -28,10 +28,10 @@ class FinancialCheck extends Base
         'create_time'  =>'datetime',//
     ];
     protected $createTime = 'create_time';
-    public function ManagerProduct(){
-        return $this->hasOne('ManagerProduct','code','code');
+    public function FinancialTz(){
+        return $this->hasOne(FinancialTz::class,'ktCode','code');
     }
     public function ProductCheck(){
-        return $this->hasOne('ProductCheck','checkCode','code');
+        return $this->hasOne(ProductCheck::class,'checkCode','code');
     }
 }