index.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>融裕行生产数据概览</title>
<link rel="stylesheet" href="./eslydsj/css/base.css">
<link rel="stylesheet" href="./echart/css/bootstrap-4.2.1.css">
<style>
.pull-left{
float: left;
}
.pull-right{
float: right;
}
.title{
padding: 0;font-size: 1.8rem;color:
}
.border_t{
height: 167px;
border-bottom: 1px solid
}
.div_height{height: 230px !important;}
.table_p table thead th:first-child{color:
.div_any02{width:60%}
.div_any03{width: 20%;margin: 0}
.order_list{
margin: 10px;
color:
}
.order_list td{
font-size: 1.3rem;
line-height: 40px;
}
.order_list td:first-child{
color:
}
.order_1{color:
.order_2{color:
.order_3{color:
.order_4{color:
</style>
</head>
<body class="con">
<!--顶部-->
<header class="header left">
<div class="left nav">
<ul>
<li class="@if(in_array(request()->path(),['/']) ) nav_active @endif"><i class="nav_1"></i><a href="{{ route('/') }}">生产数据概览</a> </li>
<li class="@if(in_array(request()->path(),['predict']) ) nav_active @endif"><i class="nav_3"></i><a href="{{ route('predict') }}">计划订单平衡概览</a> </li>
</ul>
</div>
<div class="header_center left">
<h1><strong>融裕行生产数据概览</strong></h1>
</div>
<div class="right nav text_right">
<ul style="width: 100%;">
<li class="data" id="localtime" style="width: 100%;display: block;text-align: right;padding-right: 20px;"></li>
</ul>
</div>
</header>
<!--内容部分-->
<div class="con left">
<!--统计分析图-->
<div class="div_any">
<div class="left div_any01">
<div class="div_any_child div_height">
<div class="div_any_title">订单数量</div>
<p id="char1" style="height: 200px"></p>
</div>
<div class="div_any_child" style="height: 610px;overflow: hidden">
<div class="div_any_title">订单下货率 </div>
<div style="height: 280px;overflow: hidden">
<p id="char5" style="height: 320px"></p>
</div>
<div style="height: 295px;overflow: hidden">
<p id="char6" style="height: 320px"></p>
</div>
<div style="clear: both"></div>
</div>
</div>
<div class="div_any02 left">
<div class="div_any_child div_height">
<div class="table_p">
<table>
<thead>
<tr>
<th>工厂名称</th>
<th>出勤人数</th>
<th>请假比例</th>
<th>计划数量</th>
<th>完成比例</th>
<th>台产</th>
</tr>
</thead>
<tbody class="has-many-extra-forms">
{{--<tr>--}}
{{--<td>融裕行</td>--}}
{{--<td>368</td>--}}
{{--<td>9568</td>--}}
{{--<td>9200</td>--}}
{{--<td>368</td>--}}
{{--<td>3.85%</td>--}}
{{--</tr>--}}
{{--<tr><td>源盛</td><td>368</td><td>9568</td><td>9200</td><td>368</td><td>3.85%</td></tr>--}}
{{--<tr><td>茂盛</td><td>368</td><td>9568</td><td>9200</td><td>368</td><td>3.85%</td></tr>--}}
{{--<tr><td>和盛</td><td>368</td><td>9568</td><td>9200</td><td>368</td><td>3.85%</td></tr>--}}
{{--<tr><td>金路</td><td>368</td><td>9568</td><td>9200</td><td>368</td><td>3.85%</td></tr>--}}
</tbody>
<template class="extra-tpl">
<tr>
<td class="factory_name"></td>
<td class="job_people"></td>
<td class="ask_rate"></td>
<td class="plan_num"></td>
<td class="finish_rate"></td>
<td class="unit_num"></td>
</tr>
</template>
</table>
</div>
</div>
<div class="div_any_child" style="height: 295px">
<div class="div_any_title">小时产量 </div>
<div style="height: 255px">
<p id="char3" style="height: 255px"></p>
</div>
</div>
<div class="div_any_child" style="height: 300px;overflow: hidden">
<div class="div_any_title">两周日产量 </div>
<div style="height: 280px">
<p id="char4" style="height: 280px;width: 108%;left: -3%;"></p>
</div>
</div>
</div>
<div class="right div_any03">
<div class="div_any_child div_height">
<div class="div_any_title">订单数据</div>
<div class="pull-left" style="width: 45%;height: 200px;overflow: hidden;">
<p id="char9" style="width: 128%;height: 250px"></p>
</div>
<div class="pull-left" style="width: 55%;height: 200px">
<table class="order_list">
<tbody>
<tr><td>在产款数:</td><td class="order_1">35款</td></tr>
<tr><td>延误款数:</td><td class="order_2">0款</td></tr>
<tr><td>计划数量:</td><td class="order_3">56789件</td></tr>
<tr><td>完成数量:</td><td class="order_4">45678件</td></tr>
</tbody>
</table>
</div>
</div>
<div class="div_any_child" style="height: 295px">
<div class="div_any_title">月人均台产TOP5 </div>
<div style="height: 255px;width: 95%;">
<p id="char2" style="height: 280px"></p>
</div>
</div>
<div class="div_any_child" style="height: 300px;overflow: hidden">
<div class="div_any_title"> </div>
<div style="height: 280px">
<p id="char8" style="height: 280px"></p>
</div>
</div>
</div>
</div>
</div>
<script src="./echart/js/jquery.min.js"></script>
<script src="./echart/js/echarts-4.2.1.min.js"></script>
<script src="./eslydsj/js/base.js"></script>
<script src="./eslydsj/js/index_overview.js"></script>
<script src="./eslydsj/js/echarts-liquidfill.min.js"></script>
<script src="./js/initTime.js"></script>
<script>
$(function () {
var index = 0;
var tpl = $('template.extra-tpl');
var now_month = '201912';
function init_extra(months){
$('.has-many-extra-forms').html('');
var data = {
'_token': "{{ csrf_token() }}",
'ym': months,
};
$.ajax({
url:'{{ route('getOverview') }}',
data:data,
type:'GET',
cache:false,
dataType:'json',
success:function(data) {
$('.has-many-extra-forms').html('');
for (var i =0; i< data.list.length;i++){
addHtml(data.list[i])
}
ryhChart(data.job_list,1);
$('.order_1').html(data.bulk_list.list.bulk_num+'款')
$('.order_2').html(data.bulk_list.list.delay_num+'款')
$('.order_3').html(data.bulk_list.list.plan_num+'件')
$('.order_4').html(data.bulk_list.list.finish_num+'件')
ryhChart9(data.bulk_list.rate,9);
ryhChart2(data.avg_table,2);
ryhChart3(data.hours_arr,3);
ryhChart4(data.pro_date,4);
ryhChart5(data.table,5);
ryhChart6(data.table,6);
}
});
}
init_extra(now_month)
function addHtml(data){
index++;
var template = tpl.html().replace(/__LA_KEY__/g, index).replace(/factory_name/g, 'factory_name_'+index)
.replace(/__LA_KEY__/g, index).replace(/job_people/g, 'job_people_'+index)
.replace(/__LA_KEY__/g, index).replace(/ask_rate/g, 'ask_rate_'+index)
.replace(/__LA_KEY__/g, index).replace(/plan_num/g, 'plan_num_'+index)
.replace(/__LA_KEY__/g, index).replace(/finish_rate/g, 'finish_rate_'+index)
.replace(/__LA_KEY__/g, index).replace(/unit_num/g, 'unit_num_'+index);
$('.has-many-extra-forms').append(template);
$('.factory_name_'+index).html(data['factory_name'])
$('.job_people_'+index).html(data['job_people'])
$('.ask_rate_'+index).html(data['ask_rate']+'%')
$('.plan_num_'+index).html(data['plan_num'])
$('.finish_rate_'+index).html(data['finish_rate']+'%')
$('.unit_num_'+index).html(data['unit_num'])
}
})
</script>
</body>
</html>