Explorar el Código

控制台页面修改布局

haozi hace 5 años
padre
commit
b954e59768

+ 5 - 2
app/Http/Controllers/ControlPanelController.php

@@ -2,6 +2,7 @@
 
 namespace App\Http\Controllers;
 
+use App\Owner;
 use App\Services\CheckActiveMenuService;
 use App\Services\LaborReportsCountingRecordService;
 use App\Services\NewOrderCountingRecordService;
@@ -40,6 +41,7 @@ class ControlPanelController extends Controller
         $start = (new Carbon())->subMonth()->toDateString();
         $end = (new Carbon())->toDateString();
         $ownerIds = $this->getCountingOwnerIds(null);
+        $owners=Owner::query()->whereIn('id',$ownerIds)->get();
         $unit = '日';
         $orderCountingRecords = $orderCountingRecordService->orderCountingRecords($start, $end, $unit, $ownerIds);
         $logisticsCountingRecords = $orderCountingRecordService->logisticsCountingRecords($start, $end, $ownerIds);
@@ -48,7 +50,7 @@ class ControlPanelController extends Controller
         $laborReportsCountingRecordService = app(LaborReportsCountingRecordService::class);
         $laborReportsCountingRecords = $laborReportsCountingRecordService->get($start, $end, $unit);
         $laborReportsUserGroupsCount = $laborReportsCountingRecordService->userGroupsCount($start, $end);
-        return view('control.panel', compact('menus', 'warehousesOrders', 'orderCountingRecords', 'logisticsCountingRecords', 'warehouseCountingRecords', 'laborReportsCountingRecords', 'laborReportsUserGroupsCount'));
+        return view('control.panel', compact('owners','menus', 'warehousesOrders', 'orderCountingRecords', 'logisticsCountingRecords', 'warehouseCountingRecords', 'laborReportsCountingRecords', 'laborReportsUserGroupsCount'));
     }
 
     public function orderCountingRecordsApi(Request $request)
@@ -59,7 +61,8 @@ class ControlPanelController extends Controller
         $orderCountingRecordService = app(NewOrderCountingRecordService::class);
         $start = Carbon::parse($request->start)->gt(Carbon::now()) ? Carbon::now()->toDateString() : $request->start;
         $end = Carbon::parse($request->end)->gt(Carbon::now()) ? Carbon::now()->toDateString() : $request->end;
-        $ownerIds = $this->getCountingOwnerIds(null);
+        $ownerIds=$request->owner_ids;
+        if (!$ownerIds || in_array('all',$ownerIds)) $ownerIds = $this->getCountingOwnerIds(null);
         $orderCountingRecords = $orderCountingRecordService->orderCountingRecords($start, $end, $request->unit, $ownerIds);
         return compact('orderCountingRecords');
     }

+ 201 - 155
resources/views/control/panel.blade.php

@@ -23,7 +23,7 @@
                 </div>
             </div>
             <div class="row my-3">
-                <div class="col-sm col-lg-2 col-xl-2 col-md-2">
+                <div class="col-sm-3 col-lg-3 col-xl-3 col-md-3">
                     <div class="card">
                         <div class="card-header text-dark h5">
                             <p>实时待处理订(总):@{{ totalOrders.total }}</p>
@@ -37,7 +37,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="col-sm col-lg-2 col-xl-2 col-md-2" v-for="(warehousesOrder,index) in warehousesOrders">
+                <div class="col-sm-2 col-lg-2 col-xl-2 col-md-2" v-for="(warehousesOrder,index) in warehousesOrders">
                     <div class="card">
                         <div class="card-header text-success h5">
                             <p>@{{ getWareHouse(warehousesOrder.code) }}:@{{ warehousesOrder.total }}</p>
@@ -53,12 +53,14 @@
                 </div>
             </div>
             <div class="row my-3">
-                <div class="col-sm col-lg-5  col-xl-5 col-md-5">
+                <div class="col-sm-6 col-lg-6  col-xl-6 col-md-6">
                     <div class="card">
                         <div class="card-header">
-                            <div class="block">
-                                <span v-show="orderCountingRecordsDayShow" class="demonstration">起始日期</span>
+                            <div class="block row">
+                                <div>
+                                <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">起始日期:</span>
                                 <el-date-picker
