Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-collect
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汪伟伟
data-collect
Commits
d08f7713
Commit
d08f7713
authored
Jan 25, 2024
by
汪伟伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退回 跳转
parent
77d68051
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
7 deletions
+34
-7
app/Admin/Controllers/AlreadyApproveController.php
+3
-0
app/Admin/Controllers/CreateOrderController.php
+1
-1
app/Admin/Controllers/TasksApproveController.php
+20
-5
app/Admin/Extensions/Tools/BackAction.php
+10
-1
resources/views/admin/check.blade.php
+0
-0
No files found.
app/Admin/Controllers/AlreadyApproveController.php
View file @
d08f7713
...
...
@@ -70,6 +70,9 @@ class AlreadyApproveController extends AdminController
$grid
->
disableEditButton
()
->
disableDeleteButton
()
->
disableCreateButton
()
->
disableBatchDelete
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
// $filter->expand();
// $filter->panel();
$filter
->
equal
(
'user.id'
,
'用户'
)
->
select
(
'/getUsers'
);
$filter
->
like
(
'task.name'
,
'指标名称'
);
...
...
app/Admin/Controllers/CreateOrderController.php
View file @
d08f7713
...
...
@@ -67,7 +67,7 @@ class CreateOrderController extends AdminController
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
expand
();
//展开过滤器
//
更改为 panel 布局
//
更改为 panel 布局
$filter
->
panel
();
// 注意切换为panel布局方式时需要重新调整表单字段的宽度
...
...
app/Admin/Controllers/TasksApproveController.php
View file @
d08f7713
...
...
@@ -6,6 +6,7 @@ use App\Admin\Extensions\Tools\NotPassAction;
use
App\Admin\Extensions\Tools\PassAction
;
use
App\Admin\Repositories\TasksApprove
;
use
App\Admin\Services\CityAreaService
;
use
App\Models\AdminUser
;
use
App\Models\Task
;
use
App\Models\TasksReceive
;
use
Dcat\Admin\Form
;
...
...
@@ -29,9 +30,18 @@ class TasksApproveController extends AdminController
{
$page
=
$request
->
input
(
'page'
,
1
);
$pageSize
=
$request
->
input
(
'per_page'
,
10
);
$userId
=
$request
->
input
(
'user_id'
);
$taskName
=
$request
->
input
(
'task_name'
);
// var_dump($request->input());
$data
=
Task
::
query
()
->
whereHas
(
'receives'
,
function
(
$query
)
{
$taskQuery
=
Task
::
query
();
if
(
!
empty
(
$taskName
))
{
$taskQuery
->
where
(
'name'
,
'like'
,
"%
{
$taskName
}
%"
);
}
$data
=
$taskQuery
->
whereHas
(
'receives'
,
function
(
$query
)
use
(
$userId
)
{
if
(
!
empty
(
$userId
))
{
$query
->
where
(
'user_id'
,
$userId
);
}
$query
->
where
(
'status'
,
1
)
->
orderBy
(
'created_at'
,
'desc'
);
})
->
with
([
'receives.collects'
,
'receives.user'
,
'receives.approve'
])
->
paginate
(
$pageSize
,
'*'
,
'page'
,
$page
)
->
toArray
();
...
...
@@ -55,12 +65,13 @@ class TasksApproveController extends AdminController
}
}
$users
=
AdminUser
::
query
()
->
where
(
'is_admin'
,
0
)
->
get
([
'id'
,
'name'
])
->
toArray
();
// dd($data);
$content
=
Content
::
make
();
return
$content
->
title
(
'未审核列表'
)
->
body
(
view
(
'admin.check'
,
[
'data'
=>
$data
]));
->
body
(
view
(
'admin.check'
,
[
'data'
=>
$data
,
'users'
=>
$users
,
'userId'
=>
$userId
,
'taskName'
=>
$taskName
]));
}
...
...
@@ -144,9 +155,13 @@ class TasksApproveController extends AdminController
// $grid->tools('<a class="btn btn-primary disable-outline">测试按钮</a>');
$grid
->
disableEditButton
()
->
disableDeleteButton
()
->
disableCreateButton
()
->
disable
FilterButton
()
->
disable
BatchDelete
();
$grid
->
disableEditButton
()
->
disableDeleteButton
()
->
disableCreateButton
()
->
disableBatchDelete
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
equal
(
'id'
);
$filter
->
expand
();
$filter
->
panel
();
$filter
->
equal
(
'user.id'
,
'用户'
)
->
select
(
'/getUsers'
)
->
width
(
3
);
$filter
->
like
(
'task.name'
,
'指标名称'
)
->
width
(
3
);
});
$grid
->
actions
(
function
(
Grid\Displayers\Actions
$actions
)
{
...
...
app/Admin/Extensions/Tools/BackAction.php
View file @
d08f7713
...
...
@@ -45,11 +45,14 @@ class BackAction extends RowAction
*/
public
function
handle
(
Request
$request
)
{
// 获取主键
$id
=
$this
->
getKey
();
// $user = Admin::user();
$receive
=
TasksReceive
::
query
()
->
find
(
$id
);
$type
=
$receive
->
status
;
$task
=
Task
::
query
()
->
find
(
$receive
->
task_id
);
$receive
->
collects
()
->
delete
();
$receive
->
approve
()
->
delete
();
...
...
@@ -58,9 +61,15 @@ class BackAction extends RowAction
$task
->
save
();
// dd($id,$user->id);
if
(
in_array
(
$type
,[
1
,
2
])){
$url
=
'already'
;
}
if
(
$type
==
0
){
$url
=
'noDone'
;
}
return
$this
->
response
()
->
success
(
'退回成功'
)
->
redirect
(
'noDone'
);
->
redirect
(
$url
);
}
public
function
html
()
...
...
resources/views/admin/check.blade.php
View file @
d08f7713
This diff is collapsed.
Click to expand it.
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