From ae3cc70a00036a04fdbb36d911fa49f2f4947573 Mon Sep 17 00:00:00 2001 From: lanzu_qsy <334039090@qq.com> Date: Wed, 12 Aug 2020 16:23:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9C=8D=E5=8A=A1=E5=95=86?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=AF=A6=E6=83=85=E5=AD=97=E6=AE=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ImsCjdcMarketController.php | 32 +++++++++++++++---- .../Controllers/ImsCjdcStoreController.php | 1 - .../Controllers/LanzuMmInfoController.php | 28 ++++++++++++---- .../Controllers/LanzuMmWithdrawController.php | 20 ++++++++++-- .../Controllers/LanzuMpInfoController.php | 16 ++++++---- .../Controllers/LanzuMpWithdrawController.php | 18 +++++++++-- .../LanzuServiceSpeakerController.php | 18 +++++++++-- 7 files changed, 105 insertions(+), 28 deletions(-) diff --git a/app/Admin/Controllers/ImsCjdcMarketController.php b/app/Admin/Controllers/ImsCjdcMarketController.php index ea5b418..579a9f1 100644 --- a/app/Admin/Controllers/ImsCjdcMarketController.php +++ b/app/Admin/Controllers/ImsCjdcMarketController.php @@ -84,14 +84,13 @@ class ImsCjdcMarketController extends AdminController }); } - $show->id; $show->name; $show->logo->image(); $show->introduce; $show->imgs->image(); $show->addtime('创建时间'); $show->sort; - $show->status; + $show->status()->using([0=>'禁用',1=>'正常']); $show->coordinates; $show->remark; $show->address; @@ -99,13 +98,32 @@ class ImsCjdcMarketController extends AdminController $show->dn_poundage; $show->dm_poundage; $show->yd_poundage; - $show->dada_number; - $show->is_open_dada; $show->loudspeaker_imei; $show->dishes_menu_intro; - $show->create_time; - $show->created_at; - $show->updated_at; + $show->create_time->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); + $show->created_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); + $show->updated_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); }); } diff --git a/app/Admin/Controllers/ImsCjdcStoreController.php b/app/Admin/Controllers/ImsCjdcStoreController.php index 2bc861b..b82ba55 100644 --- a/app/Admin/Controllers/ImsCjdcStoreController.php +++ b/app/Admin/Controllers/ImsCjdcStoreController.php @@ -58,7 +58,6 @@ class ImsCjdcStoreController extends AdminController protected function detail($id) { return Show::make($id, new ImsCjdcStore(), function (Show $show) { - $show->id; $show->name; $show->tel; $show->is_rest; diff --git a/app/Admin/Controllers/LanzuMmInfoController.php b/app/Admin/Controllers/LanzuMmInfoController.php index e2f573f..e162b71 100644 --- a/app/Admin/Controllers/LanzuMmInfoController.php +++ b/app/Admin/Controllers/LanzuMmInfoController.php @@ -82,18 +82,32 @@ class LanzuMmInfoController extends AdminController protected function detail($id) { return Show::make($id, new LanzuMmInfo(), function (Show $show) { - $show->id; $show->name; $show->phone; - $show->market_id; + $show->market_id()->as(function ($id){ + $market = ImsCjdcMarket::find($id); + return $market->name; + }); $show->id_frond->image(); $show->id_back->image(); $show->id_number; - $show->admin_user_id; - $show->status; - $show->is_del; - $show->created_at; - $show->updated_at; + $show->status()->using([1=>'正常',0=>'禁用']); + $show->created_at()->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); + $show->updated_at()->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); }); } diff --git a/app/Admin/Controllers/LanzuMmWithdrawController.php b/app/Admin/Controllers/LanzuMmWithdrawController.php index dd15970..0b1c2d1 100644 --- a/app/Admin/Controllers/LanzuMmWithdrawController.php +++ b/app/Admin/Controllers/LanzuMmWithdrawController.php @@ -81,6 +81,8 @@ class LanzuMmWithdrawController extends AdminController $grid->disableEditButton(); $grid->disableDeleteButton(); } + $grid->disableDeleteButton(); + $grid->disableViewButton(); }); } @@ -98,8 +100,22 @@ class LanzuMmWithdrawController extends AdminController $show->mm_id; $show->money; $show->status; - $show->created_at; - $show->updated_at; + $show->created_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); + $show->updated_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); }); } diff --git a/app/Admin/Controllers/LanzuMpInfoController.php b/app/Admin/Controllers/LanzuMpInfoController.php index e9b5770..41fc129 100644 --- a/app/Admin/Controllers/LanzuMpInfoController.php +++ b/app/Admin/Controllers/LanzuMpInfoController.php @@ -82,19 +82,21 @@ class LanzuMpInfoController extends AdminController protected function detail($id) { return Show::make($id, new LanzuMpInfo(), function (Show $show) { - $show->id; $show->name; $show->phone; $show->bank_name; $show->bank_card; $show->bank_addr; - $show->id_frond; - $show->id_back; + $show->id_frond()->image(); + $show->id_back()->image(); $show->id_number; - $show->admin_user_id; - $show->status; - $show->created_at; - $show->updated_at; + $show->status()->using([1=>'正常',0=>'禁用']); + $show->created_at()->as(function ($time){ + return date('Y-m-d H:i',$time); + }); + $show->updated_at()->as(function ($time){ + return date('Y-m-d H:i',$time); + }); }); } diff --git a/app/Admin/Controllers/LanzuMpWithdrawController.php b/app/Admin/Controllers/LanzuMpWithdrawController.php index 2f5d46c..4eaf9c9 100755 --- a/app/Admin/Controllers/LanzuMpWithdrawController.php +++ b/app/Admin/Controllers/LanzuMpWithdrawController.php @@ -70,8 +70,22 @@ class LanzuMpWithdrawController extends AdminController $show->column('服务商名称','mpInfo.name'); $show->money; $show->status; - $show->created_at; - $show->updated_at; + $show->created_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); + $show->updated_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); }); } diff --git a/app/Admin/Controllers/LanzuServiceSpeakerController.php b/app/Admin/Controllers/LanzuServiceSpeakerController.php index 476bc08..0f3283d 100755 --- a/app/Admin/Controllers/LanzuServiceSpeakerController.php +++ b/app/Admin/Controllers/LanzuServiceSpeakerController.php @@ -50,8 +50,22 @@ class LanzuServiceSpeakerController extends AdminController { return Show::make($id, new LanzuServiceSpeaker(), function (Show $show) { $show->id; - $show->created_at; - $show->updated_at; + $show->created_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); + $show->updated_at->as(function ($time){ + if ($time){ + return date('Y-m-d H:i',$time); + }else{ + return '-'; + } + + }); }); }