+                                    size="small"
                                     @blur="orderCountingRecordApi('')"
                                     v-show="orderCountingRecordsDayShow"
                                     v-model="orderCountingRecordsStart"
@@ -67,8 +69,9 @@
                                     placeholder="选起始日期">
                                 </el-date-picker>
 
-                                <span v-show="orderCountingRecordsDayShow" class="demonstration">结束日期</span>
+                                <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
                                 <el-date-picker
+                                    size="small"
                                     @blur="orderCountingRecordApi('')"
                                     v-show="orderCountingRecordsDayShow"
                                     v-model="orderCountingRecordsEnd"
@@ -77,8 +80,9 @@
                                     placeholder="选择结束日期">
                                 </el-date-picker>
 
-                                <span v-show="orderCountingRecordsMonthShow" class="demonstration">起始月</span>
+                                <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
                                 <el-date-picker
+                                    size="small"
                                     @blur="orderCountingRecordApi('')"
                                     v-show="orderCountingRecordsMonthShow"
                                     v-model="orderCountingRecordsStart"
@@ -87,8 +91,9 @@
                                     placeholder="选择起始月">
                                 </el-date-picker>
 
-                                <span v-show="orderCountingRecordsMonthShow" class="demonstration">结束月</span>
+                                <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
                                 <el-date-picker
+                                    size="small"
                                     @blur="orderCountingRecordApi('')"
                                     v-show="orderCountingRecordsMonthShow"
                                     v-model="orderCountingRecordsEnd"
@@ -97,8 +102,9 @@
                                     placeholder="选择结束月">
                                 </el-date-picker>
 
-                                <span v-show="orderCountingRecordsYearShow" class="demonstration">起始年</span>
+                                <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
                                 <el-date-picker
+                                    size="small"
                                     @blur="orderCountingRecordApi('')"
                                     v-show="orderCountingRecordsYearShow"
                                     v-model="orderCountingRecordsStart"
@@ -107,8 +113,9 @@
                                     placeholder="选择年">
                                 </el-date-picker>
 
-                                <span v-show="orderCountingRecordsYearShow" class="demonstration">结束年</span>
+                                <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
                                 <el-date-picker
+                                    size="small"
                                     @blur="orderCountingRecordApi('')"
                                     v-show="orderCountingRecordsYearShow"
                                     v-model="orderCountingRecordsEnd"
@@ -116,97 +123,109 @@
                                     value-format="yyyy-MM-dd"
                                     placeholder="选择年">
                                 </el-date-picker>
+                                </div>
+                                <div class="btn-group btn-group-sm ml-2" role="group" >
+                                    <el-button type="primary" value="日" @click="orderCountingRecordApi('日')"
+                                               class="btn btn-secondary"
+                                               v-model="orderCountingRecordsUnit">日
+                                    </el-button>
+                                    <el-button type="primary" value="月" @click="orderCountingRecordApi('月')"
+                                               class="btn btn-secondary "
+                                               v-model="orderCountingRecordsUnit">月
+                                    </el-button>
+                                    <el-button type="primary" value="年" @click="orderCountingRecordApi('年')"
+                                               class="btn btn-secondary"
+                                               v-model="orderCountingRecordsUnit">年
+                                    </el-button>
+                                </div>
+                                <div class="ml-2">
+                                    <el-select  placeholder="请选择对应货主" multiple v-model="selectOwners" size="small"  @change="orderCountingRecordApi('')">
+                                        <el-option label="选择所有" value="all"></el-option>
+                                        <el-option v-for="item in owners" :label="item.name" :value="item.id" :key="item.id"></el-option>
+                                    </el-select>
+                                </div>
                             </div>
-
-                            <el-button type="primary" value="日" @click="orderCountingRecordApi('日')"
-                                       v-model="orderCountingRecordsUnit">日
-                            </el-button>
-                            <el-button type="primary" value="月" @click="orderCountingRecordApi('月')"
-                                       v-model="orderCountingRecordsUnit">月
-                            </el-button>
-                            <el-button type="primary" value="年" @click="orderCountingRecordApi('年')"
-                                       v-model="orderCountingRecordsUnit">年
-                            </el-button>
                         </div>
