Commit b06ce52d authored by hujun's avatar hujun

add

parent 168cbe75
......@@ -17,6 +17,7 @@ use app\model\OfficeOPayLogModel;
use app\model\OfficeOrderModel;
use app\model\OfficeORefundModel;
use app\model\OfficeOReportModel;
use app\model\OfficeOTaxes;
use think\Request;
class OfficePayLog extends Basic
......@@ -1341,4 +1342,56 @@ class OfficePayLog extends Basic
return $this->response($data['code'], $data['msg'], $data['data']);
}
/**
* 成交报告详情-分佣提成
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function commissionList()
{
$data['code'] = 200;
$data['msg'] = "";
$data['data'] = [];
if (empty($this->params['id'])) {
$data['code'] = 101;
$data['msg'] = 'Id is null.';
} else {
$fields = 'a.id,a.role,a.agent_id,a.scale,a.scale_fee,a.father_id';
$where[0] = [ 'EXP', "a.id = {$this->params['id']} or a.father_id = {$this->params['id']}" ];
$where['a.status'] = [ '<>', 30 ];
$data['data'] = $this->m_bargain->getBargainPartial(1, 100, 'a.id desc', $fields, $where, $this->params['id']);
}
return $this->response($data['code'], $data['msg'], $data['data']);
}
/**
* 开票税费查询
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getTallAgeV2()
{
if (empty($this->params['bargain_id'])) {
return $this->response(101, '查询开票税费参数错误!');
}
$m_fee = new OfficeOTaxes();
$field = 'id,total_fee,operation_date,bargain_id';
$data = $m_fee->getBargainFeeDetailV2($this->params['bargain_id'], $field);
$where['a.is_del'] = 0;
foreach ($data as $k=>$v) {
$where['a.father_id'] = $v['id'];
$where['a.bargain_id'] = $v['bargain_id'];
$data[$k]['fee_list'] = $m_fee->getTaxesAgent('a.id as fee_id,a.fee,b.phone,b.name,a.role,a.scale', $where);
}
return $this->response("200", "request success", $data);
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -1050,7 +1050,9 @@ Route::group('office_index', [
'refundPayLog' => ['index/officePayLog/refundPayLog', ['method' => 'POST']],//退款
'delPayLog' => ['index/officePayLog/delPayLog', ['method' => 'POST']],//删除收款
'delAdjustment' => ['index/officePayLog/delAdjustment', ['method' => 'post']],//撤销调整
'bargainInfo' => ['index/officePayLog/bargainInfo', ['method' => 'post']],//成交报告详情
'bargainInfo' => ['index/officePayLog/bargainInfo', ['method' => 'post']],//成交报告详情
'commissionList' => ['index/officePayLog/commissionList', ['method' => 'post']],//成交报告分佣提成
'getTallAge' => ['index/officePayLog/getTallAgeV2', ['method' => 'post']],//成交报告分佣提成
]);
......
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