Commit c97dd8b9 authored by hujun's avatar hujun

业绩调整开始时间

parent 0aad6432
...@@ -15,6 +15,7 @@ use app\api_broker\service\PushMessageService; ...@@ -15,6 +15,7 @@ use app\api_broker\service\PushMessageService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\ABindingDevice; use app\model\ABindingDevice;
use app\model\AOperatingRecords;
use app\model\AStore; use app\model\AStore;
use app\model\Evaluate; use app\model\Evaluate;
use app\model\GHousesToAgents; use app\model\GHousesToAgents;
...@@ -849,4 +850,49 @@ class Broker extends Basic ...@@ -849,4 +850,49 @@ class Broker extends Basic
return $this->response("200", "成功",['data'=>$res,'total'=>$res_total]); return $this->response("200", "成功",['data'=>$res,'total'=>$res_total]);
} }
/**
* 转门店记录
*
* @return \think\Response
*/
public function getPerformanceRecordList() {
if (!$this->request->isAjax()) {
return view('performance_record');
}
$total = 0;
$list = [];
$code = 200;
$msg = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$where['type'] = 1;
if ($this->params['name']) {
$where['name'] = $this->params['name'];
}
if ($this->params['phone']) {
$where['phone'] = $this->params['phone'];
}
try {
$m_record = new AOperatingRecords();
$m_store = new AStore();
$list = $m_record->getList($pageNo, $pageSize, 'id desc', 'id,create_time,agent_id,name,phone,store_id,performance_time', $where);
foreach ($list as $k=>$v) {
$list[$k]['store_name'] = $m_store->getStoreKeyById('store_name', ['id'=>$v['store_id']]);
unset($list[$k]['store_id']);
}
$total = $m_record->getTotal($where);
} catch (\Exception $e) {
$code = 101;
$msg = '内部错误:'.$e->getMessage();
}
return $this->response($code, $msg,['data'=>$list,'total'=>$total]);
}
} }
\ No newline at end of file
...@@ -233,7 +233,7 @@ class Houses extends Basic ...@@ -233,7 +233,7 @@ class Houses extends Basic
//适合业态 //适合业态
if (!empty($this->params['fit_industry_type'])) { if (!empty($this->params['fit_industry_type'])) {
$where['fit_industry_type'] = $this->params['fit_industry_type']; $where['fit_industry_type'] = ['LIKE', '%'.$this->params['fit_industry_type'].'%'];
} }
......
...@@ -155,6 +155,13 @@ class BrokerService ...@@ -155,6 +155,13 @@ class BrokerService
$result['status'] = 'fail'; $result['status'] = 'fail';
} }
} elseif ($data['confirm_old'] == 2 && !empty($data['id'])) { } elseif ($data['confirm_old'] == 2 && !empty($data['id'])) {
if (empty($data['performance_time'])) {
$result['msg'] = '业绩调整开始时间';
$result['status'] = 'fail';
return $result;
}
$m_record = new AOperatingRecords(); $m_record = new AOperatingRecords();
$task = new ResultsSummaryNewTask(); $task = new ResultsSummaryNewTask();
$start_time = $data['performance_time']; $start_time = $data['performance_time'];
...@@ -165,6 +172,7 @@ class BrokerService ...@@ -165,6 +172,7 @@ class BrokerService
if ($id > 0 ) { if ($id > 0 ) {
$data['agent_id'] = $id; $data['agent_id'] = $id;
$data['type'] = 1; $data['type'] = 1;
$data['operation_id'] = $operation_id;
$m_record->insertData($data); //记录更换门店操作 $m_record->insertData($data); //记录更换门店操作
$result['msg'] = '修改成功'; $result['msg'] = '修改成功';
$result['status'] = 'successful'; $result['status'] = 'successful';
......
{layout name="global/frame_tpl" /}
业绩调整记录
\ No newline at end of file
...@@ -116,6 +116,7 @@ Route::group('index', [ ...@@ -116,6 +116,7 @@ Route::group('index', [
'settingCity' => ['index/broker/settingCity', ['method' => 'POST']], //设置所属城市 'settingCity' => ['index/broker/settingCity', ['method' => 'POST']], //设置所属城市
'getAgentGroupSite' => ['index/broker/getAgentGroupSite', ['method' => 'GET']], //获得经纪人站点 'getAgentGroupSite' => ['index/broker/getAgentGroupSite', ['method' => 'GET']], //获得经纪人站点
'agentPositionList' => ['index/broker/agentPositionList', ['method' => 'GET']], //经纪人职称列表 'agentPositionList' => ['index/broker/agentPositionList', ['method' => 'GET']], //经纪人职称列表
'getPerformanceRecordList' => ['index/broker/getPerformanceRecordList', ['method' => 'GET']], //转门店记录
'batchChangDish' => ['index/houses/batchChangDish', ['method' => 'post']],//批量修改盘方 'batchChangDish' => ['index/houses/batchChangDish', ['method' => 'post']],//批量修改盘方
'transformLandlord' => ['index/houses/transformLandlord', ['method' => 'post']],//转换房东手机号 'transformLandlord' => ['index/houses/transformLandlord', ['method' => 'post']],//转换房东手机号
'lockHouse' => ['index/houses/lockHouse', ['method' => 'post']],//锁盘 'lockHouse' => ['index/houses/lockHouse', ['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