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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
163 additions
and
59 deletions
+163
-59
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
+129
-52
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
...
...
@@ -21,12 +21,12 @@
style="
margin
-
right
:
3
px
">
<i class="
feather
icon
-
refresh
-
cw
"></i><span class="
d
-
none
d
-
sm
-
inline
"> 刷新</span>
</button>
{{-- <div class="
btn
-
group
filter
-
button
-
group
dropdown
" style="
margin
-
right
:
3
px
">--}}
{{-- <button class="
btn
btn
-
primary
filter
-
btn
-
ATDVmyrF
btn
-
outline
">--}}
{{-- <i class="
feather
icon
-
filter
"></i><span class="
d
-
none
d
-
sm
-
inline
"> 筛选</span>--}}
{{-- <span class="
filter
-
count
"></span>--}}
{{-- </button>--}}
{{-- </div>--}}
{{-- <div class="
btn
-
group
filter
-
button
-
group
dropdown
" style="
margin
-
right
:
3
px
">--}}
{{-- <button class="
btn
btn
-
primary
filter
-
btn
-
ATDVmyrF
btn
-
outline
">--}}
{{-- <i class="
feather
icon
-
filter
"></i><span class="
d
-
none
d
-
sm
-
inline
"> 筛选</span>--}}
{{-- <span class="
filter
-
count
"></span>--}}
{{-- </button>--}}
{{-- </div>--}}
<div class="
pull
-
right
" data-responsive-table-toolbar="
grid
-
table
">
...
...
@@ -36,45 +36,115 @@
</div>
</div>
</div>
<div class="
hidden
">
<div class="
filter
-
box
right
-
side
-
filter
-
container
" style="
padding
:
0
" id="
filter
-
boxEMP5zypo
">
<style>
.filter-box {
border-top: 1px solid #eee;
margin-top: 10px;
margin-bottom: -.5rem !important;
padding: 1.8rem;
}
</style>
<div class="
filter
-
box
shadow
-
0
card
mb
-
0
">
<div class="
card
-
body
" style="
padding
:
0
" id="
filter
-
boxRIgKkyhL
"
data-select2-id="
select2
-
data
-
filter
-
boxRIgKkyhL
">
<form action="
/
approves
" class="
form
-
horizontal
grid
-
filter
-
form
" pjax-container=""
method="
get
">
<div class="
mb
-
1
" style="
height
:
55
px
">
<div class="
p
-
1
position
-
fixed
d
-
flex
justify
-
content
-
between
header
">
<div>
<button type="
submit
" class="
btn
btn
-
sm
btn
-
primary
submit
">
<i class="
feather
icon
-
search
"></i> 搜索
</button>
<a href="
http
://
127.0
.
0.1
:
83
/
approves
?
_pjax
=%
23
pjax
-
container
"
class="
reset
btn
btn
-
sm
btn
-
white
">
<i class="
feather
icon
-
rotate
-
ccw
"></i> 重置
</a>
method="
get
" data-select2-id="
select2
-
data
-
119
-
p4oa
">
<div class="
row
mb
-
0
" data-select2-id="
select2
-
data
-
118
-
eo99
">
<div class="
filter
-
input
col
-
sm
-
2
" style="">
<div class="
form
-
group
">
<div class="
input
-
group
input
-
group
-
sm
">
<div class="
input
-
group
-
prepend
">
<span
class="
input
-
group
-
text
bg
-
white
text
-
capitalize
"><b>用户</b></span>
</div>
<select class="
form
-
control
user
-
id
select2
-
hidden
-
accessible
"
name="
user_id
" placeholder="
das
" data-value="" style=""
data-select2-id="
select2
-
data
-
1
-
ztx4
" tabindex="
-
1
"
aria-hidden="
true
">
<option value="" data-select2-id="
select2
-
data
-
3
-
8
qxx
"></option>
@foreach(
$users
as
$user
)
<option
value=
{
{$user['id']}
}
{{$userId ==
$user['id']
?'selected':''}} >
{
{$user['name']}
}
</option>
@endforeach
</select>
{{-- <span--}}
{{-- class="
select2
select2
-
container
select2
-
container
--
default
select2
-
container
--
below
select2
-
container
--
focus
"--}}
{{-- dir="
ltr
" data-select2-id="
select2
-
data
-
2
-
2
dsr
" style="">--}}
{{-- <span--}}
{{-- class="
selection
">--}}
{{-- <span--}}
{{-- class="
select2
-
selection
select2
-
selection
--
single
"--}}
{{-- role="
combobox
"--}}
{{-- aria-haspopup="
true
"--}}
{{-- aria-expanded="
false
"--}}
{{-- tabindex="
0
"--}}
{{-- aria-disabled="
false
"--}}
{{-- aria-labelledby="
select2
-
userid
-
67
-
container
">--}}
{{-- <button--}}
{{-- type="
button
"--}}
{{-- class="
select2
-
selection__clear
"--}}
{{-- tabindex="
-
1
"--}}
{{-- title="
删除所有项目
"--}}
{{-- aria-label="
删除所有项目
"--}}
{{-- aria-describedby="
select2
-
userid
-
67
-
container
"--}}
{{-- data-select2-id="
select2
-
data
-
126
-
ip59
">--}}
{{-- <span--}}
{{-- aria-hidden="
true
">×</span>--}}
{{-- </button>--}}
{{-- <span--}}
{{-- class="
select2
-
selection__rendered
"--}}
{{-- id="
select2
-
userid
-
67
-
container
"--}}
{{-- role="
textbox
"--}}
{{-- aria-readonly="
true
"--}}
{{-- title="
布劳恩
">布劳恩</span>--}}
{{-- <span--}}
{{-- class="
select2
-
selection__arrow
"--}}
{{-- role="
presentation
">--}}
{{-- <b role="
presentation
"></b>--}}
{{-- </span>--}}
{{-- </span>--}}
{{-- </span>--}}
{{-- <span--}}
{{-- class="
dropdown
-
wrapper
"--}}
{{-- aria-hidden="
true
"></span>--}}
{{-- </span>--}}
</div>
</div>
</div>
</div>
<div class="
filter
-
input
col
-
sm
-
10
" style="">
<div class="
form
-
group
">
<div class="
input
-
group
input
-
group
-
sm
">
<div class="
input
-
group
-
prepend
">
<span class="
input
-
group
-
text
bg
-
white
text
-
capitalize
"><b>ID</b></span>
<div class="
filter
-
input
col
-
sm
-
2
" style="">
<div class="
form
-
group
">
<div class="
input
-
group
input
-
group
-
sm
">
<div class="
input
-
group
-
prepend
">
<span class="
input
-
group
-
text
bg
-
white
text
-
capitalize
"><b>指标名称</b></span>
</div>
<input type="
text
" class="
form
-
control
filter
-
column
-
task
-
name
"
placeholder="
指标名称
" name="
task_name
" value="
{{
$taskName
??
''
}}
">
</div>
<input type="
text
" class="
form
-
control
filter
-
column
-
id
" placeholder="
ID
"
name="
id
" value="">
</div>
</div>
<button class="
btn
btn
-
primary
btn
-
sm
btn
-
mini
submit
" style="
margin
-
left
:
12
px
">
<i class="
feather
icon
-
search
"></i><span class="
d
-
none
d
-
sm
-
inline
"> 搜索</span>
</button>
<a style="
margin
-
left
:
6
px
" href="
/
approves
?
reset
=
1
"
class="
reset
btn
btn
-
white
btn
-
sm
">
<i class="
feather
icon
-
rotate
-
ccw
"></i><span class="
d
-
none
d
-
sm
-
inline
"> 重置</span>
</a>
</div>
</form>
</div>
</div>
<div class="
table
-
responsive
table
-
wrapper
complex
-
container
table
-
middle
mt
-
1
table
-
collapse
">
@foreach(
$data['data']
as
$key
=>
$item
)
<table style="" class="
table
custom
-
data
-
table
data
-
table
table
-
text
-
center
" id="
grid
-
table
">
<table style="" class="
table
custom
-
data
-
table
data
-
table
table
-
text
-
center
"
id="
grid
-
table
">
<thead>
<tr>
{{-- <th>--}}
...
...
@@ -123,9 +193,14 @@
{{-- <td>3</td>--}}
<td class="
grid__actions__
">
{{-- <a style="
cursor
:
pointer
;
" class="
act
-
YwdhdqPcBxTZwKy2
" href="
http
://
127.0
.
0.1
:
83
/
approves
/
17
"><i class=""></i> <span class="
text
-
success
">查看</span> </a>--}}
<a id="
allPass
-
task
-
{{
$item
[
'id'
]}}
" style="
cursor
:
pointer
;
" class="
act
-
8
r3v0iFpeBCgEsaB
"
href="
#" onclick="allPass({{$item['id']}},{{json_encode($item['receives'])}})">全部通过 </a>
<
span
id
=
"allNotPass-task-
{
{$item['id']}
}
"
onclick
=
"noPass(
{
{$item['id']}},1,{{json_encode($item['receives'])}
}
)"
style
=
"cursor: pointer"
data
-
toggle
=
"modal"
data
-
target
=
"#modal-14NXsK3Ogh"
>
<a id="
allPass
-
task
-
{{
$item
[
'id'
]}}
" style="
cursor
:
pointer
;
"
class="
act
-
8
r3v0iFpeBCgEsaB
"
href="
#"
onclick
=
"allPass(
{
{$item['id']}},{{json_encode($item['receives'])}
}
)"
>
全部通过
&
nbsp
;
&
nbsp
;
&
nbsp
;
</
a
>
<
span
id
=
"allNotPass-task-
{
{$item['id']}
}
"
onclick
=
"noPass(
{
{$item['id']}},1,{{json_encode($item['receives'])}
}
)"
style
=
"cursor: pointer"
data
-
toggle
=
"modal"
data
-
target
=
"#modal-14NXsK3Ogh"
>
<
a
href
=
"javascript:void(0)"
>
全部不通过
</
a
></
span
>
</
td
>
</
tr
>
...
...
@@ -167,10 +242,12 @@
</td>
<td class="
grid__actions__
">
<a id="
approvePass
-
{{
$rec
[
'id'
]}}
" style="
cursor
:
pointer
;
" class="
act
-
8
r3v0iFpeBCgEsaB
"
<a id="
approvePass
-
{{
$rec
[
'id'
]}}
" style="
cursor
:
pointer
;
"
class="
act
-
8
r3v0iFpeBCgEsaB
"
href="
#" onclick="passTask({{$rec['id']}})">通过 </a>
<
span
id
=
"approveNotPass-
{
{$rec['id']}
}
"
style
=
"cursor: pointer"
data
-
toggle
=
"modal"
<
span
id
=
"approveNotPass-
{
{$rec['id']}
}
"
style
=
"cursor: pointer"
data
-
toggle
=
"modal"
data
-
target
=
"#modal-14NXsK3Ogh"
><
a
href
=
"#"
onclick
=
"noPass(
{
{$rec['id']}
}
)"
>
不通过
</
a
></
span
>
</
td
>
...
...
@@ -296,9 +373,9 @@
</div>
<input type="
hidden
" id="
receive
-
id
" value="
0
" class="
field__form_
_normal_
">
<input type="
hidden
" id="
task
-
id
" value="
0
" class="
field__current_
_normal_
">
{{-- <input type="
hidden
" name="
_payload_
"--}}
{{-- value="
{
&
quot
;
_current_
&
quot
;
:&
quot
;
http
:
\
/
\
/
127.0
.
0.1
:
83
\
/
alreadyApprove
?&
quot
;,
&
quot
;
id
&
quot
;
:&
quot
;
27
&
quot
;,
&
quot
;
renderable
&
quot
;
:&
quot
;
App_Admin_Forms_MsgSetting
&
quot
;,
&
quot
;
_trans_
&
quot
;
:&
quot
;
already
-
approve
&
quot
;}
"--}}
{{-- class="
field__payload_
_normal_
">--}}
{{-- <input type="
hidden
" name="
_payload_
"--}}
{{-- value="
{
&
quot
;
_current_
&
quot
;
:&
quot
;
http
:
\
/
\
/
127.0
.
0.1
:
83
\
/
alreadyApprove
?&
quot
;,
&
quot
;
id
&
quot
;
:&
quot
;
27
&
quot
;,
&
quot
;
renderable
&
quot
;
:&
quot
;
App_Admin_Forms_MsgSetting
&
quot
;,
&
quot
;
_trans_
&
quot
;
:&
quot
;
already
-
approve
&
quot
;}
"--}}
{{-- class="
field__payload_
_normal_
">--}}
</div>
<div class="
box
-
footer
row
d
-
flex
">
...
...
@@ -307,7 +384,8 @@
<button type="
reset
" class="
btn
btn
-
white
pull
-
left
"><i class="
feather
icon
-
rotate
-
ccw
"></i>
重置
</button>
<button type="
button
" onclick="
noPassAction
()
" class="
btn
btn
-
primary
pull
-
right
"><i class="
feather
icon
-
save
"></i>
<button type="
button
" onclick="
noPassAction
()
" class="
btn
btn
-
primary
pull
-
right
"><i
class="
feather
icon
-
save
"></i>
提交
</button>
</div>
...
...
@@ -341,15 +419,15 @@
console.log(123213)
}
function allPass(taskId,allReceives) {
console.log(taskId,allReceives)
function allPass(taskId,
allReceives) {
console.log(taskId,
allReceives)
$.ajax({
url: '/allPass/' + taskId,
success: function (res) {
document.getElementById("
allPass
-
task
-
" + taskId).style.display = 'none';
for (var i
=0;i< allReceives.length;i++)
{
for (var i
= 0; i < allReceives.length; i++)
{
console.log(allReceives[i].id)
document.getElementById("
approvePass
-
" + allReceives[i].id).style.display = 'none';
}
...
...
@@ -363,7 +441,7 @@
var receiveArr = [];
function noPass(receiveId,
type = 0,
arr = []) {
function noPass(receiveId,
type = 0,
arr = []) {
// 获取现有元素(比如id为existingDiv)的父节点
var parentElement = document.getElementById("
tan
-
chuang
-
msg
").parentNode;
...
...
@@ -380,28 +458,27 @@
tan_chuang.setAttribute('aria-modal', 'true')
tan_chuang.removeAttribute('aria-hidden')
if (type == 0){//单个不通过
if (type == 0)
{//单个不通过
var receive_id = document.getElementById("
receive
-
id
");
receive_id.setAttribute('value',receiveId)
receive_id.setAttribute('value',
receiveId)
}
if (type == 1){//全部不通过
if (type == 1)
{//全部不通过
receiveArr = arr;
document.getElementById("
task
-
id
").value = receiveId;
}
}
function noPassAction() {
var taskId = document.getElementById("
task
-
id
").value;
console.log(taskId,2323232);
console.log(taskId,
2323232);
var receiveId = document.getElementById("
receive
-
id
").value;
msg = document.getElementById("
msg
-
input
").value;
if (msg == '') {
Dcat.error('请填写不通过原因')
}else {
}
else {
if (taskId == 0) {//单个不通过
console.log(receiveId)
$.ajax({
...
...
@@ -425,7 +502,7 @@
document.getElementById("
msg
-
input
").value = '';
document.getElementById("
allNotPass
-
task
-
" + taskId).style.display = 'none';
for (var i
=0;i< receiveArr.length;i++)
{
for (var i
= 0; i < receiveArr.length; i++)
{
console.log(receiveArr[i].id)
document.getElementById("
approveNotPass
-
" + receiveArr[i].id).style.display = 'none';
}
...
...
@@ -444,7 +521,7 @@
$.ajax({
url: '/pass/' + receiveId,
success: function (res) {
document.getElementById("
approvePass
-
"
+
receiveId).style.display = 'none';
document.getElementById("
approvePass
-
"
+
receiveId).style.display = 'none';
Dcat.success('审核成功')
}
...
...
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