Commit 0751e26a authored by hujun's avatar hujun

增加实收佣金

parent fb8dff29
...@@ -586,4 +586,19 @@ class Finance extends Basic ...@@ -586,4 +586,19 @@ class Finance extends Basic
$export->exportTable('分佣提成明细',$data, 8); $export->exportTable('分佣提成明细',$data, 8);
return ; return ;
} }
/**
* 增加实收佣金
*
* @return \think\Response
*/
public function addRealIncome() {
if (empty($this->params['bargain_id'])) {
return $this->response(101, '新增实收参数错误');
}
$m_partial = new OPartialCommission();
$data = $m_partial->addCommission($this->params, $this->userId);
return $this->response("200", "request success", $data);
}
} }
...@@ -111,4 +111,23 @@ class OPartialCommission extends BaseModel ...@@ -111,4 +111,23 @@ class OPartialCommission extends BaseModel
->where($where) ->where($where)
->count(); ->count();
} }
/**
* 增加实收佣金
*
* @param $data
* @param $agent_id
* @return int|string
*/
public function addCommission($data, $agent_id) {
$insert_data['bargain_id'] = $data['bargain_id'];
$insert_data['practical_fee'] = $data['practical_fee'];
$insert_data['cash'] = $data['cash'];
$insert_data['service_charge'] = $data['service_charge'];
$insert_data['tallage'] = $data['tallage'];
$insert_data['charity_fund'] = $data['charity_fund'];
$insert_data['real_fee'] = $data['real_fee'];
$insert_data['agent_id'] = $agent_id;
return $this->insert($insert_data);
}
} }
\ No newline at end of file
...@@ -217,6 +217,7 @@ Route::group('index', [ ...@@ -217,6 +217,7 @@ Route::group('index', [
'phone_up_list' => ['index/remark/phone_up_list', [ 'method' => 'get|post' ] ], //电话跟进列表 'phone_up_list' => ['index/remark/phone_up_list', [ 'method' => 'get|post' ] ], //电话跟进列表
'selectReportAll' => ['index/Finance/selectReportAll', [ 'method' => 'get|post' ] ], //时间轴 'selectReportAll' => ['index/Finance/selectReportAll', [ 'method' => 'get|post' ] ], //时间轴
'partialCommissionList' => ['index/Finance/partialCommissionList', [ 'method' => 'get' ] ], //分佣提成明细表 'partialCommissionList' => ['index/Finance/partialCommissionList', [ 'method' => 'get' ] ], //分佣提成明细表
'addRealIncome' => ['index/Finance/addRealIncome', [ 'method' => 'POST' ] ], //增加实收佣金
'test123' => ['index/WatchShop/test123', [ 'method' => 'get|post' ] ], //时间轴 'test123' => ['index/WatchShop/test123', [ 'method' => 'get|post' ] ], //时间轴
'agent_zhuan_aagent' => [ 'index/agent/agent_zhuan_aagent', [ 'method' => 'post|get' ] ],//经纪人 'agent_zhuan_aagent' => [ 'index/agent/agent_zhuan_aagent', [ 'method' => 'post|get' ] ],//经纪人
'shop_a_store' => [ 'index/agent/shop_a_store', [ 'method' => 'post|get' ] ],//经纪人 'shop_a_store' => [ 'index/agent/shop_a_store', [ 'method' => 'post|get' ] ],//经纪人
......
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