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
5b8a080c
Commit
5b8a080c
authored
Jul 24, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4b48ffb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
common.php
application/common.php
+15
-0
CostDetail.php
application/index/controller/CostDetail.php
+2
-3
CostParameter.php
application/index/controller/CostParameter.php
+4
-0
No files found.
application/common.php
View file @
5b8a080c
...
...
@@ -263,4 +263,18 @@ function curl_post($url, array $params = array(), $timeout)
$data
=
curl_exec
(
$ch
);
//运行curl
curl_close
(
$ch
);
return
(
$data
);
}
/**
* 判断输入的字符串是否是合法日期
* @param $data
* @return bool
*/
function
checkDate
(
$data
){
$date
=
strtotime
(
$data
);
if
(
$data
==
(
date
(
"Y-m-d"
,
$date
))
||
$data
==
(
date
(
"Y-m-j"
,
$date
))
||
$data
==
(
date
(
"Y-n-d"
,
$date
))
||
$data
==
(
date
(
"Y-n-j"
,
$date
)))
return
true
;
//合法
else
return
false
;
//非法
}
\ No newline at end of file
application/index/controller/CostDetail.php
View file @
5b8a080c
...
...
@@ -450,11 +450,10 @@ class CostDetail extends Basic
//计入月份
$conditions
[
"b.setting_date"
]
=
$params
[
"setting_date"
];
//门店id
$conditions
[
"b.store_id"
]
=
$params
[
"store_id"
];
$conditions
[
"a.store_id"
]
=
$params
[
"store_id"
];
$field
=
'a.id,a.cost_id,b.setting_date,a.create_time,b.operator_name,
a.type,a.fee_item,a.purpose,
c
.store_id,a.assume_fee'
;
a.type,a.fee_item,a.purpose,
b
.store_id,a.assume_fee'
;
$list
=
$this
->
storeCostExt
->
getMyCostDetailList
(
$field
,
$conditions
);
if
(
!
$list
)
...
...
application/index/controller/CostParameter.php
View file @
5b8a080c
...
...
@@ -57,6 +57,10 @@ class CostParameter extends Basic
return
$this
->
response
(
"101"
,
$checkResult
);
}
if
(
!
checkDate
(
$params
[
'setting_date'
])){
return
$this
->
response
(
"101"
,
'非法时间'
);
}
$conditions
=
[];
//门店
if
(
!
empty
(
$params
[
'store_id'
]))
{
...
...
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