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
f3633f8d
Commit
f3633f8d
authored
Dec 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
财务日报列表
parent
893d9c1b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
3 deletions
+73
-3
Finance.php
application/index/controller/Finance.php
+70
-1
ODaily.php
application/model/ODaily.php
+3
-2
No files found.
application/index/controller/Finance.php
View file @
f3633f8d
...
...
@@ -20,6 +20,7 @@ use app\model\GHouses;
use
app\model\GHousesToAgents
;
use
app\model\OBargainLogModel
;
use
app\model\OBargainModel
;
use
app\model\ODaily
;
use
app\model\OImg
;
use
app\model\OMarchInModel
;
use
app\model\OPayLogAdjustment
;
...
...
@@ -3055,8 +3056,76 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
/**
* 财务日报
*
* @return \think\Response|\think\response\View
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
dailyList
()
{
return
view
(
'daily_list'
);
if
(
!
$this
->
request
->
isAjax
())
{
// return view('daily_list');
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$where
[
'is_del'
]
=
0
;
if
(
!
empty
(
$this
->
params
[
'id'
]))
{
$where
[
'id'
]
=
$this
->
params
[
'id'
];
}
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
}
if
(
!
empty
(
$this
->
params
[
'daily_start_time'
])
&&
empty
(
$this
->
params
[
'daily_end_time'
]))
{
$where
[
'daily_date'
]
=
[
'> time'
,
$this
->
params
[
'daily_start_time'
]];
}
if
(
!
empty
(
$this
->
params
[
'daily_end_time'
])
&&
empty
(
$this
->
params
[
'daily_start_time'
]))
{
$where
[
'daily_date'
]
=
[
'< time'
,
$this
->
params
[
'daily_end_time'
]];
}
if
(
!
empty
(
$this
->
params
[
'daily_end_time'
])
&&
!
empty
(
$this
->
params
[
'daily_start_time'
]))
{
$where
[
'daily_date'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
],
$this
->
params
[
'daily_end_time'
]]
];
}
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
$where
[
'district_id'
]
=
$this
->
params
[
'district_id'
];
}
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'agent_id'
]
=
$this
->
params
[
'agent_id'
];
}
$m_daily
=
new
ODaily
();
$m_store
=
new
AStore
();
$field
=
'id,agent_id,create_time,daily_date,store_id,status'
;
$list
=
$m_daily
->
getList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
foreach
(
$list
as
$k
=>
$v
)
{
$store_name
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$v
[
'store_id'
]]);
$list
[
$k
][
'store_name'
]
=
empty
(
$store_name
)
?
''
:
$store_name
;
}
$data
[
'list'
]
=
$list
;
$data
[
'total'
]
=
$m_daily
->
getTotal
(
$where
);
return
$this
->
response
(
200
,
''
,
$data
);
}
public
function
dailyDetails
()
{
...
...
application/model/ODaily.php
View file @
f3633f8d
...
...
@@ -11,13 +11,14 @@ use think\Model;
* Time : 11:26 AM
* Intro:
*/
class
ODaily
extends
Model
{
class
ODaily
extends
Base
Model
{
protected
$table
=
"o_daily"
;
private
$db_
;
public
function
__construct
()
public
function
__construct
(
$data
=
[]
)
{
parent
::
__construct
(
$data
);
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
...
...
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