Commit db5e9ca0 authored by zhuwei's avatar zhuwei

1

parent 60f496e7
......@@ -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
......@@ -21,6 +21,7 @@ class CostParameterValidate extends Validate {
protected $scene = [
'editCostParameter' => [ 'store_id', 'setting_date'],
'getCompanyCostParameterList' => [ 'setting_date'],
];
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ class FCompanyData extends BaseModel
* @param $data
* @return mixed
*/
public function saveOffice($data) {
public function saveCompanyData($data) {
$time = date("Y-m-d H:i:s", time());
$data["is_del"] = 0;
$data['create_time'] = $time;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment