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
633b2622
Commit
633b2622
authored
Jan 25, 2024
by
汪伟伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未审核模块 操作之后就不显示
parent
3961f232
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
4 deletions
+15
-4
app/Admin/Controllers/AlreadyDoneTaskController.php
+1
-0
app/Admin/Controllers/NoDoneTaskController.php
+2
-1
app/Admin/Controllers/TaskController.php
+1
-1
app/Admin/Controllers/TasksApproveController.php
+8
-2
app/Models/TasksReceive.php
+1
-0
database/migrations/2024_01_11_165609_create_tasks_approves_table.php
+1
-0
database/migrations/2024_01_17_170245_create_tasks_receives_table.php
+1
-0
resources/views/admin/check.blade.php
+0
-0
No files found.
app/Admin/Controllers/AlreadyDoneTaskController.php
View file @
633b2622
...
@@ -226,6 +226,7 @@ class AlreadyDoneTaskController extends AdminController
...
@@ -226,6 +226,7 @@ class AlreadyDoneTaskController extends AdminController
}
}
}
}
TasksCollect
::
query
()
->
where
(
'receive_id'
,
$this
->
id
)
->
update
([
'images'
=>
$images
]);
//更新
TasksCollect
::
query
()
->
where
(
'receive_id'
,
$this
->
id
)
->
update
([
'images'
=>
$images
]);
//更新
\App\Models\TasksReceive
::
query
()
->
where
(
'id'
,
$this
->
id
)
->
update
([
'time'
=>
date
(
'Y-m-d H:i:s'
)]);
//更新完成时间
});
});
$form
->
disableDeleteButton
();
$form
->
disableDeleteButton
();
...
...
app/Admin/Controllers/NoDoneTaskController.php
View file @
633b2622
...
@@ -141,6 +141,7 @@ class NoDoneTaskController extends AdminController
...
@@ -141,6 +141,7 @@ class NoDoneTaskController extends AdminController
$receive
=
\App\Models\TasksReceive
::
query
()
->
find
(
$id
);
$receive
=
\App\Models\TasksReceive
::
query
()
->
find
(
$id
);
if
(
$receive
){
if
(
$receive
){
$receive
->
status
=
1
;
$receive
->
status
=
1
;
$receive
->
time
=
date
(
'Y-m-d H:i:s'
);
TasksCollect
::
query
()
->
where
(
'receive_id'
,
$id
)
->
update
([
'is_find'
=>
0
,
'remark'
=>
$remark
]);
TasksCollect
::
query
()
->
where
(
'receive_id'
,
$id
)
->
update
([
'is_find'
=>
0
,
'remark'
=>
$remark
]);
$receive
->
save
();
$receive
->
save
();
TasksApprove
::
query
()
->
updateOrCreate
([
//审核表里新增一条记录
TasksApprove
::
query
()
->
updateOrCreate
([
//审核表里新增一条记录
...
@@ -244,7 +245,7 @@ class NoDoneTaskController extends AdminController
...
@@ -244,7 +245,7 @@ class NoDoneTaskController extends AdminController
if
(
$this
->
status
==
0
)
{
if
(
$this
->
status
==
0
)
{
// dd($this->id);
// dd($this->id);
\App\Models\TasksReceive
::
query
()
->
where
(
'id'
,
$this
->
id
)
->
update
([
'status'
=>
1
]);
//状态更新成已完成
\App\Models\TasksReceive
::
query
()
->
where
(
'id'
,
$this
->
id
)
->
update
([
'status'
=>
1
,
'time'
=>
date
(
'Y-m-d H:i:s'
)
]);
//状态更新成已完成
TasksCollect
::
query
()
->
where
(
'receive_id'
,
$this
->
id
)
->
update
([
'is_find'
=>
1
]);
//可以找到
TasksCollect
::
query
()
->
where
(
'receive_id'
,
$this
->
id
)
->
update
([
'is_find'
=>
1
]);
//可以找到
TasksApprove
::
query
()
->
updateOrCreate
([
//审核表里新增一条记录
TasksApprove
::
query
()
->
updateOrCreate
([
//审核表里新增一条记录
'task_id'
=>
$this
->
task_id
,
'task_id'
=>
$this
->
task_id
,
...
...
app/Admin/Controllers/TaskController.php
View file @
633b2622
...
@@ -45,7 +45,7 @@ class TaskController extends AdminController
...
@@ -45,7 +45,7 @@ class TaskController extends AdminController
$grid
->
addTableClass
([
'table-text-center'
]);
//设置表格文字居中
$grid
->
addTableClass
([
'table-text-center'
]);
//设置表格文字居中
// $grid->title('dasd');
// $grid->title('dasd');
$grid
->
model
()
->
whereNotIn
(
'id'
,
$exists
);
$grid
->
model
()
->
whereNotIn
(
'id'
,
$exists
)
->
orderBy
(
'created_at'
,
'desc'
)
;
// dd(Admin::user()->is_admin);
// dd(Admin::user()->is_admin);
// dd(trans('admin.view'));//查看
// dd(trans('admin.view'));//查看
...
...
app/Admin/Controllers/TasksApproveController.php
View file @
633b2622
...
@@ -42,9 +42,15 @@ class TasksApproveController extends AdminController
...
@@ -42,9 +42,15 @@ class TasksApproveController extends AdminController
if
(
!
empty
(
$userId
))
{
if
(
!
empty
(
$userId
))
{
$query
->
where
(
'user_id'
,
$userId
);
$query
->
where
(
'user_id'
,
$userId
);
}
}
$query
->
where
(
'status'
,
1
)
->
orderBy
(
'created_at'
,
'desc'
)
;
$query
->
where
(
'status'
,
1
);
})
})
->
with
([
'receives.collects'
,
'receives.user'
,
'receives.approve'
])
->
paginate
(
$pageSize
,
'*'
,
'page'
,
$page
)
->
toArray
();
->
with
([
'receives'
=>
function
(
$qq
){
$qq
->
orderBy
(
'time'
,
'desc'
);
}
,
'receives.collects'
,
'receives.user'
,
'receives.approve'
])
->
orderBy
(
'created_at'
,
'desc'
)
->
paginate
(
$pageSize
,
'*'
,
'page'
,
$page
)
->
toArray
();
foreach
(
$data
[
'data'
]
as
$key
=>
&
$item
)
{
foreach
(
$data
[
'data'
]
as
$key
=>
&
$item
)
{
if
(
count
(
$item
[
'receives'
])
>
1
)
{
if
(
count
(
$item
[
'receives'
])
>
1
)
{
...
...
app/Models/TasksReceive.php
View file @
633b2622
...
@@ -31,6 +31,7 @@ class TasksReceive extends Model
...
@@ -31,6 +31,7 @@ class TasksReceive extends Model
'order_id'
,
'order_id'
,
'area'
,
'area'
,
'status'
,
'status'
,
'time'
,
'created_at'
,
'created_at'
,
'updated_at'
,
'updated_at'
,
];
];
...
...
database/migrations/2024_01_11_165609_create_tasks_approves_table.php
View file @
633b2622
...
@@ -20,6 +20,7 @@ class CreateTasksApprovesTable extends Migration
...
@@ -20,6 +20,7 @@ class CreateTasksApprovesTable extends Migration
$table
->
bigInteger
(
'receive_id'
)
->
comment
(
'用户领取的任务id'
);
$table
->
bigInteger
(
'receive_id'
)
->
comment
(
'用户领取的任务id'
);
$table
->
tinyInteger
(
'status'
)
->
default
(
'0'
)
->
comment
(
'0:未审核,1:审核不通过,2:审核通过,3:已结算'
);
$table
->
tinyInteger
(
'status'
)
->
default
(
'0'
)
->
comment
(
'0:未审核,1:审核不通过,2:审核通过,3:已结算'
);
$table
->
string
(
'msg'
)
->
nullable
()
->
comment
(
'未通过原因'
);
$table
->
string
(
'msg'
)
->
nullable
()
->
comment
(
'未通过原因'
);
$table
->
dateTime
(
'time'
)
->
nullable
()
->
comment
(
'审核时间'
);
$table
->
timestamps
();
$table
->
timestamps
();
});
});
}
}
...
...
database/migrations/2024_01_17_170245_create_tasks_receives_table.php
View file @
633b2622
...
@@ -20,6 +20,7 @@ class CreateTasksReceivesTable extends Migration
...
@@ -20,6 +20,7 @@ class CreateTasksReceivesTable extends Migration
$table
->
bigInteger
(
'order_id'
)
->
default
(
'0'
)
->
comment
(
'所属结算单id'
);
$table
->
bigInteger
(
'order_id'
)
->
default
(
'0'
)
->
comment
(
'所属结算单id'
);
$table
->
string
(
'area'
)
->
default
(
''
)
->
comment
(
'地区'
);
$table
->
string
(
'area'
)
->
default
(
''
)
->
comment
(
'地区'
);
$table
->
tinyInteger
(
'status'
)
->
default
(
'0'
)
->
comment
(
'任务状态:(0:已领取但未完成的任务;1:已经完成但未审核的任务;2:审核不通过的任务;3:审核通过但未结算的任务;4:已经结算的任务)'
);
$table
->
tinyInteger
(
'status'
)
->
default
(
'0'
)
->
comment
(
'任务状态:(0:已领取但未完成的任务;1:已经完成但未审核的任务;2:审核不通过的任务;3:审核通过但未结算的任务;4:已经结算的任务)'
);
$table
->
dateTime
(
'time'
)
->
nullable
()
->
comment
(
'完成时间'
);
$table
->
timestamps
();
$table
->
timestamps
();
});
});
}
}
...
...
resources/views/admin/check.blade.php
View file @
633b2622
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