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
66cebc84
Commit
66cebc84
authored
Jan 18, 2024
by
汪伟伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
5a1e0464
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
200 additions
and
58 deletions
+200
-58
app/Admin/Controllers/AlreadyApproveController.php
+17
-3
app/Admin/Controllers/AlreadyDoneTaskController.php
+18
-3
app/Admin/Controllers/AlreadySettlementController.php
+28
-23
app/Admin/Controllers/CreateOrderController.php
+18
-3
app/Admin/Controllers/NoDoneTaskController.php
+11
-2
app/Admin/Controllers/TaskController.php
+22
-4
app/Admin/Controllers/TaskReceiveController.php
+18
-3
app/Admin/Controllers/TasksApproveController.php
+39
-10
app/Admin/Controllers/TasksCollectController.php
+10
-4
app/Admin/Controllers/TasksOrderController.php
+19
-3
No files found.
app/Admin/Controllers/AlreadyApproveController.php
View file @
66cebc84
...
...
@@ -44,13 +44,27 @@ class AlreadyApproveController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'task.name'
,
'指标名称'
);
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'task.year'
,
'时间'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'task.price'
,
'单价'
);
$grid
->
column
(
'collects.value'
,
'指标值'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'collects.refer_level'
,
'信源等级'
);
// $grid->column('collects.net_img', '截图链接');
$grid
->
column
(
'status'
,
'状态'
)
->
display
(
function
(
$statusValue
)
{
//是当前字段的值
...
...
app/Admin/Controllers/AlreadyDoneTaskController.php
View file @
66cebc84
...
...
@@ -4,6 +4,7 @@ namespace App\Admin\Controllers;
use
App\Admin\Extensions\Tools\BackAction
;
use
App\Admin\Repositories\TasksReceive
;
use
App\Admin\Services\CityAreaService
;
use
App\Models\TasksApprove
;
use
App\Models\TasksCollect
;
use
Dcat\Admin\Actions\Action
;
...
...
@@ -44,15 +45,29 @@ class AlreadyDoneTaskController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'task.name'
,
'指标名称'
);
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'task.year'
,
'时间'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'task.level'
,
'等级'
);
$grid
->
column
(
'task.price'
,
'单价'
);
$grid
->
column
(
'collects.value'
,
'指标值'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
// $grid->column('collects.net_img', '网页截图');
$grid
->
column
(
'status'
,
'状态'
)
->
display
(
function
(
$val
)
{
...
...
app/Admin/Controllers/AlreadySettlementController.php
View file @
66cebc84
...
...
@@ -10,42 +10,47 @@ use Dcat\Admin\Http\Controllers\AdminController;
class
AlreadySettlementController
extends
AdminController
{
protected
$title
=
'已经结算任务'
;
protected
$title
=
'已经结算'
;
protected
function
grid
()
{
return
Grid
::
make
(
TasksOrder
::
query
(),
function
(
Grid
$grid
)
{
$user
=
Admin
::
user
();
$grid
->
model
()
->
where
(
'user_id'
,
$user
->
id
);
// 在 display 回调中使用
$grid
->
column
(
'序号'
)
->
display
(
function
()
{
return
$this
->
_index
+
1
;
});
$user
=
Admin
::
user
();
if
(
$user
->
is_admin
==
1
)
{
return
response
()
->
redirectTo
(
'/orders'
);
}
else
{
return
Grid
::
make
(
TasksOrder
::
query
(),
function
(
Grid
$grid
)
use
(
$user
)
{
$grid
->
model
()
->
where
(
'user_id'
,
$user
->
id
);
// 在 display 回调中使用
$grid
->
column
(
'序号'
)
->
display
(
function
()
{
return
$this
->
_index
+
1
;
});
// $grid->column('id')->sortable();
$grid
->
column
(
'time'
,
'结算时间'
);
$grid
->
column
(
'num'
,
'数量'
);
$grid
->
column
(
'amount'
,
'金额'
);
$grid
->
column
(
'pay_img'
,
'转账截图'
);
$grid
->
column
(
'status'
,
'状态'
)
->
display
(
function
(
$val
)
{
return
TasksOrder
::
ORDER_STATUS_DESC
[
$val
];
});
$grid
->
column
(
'time'
,
'结算时间'
);
$grid
->
column
(
'num'
,
'数量'
);
$grid
->
column
(
'amount'
,
'金额'
);
$grid
->
column
(
'pay_img'
,
'转账截图'
);
$grid
->
column
(
'status'
,
'状态'
)
->
display
(
function
(
$val
)
{
return
TasksOrder
::
ORDER_STATUS_DESC
[
$val
];
});
// $grid->column('created_at');
// $grid->column('updated_at')->sortable();
$grid
->
actions
(
function
(
Grid\Displayers\Actions
$actions
)
use
(
$user
)
{
$actions
->
append
(
new
OrderDetailAction
());
//
$grid
->
actions
(
function
(
Grid\Displayers\Actions
$actions
)
use
(
$user
)
{
$actions
->
append
(
new
OrderDetailAction
());
//
});
});
$grid
->
disableCreateButton
()
->
disableDeleteButton
()
->
disableEditButton
()
->
disableViewButton
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$grid
->
disableCreateButton
()
->
disableDeleteButton
()
->
disableEditButton
()
->
disableViewButton
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
// $filter->equal('id');
});
});
}
);
}
}
}
app/Admin/Controllers/CreateOrderController.php
View file @
66cebc84
...
...
@@ -6,6 +6,7 @@ use App\Admin\Extensions\Tools\CreateSettlementOrder;
use
App\Admin\Extensions\Tools\ReturnBack
;
use
App\Admin\Extensions\Tools\UserConfirmOrder
;
use
App\Admin\Repositories\TasksReceive
;
use
App\Admin\Services\CityAreaService
;
use
App\Models\AdminUser
;
use
App\Models\TasksOrder
;
use
Dcat\Admin\Admin
;
...
...
@@ -37,13 +38,27 @@ class CreateOrderController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'task.name'
,
'指标名称'
);
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'task.year'
,
'时间'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'task.price'
,
'单价'
);
$grid
->
column
(
'collects.value'
,
'指标值'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'status'
,
'状态'
)
->
display
(
function
(
$val
)
{
return
\App\Models\TasksReceive
::
STATUS_DESC
[
$val
];
...
...
app/Admin/Controllers/NoDoneTaskController.php
View file @
66cebc84
...
...
@@ -4,6 +4,7 @@ namespace App\Admin\Controllers;
use
App\Admin\Extensions\Tools\BackAction
;
use
App\Admin\Repositories\TasksReceive
;
use
App\Admin\Services\CityAreaService
;
use
App\Models\TasksApprove
;
use
App\Models\TasksCollect
;
use
Dcat\Admin\Actions\Action
;
...
...
@@ -45,9 +46,17 @@ class NoDoneTaskController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'task.name'
,
'指标名称'
);
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'task.year'
,
'时间'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'task.level'
,
'等级'
);
...
...
app/Admin/Controllers/TaskController.php
View file @
66cebc84
...
...
@@ -6,6 +6,7 @@ use App\Admin\Extensions\Tools\BatchReceiveAction;
use
App\Admin\Extensions\Tools\CreateSettlementOrder
;
use
App\Admin\Extensions\Tools\ReceiveAction
;
use
App\Admin\Repositories\Task
;
use
App\Admin\Services\CityAreaService
;
use
App\Models\TasksReceive
;
use
Dcat\Admin\Admin
;
use
Dcat\Admin\Form
;
...
...
@@ -56,9 +57,17 @@ class TaskController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'name'
);
$grid
->
column
(
'level'
);
$grid
->
column
(
'city_id'
)
->
distpicker
();
$grid
->
column
(
'city_id'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'year'
);
$grid
->
column
(
'refer'
);
$grid
->
column
(
'refer'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
// $grid->column('guide');
// $grid->column('status');
// $grid->column('created_at');
...
...
@@ -135,9 +144,18 @@ class TaskController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'name'
);
$grid
->
column
(
'level'
);
$grid
->
column
(
'city_id'
)
->
distpicker
();
// $grid->column('city_id')->distpicker();
$grid
->
column
(
'city_id'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'year'
);
$grid
->
column
(
'refer'
);
$grid
->
column
(
'refer'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
// $grid->column('guide');
// $grid->column('status');
// $grid->column('created_at');
...
...
app/Admin/Controllers/TaskReceiveController.php
View file @
66cebc84
...
...
@@ -5,6 +5,7 @@ namespace App\Admin\Controllers;
use
App\Admin\Extensions\Tools\BackAction
;
use
App\Admin\Extensions\Tools\OrderDetailAction
;
use
App\Admin\Repositories\TasksReceive
;
use
App\Admin\Services\CityAreaService
;
use
App\Models\TasksApprove
;
use
App\Models\TasksCollect
;
use
App\Models\TasksOrder
;
...
...
@@ -101,16 +102,30 @@ class TaskReceiveController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'task.name'
,
'指标名称'
);
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'task.year'
,
'时间'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'task.level'
,
'等级'
);
if
(
$status
==
1
)
{
$grid
->
column
(
'task.price'
,
'单价'
);
$grid
->
column
(
'collects.value'
,
'指标值'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
// $grid->column('collects.net_img', '网页截图');
}
...
...
app/Admin/Controllers/TasksApproveController.php
View file @
66cebc84
...
...
@@ -22,13 +22,13 @@ use SuperEggs\DcatDistpicker\DcatDistpickerHelper;
class
TasksApproveController
extends
AdminController
{
protected
$title
=
'未审核'
;
protected
$title
=
'未审核'
;
public
function
checkData
(
$status
)
{
$content
=
Content
::
make
();
return
$content
->
body
(
view
(
'admin.check'
,
[
'id'
=>
1
]));
return
$content
->
body
(
view
(
'admin.check'
,
[
'id'
=>
1
]));
}
protected
function
getData22
(
$status
)
...
...
@@ -50,9 +50,17 @@ class TasksApproveController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'name'
,
'指标名称'
);
$grid
->
column
(
'city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'city_id'
,
'地区'
)
->
display
(
function
(
$v
)
{
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'year'
,
'时间'
);
$grid
->
column
(
'refer'
,
'参考信源'
);
$grid
->
column
(
'refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'price'
,
'单价'
);
$grid
->
disableEditButton
()
->
disableDeleteButton
()
->
disableCreateButton
()
->
disableFilterButton
()
->
disableBatchDelete
();
...
...
@@ -76,7 +84,13 @@ class TasksApproveController extends AdminController
$grid
->
column
(
'collects.value'
,
'指标值'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'collects.refer_level'
,
'信源等级'
);
// $grid->column('collects.net_img', '截图链接');
...
...
@@ -93,7 +107,7 @@ class TasksApproveController extends AdminController
$content
=
Content
::
make
();
$row
=
new
Row
();
$row
->
column
(
12
,
function
(
Column
$column
)
use
(
$header
){
$row
->
column
(
12
,
function
(
Column
$column
)
use
(
$header
)
{
$column
->
row
(
$header
...
...
@@ -129,7 +143,8 @@ class TasksApproveController extends AdminController
// $model = \App\Models\Task::query()->with(['approves'])->whereIn('id',$taskIds);
// dd($taskIds);
return
Grid
::
make
(
TasksApprove
::
with
([
'task'
,
'collects'
,
'user'
]),
function
(
Grid
$grid
)
{
return
Grid
::
make
(
TasksApprove
::
with
([
'task'
,
'collects'
,
'user'
]),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
where
(
'status'
,
0
)
->
orderBy
(
'task_id'
,
'desc'
);
// 在 display 回调中使用
...
...
@@ -140,13 +155,27 @@ class TasksApproveController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'task.name'
,
'指标名称'
);
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
display
(
function
(
$v
)
{
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'task.year'
,
'时间'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'task.price'
,
'单价'
);
$grid
->
column
(
'collects.value'
,
'指标值'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'collects.refer_level'
,
'信源等级'
);
// $grid->column('collects.net_img', '截图链接');
...
...
app/Admin/Controllers/TasksCollectController.php
View file @
66cebc84
...
...
@@ -23,17 +23,23 @@ class TasksCollectController extends AdminController
$grid
->
column
(
'user_id'
);
$grid
->
column
(
'receive_id'
);
$grid
->
column
(
'value'
);
$grid
->
column
(
'reality_refer'
);
$grid
->
column
(
'reality_refer'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'refer_level'
);
$grid
->
column
(
'net_img'
);
$grid
->
column
(
'is_find'
);
$grid
->
column
(
'remark'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'updated_at'
)
->
sortable
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
equal
(
'id'
);
});
});
}
...
...
@@ -81,7 +87,7 @@ class TasksCollectController extends AdminController
$form
->
text
(
'net_img'
);
$form
->
text
(
'is_find'
);
$form
->
text
(
'remark'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
});
...
...
app/Admin/Controllers/TasksOrderController.php
View file @
66cebc84
...
...
@@ -6,6 +6,7 @@ use App\Admin\Extensions\Tools\CreateSettlementOrder;
use
App\Admin\Extensions\Tools\ReturnBack
;
use
App\Admin\Extensions\Tools\UserConfirmOrder
;
use
App\Admin\Repositories\TasksReceive
;
use
App\Admin\Services\CityAreaService
;
use
App\Models\AdminUser
;
use
App\Models\TasksOrder
;
use
Dcat\Admin\Admin
;
...
...
@@ -66,15 +67,29 @@ class TasksOrderController extends AdminController
// $grid->column('id')->sortable();
$grid
->
column
(
'task.name'
,
'指标名称'
);
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
distpicker
();
$grid
->
column
(
'task.city_id'
,
'地区'
)
->
display
(
function
(
$v
){
return
CityAreaService
::
getAreaName
(
$v
);
});
$grid
->
column
(
'task.year'
,
'时间'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
);
$grid
->
column
(
'task.refer'
,
'参考信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
$grid
->
column
(
'task.level'
,
'等级'
);
$grid
->
column
(
'task.price'
,
'单价'
);
$grid
->
column
(
'collects.value'
,
'指标值'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
);
$grid
->
column
(
'collects.reality_refer'
,
'实际信源'
)
->
display
(
function
(
$val
)
{
if
(
filter_var
(
$val
,
FILTER_VALIDATE_URL
)
!==
false
)
{
//是链接
return
"<a href=
{
$val
}
target='_blank' style='color: #00b44e'>点击查看</a>"
;
}
else
{
return
$val
;
}
});
// $grid->column('collects.net_img', '网页截图');
...
...
@@ -116,6 +131,7 @@ class TasksOrderController extends AdminController
});
}
protected
$title
=
'结算'
;
/**
* Make a grid builder.
...
...
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