Commit 70570468 authored by hujun's avatar hujun

修改分佣方记录

parent 1d9e1c51
...@@ -468,7 +468,6 @@ class Finance extends Basic ...@@ -468,7 +468,6 @@ class Finance extends Basic
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/ */
public function overRule() public function overRule()
{ {
...@@ -1038,7 +1037,7 @@ class Finance extends Basic ...@@ -1038,7 +1037,7 @@ class Finance extends Basic
$data['code'] = 200; $data['code'] = 200;
$data['msg'] = ""; $data['msg'] = "";
$whereOr = $data['data'] = $excel_data = []; $data['data'] = $excel_data = [];
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
...@@ -1400,13 +1399,16 @@ class Finance extends Basic ...@@ -1400,13 +1399,16 @@ class Finance extends Basic
return $this->response($result['code'], $result['msg']); return $this->response($result['code'], $result['msg']);
} }
/** /**
* 成交报告分佣方详情 * 成交报告分佣方详情
* *
* @return type * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function getBargainoCommission() { public function getBargainCommission() {
if (empty($this->params['bargain_id'])) { if (empty($this->params['bargain_id'])) {
return $this->response(101, '成交报告id为空'); return $this->response(101, '成交报告id为空');
} }
...@@ -1430,7 +1432,25 @@ class Finance extends Basic ...@@ -1430,7 +1432,25 @@ class Finance extends Basic
$update['agent_id'] = $this->params['agent_id']; $update['agent_id'] = $this->params['agent_id'];
$update['scale'] = $this->params['scale']; $update['scale'] = $this->params['scale'];
$data = $m_bargain->updateBargainById($this->params['bargain_id'], $update); $data = $m_bargain->updateBargainById($this->params['bargain_id'], $update);
/*记录日志 start*/
$bargain_data = $m_bargain->selectBargainByOrderNo('agent_id,father_id', ['id'=>$this->params['bargain_id']]);
$father_id = $this->params['bargain_id'];
if ($bargain_data[0]['father_id'] != 0) {
$father_id = $bargain_data[0]['father_id'];
}
$agent_id[0] = $bargain_data[0]['agent_id'];
$agent_id[1] = $this->params['agent_id'];
$m_agent = new AAgents();
$agent_data = $m_agent->getAgentById('id,name,phone', ['in_id'=>$agent_id]);
$content = '修改成交报告【编号:'.$father_id.'】【分佣方:'.$agent_data[0]['name'].'-'.$agent_data[0]['phone']
.'修改为:'.$agent_data[1]['name'].'-'.$agent_data[1]['phone'].'】';
$this->editRecordLog($this->params['bargain_id'], $content);
/*记录日志 end*/
return $this->response(200, '修改成功', $data); return $this->response(200, '修改成功', $data);
} }
} }
...@@ -272,8 +272,9 @@ class AAgents extends BaseModel ...@@ -272,8 +272,9 @@ class AAgents extends BaseModel
if (isset($params["level"])) { if (isset($params["level"])) {
$where_["level"] = $params["level"]; $where_["level"] = $params["level"];
} }
if (isset($params['in_id'])) {
$where_['id'] = ['in', $params['in_id']];
}
$result = $this->field($field) $result = $this->field($field)
->where($where_) ->where($where_)
->select(); ->select();
......
...@@ -98,7 +98,9 @@ class OBargainModel extends Model ...@@ -98,7 +98,9 @@ class OBargainModel extends Model
if (isset($params["agent_id"])) { if (isset($params["agent_id"])) {
$where_["agent_id"] = $params["agent_id"]; $where_["agent_id"] = $params["agent_id"];
} }
if (isset($params['id'])) {
$where_['id'] = $params['id'];
}
return $this->db_ return $this->db_
->field($filed) ->field($filed)
->where($where_) ->where($where_)
...@@ -108,8 +110,12 @@ class OBargainModel extends Model ...@@ -108,8 +110,12 @@ class OBargainModel extends Model
/** /**
* 根据商铺号查询成交报告中业态 * 根据商铺号查询成交报告中业态
*
* @param $house_id * @param $house_id
* @return false|\PDOStatement|string|\think\Collection * @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function selectBargainListByHouseId($house_id) public function selectBargainListByHouseId($house_id)
{ {
...@@ -1113,14 +1119,15 @@ class OBargainModel extends Model ...@@ -1113,14 +1119,15 @@ class OBargainModel extends Model
->where('a.id', $id) ->where('a.id', $id)
->find(); ->find();
} }
/** /**
* 成交报告分佣方详情 * 成交报告分佣方详情
* *
* @param type $param * @param $filed
* @return boolean * @param $params
* @return array|bool|false|\PDOStatement|string|Model
*/ */
public function getBargainPartialDetail($filed, $param) { public function getBargainPartialDetail($filed, $params) {
$where_ = $whereOr_ = []; $where_ = $whereOr_ = [];
if (isset($param["bargain_id"])) { if (isset($param["bargain_id"])) {
$where_["a.id"] = $params["bargain_id"]; $where_["a.id"] = $params["bargain_id"];
...@@ -1128,7 +1135,7 @@ class OBargainModel extends Model ...@@ -1128,7 +1135,7 @@ class OBargainModel extends Model
} }
if (isset($param['id'])) { if (isset($param['id'])) {
$where_['a.id'] = $param['id']; $where_['a.id'] = $params['id'];
} }
try { try {
......
...@@ -234,7 +234,7 @@ Route::group('index', [ ...@@ -234,7 +234,7 @@ Route::group('index', [
'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单 'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单
'delPartialCommission' => [ 'index/Finance/delPartialCommission', [ 'method' => 'POST' ] ], //删除分佣方 'delPartialCommission' => [ 'index/Finance/delPartialCommission', [ 'method' => 'POST' ] ], //删除分佣方
'delTaxes' => [ 'index/Finance/delTaxes', [ 'method' => 'POST' ] ], //删除开票税费 'delTaxes' => [ 'index/Finance/delTaxes', [ 'method' => 'POST' ] ], //删除开票税费
'getBargainoCommission' => [ 'index/Finance/getBargainoCommission', [ 'method' => 'GET|POST' ] ], //获取成交报告分佣方佣金和修改 'getBargainCommission' => [ 'index/Finance/getBargainCommission', [ 'method' => 'GET|POST' ] ], //获取成交报告分佣方佣金和修改
'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存 'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存
'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片 'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片
'receiptImgList' => [ 'index/Collection/receiptImgList', [ 'method' => 'post|get' ] ],//收款列表-收款图片列表 'receiptImgList' => [ 'index/Collection/receiptImgList', [ '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