-                        <div class="card-body row">
-                            <div v-show="orderCountingRecordsShow" id="orderCountingRecords" class="col"
-                                 style="width:600px;height:600px;"></div>
+                        <div class="card-body">
+                            <div v-show="orderCountingRecordsShow" id="orderCountingRecords"
+                                 style="width: 100%;height:500px;"></div>
                         </div>
                         <div v-show="!orderCountingRecordsShow" class="text-center">
                             <h3>正在加载...</h3>
                         </div>
                     </div>
                 </div>
-                <div class="col-sm col-lg-7  col-xl-7 col-md-7">
-                    <div class="row">
-                        <div class="col-sm col-lg-5  col-xl-5 col-md-5">
-                            <div class="card">
-                                <div class="card-header">
-                                    <div class="col-5 row">
-                                        <div class="block">
-                                            <span class="demonstration"></span>
-                                            <el-date-picker @blur="logisticsCountingRecordsApi()"
-                                                            v-model="logisticsCountingRecordsData"
-                                                            type="daterange"
-                                                            align="right"
-                                                            unlink-panels
-                                                            range-separator="-"
-                                                            start-placeholder="开始日期"
-                                                            end-placeholder="结束日期"
-                                                            value-format="yyyy-MM-dd"
-                                                            :picker-options="pickerOptions">
-                                            </el-date-picker>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="card-body row">
-                                    <div v-show="logisticsCountingRecordsShow" id="logisticsCountingRecords" class="col"
-                                         style="width: 600px;height:600px;"></div>
-                                    <div v-show="!logisticsCountingRecordsShow" class="text-center">
-                                        <h3>正在加载...</h3>
-                                    </div>
+                <div class="col-sm-3 col-lg-3 col-xl-3 col-md-3">
+                    <div class="card">
+                        <div class="card-header">
+                                <div class="block">
+                                    <span class="demonstration"></span>
+                                    <el-date-picker
+                                        size="small"
+                                        style="width: 80%;"
+                                        @blur="logisticsCountingRecordsApi()"
+                                        v-model="logisticsCountingRecordsData"
+                                        type="daterange"
+                                        align="right"
+                                        unlink-panels
+                                        range-separator="-"
+                                        start-placeholder="开始日期"
+                                        end-placeholder="结束日期"
+                                        value-format="yyyy-MM-dd"
+                                        :picker-options="pickerOptions">
+                                    </el-date-picker>
                                 </div>
+                        </div>
+                        <div class="card-body row">
+                            <div v-show="logisticsCountingRecordsShow" id="logisticsCountingRecords" class="col"
+                                 style="width: 100%;height:500px;"></div>
+                            <div v-show="!logisticsCountingRecordsShow" class="text-center">
+                                <h3>正在加载...</h3>
                             </div>
                         </div>
-                        <div class="col-sm col-lg-5  col-xl-5 col-md-5">
-                            <div class="card">
-                                <div class="card-header">
-                                    <div class="col-5 row">
-                                        <div class="block">
-                                            <span class="demonstration"></span>
-                                            <el-date-picker @blur="warehouseCountingRecordsApi()"
-                                                            v-model="warehouseCountingRecordsData"
-                                                            type="daterange"
-                                                            align="right"
-                                                            unlink-panels
-                                                            range-separator="-"
-                                                            start-placeholder="开始日期"
-                                                            end-placeholder="结束日期"
-                                                            value-format="yyyy-MM-dd"
-                                                            :picker-options="pickerOptions">
-                                            </el-date-picker>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="card-body row">
-                                    <div v-show="warehouseCountingRecordsShow" id="warehouseCountingRecords" class="col"
-                                         style="width: 600px;height:600px;"></div>
-                                    <div v-show="!warehouseCountingRecordsShow">
-                                        正在加载
-                                    </div>
+                    </div>
+                </div>
+                <div class="col-sm-3 col-lg-3 col-xl-3 col-md-3">
+                    <div class="card">
+                        <div class="card-header">
+                                <div class="block">
+                                    <span class="demonstration"></span>
+                                    <el-date-picker
+                                        size="small"
+                                        style="width: 80%;"
+                                        @blur="warehouseCountingRecordsApi()"
+                                        v-model="warehouseCountingRecordsData"
+                                        type="daterange"
+                                        align="right"
+                                        unlink-panels
+                                        range-separator="-"
+                                        start-placeholder="开始日期"
+                                        end-placeholder="结束日期"
+                                        value-format="yyyy-MM-dd"
+                                        :picker-options="pickerOptions">
+                                    </el-date-picker>
                                 </div>
