流水预警优化

master
zhanggucheng 3 years ago
parent b76458bc41
commit 588fb81c1e

@ -29,7 +29,7 @@ class PromoteCompanyWarningController extends ThinkController
$month = I('month', '');
$companyId = I('company_id', 0);
$isExport = I('is_export', 0);
$isSignContact = I('is_sign_contact', -1);
$isSignContact = I('is_sign_contact', 0);
$where = [
'_string' => '1=1 and b.company_id is not null',
'c.company_belong' => ['in', [1, 2]],
@ -47,9 +47,10 @@ class PromoteCompanyWarningController extends ThinkController
$monthNumber = date('Ym', strtotime($month.'-01'));
$where['b.month'] = $monthNumber;
}
$where['c.cooperation_status'] = 1;
$joinDataTable = 'tab_company_monthly_data';
$columns = ['b.company_id', 'c.company_name', 'c.is_sign_contact', 'b.pay_amount'];
$columns = ['b.company_id', 'c.company_name', 'c.is_sign_contact', 'b.pay_amount', 'c.cooperation_status'];
$orderBy = 'b.company_id asc';
if ($type == 'total') {
$subSql = M('company_monthly_data', 'tab_')->field('company_id')->where(['is_warning' => 1])->select(false);
@ -101,6 +102,7 @@ class PromoteCompanyWarningController extends ThinkController
foreach ($items as $key => $item) {
$item['month'] = date('Y-m', strtotime($item['month'].'01'));
$item['is_sign_contact_text'] = $item['is_sign_contact'] == 1 ? '是' : '否';
$item['cooperation_status_text'] = $item['cooperation_status'] == 1 ? '合作中' : '终止合作';
$itemPromotes = $companyPromotes[$item['company_id']];
$promoteCount = count($itemPromotes);
$index = 0;
@ -125,6 +127,7 @@ class PromoteCompanyWarningController extends ThinkController
$item['month'] = date('Y-m', strtotime($item['month'].'01'));
}
$item['is_sign_contact_text'] = $item['is_sign_contact'] == 1 ? '是' : '否';
$item['cooperation_status_text'] = $item['cooperation_status'] == 1 ? '合作中' : '终止合作';
$itemPromotes = $companyPromotes[$item['company_id']];
$promoteCount = count($itemPromotes);
$index = 0;

@ -104,7 +104,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select name="is_sign_contact" class="select_gallery" style="width:120px;">
<option value="-1">是否签约</option>
<option value="0"></option>
<option value="0" selected></option>
<option value="1"></option>
</select>
</div>
@ -128,13 +128,16 @@
<thead>
<tr>
<th>合作方名称</th>
<th>流水金额</th>
<th> <?php if ($pageType=='total'):?>
累计
<?php endif;?>流水金额</th>
<?php if ($pageType=='monthly'):?>
<th>达标月份</th>
<?php endif;?>
<th>会长账号</th>
<th>市场专员</th>
<th>所属市场部</th>
<th>合作关系</th>
<th>是否签约</th>
</tr>
</thead>
@ -156,6 +159,7 @@
<td>{$data.account}</td>
<td>{$data.market_user_name}</td>
<td>{$data.market_department_name}</td>
<td>{$data.cooperation_status_text}</td>
<?php if($data['rowspan']>0):?>
<td rowspan="{$data.rowspan}">{$data.is_sign_contact_text}</td>
<?php endif;?>

Loading…
Cancel
Save