Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
b6419b05
Commit
b6419b05
authored
Jul 19, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成本明细表
parent
561e2e76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
CostDetail.php
application/index/controller/CostDetail.php
+8
-14
FStoreCostExt.php
application/model/FStoreCostExt.php
+4
-0
route.php
application/route.php
+3
-0
No files found.
application/index/controller/CostDetail.php
View file @
b6419b05
...
...
@@ -5,6 +5,7 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\api\service\ActivityService
;
use
app\model\CActivity
;
use
app\model\FStoreCostExt
;
use
think\Request
;
/**
...
...
@@ -16,31 +17,24 @@ use think\Request;
*/
class
CostDetail
extends
Basic
{
private
$
activityService
;
private
$
storeCostExt
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
activityService
=
new
ActivityService
();
$this
->
storeCostExt
=
new
FStoreCostExt
();
}
/**
* 获取活动列表
* doc url :http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=818
* 成本明细表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
get
Activity
List
()
public
function
get
CostDetail
List
()
{
$params
=
$this
->
params
;
/* $params = array(
"id" => 1,
"title" => "asd",
"pageNo" => 1,
"pageSize" => 15,
);*/
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
...
...
@@ -55,8 +49,8 @@ class CostDetail extends Basic
$where_
[
"id"
]
=
$params
[
'id'
];
}
$where_
[
"status"
]
=
array
(
"neq"
,
4
);
$list
=
$
activityModel
->
getActivityLis
t
(
$field
,
$where_
,
$pageNo
,
$pageSize
);
$count
=
$
activityModel
->
getActivityCount
(
$field
,
$where_
);
$list
=
$
this
->
storeCostExt
->
getStoreCostEx
t
(
$field
,
$where_
,
$pageNo
,
$pageSize
);
$count
=
$
this
->
storeCostExt
->
getStoreCostExtTotal
(
$field
,
$where_
);
$result
[
"list"
]
=
$list
;
$result
[
"total"
]
=
$count
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
...
...
application/model/FStoreCostExt.php
View file @
b6419b05
...
...
@@ -27,6 +27,8 @@ class FStoreCostExt extends BaseModel
{
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'f_store_cost b'
,
'a.cost_id = b.id'
,
'left'
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
...
...
@@ -38,6 +40,8 @@ class FStoreCostExt extends BaseModel
{
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'f_store_cost b'
,
'a.cost_id = b.id'
,
'left'
)
->
where
(
$params
)
->
count
();
return
$result
;
...
...
application/route.php
View file @
b6419b05
...
...
@@ -537,6 +537,9 @@ Route::group('index', [
'checkCostThree/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
2
]],
//费用报销审核一审
'checkCostFour/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
3
]],
//费用报销审核二审
'checkCostFive/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
4
]],
//费用报销审核三审
'getCostDetailList'
=>
[
'index/CostDetail/getCostDetailList'
,
[
'method'
=>
'POST|GET'
]
],
]);
...
...
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