+                        </div>
+                        <div class="card-body row">
+                            <div v-show="warehouseCountingRecordsShow" id="warehouseCountingRecords" class="col"
+                                 style="width: 100%;height:500px;"></div>
+                            <div v-show="!warehouseCountingRecordsShow">
+                                <h3>正在加载...</h3>
                             </div>
                         </div>
                     </div>
                 </div>
+            </div>
+            <div class="row my-3">
                 @can('人事管理-临时工报表-可见全部组')
-                    <div class="col-sm col-lg-5  col-xl-5 col-md-5">
+                    <div class="col-sm-6 col-lg-6  col-xl-6 col-md-6">
                         <div class="card">
                             <div class="card-header">
-                                <span class="demonstration"></span>
-                                <div class="block">
-                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration">起始日期</span>
+                                <div class="block row">
+                                    <span class="demonstration"></span>
+                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration mt-1">起始日期:</span>
                                     <el-date-picker
+                                        size="small"
                                         @blur="laborReportsCountingRecordApi('')"
                                         v-show="laborReportsCountingRecordsDayShow"
                                         v-model="laborReportsCountingRecordsStart"
@@ -214,9 +233,9 @@
                                         value-format="yyyy-MM-dd"
                                         placeholder="选起始日期">
                                     </el-date-picker>
-
-                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration">结束日期</span>
+                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
                                     <el-date-picker
+                                        size="small"
                                         @blur="laborReportsCountingRecordApi('')"
                                         v-show="laborReportsCountingRecordsDayShow"
                                         v-model="laborReportsCountingRecordsEnd"
@@ -224,9 +243,9 @@
                                         value-format="yyyy-MM-dd"
                                         placeholder="选择结束日期">
                                     </el-date-picker>
-
-                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration">起始月</span>
+                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
                                     <el-date-picker
+                                        size="small"
                                         @blur="laborReportsCountingRecordApi('')"
                                         v-show="laborReportsCountingRecordsMonthShow"
                                         v-model="laborReportsCountingRecordsStart"
@@ -235,8 +254,9 @@
                                         placeholder="选择起始月">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration">结束月</span>
+                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
                                     <el-date-picker
+                                        size="small"
                                         @blur="laborReportsCountingRecordApi('')"
                                         v-show="laborReportsCountingRecordsMonthShow"
                                         v-model="laborReportsCountingRecordsEnd"
@@ -245,8 +265,9 @@
                                         placeholder="选择结束月">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration">起始年</span>
+                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
                                     <el-date-picker
+                                        size="small"
                                         @blur="laborReportsCountingRecordApi('')"
                                         v-show="laborReportsCountingRecordsYearShow"
                                         v-model="laborReportsCountingRecordsStart"
@@ -255,8 +276,9 @@
                                         placeholder="选择年">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration">结束年</span>
+                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
                                     <el-date-picker
+                                        size="small"
                                         @blur="laborReportsCountingRecordApi('')"
                                         v-show="laborReportsCountingRecordsYearShow"
                                         v-model="laborReportsCountingRecordsEnd"
@@ -264,50 +286,56 @@
                                         value-format="yyyy-MM-dd"
                                         placeholder="选择年">
                                     </el-date-picker>
+                                    <div class="btn-group btn-group-sm ml-2" role="group">
+                                        <el-button type="primary" value="日" @click="laborReportsCountingRecordApi('日')"
+                                                   class="btn btn-secondary"
+                                                   v-model="laborReportsCountingRecordUnit">日
+                                        </el-button>
+                                        <el-button type="primary" value="月" @click="laborReportsCountingRecordApi('月')"
+                                                   class="btn btn-secondary"
+                                                   v-model="laborReportsCountingRecordUnit">月
+                                        </el-button>
+                                        <el-button type="primary" value="年" @click="laborReportsCountingRecordApi('年')"
+                                                   class="btn btn-secondary"
+                                                   v-model="laborReportsCountingRecordUnit">年
+                                        </el-button>
+                                    </div>
                                 </div>
