Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
93cc1f2d
authored
Nov 16, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善转让翻译
parent
54c57f90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
51 deletions
app/Admin/Actions/User/UserTransferAction.php
app/Admin/Service/UserService.php
resources/lang/en/user.php
app/Admin/Actions/User/UserTransferAction.php
View file @
93cc1f2d
...
...
@@ -19,22 +19,16 @@ class UserTransferAction extends BatchAction
protected
$htmlClasses
=
[
'btn btn-primary btn-sm btn-mini'
];
// 注意action的构造方法参数一定要给默认值
public
function
__construct
(
$title
=
null
,
$action
=
1
)
public
function
__construct
()
{
$this
->
title
=
$title
;
$this
->
action
=
$action
;
}
// 确认弹窗信息
public
function
confirm
()
{
return
'您确定要已选中的文章吗?'
;
$this
->
title
=
trans
(
'user.labels.transfer'
);
$this
->
action
=
1
;
}
public
function
render
()
{
$form
=
AssignUserHandle
::
make
();
$buttonName
=
trans
(
'user.labels.
handle
'
);
$buttonName
=
trans
(
'user.labels.
transfer
'
);
return
Modal
::
make
()
->
lg
()
->
title
(
$this
->
title
)
->
body
(
$form
->
payload
([]))
->
onLoad
(
$this
->
getModalScript
())
->
button
(
'<button class="btn btn-primary">
<i class="feather icon-check-circle"></i><span class="d-none d-sm-inline" style="margin-left: 5px">'
.
$buttonName
.
'</span>
</button>'
);
...
...
@@ -62,14 +56,7 @@ JS;
// 处理请求
public
function
handle
(
Request
$request
)
{
// 获取选中的文章ID数组
$keys
=
$this
->
getKey
();
// 获取请求参数
$action
=
$request
->
get
(
'action'
);
$message
=
$action
?
'文章发布成功'
:
'文章下线成功'
;
$message
=
admin_trans
(
"succeeded"
);
return
$this
->
response
()
->
success
(
$message
)
->
refresh
();
}
...
...
app/Admin/Service/UserService.php
View file @
93cc1f2d
...
...
@@ -59,8 +59,8 @@ class UserService
public
static
function
userListTool
(
Grid
$grid
)
{
$grid
->
tools
([
new
UserTransferAction
(
"转让销售"
),
new
UserAssignAction
(
"分配销售"
),
new
UserTransferAction
(),
new
UserAssignAction
(),
]);
}
...
...
resources/lang/en/user.php
View file @
93cc1f2d
<?php
return
[
'labels'
=>
[
'User'
=>
'User'
,
'user'
=>
'User'
,
'labels'
=>
[
'User'
=>
'User'
,
'user'
=>
'User'
,
'user_detail'
=>
'User Detail'
,
'handle'
=>
'Handle'
,
'transfer'
=>
'Transfer'
,
'assign'
=>
'Assign'
,
],
'fields'
=>
[
'user_sn'
=>
'客户编码'
,
'name'
=>
'用户名'
,
'email'
=>
'邮箱'
,
'email_verified_at'
=>
'邮箱校验时间'
,
'password'
=>
'密码'
,
'remark'
=>
'备注'
,
'phone'
=>
'手机号码'
,
'remember_token'
=>
'记住登陆token'
,
'fields'
=>
[
'user_sn'
=>
'客户编码'
,
'name'
=>
'用户名'
,
'email'
=>
'邮箱'
,
'email_verified_at'
=>
'邮箱校验时间'
,
'password'
=>
'密码'
,
'remark'
=>
'备注'
,
'phone'
=>
'手机号码'
,
'remember_token'
=>
'记住登陆token'
,
'account_properties'
=>
'账号属性'
,
'status'
=>
'状态'
,
'company_name'
=>
'公司名称'
,
'first_name'
=>
'名字'
,
'sale_id'
=>
'业务员'
,
'sale_name'
=>
'业务员名字'
,
'last_name'
=>
'姓氏'
,
'created_time'
=>
'创建时间'
,
'update_time'
=>
'更新时间'
,
'reg_source'
=>
'注册来源'
,
'user_address'
=>
[
'status'
=>
'状态'
,
'company_name'
=>
'公司名称'
,
'first_name'
=>
'名字'
,
'sale_id'
=>
'业务员'
,
'sale_name'
=>
'业务员名字'
,
'last_name'
=>
'姓氏'
,
'created_time'
=>
'创建时间'
,
'update_time'
=>
'更新时间'
,
'reg_source'
=>
'注册来源'
,
'user_address'
=>
[
'consignee'
=>
'Sales Name'
,
]
],
'options'
=>
[
"status"
=>
[
"1"
=>
"正常"
,
"-1"
=>
"禁用"
"status"
=>
[
"1"
=>
"正常"
,
"-1"
=>
"禁用"
],
"reg_source"
=>
[
"1"
=>
"网站"
,
"2"
=>
"人工新增"
"reg_source"
=>
[
"1"
=>
"网站"
,
"2"
=>
"人工新增"
],
"account_properties"
=>
[
"1"
=>
"个人"
,
"2"
=>
"企业"
"account_properties"
=>
[
"1"
=>
"个人"
,
"2"
=>
"企业"
],
],
];
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment