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
76c34743
authored
Nov 18, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加列表数据返回
parent
4d65e59e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
app/Admin/Service/UserService.php
resources/lang/en/user.php
app/Admin/Service/UserService.php
View file @
76c34743
...
...
@@ -50,6 +50,20 @@ class UserService
$grid
->
column
(
'email'
);
$grid
->
column
(
'remark'
);
$grid
->
column
(
'sale_name'
);
$grid
->
column
(
'order_num_data'
)
->
display
(
function
(
$order_num_data
)
{
$data
=
InquiryService
::
getInquiryCountByUserIds
([
$this
->
id
])[
$this
->
id
]
??
[
"pending"
=>
0
,
"all"
=>
0
];
return
"
{
$data
[
'pending'
]
}
/
{
$data
[
'all'
]
}
"
;
});
$grid
->
column
(
'inquiry_num_data'
)
->
display
(
function
(
$order_num_data
)
{
$data
=
InquiryService
::
getInquiryCountByUserIds
([
$this
->
id
])[
$this
->
id
]
??
[
"pending"
=>
0
,
"all"
=>
0
];
return
"
{
$data
[
'pending'
]
}
/
{
$data
[
'all'
]
}
"
;
});
$grid
->
column
(
'created_time'
)
->
display
(
function
(
$time
)
{
return
$time
?
date
(
'Y-m-d H:i:s'
,
$time
)
:
''
;
})
->
sortable
();;
...
...
resources/lang/en/user.php
View file @
76c34743
...
...
@@ -28,6 +28,8 @@ return [
'created_time'
=>
'创建时间'
,
'update_time'
=>
'更新时间'
,
'reg_source'
=>
'注册来源'
,
'order_num_data'
=>
'进行中 / 总计 订单数'
,
'inquiry_num_data'
=>
'待处理 / 总计 询价数'
,
'user_address'
=>
[
'consignee'
=>
'Sales Name'
,
]
...
...
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