-
-                                <el-button type="primary" value="日" @click="laborReportsCountingRecordApi('日')"
-                                           v-model="laborReportsCountingRecordUnit">日
-                                </el-button>
-                                <el-button type="primary" value="月" @click="laborReportsCountingRecordApi('月')"
-                                           v-model="laborReportsCountingRecordUnit">月
-                                </el-button>
-                                <el-button type="primary" value="年" @click="laborReportsCountingRecordApi('年')"
-                                           v-model="laborReportsCountingRecordUnit">年
-                                </el-button>
                             </div>
                             <div class="card-body row">
                                 <div v-show="laborReportsCountingRecordsShow" id="laborReportsCountingRecords"
                                      class="col"
-                                     style="width:600px;height:600px;"></div>
+                                     style="width: 100%;height:500px;"></div>
                                 <div v-show="!laborReportsCountingRecordsShow">
-                                    正在加载
+                                    <h3>正在加载...</h3>
                                 </div>
                             </div>
                         </div>
                     </div>
-                    <div class="col-sm col-lg-7  col-xl-5 col-md-5">
+                    <div class="col-sm-6 col-lg-6  col-xl-6 col-md-6">
                         <div class="card">
                             <div class="card-header">
                                 <span class="demonstration"></span>
-                                <el-date-picker @blur="laborReportsUserGroupsCountApi('')"
-                                                v-model="laborReportsUserGroupsCountDate"
-                                                type="daterange"
-                                                align="right"
-                                                unlink-panels
-                                                range-separator="-"
-                                                start-placeholder="开始日期"
-                                                end-placeholder="结束日期"
-                                                value-format="yyyy-MM-dd"
-                                                :picker-options="pickerOptions">
+                                <el-date-picker
+                                    size="small"
+                                    @blur="laborReportsUserGroupsCountApi('')"
+                                    v-model="laborReportsUserGroupsCountDate"
+                                    type="daterange"
+                                    align="right"
+                                    unlink-panels
+                                    range-separator="-"
+                                    start-placeholder="开始日期"
+                                    end-placeholder="结束日期"
+                                    value-format="yyyy-MM-dd"
+                                    :picker-options="pickerOptions">
                                 </el-date-picker>
                             </div>
                             <div class="card-body row">
                                 <div v-show="laborReportsUserGroupsCountShow" id="laborReportsUserGroupsCount"
                                      class="col"
-                                     style="width:600px;height:600px;"></div>
+                                     style="width: 100%;height:500px;"></div>
                                 <div v-show="!laborReportsUserGroupsCountShow">
-                                    正在加载
+                                    <h3>正在加载...</h3>
                                 </div>
                             </div>
                         </div>
