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
3297b079
Commit
3297b079
authored
Jul 25, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7156eb8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
CostParameter.php
application/index/controller/CostParameter.php
+6
-5
No files found.
application/index/controller/CostParameter.php
View file @
3297b079
...
...
@@ -306,7 +306,7 @@ class CostParameter extends Basic
$f_params
[
'setting_date'
]
=
$params
[
'setting_date'
];
$f_field
=
'type,fixed_fee,apply_for_fee,discounts'
;
$list_
=
$this
->
m_company_data
->
findByOne
(
$f_field
,
$f_params
);
if
(
!
$
company_data
){
if
(
!
$
list_
){
$list_
[
'type'
]
=
$v
;
//费用类型 0上海总部成本 1杭州总部成本 2深圳总部成本 3广州总部成本 4北京总部成本 5同联发展基金 6总经理基薪
$list_
[
'fixed_fee'
]
=
0
;
//本月固定成本
$list_
[
'apply_for_fee'
]
=
$this
->
getApplyForFee
(
$v
,
$params
[
'setting_date'
]);
//本月报销费用 (其他费用)
...
...
@@ -380,7 +380,6 @@ class CostParameter extends Basic
// "save_json" => '[{"type":1},{"id":1}]',
// );
big_log
(
$params
);
$checkResult
=
$this
->
validate
(
$params
,
"CostParameterValidate.editCompanyData"
);
if
(
true
!==
$checkResult
)
{
...
...
@@ -392,14 +391,16 @@ class CostParameter extends Basic
$save_json
=
json_decode
(
$params
[
'save_json'
],
true
);
foreach
(
$save_json
as
$k
=>
$v
)
{
if
(
!
is_numeric
(
$v
[
'type'
])){
return
$this
->
response
(
"101"
,
'type不能为空'
);
}
$f_params
[
'type'
]
=
$v
[
'type'
];
$f_params
[
'setting_date'
]
=
$params
[
'setting_date'
];
$store_data_res
=
$this
->
m_company_data
->
findByOne
(
'id'
,
$f_params
);
if
(
$store_data_res
)
{
//修改
$this
->
updateCompanyData
(
$store_data_res
[
'id'
],
$v
);
$company_data_res
=
$this
->
m_company_data
->
findByOne
(
'id'
,
$f_params
);
if
(
$company_data_res
)
{
//修改
$this
->
updateCompanyData
(
$company_data_res
[
'id'
],
$v
);
}
else
{
//新增
$this
->
saveCompanyData
(
$v
);
}
...
...
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