| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- @extends('base.base')
- @section('base')
- <!-- 内容区域 -->
- <div class="main-panel">
- <div class="content-wrapper">
- <div class="page-header">
- <h3 class="page-title">
- <span class="page-title-icon bg-gradient-primary text-white mr-2">
- <i class="mdi mdi-settings"></i>
- </span>
- {{ __('auto.库存变化曲线') }}
- </h3>
- <nav aria-label="breadcrumb">
- <ol class="breadcrumb">
- <li class="breadcrumb-item"><a href="#">{{ __('auto.库存变化曲线') }}</a></li>
- <li class="breadcrumb-item active" aria-current="page">{{ __('auto.用户控制') }}</li>
- </ol>
- </nav>
- </div>
- <div class="row">
- <div class="col-lg-12 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">{{ __('auto.库存变化曲线') }}</h4>
- <form class="well form-inline margin-top-20" method="get" action='/admin/stock/change'>
- <spen style="padding-left: 10px" >{{ __('auto.库存选择:') }}</spen>
- <select class="form-control" name="type" value="{{$type}}" style="color: black" onchange="gradeChange(this.options[this.options.selectedIndex].value)">
- <option value="">{{ __('auto.全部') }}</option>
- @foreach($stocks as $key=>$val)
- <option value="{{$key}}" @if ($type == $key)
- selected
- @endif>{{$val}}</option>
- @endforeach
- </select>
- <spen style="padding-left: 10px" >{{ __('auto.房间选择:') }}</spen>
- <select class="form-control" name="roomID" value="" style="color: black" id="room_list">
- <option value="">{{ __('auto.全部') }}</option>
- @foreach($roomList as $key=>$val)
- <option value="{{$val->ServerID}}" @if ($room == $val->ServerID)
- selected
- @endif>{{$val->ServerName}}</option>
- @endforeach
- </select>
- <spen style="padding-left: 10px" >{{ __('auto.选择时间:') }}</spen>
- <input type="datetime-local" step="01" name="start_time" class="form-control" value="{{$start_time}}" />
- <input type="datetime-local" step="01" name="end_time" class="form-control" value="{{$end_time}}" />
- <spen style="padding-left: 10px" >{{ __('auto.选择时间:') }}</spen>
- <select class="form-control" name="date" value="" style="color: black">
- <option value="">{{ __('auto.全部') }}</option>
- @foreach($dates as $key=>$val)
- <option value="{{$key}}" @if ($choice_date == $key)
- selected
- @endif>{{$val}}</option>
- @endforeach
- </select>
- <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>
- <a href="/admin/stock/change" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>
- <a href="/admin/stock/change?excel=1&start_time={{$start_time}}&end_time={{$end_time}}&roomID={{$room}}" class="btn btn-sm btn-gradient-light btn-icon-text">{{ __('auto.导出') }}</a>
- </form>
- <div style="margin-left:20px;float: left ;width: 100%;height:400px;" id="zhexian" >
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 引入 ECharts 文件 -->
- <script src="/assets/js/echarts.min.js"></script>
- <script>
- // 基于准备好的dom,初始化echarts实例
- var myChart = echarts.init(document.getElementById('zhexian'));
- option = {
- title: {
- text: '{!! $title !!}'
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: []
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- feature: {
- saveAsImage: {}
- }
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: {!! $date !!}
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- name: '{!! $title !!}',
- type: 'line',
- stack: '{{ __('auto.库存') }}',
- data: {!! $list !!},
- },
- ]
- };
- // 使用刚指定的配置项和数据显示图表。
- myChart.setOption(option);
- </script>
- <script>
- $(function(){
- cutStr(50);
- });
- function gradeChange(value) {
- myRequest("/admin/stock/room_list", "get", {'type': value}, function (res) {
- var data = res.data
- var html = ''
- for (var i of data) {
- html += '<option value=' + i['ServerID'] + '>' + i['ServerName'] + '</option>'
- }
- $("#room_list").html(html)
- });
- }
- </script>
- @endsection
|