Procházet zdrojové kódy

查审核人信息

moonsflyer před 9 měsíci
rodič
revize
592a246193

+ 1 - 1
app/adminapi/lists/asset/AssetLeaseLists.php

@@ -326,7 +326,7 @@ class AssetLeaseLists extends BaseAdminDataLists implements ListsSearchInterface
      */
     public static function detail($params) : array
     {
-        return AssetLeaseInfo::with('asset')->findOrEmpty($params['id'])->append(['first_status_desc','second_status_desc'])->toArray();
+        return AssetLeaseInfo::with(['asset','firstapproval','endapproval'])->findOrEmpty($params['id'])->append(['first_status_desc','second_status_desc'])->toArray();
     }
 
     /**

+ 24 - 0
app/common/model/asset/AssetLeaseInfo.php

@@ -50,6 +50,30 @@ class AssetLeaseInfo extends BaseModel
         return $this->hasOne(Admin::class, 'id', 'referee_uid')
             ->field('id,name');
     }
+
+    /**
+     * @notes 关联管理员表
+     * @return \think\model\relation\HasOne
+     * @author 令狐冲
+     * @date 2021/7/5 14:39
+     */
+    public function firstapproval()
+    {
+        return $this->hasOne(Admin::class, 'id', 'first_uid')
+            ->field('id,name');
+    }
+
+    /**
+     * @notes 关联管理员表
+     * @return \think\model\relation\HasOne
+     * @author 令狐冲
+     * @date 2021/7/5 14:39
+     */
+    public function endapproval()
+    {
+        return $this->hasOne(Admin::class, 'id', 'second_uid')
+            ->field('id,name');
+    }
     /**
      * @notes 关联管理员表
      * @return \think\model\relation\HasOne