Commit 23ec91cf authored by zw's avatar zw

Merge branch 'test'

parents 33ec00c4 7456411d
...@@ -31,7 +31,7 @@ class CellPhone extends Basic ...@@ -31,7 +31,7 @@ class CellPhone extends Basic
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$call = new CallPhoneService($this->city); $call = new CallPhoneService($this->city, $this->siteId);
$record = true; //是否录音 $record = true; //是否录音
$user_id = empty($this->params['user_id']) ? 0:(int)$this->params['user_id']; $user_id = empty($this->params['user_id']) ? 0:(int)$this->params['user_id'];
$house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id']; $house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id'];
......
...@@ -39,8 +39,9 @@ class CallPhoneService ...@@ -39,8 +39,9 @@ class CallPhoneService
private $city; private $city;
public $redis; public $redis;
private $m_bind; private $m_bind;
private $site_id;
public function __construct(string $city = '上海市') public function __construct(string $city = '上海市', int $site_id = 10001)
{ {
$this->city = substr($city, 0, strpos($city, '市')); //去市 $this->city = substr($city, 0, strpos($city, '市')); //去市
$this->redis = RedisExt::getRedis(); $this->redis = RedisExt::getRedis();
...@@ -52,6 +53,7 @@ class CallPhoneService ...@@ -52,6 +53,7 @@ class CallPhoneService
$this->day_num = empty($this->day_num) ? 1 : $this->day_num + 1; $this->day_num = empty($this->day_num) ? 1 : $this->day_num + 1;
$this->landlord_phone_day = empty($this->landlord_phone_day) ? 1 : $this->landlord_phone_day + 1; $this->landlord_phone_day = empty($this->landlord_phone_day) ? 1 : $this->landlord_phone_day + 1;
$this->m_bind = new BindingPhone(); $this->m_bind = new BindingPhone();
$this->site_id = $site_id;
} }
/** /**
...@@ -547,13 +549,12 @@ class CallPhoneService ...@@ -547,13 +549,12 @@ class CallPhoneService
$follow_where['agent_id'] = $array[0]; $follow_where['agent_id'] = $array[0];
$follow_where['user_id'] = $array[1]; $follow_where['user_id'] = $array[1];
if(isset($array[2])){ if(isset($array[2])){
$follow_where['site_id'] = $array[2]; $site_id = $array[2];
}else{ }else{
$follow_where['site_id'] = "10001"; $site_id = '10001';
} }
$m_follow_up = new UPhoneFollowPp($follow_where['site_id']); $m_follow_up = new UPhoneFollowPp($site_id);
$num = $m_follow_up->getFollowTotal($follow_where); $num = $m_follow_up->getFollowTotal($follow_where);
if (empty($num) && !empty($array[1])) { if (empty($num) && !empty($array[1])) {
//$agent_id, $user_id, $content, $type //$agent_id, $user_id, $content, $type
$m_follow_up->insertDefaultFollow($array[0], $array[1], $content, 0); $m_follow_up->insertDefaultFollow($array[0], $array[1], $content, 0);
...@@ -585,7 +586,7 @@ class CallPhoneService ...@@ -585,7 +586,7 @@ class CallPhoneService
} }
if ($user_type == 1) { if ($user_type == 1) {
$this->redis->hSet($key, $agent_id . '-' . $user_id, time()); $this->redis->hSet($key, $agent_id . '-' . $user_id. '-'. $this->site_id, time());
} else { } else {
$this->redis->hSet($key, $agent_id . '-' . $user_id . '-' . $phone_a . '-' . $phone_b, time()); $this->redis->hSet($key, $agent_id . '-' . $user_id . '-' . $phone_a . '-' . $phone_b, time());
} }
......
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
<a href="javascript:;" id="fix_area_bottom_btn"><img src="/app/images/xq_cha@2x.png" /></a> <a href="javascript:;" id="fix_area_bottom_btn"><img src="/app/images/xq_cha@2x.png" /></a>
</div> </div>
<div class="shop-list"> <div class="shop-list">
<img src="/app/images/img_more@2x.png" alt="" /> <!--<img src="/app/images/img_more@2x.png" alt="" />-->
</div> </div>
<!--<script src="/app/js/jquery.js"></script>--> <!--<script src="/app/js/jquery.js"></script>-->
......
...@@ -275,7 +275,7 @@ class CellPhone extends Basic ...@@ -275,7 +275,7 @@ class CellPhone extends Basic
$house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id']; $house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id'];
$landlord = empty($this->params['landlord']) ? 0: (int)$this->params['landlord']; $landlord = empty($this->params['landlord']) ? 0: (int)$this->params['landlord'];
$record = true; //录音 $record = true; //录音
$call_phone = new CallPhoneService($this->city); $call_phone = new CallPhoneService($this->city, $this->siteId);
$data = $call_phone->bindAXB($this->params['phone_a'], $phone_b, $record, $user_id, $this->userId, $this->userName, $landlord, $house_id); $data = $call_phone->bindAXB($this->params['phone_a'], $phone_b, $record, $user_id, $this->userId, $this->userName, $landlord, $house_id);
$result['msg'] = ''; $result['msg'] = '';
if ($data['status'] == 'success') { if ($data['status'] == 'success') {
......
...@@ -913,18 +913,64 @@ class Finance extends Basic ...@@ -913,18 +913,64 @@ class Finance extends Basic
$where['e.id'] = $this->params['partial_id']; $where['e.id'] = $this->params['partial_id'];
} }
$field = 'a.id,a.confirm_date,a.practical_fee,b.scale_fee,d.internal_address,b.agent_id,cash,service_charge,charity_fund,real_fee,a.real_income_id,a.should_commission'; $field = 'a.id,a.confirm_date,a.practical_fee,b.scale_fee,b.scale,b.role,d.internal_address,b.agent_id,cash,service_charge,charity_fund,real_fee,a.real_income_id,a.should_commission';
$m_commission = new OPartialCommission(); $m_commission = new OPartialCommission();
try { try {
$data = $m_commission->getCommissionBargainColumn($pageNo, $pageSize, 'a.id desc', $field, $where); $data = $m_commission->getCommissionBargainColumn($pageNo, $pageSize, 'a.id desc', $field, $where);
$m_agent = new AAgents();
$m_real = new ORealIncome();
$fields_str = 'a.id,a.name,a.phone,b.store_name,c.district_name';
$result = [];
foreach ($data as $k => $v) {
$result[$k]['income_time'] = $m_real->where('id', $v['real_income_id'])->value('income_time');
if ($v['agent_id']) {
$agent_data = $m_agent->getStoreDistrict($fields_str, [ 'a.id' => $v['agent_id'] ]);
$result[$k]['district_store'] = $agent_data['store_name'] . '-' . $agent_data['store_name'];
$result[$k]['agent'] = $agent_data['name'] . '-' . $agent_data['phone'];
}
switch ($v['role']) {
case 1:
$result[$k]['role'] = '盘方';
break;
case 2:
$result[$k]['role'] = '客方';
break;
case 3:
$result[$k]['role'] = '反签';
break;
case 4:
$result[$k]['role'] = '独家';
break;
case 5:
$result[$k]['role'] = '合作方';
break;
case 6:
$result[$k]['role'] = 'APP盘下载方';
break;
case 7:
$result[$k]['role'] = 'APP客下载方';
break;
default:
$result[$k]['role'] = '未定义';
}
$result[$k]['scale'] = $v['scale'];
$result[$k]['should_commission'] = $v['should_commission'];
$result[$k]['real_fee'] = $v['real_fee'];
$result[$k]['service_charge'] = $v['service_charge'];
$result[$k]['charity_fund'] = $v['charity_fund'];
$result[$k]['cash'] = $v['cash'];
$result[$k]['practical_fee'] = $v['practical_fee'];
}
} catch (\Exception $e) { } catch (\Exception $e) {
return '<script>alert("导出分佣提成明细列表失败");window.close();</script>'; return '<script>alert("导出分佣提成明细列表失败");window.close();</script>';
} }
$export = new ExportExcelUntil(); $export = new ExportExcelUntil();
$title = [ '收佣日期', '所属部门/门店', '业务员', '应分佣金(元)', '预分佣金(元)', '手续费(元)', '慈善基金(元)', '现金奖(元)', '实收佣金(元)' ]; $title = [ '收佣日期', '所属部门/门店', '业务员','分佣角色', '分佣比例(%)','应分佣金(元)', '预分佣金(元)', '手续费(元)', '慈善基金(元)', '现金奖(元)', '实收佣金(元)' ];
$export->exportTable('实收明细表', $data, 8, '实收明细表', $title); $export->exportTable('实收明细表', $result, 10, '实收明细表', $title);
return ''; return '';
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<tr> <tr>
<th class="text-center">姓名</th> <th class="text-center">姓名</th>
<th class="text-center">手机号</th> <th class="text-center">手机号</th>
<th class="text-center">通话时长</th> <th class="text-center">通话时长(分钟)</th>
<th class="text-center">花费</th> <th class="text-center">花费</th>
</tr> </tr>
</thead> </thead>
......
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
<a href="javascript:;" id="fix_area_bottom_btn"><img src="/app/images/xq_cha@2x.png" /></a> <a href="javascript:;" id="fix_area_bottom_btn"><img src="/app/images/xq_cha@2x.png" /></a>
</div> </div>
<div class="shop-list"> <div class="shop-list">
<img src="/app/images/img_more@2x.png" alt="" /> <!--<img src="/app/images/img_more@2x.png" alt="" />-->
</div> </div>
<!--<script src="/app/js/jquery.js"></script>--> <!--<script src="/app/js/jquery.js"></script>-->
......
...@@ -88,6 +88,14 @@ class OPartialCommission extends BaseModel ...@@ -88,6 +88,14 @@ class OPartialCommission extends BaseModel
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
/**
* @param $pageNo
* @param $pageSize
* @param string $order_
* @param $fields
* @param $where
* @return array
*/
public function getCommissionBargainColumn($pageNo, $pageSize, $order_ = 'id desc', $fields, $where) public function getCommissionBargainColumn($pageNo, $pageSize, $order_ = 'id desc', $fields, $where)
{ {
$data = $this->alias('a') $data = $this->alias('a')
...@@ -101,27 +109,7 @@ class OPartialCommission extends BaseModel ...@@ -101,27 +109,7 @@ class OPartialCommission extends BaseModel
->limit($pageSize) ->limit($pageSize)
->page($pageNo) ->page($pageNo)
->column($fields); ->column($fields);
return $data;
$result = [];
$m_agent = new AAgents();
$m_real = new ORealIncome();
$fields_str = 'a.id,a.name,a.phone,b.store_name,c.district_name';
foreach ($data as $k => $v) {
$result[$k]['income_time'] = $m_real->where('id', $v['real_income_id'])->value('income_time');
if ($v['agent_id']) {
$agent_data = $m_agent->getStoreDistrict($fields_str, [ 'a.id' => $v['agent_id'] ]);
$result[$k]['district_store'] = $agent_data['store_name'] . '-' . $agent_data['store_name'];
$result[$k]['agent'] = $agent_data['name'] . '-' . $agent_data['phone'];
}
$result[$k]['should_commission'] = $v['should_commission'];
$result[$k]['real_fee'] = $v['real_fee'];
$result[$k]['service_charge'] = $v['service_charge'];
$result[$k]['charity_fund'] = $v['charity_fund'];
$result[$k]['cash'] = $v['cash'];
$result[$k]['practical_fee'] = $v['practical_fee'];
}
return $result;
} }
/** /**
......
...@@ -439,17 +439,39 @@ body{ ...@@ -439,17 +439,39 @@ body{
text-overflow: ellipsis; text-overflow: ellipsis;
margin-top: 0.16rem; margin-top: 0.16rem;
} }
/*商铺详情 动画*/
.shop-list{ .shop-list{
position: fixed; position: fixed;
right: .2rem; right: .2rem;
bottom: 2rem; bottom: 2rem;
height: 1.6rem; height: 2rem;
width: 1.6rem; width: 2.15rem;
display: none; display: none;
background: url(/app/images/Artboard@1x.png) no-repeat 0 0;
background-size: 43rem 2rem;
animation: fly 1.25s steps(20) infinite;
-webkit-animation: fly 1.25s steps(20) infinite;
}
@keyframes fly {
0% {
background-position: 0 0;
}
100% {
background-position: -43rem 0;
}
} }
.shop-list img{
@-webkit-keyframes fly {
0% {
background-position: 0 0;
}
100% {
background-position: -43rem 0;
}
}
/*.shop-list img{
width: 1.6rem; width: 1.6rem;
} }*/
.b3_span_shop_mianji{ .b3_span_shop_mianji{
display: none; display: none;
} }
...@@ -487,3 +509,4 @@ body{ ...@@ -487,3 +509,4 @@ body{
margin-bottom: .3rem; margin-bottom: .3rem;
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<tr class="text-center"> <tr class="text-center">
<td>[%= it[item]['name'] %]</td> <td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['phone'] %]</td> <td>[%= it[item]['phone'] %]</td>
<td>[%= it[item]['time'] %]</td> <td>[%= Math.round(it[item]['time']/60) %]</td>
<td>[%= it[item]['money'] %] </td> <td>[%= it[item]['money'] %] </td>
</tr> </tr>
[% } %] [% } %]
......
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