1748153932 12 months ago
commit 5e151a4689
  1. 5
      app/common/repositories/user/UserPartnerRepository.php
  2. 4
      route/admin/user.php

@ -75,7 +75,8 @@ class UserPartnerRepository extends BaseRepository
/** @var UserLabelRepository $make */
$list = $this->dao->getAll($uid)->column('partner_id') ?? [];
$data = ['partner_id' => $list, 'uid' => $uid];
return Elm::createForm(Route::buildUrl('systemUserChangePartner', compact('uid'))->build(), [
$url = 'sys/user/partner/'.$uid;
$res = Elm::createForm($url, [
Elm::input('uid', '用户 ID', '')->disabled(true)->required(true),
Elm::selectMultiple('partner_id', '用户合作人角色')->options(function () {
$partnerForm = new PartnerDao();
@ -88,7 +89,7 @@ class UserPartnerRepository extends BaseRepository
return $options;
}),
])->setTitle('编辑合作人角色')->formData($data);
//return compact('list', 'option');
return $res;
}
public function editPartner(int $uid, array $partner_id = [])

@ -184,8 +184,10 @@ Route::group(function () {
//合作人角色
Route::get('partner/:id', '/getPartner')->name('systemUserGetPartner')->option([
'_alias' => '获取合作人角色',
'_auth' => false,
'_form' => 'systemUserChangePartner',
]);
Route::post('partner/edit', '/changePartner')->name('systemUserChangePartner')->option([
Route::post('partner/:id', '/changePartner')->name('systemUserChangePartner')->option([
'_alias' => '用户合作人角色编辑',
]);

Loading…
Cancel
Save