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