|
|
|
@ -133,31 +133,31 @@ class UserRepository extends BaseRepository |
|
|
|
|
Elm::input('card_id', '身份证'), |
|
|
|
|
Elm::input('addres', '用户地址'), |
|
|
|
|
Elm::textarea('mark', '备注'), |
|
|
|
|
Elm::select('group_id', '用户分组')->options(function () { |
|
|
|
|
$data = app()->make(UserGroupRepository::class)->allOptions(); |
|
|
|
|
$options = [['value' => 0, 'label' => '请选择']]; |
|
|
|
|
foreach ($data as $value => $label) { |
|
|
|
|
$options[] = compact('value', 'label'); |
|
|
|
|
} |
|
|
|
|
return $options; |
|
|
|
|
}), |
|
|
|
|
Elm::selectMultiple('label_id', '用户标签')->options(function () { |
|
|
|
|
$data = app()->make(UserLabelRepository::class)->allOptions(); |
|
|
|
|
$options = []; |
|
|
|
|
foreach ($data as $value => $label) { |
|
|
|
|
$value = (string)$value; |
|
|
|
|
$options[] = compact('value', 'label'); |
|
|
|
|
} |
|
|
|
|
return $options; |
|
|
|
|
}), |
|
|
|
|
Elm::radio('status', '状态', 1)->options([ |
|
|
|
|
['value' => 0, 'label' => '关闭'], |
|
|
|
|
['value' => 1, 'label' => '开启'], |
|
|
|
|
])->requiredNum(), |
|
|
|
|
Elm::radio('is_promoter', '推广员', 1)->options([ |
|
|
|
|
['value' => 0, 'label' => '关闭'], |
|
|
|
|
['value' => 1, 'label' => '开启'], |
|
|
|
|
])->requiredNum() |
|
|
|
|
// Elm::select('group_id', '用户分组')->options(function () { |
|
|
|
|
// $data = app()->make(UserGroupRepository::class)->allOptions(); |
|
|
|
|
// $options = [['value' => 0, 'label' => '请选择']]; |
|
|
|
|
// foreach ($data as $value => $label) { |
|
|
|
|
// $options[] = compact('value', 'label'); |
|
|
|
|
// } |
|
|
|
|
// return $options; |
|
|
|
|
// }), |
|
|
|
|
// Elm::selectMultiple('label_id', '用户标签')->options(function () { |
|
|
|
|
// $data = app()->make(UserLabelRepository::class)->allOptions(); |
|
|
|
|
// $options = []; |
|
|
|
|
// foreach ($data as $value => $label) { |
|
|
|
|
// $value = (string)$value; |
|
|
|
|
// $options[] = compact('value', 'label'); |
|
|
|
|
// } |
|
|
|
|
// return $options; |
|
|
|
|
// }), |
|
|
|
|
// Elm::radio('status', '状态', 1)->options([ |
|
|
|
|
// ['value' => 0, 'label' => '关闭'], |
|
|
|
|
// ['value' => 1, 'label' => '开启'], |
|
|
|
|
// ])->requiredNum(), |
|
|
|
|
// Elm::radio('is_promoter', '推广员', 1)->options([ |
|
|
|
|
// ['value' => 0, 'label' => '关闭'], |
|
|
|
|
// ['value' => 1, 'label' => '开启'], |
|
|
|
|
// ])->requiredNum() |
|
|
|
|
])->setTitle('编辑')->formData($user->toArray()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|