From 5c737b50cf9c410f2a5eda834b63ee53af0bb6bb Mon Sep 17 00:00:00 2001 From: liapples Date: Tue, 7 Sep 2021 10:32:44 +0800 Subject: [PATCH] =?UTF-8?q?bidding=E7=AB=9E=E6=A0=87=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DemandController.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/app/AdminSupplier/Controllers/DemandController.php b/app/AdminSupplier/Controllers/DemandController.php index 1c3f342..538b2e4 100755 --- a/app/AdminSupplier/Controllers/DemandController.php +++ b/app/AdminSupplier/Controllers/DemandController.php @@ -3,9 +3,7 @@ namespace App\AdminSupplier\Controllers; use App\AdminSupplier\Lazys\DemandBiddingLazys; -use App\Models\AgentProduct; use App\Models\DemandProduct; -use App\Models\Product; use App\Traits\ResponseHelper; use App\AdminAgent\Repositories\Demand; use App\Models\DemandBidding; @@ -15,12 +13,6 @@ use Dcat\Admin\Grid; use Dcat\Admin\Show; use Dcat\Admin\Http\Controllers\AdminController; use App\Traits\DemandTraits; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Http\Request; -use Illuminate\Support\Arr; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\URL; class DemandController extends AdminController { @@ -70,14 +62,16 @@ class DemandController extends AdminController return DemandBiddingLazys::make(['demand_id' => $this->id]); }); }else{ - $grid->column('bidding','竞标') - ->if(function (){ + $grid->column('bidding', '竞标') + ->if(function () { // $this->bidding 表示参加过竞标后不再显示 return $this->state == 1 && $this->bidding_user_type == DemandTraits::$col[1] && $this->bidding; }) ->then(function (Grid\Column $column) { - $column->append('发起竞标'); - }); + $column->append('发起竞标'); + }) + ->else() + ->display(''); } $grid->column('created_at')->sortable();