|
|
@ -184,7 +184,10 @@ class AgentProductController extends AdminController |
|
|
return $form->response()->error('数据不存在'); |
|
|
return $form->response()->error('数据不存在'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// $form->display('id');
|
|
|
|
|
|
|
|
|
$options = Category::selectOptions(fn($query) => $query->where('agent_id', $agent_id)); |
|
|
|
|
|
$form->select('category_id') |
|
|
|
|
|
->options(array_slice($options, 1, null, true)) |
|
|
|
|
|
->required(); |
|
|
|
|
|
|
|
|
//计调版旅行社不允许选择计调云产品
|
|
|
//计调版旅行社不允许选择计调云产品
|
|
|
if (Admin::user()->type == AgentType::OPERATOR) { |
|
|
if (Admin::user()->type == AgentType::OPERATOR) { |
|
|
@ -267,11 +270,6 @@ class AgentProductController extends AdminController |
|
|
|
|
|
|
|
|
$form->number('sale')->min(0)->default(0); |
|
|
$form->number('sale')->min(0)->default(0); |
|
|
|
|
|
|
|
|
$options = Category::selectOptions(fn($query) => $query->where('agent_id', $agent_id)); |
|
|
|
|
|
$form->select('category_id') |
|
|
|
|
|
->options(array_slice($options, 1, null, true)) |
|
|
|
|
|
->required(); |
|
|
|
|
|
|
|
|
|
|
|
$cat2publish_type = json_encode(Category::where('agent_id', $agent_id)->pluck('publish_type', 'id')); |
|
|
$cat2publish_type = json_encode(Category::where('agent_id', $agent_id)->pluck('publish_type', 'id')); |
|
|
Admin::script(<<<JS |
|
|
Admin::script(<<<JS |
|
|
var PublishType = $cat2publish_type; |
|
|
var PublishType = $cat2publish_type; |
|
|
|