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
db5e9ca0
Commit
db5e9ca0
authored
Jul 23, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
60f496e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
1 deletion
+82
-1
CostParameter.php
application/index/controller/CostParameter.php
+79
-0
CostParameterValidate.php
application/index/validate/CostParameterValidate.php
+2
-0
FCompanyData.php
application/model/FCompanyData.php
+1
-1
No files found.
application/index/controller/CostParameter.php
View file @
db5e9ca0
...
...
@@ -10,6 +10,7 @@ use app\model\AAgents;
use
app\model\AStore
;
use
app\model\CActivity
;
use
app\model\FApplyForFeeCheck
;
use
app\model\FCompanyData
;
use
app\model\FStoreCostExt
;
use
app\model\FStoreData
;
use
app\model\OPartialCommission
;
...
...
@@ -26,12 +27,14 @@ class CostParameter extends Basic
{
private
$m_store
;
private
$m_store_data
;
private
$m_company_data
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
m_store
=
new
AStore
();
$this
->
m_store_data
=
new
FStoreData
();
$this
->
m_company_data
=
new
FCompanyData
();
}
...
...
@@ -257,4 +260,79 @@ class CostParameter extends Basic
}
/**
* 总部成本
* @return \think\Response
*/
public
function
getCompanyCostParameterList
()
{
// $params = $this->params;
//
// // $params = array(
// // "store_id" => '1',
// // "setting_date" => '2019-07-01',
// // );
//
// $checkResult = $this->validate($params, "CostParameterValidate.getCompanyCostParameterList");
// if (true !== $checkResult) {
// return $this->response("101", $checkResult);
// }
// //费用类型 0上海总部成本 1杭州总部成本 2深圳总部成本 3广州总部成本 4北京总部成本 5同联发展基金 6总经理基薪
// $type_list = [0,1,2,3,4,5,6];
// foreach ($type_list as $k => $v) {
// // `fixed_fee` decimal(9,2) DEFAULT '0.00' COMMENT '本月固定成本 如果type为同联发展基金和总经理基薪逻辑独立判断',
// // `apply_for_fee` decimal(7,2) DEFAULT '0.00' COMMENT '本月报销费用',
// // `discounts` tinyint(2) DEFAULT '0' COMMENT '百分比 5% 存 5 ',
//
// $list_['type'] = ;
// $list_['fixed_fee'] = ;
// $list_['apply_for_fee'] = ;
// $list_['discounts'] = ;
// $list_['type'] = ;
//
// $list = $list_;
// }
//
//
// $result["list"] = $list;
// return $this->response("200", "success", $result);
}
// $this->m_company_data->saveCompanyData($data);
public
function
editCompanyCostParameter
()
{
$params
=
$this
->
params
;
// $params = array(
// "type" => '1',
// "setting_date" => '2019-07-23',
// );
//`fixed_fee` decimal(9,2) DEFAULT '0.00' COMMENT '本月固定成本 如果type为同联发展基金和总经理基薪逻辑独立判断',
//`apply_for_fee` decimal(7,2) DEFAULT '0.00' COMMENT '本月报销费用',
//`discounts` tinyint(2) DEFAULT '0' COMMENT '百分比 5% 存 5 ',
// $checkResult = $this->validate($params, "CostParameterValidate.editCostParameter");
// if (true !== $checkResult) {
// return $this->response("101", $checkResult);
// }
//
// $f_params['store_id'] = $params['store_id'];
// $f_params['setting_date'] = $params['setting_date'];
// $store_data_res = $this->m_store_data->findByOne('id',$params);
//
// if ($store_data_res) {//修改
// $this->updateStoreData($store_data_res['id'],$params);
// } else {//新增
// $this->saveStoreData($params);
// }
return
$this
->
response
(
"200"
,
"成功"
);
}
}
\ No newline at end of file
application/index/validate/CostParameterValidate.php
View file @
db5e9ca0
...
...
@@ -21,6 +21,7 @@ class CostParameterValidate extends Validate {
protected
$scene
=
[
'editCostParameter'
=>
[
'store_id'
,
'setting_date'
],
'getCompanyCostParameterList'
=>
[
'setting_date'
],
];
}
\ No newline at end of file
application/model/FCompanyData.php
View file @
db5e9ca0
...
...
@@ -22,7 +22,7 @@ class FCompanyData extends BaseModel
* @param $data
* @return mixed
*/
public
function
save
Office
(
$data
)
{
public
function
save
CompanyData
(
$data
)
{
$time
=
date
(
"Y-m-d H:i:s"
,
time
());
$data
[
"is_del"
]
=
0
;
$data
[
'create_time'
]
=
$time
;
...
...
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