@@ -328,6 +356,8 @@
             data: {
                 myChart: null,
                 menus:{!! $menus !!},
+                owners:{!! $owners !!},
+                selectOwners:[],
                 warehousesOrders:{!! $warehousesOrders !!},
                 orderCountingRecords:{!! $orderCountingRecords !!},
                 logisticsCountingRecords:{!! $logisticsCountingRecords !!},
@@ -395,7 +425,7 @@
                 orderCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
                 orderCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
                 orderCountingUnit: '日',
-                orderUnitsData:{
+                orderUnitsData: {
                     start_day: moment().subtract('1', 'month').format('yyyy-MM-DD'),
                     end_day: moment(new Date()).format('yyyy-MM-DD'),
                     start_month: moment().subtract('12', 'month').format('yyyy-MM-DD'),
@@ -405,7 +435,7 @@
                 },
 
                 laborReportsUnit: '日',
-                laborReportsData:{
+                laborReportsData: {
                     start_day: moment().subtract('1', 'month').format('yyyy-MM-DD'),
                     end_day: moment(new Date()).format('yyyy-MM-DD'),
                     start_month: moment().subtract('12', 'month').format('yyyy-MM-DD'),
@@ -420,6 +450,16 @@
                 laborReportsCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
                 laborReportsCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
             },
+            watch:{
+                selectOwners:function(val,oldval){
+                    let newindex =  val.indexOf('all');
+                    let   oldindex =  oldval.indexOf('all');                                //获取val和oldval里all的索引,如果没有则返回-1
+                    if(newindex!=-1 && oldindex==-1 && val.length>1)                       //如果新的选择里有勾选了选择所有选择所有 则 只直线勾选所有整个选项
+                        this.selectOwners=['all'];
+                    else if(newindex!=-1 && oldindex!=-1 && val.length>1)                 //如果操作前有勾选了选择所有且当前也选中了勾选所有且勾选数量大于1  则移除掉勾选所有
+                        this.selectOwners.splice(val.indexOf('all'),1)
+                }
+            },
             mounted: function () {
                 $('#list').removeClass('d-none');
                 let _this = this;
@@ -455,63 +495,63 @@
 
             },
             methods: {
-                switchDataPanel_forOrderCountingRecords(fromUnit,toUnit){
-                    switch (fromUnit){
+                switchDataPanel_forOrderCountingRecords(fromUnit, toUnit) {
+                    switch (fromUnit) {
                         case '日':
-                            this.orderUnitsData.start_day=this.orderCountingRecordsStart;
-                            this.orderUnitsData.end_day=this.orderCountingRecordsEnd;
+                            this.orderUnitsData.start_day = this.orderCountingRecordsStart;
+                            this.orderUnitsData.end_day = this.orderCountingRecordsEnd;
                             break;
                         case '月':
-                            this.orderUnitsData.start_month=this.orderCountingRecordsStart;
-                            this.orderUnitsData.end_month=this.orderCountingRecordsEnd;
+                            this.orderUnitsData.start_month = this.orderCountingRecordsStart;
+                            this.orderUnitsData.end_month = this.orderCountingRecordsEnd;
                             break;
                         case '年':
-                            this.orderUnitsData.start_year=this.orderCountingRecordsStart;
-                            this.orderUnitsData.end_year=this.orderCountingRecordsEnd;
+                            this.orderUnitsData.start_year = this.orderCountingRecordsStart;
+                            this.orderUnitsData.end_year = this.orderCountingRecordsEnd;
                             break;
                     }
-                    switch (toUnit){
+                    switch (toUnit) {
                         case '日':
-                            this.orderCountingRecordsStart=this.orderUnitsData.start_day;
-                            this.orderCountingRecordsEnd=this.orderUnitsData.end_day;
+                            this.orderCountingRecordsStart = this.orderUnitsData.start_day;
+                            this.orderCountingRecordsEnd = this.orderUnitsData.end_day;
                             break;
                         case '月':
-                            this.orderCountingRecordsStart=this.orderUnitsData.start_month;
-                            this.orderCountingRecordsEnd=this.orderUnitsData.end_month;
+                            this.orderCountingRecordsStart = this.orderUnitsData.start_month;
+                            this.orderCountingRecordsEnd = this.orderUnitsData.end_month;
                             break;
                         case '年':
-                            this.orderCountingRecordsStart=this.orderUnitsData.start_year;
-                            this.orderCountingRecordsEnd=this.orderUnitsData.end_year;
+                            this.orderCountingRecordsStart = this.orderUnitsData.start_year;
+                            this.orderCountingRecordsEnd = this.orderUnitsData.end_year;
                             break;
                     }
                 },
-                switchDataPanel_forLaborReports(fromUnit,toUnit){
-                    switch (fromUnit){
+                switchDataPanel_forLaborReports(fromUnit, toUnit) {
+                    switch (fromUnit) {
                         case '日':
-                            this.laborReportsData.start_day=this.laborReportsCountingRecordsStart;
-                            this.laborReportsData.end_day=this.laborReportsCountingRecordsEnd;
+                            this.laborReportsData.start_day = this.laborReportsCountingRecordsStart;
+                            this.laborReportsData.end_day = this.laborReportsCountingRecordsEnd;
                             break;
                         case '月':
-                            this.laborReportsData.start_month=this.laborReportsCountingRecordsStart;
-                            this.laborReportsData.end_month=this.laborReportsCountingRecordsEnd;
+                            this.laborReportsData.start_month = this.laborReportsCountingRecordsStart;
+                            this.laborReportsData.end_month = this.laborReportsCountingRecordsEnd;
                             break;
                         case '年':
-                            this.laborReportsData.start_year=this.laborReportsCountingRecordsStart;
-                            this.laborReportsData.end_year=this.laborReportsCountingRecordsEnd;
+                            this.laborReportsData.start_year = this.laborReportsCountingRecordsStart;
+                            this.laborReportsData.end_year = this.laborReportsCountingRecordsEnd;
                             break;
                     }
-                    switch (toUnit){
+                    switch (toUnit) {
                         case '日':
-                            this.laborReportsCountingRecordsStart=this.laborReportsData.start_day;
-                            this.laborReportsCountingRecordsEnd=this.laborReportsData.end_day;
+                            this.laborReportsCountingRecordsStart = this.laborReportsData.start_day;
+                            this.laborReportsCountingRecordsEnd = this.laborReportsData.end_day;
                             break;
                         case '月':
-                            this.laborReportsCountingRecordsStart=this.laborReportsData.start_month;
-                            this.laborReportsCountingRecordsEnd=this.laborReportsData.end_month;
+                            this.laborReportsCountingRecordsStart = this.laborReportsData.start_month;
+                            this.laborReportsCountingRecordsEnd = this.laborReportsData.end_month;
                             break;
                         case '年':
-                            this.laborReportsCountingRecordsStart=this.laborReportsData.start_year;
-                            this.laborReportsCountingRecordsEnd=this.laborReportsData.end_year;
+                            this.laborReportsCountingRecordsStart = this.laborReportsData.start_year;
+                            this.laborReportsCountingRecordsEnd = this.laborReportsData.end_year;
                             break;
                     }
                 },
@@ -524,9 +564,10 @@
                         this.orderCountingRecordsData.push(this.orderCountingRecords[key].counter);
                     }
                 },
-                initOrderCountingRecordsChart() {
+                initOrderCountingRecordsChart(text) {
+                    if (text==null ||text==''||text==undefined) text='默认显示权限下所有货主订单信息'
                     this.orderCountingRecordsChart.setOption({
-                        title: {text: '订单量趋势'},
+                        title: {text: '订单量趋势',subtext: text,},
                         tooltip: {},
                         legend: {data: ['订单数']},
                         xAxis: {
@@ -655,7 +696,7 @@
                         orderCountingRecordsUnit = this.orderCountingRecordsUnit;
                     }
                     this.switchDataPanel_forOrderCountingRecords(this.orderCountingUnit, orderCountingRecordsUnit);
-                    this.orderCountingUnit=orderCountingRecordsUnit;
+                    this.orderCountingUnit = orderCountingRecordsUnit;
                     switch (orderCountingRecordsUnit) {
                         case '日':
                             this.orderCountingRecordsDayShow = true;
@@ -674,19 +715,24 @@
                             break;
                     }
                     this.orderCountingRecordsUnit = orderCountingRecordsUnit;
-                    let formData = new FormData();
-                    formData.append('start', this.orderCountingRecordsStart);
-                    formData.append('end', this.orderCountingRecordsEnd);
-                    formData.append('unit', orderCountingRecordsUnit);
+                    // let formData = new FormData();
+                    // formData.append('start', this.orderCountingRecordsStart);
+                    // formData.append('end', this.orderCountingRecordsEnd);
+                    // formData.append('unit', orderCountingRecordsUnit);
+                    // formData.append('owner_ids',this.selectOwners);
                     this.orderCountingRecordsShow = false;
                     let _this = this;
-                    axios.post('{{url('apiLocal/control/panel/menu/orderCountingRecordApi')}}', formData).then(function (res) {
+                    let text = null;
+                    axios.post('{{url('apiLocal/control/panel/menu/orderCountingRecordApi')}}',{
+                        'start':this.orderCountingRecordsStart,'end':this.orderCountingRecordsEnd,
+                        'unit':orderCountingRecordsUnit,'owner_ids':this.selectOwners}).then(function (res) {
                         if (res.status === 200) {
                             _this.orderCountingRecords = res.data.orderCountingRecords;
                             _this.orderCountingRecordsDateTarget = [];
                             _this.orderCountingRecordsData = [];
                             _this.initOrderCountingRecords();
-                            _this.initOrderCountingRecordsChart();
+                            if (_this.selectOwners.length>0) text='当前选中货主订单信息';
+                            _this.initOrderCountingRecordsChart(text);
                             _this.orderCountingRecordsShow = true;
                         }
                     });
@@ -728,7 +774,7 @@
                         laborReportsCountingRecordUnit = this.laborReportsCountingRecordUnit;
                     }
                     this.switchDataPanel_forLaborReports(this.laborReportsUnit, laborReportsCountingRecordUnit);
-                    this.laborReportsUnit=laborReportsCountingRecordUnit;
+                    this.laborReportsUnit = laborReportsCountingRecordUnit;
                     this.laborReportsCountingRecordUnit = laborReportsCountingRecordUnit;
                     switch (laborReportsCountingRecordUnit) {
                         case '日':