修复项目任务列表新建时间戳
修复区域销售品类报表错误
This commit is contained in:
@@ -7,9 +7,8 @@
|
||||
<a class="btn btn-default btn-sm" onclick="LocalTableExport('report_export', '地区品类销售');"><i class="fa fa-mail-forward"></i> 导出</a>
|
||||
</div>
|
||||
|
||||
@if(Auth::user()->role->code != 'c001')
|
||||
@include('report/select')
|
||||
@endif
|
||||
@include('report/select')
|
||||
|
||||
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i> 筛选</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -17,51 +16,68 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="report_export">
|
||||
<tr>
|
||||
<th style="white-space:nowrap">
|
||||
销售组
|
||||
</th>
|
||||
|
||||
@foreach($categorys as $k => $v)
|
||||
@if($v['parent_id'] == 226)
|
||||
<th nowrap="true">{{$v['name']}}</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th style="white-space:nowrap">销售区域</th>
|
||||
|
||||
<th style="white-space:nowrap"></th>
|
||||
|
||||
@if(count($categorys))
|
||||
@foreach($categorys as $k => $v)
|
||||
@if($v['parent_id'] == 226)
|
||||
<th nowrap="nowrap">{{$v['name']}}</th>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<th>总销售额</th>
|
||||
<th>促销费比</th>
|
||||
<th>促销金额</th>
|
||||
<!--
|
||||
<th>消费促销</th>
|
||||
<th>渠道促销</th>
|
||||
<th>经销促销</th>
|
||||
-->
|
||||
</tr>
|
||||
|
||||
@if(count($now_year_single['money']))
|
||||
@foreach($now_year_single['money'] as $key => $value)
|
||||
|
||||
<tr>
|
||||
|
||||
<td rowspan="3" align="center" style="white-space:nowrap;vertical-align:middle;">
|
||||
{{$regions[$key]}}
|
||||
<a class="option" href="{{url('citydata')}}?circle_id={{$key}}&year={{$now_year}}">
|
||||
[月销]
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td align="center" style="vertical-align:middle;color:#999;">销售金额(元)</td>
|
||||
|
||||
@if(count($categorys))
|
||||
@foreach($categorys as $k => $v)
|
||||
@if($v['parent_id'] == 226)
|
||||
<td align="right">
|
||||
{{(int)$value[$k]}}
|
||||
{{number_format($value[$k], 2)}}
|
||||
</td>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<td style="vertical-align:middle;" align="right">{{$now_year_single['totalcost'][$key]}}</td>
|
||||
<td style="vertical-align:middle;" align="right">
|
||||
{{number_format($now_year_single['totalcost'][$key], 2)}}
|
||||
</td>
|
||||
|
||||
<td rowspan="3" style="vertical-align:middle;" align="center">
|
||||
@if($promotions['all'][$key])
|
||||
{{:$c = ($promotions['all'][$key]/$now_year_single['totalcost'][$key])}}
|
||||
{{number_format($c*100, 2)}}%
|
||||
{{number_format($c * 100, 2)}}%
|
||||
@else
|
||||
0.00%
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td rowspan="3" style="vertical-align:middle;" align="right">
|
||||
{{$promotions['all'][$key] > 0 ? $promotions['all'][$key] : 0}}
|
||||
</td>
|
||||
|
||||
<!--
|
||||
{{:$ps = $promotions[$key]}}
|
||||
<td rowspan="3" style="vertical-align:middle;" align="right">
|
||||
{{$ps[1] > 0 ? $ps[1] : 0}}
|
||||
@@ -72,24 +88,30 @@
|
||||
<td rowspan="3" style="vertical-align:middle;" align="right">
|
||||
{{$ps[3] > 0 ? $ps[3] : 0}}
|
||||
</td>
|
||||
-->
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@foreach($categorys as $category_id => $category)
|
||||
@if($category['parent_id'] == 226)
|
||||
<td align="right" title="去年同期增长率" nowrap="true">
|
||||
<?php $scale = $oldscale[$key][$category_id]; ?>
|
||||
@if($scale == 0)
|
||||
去年无
|
||||
@elseif($scale > 0)
|
||||
<span style="color:green">{{number_format($scale * 100, 2)}}%</span>
|
||||
@else
|
||||
<span style="color:red">{{number_format($scale * 100, 2)}}%</span>
|
||||
<td align="center" style="vertical-align:middle;color:#999;">去年同期增长率</td>
|
||||
|
||||
@if(count($categorys))
|
||||
@foreach($categorys as $category_id => $category)
|
||||
@if($category['parent_id'] == 226)
|
||||
<td align="right" title="去年同期增长率" nowrap="nowrap">
|
||||
<?php $scale = $oldscale[$key][$category_id]; ?>
|
||||
@if($scale == 0)
|
||||
去年无
|
||||
@elseif($scale > 0)
|
||||
<span style="color:green">{{number_format($scale * 100, 2)}}%</span>
|
||||
@else
|
||||
<span style="color:red">{{number_format($scale * 100, 2)}}%</span>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<?php
|
||||
$_year = $now_year_single['totalcost'][$key] - $old_year_single['totalcost'][$key];
|
||||
@@ -110,22 +132,24 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align="center" style="vertical-align:middle;color:#999;">占区域该品类百分比</td>
|
||||
@if(count($categorys))
|
||||
@foreach($categorys as $k => $v)
|
||||
@if($v['parent_id'] == 226)
|
||||
<td align="right" title="占区域该品类百分比">
|
||||
@if($value[$v['id']] > 0)
|
||||
{{number_format(($value[$v['id']] / $now_year_single['cat'][$v['id']]) * 100, 2)}}%
|
||||
{{number_format(($value[$v['id']] / $now_year_single[cat][$v['id']]) * 100, 2)}}%
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<td style="vertical-align:middle;" align="right"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<div class="panel">
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td><div class='title'>{{$year}}年 ({{$circle['name']}}) 客户圈月份销售分析</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
|
||||
@if(count($categorys)) @foreach($categorys as $k => $v)
|
||||
<th>{{$k}}</th>
|
||||
@endforeach @endif
|
||||
|
||||
<th>总销售额</th>
|
||||
<th>促销费比</th>
|
||||
|
||||
<th>消费促销</th>
|
||||
<th>渠道促销</th>
|
||||
<th>经销促销</th>
|
||||
|
||||
@if(count($single['money'])) @foreach($single['money'] as $key => $value)
|
||||
<tr>
|
||||
<td rowspan="2" width="40" align="center" style="vertical-align:middle;color:#66CC00;font-weight:bold;background:#FFFFE9">{{$key}}月</td>
|
||||
|
||||
@if(count($categorys)) @foreach($categorys as $k => $v)
|
||||
<td align="right">
|
||||
{{$value[$v] > 0 ? $value[$v] : 0}}
|
||||
</td>
|
||||
@endforeach @endif
|
||||
|
||||
|
||||
<td rowspan="2" align="right" style="vertical-align:middle;color:#666;background:#FFFFE9">{{$single['cat'][$key]}}</td>
|
||||
|
||||
<td rowspan="2" style="vertical-align:middle;" align="right">
|
||||
@if($single['cat'][$key])
|
||||
{{:$c = ($promotions['month1'][$key]/$single['cat'][$key])}}
|
||||
{{number_format($c*100, 2)}}%
|
||||
@else
|
||||
0.00%
|
||||
@endif
|
||||
</td>
|
||||
|
||||
|
||||
{{:$promotion = $promotions['month'][$key]}}
|
||||
<td rowspan="2" style="vertical-align:middle;" align="right">
|
||||
{{$promotion[1] > 0 ? $promotion[1] : 0}}
|
||||
</td>
|
||||
<td rowspan="2" style="vertical-align:middle;" align="right">
|
||||
{{$promotion[2] > 0 ? $promotion[2] : 0}}
|
||||
</td>
|
||||
<td rowspan="2" style="vertical-align:middle;" align="right">
|
||||
{{$promotion[3] > 0 ? $promotion[3] : 0}}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@if(count($categorys)) @foreach($categorys as $k => $v)
|
||||
<td align="right">
|
||||
{{:$pl = $value[$v]/$single['cat'][$key]}}
|
||||
{{$_pl = number_format($pl*100, 2)}}%
|
||||
</td>
|
||||
@endforeach @endif
|
||||
</tr>
|
||||
|
||||
@endforeach @endif
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user