Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
stock_new
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
stock_new
Commits
f4afec72
Commit
f4afec72
authored
Jun 19, 2024
by
twj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
期权计划明细
parent
2c909e78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
1 deletion
+110
-1
application/money/admin/Esoplayrecord.php
application/money/admin/Esoplayrecord.php
+76
-0
application/money/admin/Esopplan.php
application/money/admin/Esopplan.php
+1
-1
application/money/model/EsopPlanRecord.php
application/money/model/EsopPlanRecord.php
+33
-0
No files found.
application/money/admin/Esoplayrecord.php
0 → 100644
View file @
f4afec72
<?php
namespace
app\money\admin
;
use
app\admin\controller\Admin
;
use
app\common\builder\ZBuilder
;
use
app\money\model\EsopPlan
as
EsopPlanModel
;
use
app\money\model\EsopPlanRecord
as
EsopPlanRecordModel
;
use
app\member\model\Member
as
MemberModel
;
use
app\stock\model\StockList
as
StockListModel
;
use
think\Db
;
use
think\Hook
;
use
think\Cache
;
/**
* 期权计划管理控制器
* @package app\money\admin
*/
class
EsopplanRecord
extends
Admin
{
/**
* 首页
* @return mixed
*/
public
function
index
()
{
cookie
(
'__forward__'
,
$_SERVER
[
'REQUEST_URI'
]);
// 获取查询条件
$map
=
$this
->
getMap
();
$order
=
$this
->
getOrder
();
empty
(
$order
)
&&
$order
=
'id desc'
;
// 数据列表
$data_list
=
EsopPlanRecordModel
::
getAll
(
$map
,
$order
);
// 分页数据
$page
=
$data_list
->
render
();
if
(
empty
(
$_SERVER
[
"QUERY_STRING"
]))
{
$excel_url
=
substr
(
http
()
.
$_SERVER
[
"SERVER_NAME"
]
.
$_SERVER
[
"REQUEST_URI"
],
0
,
-
5
)
.
"_export"
;
}
else
{
$excel_url
=
substr
(
http
()
.
$_SERVER
[
"SERVER_NAME"
]
.
$_SERVER
[
"PHP_SELF"
],
0
,
-
5
)
.
"_export?"
.
$_SERVER
[
"QUERY_STRING"
];
}
$btn_excel
=
[
'title'
=>
'导出EXCEL表'
,
'icon'
=>
'fa fa-fw fa-download'
,
'href'
=>
url
(
$excel_url
,
''
,
''
)
];
return
ZBuilder
::
make
(
'table'
)
->
setSearch
([
'mid'
=>
'用户ID'
,
'member.name'
=>
'姓名'
,
'member.mobile'
=>
'手机号'
])
// 设置搜索框
->
addColumns
([
// 批量添加数据列
[
'id'
,
'ID'
],
[
'esop_plan_id'
,
'期权计划id'
],
[
'name'
,
'姓名'
],
[
'title'
,
'股票'
],
[
'affect'
,
'金额'
],
[
'surplus'
,
'余额'
],
[
'type'
,
'类型'
],
[
'info'
,
'详情'
],
[
'create_ip'
,
'创建IP'
],
[
'create_time'
,
'创建时间'
,
'datetime'
],
])
->
hideCheckbox
()
->
setTableName
(
'esop_plan'
)
->
addTopButton
(
'custem'
,
$btn_excel
)
->
addOrder
(
'id,create_time,release_time'
)
->
setRowList
(
$data_list
)
->
fetch
();
// 渲染模板
}
/**
* 自动任务,根据设定的期权计划执行释放期权
*/
public
function
releaseEsop
()
{
}
}
application/money/admin/Esopplan.php
View file @
f4afec72
...
...
@@ -58,7 +58,7 @@ class Esopplan extends Admin
[
'duration'
,
'总释放天数'
],
[
'days'
,
'已释放天数'
],
[
'release_time'
,
'开始释放时间'
],
[
'create_time'
,
'创建时间'
],
[
'create_time'
,
'创建时间'
,
'datetime'
],
[
'status'
,
'状态'
,
'switch'
],
])
->
hideCheckbox
()
...
...
application/money/model/EsopPlanRecord.php
0 → 100644
View file @
f4afec72
<?php
namespace
app\money\model
;
use
think\helper\Hash
;
use
app\money\model\Role
as
RoleModel
;
use
think\model
;
use
think\Db
;
class
EsopPlanRecord
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'__ESOP__PLAN__Record__'
;
public
static
function
getAll
(
$map
=
[],
$order
=
''
)
{
$data_list
=
self
::
view
(
'esop_plan_record pr'
,
true
)
->
view
(
'member'
,
'mobile, name, id_card'
,
'member.id=p.mid'
,
'left'
)
->
view
(
'stock_list'
,
'title'
,
'stock_list.id=p.stock_id'
,
'left'
)
->
view
(
'esop_plan p'
,
'id'
,
'p.id=pr.esop_plan_id'
)
->
where
(
$map
)
->
order
(
$order
)
->
paginate
()
->
each
(
function
(
$item
,
$key
){
$item
->
affect
=
money_convert
(
$item
->
affect
);
$item
->
surplus
=
money_convert
(
$item
->
surplus
);
});
return
$data_list
;
}
}
?>
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