Parcourir la source

查看租赁详情

moonsflyer il y a 9 mois
Parent
commit
7437cc4df0

+ 3 - 15
app/adminapi/controller/asset/AssetLeaseController.php

@@ -77,29 +77,17 @@ class AssetLeaseController extends BaseAdminController
         return $this->fail(AssetLeaseLists::getError());
     }
 
-    /**
-     * @notes  删除资讯
-     * @return \think\response\Json
-     * @author heshihu
-     * @date 2022/2/22 10:17
-     */
-    public function delete()
-    {
-        $params = (new AssetValidate())->post()->goCheck('delete');
-        AssetLists::delete($params);
-        return $this->success('删除成功', [], 1, 1);
-    }
 
     /**
-     * @notes  资产详情
+     * @notes  租赁详情
      * @return \think\response\Json
      * @author heshihu
      * @date 2022/2/22 10:15
      */
     public function detail()
     {
-        $params = (new AssetValidate())->goCheck('detail');
-        $result = AssetLists::detail($params);
+        $params = (new AssetLeaseValidate())->goCheck('detail');
+        $result = AssetLeaseLists::detail($params);
         return $this->data($result);
     }
 

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

@@ -151,7 +151,7 @@ class AssetLeaseLists extends BaseAdminDataLists implements ListsSearchInterface
     }
 
     /**
-     * @notes  编辑资产
+     * @notes  编辑租赁信息资产
      * @param array $params
      * @return bool
      * @author heshihu
@@ -222,6 +222,6 @@ class AssetLeaseLists extends BaseAdminDataLists implements ListsSearchInterface
      */
     public static function detail($params) : array
     {
-        return AssetInfo::findOrEmpty($params['id'])->append(['status_desc','lease_status_desc'])->toArray();
+        return AssetLeaseInfo::with('asset')->findOrEmpty($params['id'])->append(['first_status_desc','second_status_desc'])->toArray();
     }
 }

+ 1 - 1
app/adminapi/validate/asset/AssetLeaseValidate.php

@@ -40,7 +40,7 @@ class AssetLeaseValidate extends BaseValidate
     ];
 
     protected $message = [
-        'id.require' => '资产id必传',
+        'id.require' => '租赁资产信息id必传',
         'tenant_name.require' => '租赁人姓名必传!',
         'tenant_name.length' => '资产名称长度须在1-50位字符',
         'tenant_mobile.require' => '租赁人联系方式必传!',

+ 0 - 1
app/common/model/article/ArticleCollect.php

@@ -29,7 +29,6 @@ class ArticleCollect extends BaseModel
 
     protected $deleteTime = 'delete_time';
 
-
     /**
      * @notes 是否已收藏文章
      * @param $userId