Merge branch 'feature/market_admin' of wmtx/platform into release

修改换绑bug
master
廖金灵 4 years ago committed by Gogs
commit 4a755d2269

@ -75,6 +75,11 @@ class FinancePromoteController extends AdminController
$nwtflag = false;
}
}
if(isset($_REQUEST['develop_type'])){
if($_REQUEST['develop_type']!=0){
$nwtflag = false;
}
}
if(isset($_REQUEST['admin_id'])){
if($_REQUEST['admin_id']!=0){
$nwtflag = false;
@ -183,12 +188,15 @@ class FinancePromoteController extends AdminController
$outBelong = 0;
$insideBelong = 0;
$otherBelong = 0;
foreach ($data as $key => $value) {
if ($value['company_belong']=='内团') {
$insideBelong+=$value['allcount'];
} else {
} elseif ($value['company_belong']=='外团' || $value['company_belong']=='外团-分发') {
$outBelong+=$value['allcount'];
} else {
$otherBelong+=$value['allcount'];
}
}
@ -205,7 +213,7 @@ class FinancePromoteController extends AdminController
$this->assign('outBelong',number_format($outBelong/$count['all_count']*100,2,'.',''));
//内团占比
$this->assign('insideBelong',number_format($insideBelong/$count['all_count']*100,2,'.',''));
$this->assign('otherBelong',number_format($otherBelong/$count['all_count']*100,2,'.',''));
$size = $row;
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->assign('list_data', $data);
@ -347,6 +355,11 @@ class FinancePromoteController extends AdminController
//获取各会长的现金充值
$map=[];
$title = '';
if (!empty(I('develop_type'))) {
$map['company.develop_type'] = I('develop_type');
}
self::setPromoteMap($map,"s.promote_id",$title);
$title .= "渠道统计";
$this->assign('title', $title);
@ -1205,12 +1218,10 @@ class FinancePromoteController extends AdminController
$title .= (getCompanyBlong($_REQUEST['company_belong'])."-");
}
if (!empty(I('develop_type'))) {
$map['company.develop_type'] = I('develop_type');
if(I('develop_type') != 0){
$gfflg = false;
}
if (I('develop_type', 0) != 0) {
$gfflg = false;
}
if (!empty(I('admin_id'))) {
if(I('admin_id') != 0){
$gfflg = false;

@ -48,8 +48,7 @@ class MarketController extends ThinkController
if (count($recordCompanyIds) > 0) {
$recordCompanys = M('promote_company', 'tab_')->field(['id', 'company_name', 'company_belong'])->where(['id' => ['in', $recordCompanyIds]])->select();
}
$adminIds = array_merge(array_column($items, 'from_id'), array_column($items, 'to_id'));
$recordAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $adminIds]])->select();
$recordAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->select();
$recordPromotes = index_by_column('id', $recordPromotes);
$recordCompanys = index_by_column('id', $recordCompanys);
$recordAdmins = index_by_column('id', $recordAdmins);
@ -82,7 +81,8 @@ class MarketController extends ThinkController
'split_time' => $item['split_time'] == 0 ? '全部' : date('Y-m-d H:i:s', $item['split_time']),
'created_time' => date('Y-m-d H:i:s', $item['created_time']),
'status_text' => $statusList[$item['status']],
'status' => $item['status']
'status' => $item['status'],
'creator_username' => isset($recordAdmins[$item['creator_id']]) ? $recordAdmins[$item['creator_id']]['username'] : '未知',
];
}
$companys = M('promote_company', 'tab_')->field(['id', 'company_name'])->where(['company_belong' => ['in', [1, 2]]])->select();
@ -99,8 +99,17 @@ class MarketController extends ThinkController
public function rebind()
{
$this->meta_title = '新增换绑';
$companyTypes = [
0 => '内团',
1 => '外团',
2 => '外团-分发联盟',
3 => '无'
];
$id = I('id', 0);
$companys = M('promote_company', 'tab_')->field(['id', 'company_name'])->where(['company_belong' => ['in', [1, 2]]])->select();
$companys = M('promote_company', 'tab_')->field(['id', 'company_name', 'company_belong'])->where(['company_belong' => ['in', [1, 2]]])->select();
foreach ($companys as &$company) {
$company['company_belong'] = $companyTypes[$company['company_belong']] ?? '未知';
}
$marketAdmins = getMarketAdmins();
$this->assign('companys', $companys);
$this->assign('marketAdmins', $marketAdmins);

@ -282,7 +282,7 @@
</tr>
<tr class="data_summary">
<td style="text-align: center;">内外团占比:</td>
<td colspan="20" style="text-align: center;">内团充值金额占比:{$insideBelong}%&nbsp&nbsp&nbsp&nbsp其他团体充值金额占比:{$outBelong}%</td>
<td colspan="20" style="text-align: center;">内团充值金额占比:{$insideBelong}%&nbsp&nbsp&nbsp&nbsp外团充值金额占比:{$outBelong}%&nbsp&nbsp&nbsp&nbsp其他团体充值金额占比:{$otherBelong}%</td>
</tr>
</tbody>
</table>

@ -95,7 +95,7 @@
<select name="company_id" id="company-select" class="select_gallery">
<option value="">请选择推广公司</option>
<?php foreach($companys as $company):?>
<option value="<?=$company['id']?>" <?php if($company['id'] == $promote['company_id']):?>selected<?php endif;?>><?=$company['company_name']?></option>
<option value="<?=$company['id']?>" data-belong="<?=$company['company_belong']?>" <?php if($company['id'] == $promote['company_id']):?>selected<?php endif;?>><?=$company['company_name']?></option>
<?php endforeach;?>
</select>
</td>
@ -260,6 +260,8 @@ $(function(){
var companyOption = $("#company-select option:selected");
var companyId = companyOption.val()
var companyName = companyOption.text()
var belong = companyOption.attr('data-belong');
belong == undefined ? '--' : belong
var promoteOption = $("#promote-select option:selected");
var promoteId = promoteOption.val()
var promoteName = promoteOption.text()
@ -296,7 +298,7 @@ $(function(){
console.log(promoteIds)
var html = '<tr data-post=' + JSON.stringify(data) + '><td>' + companyName + '</td>' +
'<td class="promote-item" data-id="' + promoteId + '">' + promoteName + '</td>' +
'<td>' + 'ssb' + '</td>' +
'<td>' + belong + '</td>' +
'<td>' + $('#from-market-name').text() + '</td>' +
'<td>' + marketName + '</td>' +
'<td>' + splitTime + '</td>' +

@ -97,6 +97,7 @@
<th>新市场专员</th>
<th>备注</th>
<th>订单切分时间</th>
<th>操作人</th>
<th>状态</th>
<th>换绑操作时间</th>
<!-- <th>操作</th> -->
@ -117,6 +118,7 @@
<td>{$data.to_username}</td>
<td>{$data.remark}</td>
<td>{$data.split_time}</td>
<td>{$data.creator_username}</td>
<td>{$data.status_text}</td>
<td>{$data.created_time}</td>
<!-- <td>

Loading…
Cancel
Save