|
|
|
@ -4,6 +4,7 @@ namespace App\AdminAgent\Controllers; |
|
|
|
|
|
|
|
use App\AdminAgent\Actions\Grid\DemandConfirm; |
|
|
|
use App\AdminAgent\Lazys\DemandBiddingLazys; |
|
|
|
use App\Common\AgentType; |
|
|
|
use App\Models\AgentProduct; |
|
|
|
use App\Models\Product; |
|
|
|
use App\Traits\ResponseHelper; |
|
|
|
@ -147,10 +148,11 @@ class DemandController extends AdminController |
|
|
|
return json_encode($path); |
|
|
|
}); |
|
|
|
$form->hidden('deadline'); |
|
|
|
$form->select('bidding_user_type','竞标用户类型') |
|
|
|
->when([2],function (Form $form){ |
|
|
|
$form->select('agent_product_id','产品')->options(function (){ |
|
|
|
return AgentProduct::query()->where('agent_id',Admin::user()->id)->where('status',1)->pluck('title','id'); |
|
|
|
if (Admin::user()->type == AgentType::CLUSTER) { |
|
|
|
$form->select('bidding_user_type', '竞标用户类型') |
|
|
|
->when([2], function (Form $form) { |
|
|
|
$form->select('agent_product_id', '产品')->options(function () { |
|
|
|
return AgentProduct::query()->where('agent_id', Admin::user()->id)->where('status', 1)->pluck('title', 'id'); |
|
|
|
}); |
|
|
|
}) |
|
|
|
->options([ |
|
|
|
@ -158,6 +160,13 @@ class DemandController extends AdminController |
|
|
|
2 => '地接' |
|
|
|
]) |
|
|
|
->default(1); |
|
|
|
}else{ |
|
|
|
$form->select('bidding_user_type', '竞标用户类型') |
|
|
|
->options([ |
|
|
|
1 => '供应商', |
|
|
|
]) |
|
|
|
->default(1); |
|
|
|
} |
|
|
|
$form->decimal('price'); |
|
|
|
$form->number('stock'); |
|
|
|
$form->hidden('publisher_type'); |
|
|
|
|