Forráskód Böngészése

Merge branch 'master' into zzd

dream 5 éve
szülő
commit
84780ab6a8

+ 1 - 1
app/Console/Commands/LogExpireDelete.php

@@ -44,7 +44,7 @@ class LogExpireDelete extends Command
     }
 
     public function deleteLog(){
-        $expire_duration=config('logging.expire_duration');//前150天
+        $expire_duration=config('logging.expire_duration');//保留的日志天数
         $date=Carbon::now()->subDays($expire_duration)->format('Y-m-d');
         DB::table('logs')->where('created_at','<',$date)->delete();
     }

+ 2 - 2
app/Console/Commands/SyncBatchTask.php

@@ -35,7 +35,7 @@ class SyncBatchTask extends Command
 
     public function handle()
     {
-        sleep(rand(0,10));
+        sleep(100+rand(0,10));
         $this->disposeHeader();
         $this->disposeDetail();
     }
@@ -261,7 +261,7 @@ sql;
                     app("OrderService")->update(["code"=>$map[$batch->code]],["batch_id"=>$batch->id]);
                 }
                 try{
-                    $this->batchService->assignTasks($batches);    //在这里为波次注册任务!
+//                    $this->batchService->assignTasks($batches);    //在这里为波次注册任务!
                 }catch (Exception $e){
                     //避免影响外部事务:一般异常已在内部日志过
                 }

+ 2 - 3
app/Console/Commands/SyncWMSOrderTask.php

@@ -118,15 +118,14 @@ class SyncWMSOrderTask extends Command
         ini_set('memory_limit', '1024M');
         $last_date = $this->service->getOrderSyncAt($renewal_key,'renewal');                               // 获取更新时间点
 
-        $orderHeaders = OracleDOCOrderHeader::query()->where('addTime',">=",$last_date)
+        $orderHeaders = OracleDOCOrderHeader::query()->where('editTime',">=",$last_date)
             ->selectRaw(implode(',',OracleDOCOrderHeaderService::$columns))
-            ->whereColumn('editTime','!=','addTime')
+            ->whereColumn('DOC_Order_Header.editTime','!=','DOC_Order_Header.addTime')
             ->orderByDesc('editTime')
             ->get();
 
         if($orderHeaders->count()==0)return;
 
-
         $orderHeaderList = $orderHeaders->chunk(2000);
         foreach ($orderHeaderList as $item) {
             $item  = $oracleDOCOrderHeaderService->loadMissing($item);

+ 3 - 21
app/Http/Controllers/ControlPanelController.php

@@ -32,29 +32,11 @@ class ControlPanelController extends Controller
 
     public function index()
     {
-        /**
-         * @var $orderCountingRecordService  NewOrderCountingRecordService
-         * @var $laborReportsCountingRecordService LaborReportsCountingRecordService
-         */
-        $checkActiveMenuService = app(CheckActiveMenuService::class);
-        $menus = $checkActiveMenuService->activeMenus();
-        $realtimePendingOrdersService = app(RealtimePendingOrdersService::class);
-        $warehousesOrders = $realtimePendingOrdersService->warehousesOrders();
-        $orderCountingRecordService = app(NewOrderCountingRecordService::class);
-        //默认查询一个月的数据
-        $start = (new Carbon())->subMonth()->toDateString();
-        $end = (new Carbon())->toDateString();
         $ownerIds = $this->getCountingOwnerIds(null);
+        $menus = app(CheckActiveMenuService::class)->activeMenus();
         $owners=Owner::query()->whereIn('id',$ownerIds)->get();
-        $unit = '日';
-        $orderCountingRecords = $orderCountingRecordService->orderCountingRecordsFromCache($start, $end, $unit, $ownerIds);
-        $logisticsCountingRecords = $orderCountingRecordService->logisticsCountingRecords($start, $end, $ownerIds);
-        $warehouseCountingRecords = $orderCountingRecordService->warehouseCountingRecords($start, $end, $ownerIds);
-
-        $laborReportsCountingRecordService = app(LaborReportsCountingRecordService::class);
-        $laborReportsCountingRecords = $laborReportsCountingRecordService->get($start, $end, $unit);
-        $laborReportsUserGroupsCount = $laborReportsCountingRecordService->userGroupsCount($start, $end);
-        return view('control.panel', compact('owners','menus', 'warehousesOrders', 'orderCountingRecords', 'logisticsCountingRecords', 'warehouseCountingRecords', 'laborReportsCountingRecords', 'laborReportsUserGroupsCount'));
+        $warehousesOrders = app(RealtimePendingOrdersService::class)->warehousesOrders();
+        return view('control.panel', compact('owners','menus', 'warehousesOrders'));
     }
 
     public function orderCountingRecordsApi(Request $request)

+ 24 - 8
app/Http/Controllers/TestController.php

@@ -347,8 +347,9 @@ sql;
 
     function t1(Request $request)
     {
-        $r=StationTaskMaterialBox::query()->with('stationTaskCommodities')->where('id', 1710)->first();
-        dd($r['stationTaskCommodities']);
+
+        $re=OracleDOCWaveDetails::query()->where('orderno', 'SO201230003574')->get('seqno')->first()['seqno'];
+        dd($re);
     }
 
     function packageT(Request $request)
@@ -1071,7 +1072,7 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
 
     public function reNewBatches3()
     {
-        $batches = Batch::query()->where('id','>', 79628)->get('code');
+        $batches = Batch::query()->where('id','>', 82182)->get('code');
         $batchCodes = $batches->map(function ($batch) {
             return $batch['code'];
         })->toArray();
@@ -1097,7 +1098,7 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
 //        dd($logs);
         foreach ($batchCodes as $code) {
 //            $request=Cache::get('temp'.$code)['description'];
-            $request = Log::query()->select('description')->where('CREATED_AT', '>', '2021-01-22')
+            $request = Log::query()->select('description')->where('CREATED_AT', '>', '2021-02-25')
                 ->where('method', "issued_newBatch")
                 ->where('description', 'like', "%{$code}%")
                 ->first();
@@ -1592,11 +1593,26 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
         $orderHeaderList = $orderHeaders->chunk(2000);
         foreach ($orderHeaderList as $item) {
             $item = $oracleDOCOrderHeaderService->loadMissing($item);
-            $last_order = $item->first();                                                               // 时间点靠后的
-            $newest_orders = $item->where('addtime',$last_order->addtime);
-            if(count($newest_orders)>0 && count($orderHeaders) >0){
-                $orderService->syncOrder($orderHeaders);                                             //  同步订单
+//            $last_order = $item->first();                                                               // 时间点靠后的
+//            $newest_orders = $item->where('addtime',$last_order->addtime);
+            if( count($orderHeaders) >0){
+                $orderService->syncOrder($item);                                             //  同步订单
             }
         }
     }
+    public function syncOrderByWaveNo2(Request $request)
+    {
+        $oracleDOCOrderHeaderService = new OracleDOCOrderHeaderService();
+        $orderService = new OrderService();
+        $waveNos = ['W210220000010','W210220000009'];
+        $orderHeaders = OracleDOCOrderHeader::query()
+            ->selectRaw(implode(',',OracleDOCOrderHeaderService::$columns))
+            ->whereIn('WaveNo',$waveNos)
+            ->get();
+        $orderHeaderList = $orderHeaders->chunk(2000);
+        foreach ($orderHeaderList as $item) {
+            $item = $oracleDOCOrderHeaderService->loadMissing($item);
+            $orderService->syncOrder($item);
+        }
+    }
 }

+ 78 - 78
app/Http/Controllers/api/thirdPart/flux/SortingController.php

@@ -30,85 +30,85 @@ class SortingController extends Controller
      */
     public function newBatch(Request $request)
     {
-//       $requestArr=$request->all();
+       $requestArr=$request->all();
         app('LogService')->log(__METHOD__, 'issued_' . __FUNCTION__, json_encode($request->all()));
-//        !$requestArr?$requestArr=json_decode($request->getContent(),true):false;
-//        $errors=$this->newBatchValidator($requestArr)->errors();
-//        if(count($errors)>0){
-//            app('LogService')->log(__METHOD__, 'error' . __FUNCTION__, 'fields wrong, see Errors report please.'.'|'.json_encode($request->all()).'|'.json_encode($errors));
-//            return response()->json(['Response'=>['return'=>['returnFlag'=>'0','returnCode'=>'0001',
-//                'returnDesc'=>':Failure','resultInfo'=>'','errors'=>$errors]]])->setEncodingOptions(JSON_UNESCAPED_UNICODE);
-//        }
-//        $requestBatches = $requestArr['request']?? '';
-//
-//        foreach ($requestBatches as $requestBatch){
-//            $requestBatch['edittime']&&strpos(trim($requestBatch['edittime']),' ')?$editTimeFormat='Y-m-d H:i:s':$editTimeFormat='YmdHis';
-//            $batch=Batch::query()->firstOrCreate(['code' => $requestBatch['waveno']]);
-//
-//            if(!$batch)$batch=new Batch();
-//            $batch->fill([
-//                    'code' => $requestBatch['waveno'],
-//                    'wms_type' => $requestBatch['batch_type']??'',
-//                    'wms_status' => $requestBatch['docstatus']??'',
-//                    'status' => '未处理',
-//                    'wms_created_at' => $requestBatch['edittime']?Carbon::createFromFormat($editTimeFormat,$requestBatch['edittime']):'',
-//            ]);
-//            $batch->save();
-//            $oracleAlloactions=OracleActAllocationDetails::query()->where('waveno',$requestBatch['waveno'])->get();
-//            foreach($requestBatch['order_list'] as $requestOrder){
-//                $owner=Owner::query()->where('code',$requestOrder['customerid'])->first();
-//                $order=app("OrderService")->first(['code'=>$requestOrder['docno']]);
-//                if(!$order){
-//                    $order=app("OrderService")->createOrder([
-//                        'batch_id' => $batch['id'],
-//                        'code' => $requestOrder['docno'],
-//                        'owner_id' => $owner['id'],
-//                        'wms_status' => $requestOrder['docstatus']??'波次下发',
-//                        'status' => '未处理',
-//                    ]);
-//                    app('LogService')->log(__METHOD__,__FUNCTION__,'创建 Order'.json_encode($order));
-//                }else{
-//                    $order['batch_id']= $batch['id'] ;
-//                    $order['owner_id']=$order['owner_id']??$owner['owner_id'];
-//                    $order['wms_status']=$order['wms_status']??$requestOrder['docstatus']??'波次下发';
-//                    $order['status']=$order['status']??'未处理';
-//                }
-//                $order->save();
-//                OrderBin::query()->firstOrCreate([
-//                    'order_id' => $order['id'],
-//                    'number' => $requestOrder['reservedfield01'],
-//                ]);
-//                foreach($requestOrder['barcode_list'] as $requestBarcode){
-//                    $orderCommodity=OrderCommodity::query()
-//                        ->where('order_id',$order['id'])->where('wms_ptltaskid',$requestBarcode['ptltaskid'])->first();
-//                    if(!$orderCommodity){
-//                        /** @var CommodityService $commodityService */
-//                        $commodityService=app('CommodityService');
-//                        $commodity=$commodityService->syncBarcodes($requestBarcode['alternate_sku1'],$owner['id'],$requestBarcode['sku']);
-//                        $orderCommodity=OrderCommodity::query()->firstOrCreate(['order_id'=>$order['id'],'commodity_id'=>$commodity['id']]);
-//                        if(!$orderCommodity){
-//                            $orderCommodity = new OrderCommodity([
-//                                'order_id' => $order['id'],
-//                                'commodity_id' => $commodity['id'],
-//                                'amount' => $requestBarcode['fmqty_each']??0,
-//                                'wms_ptltaskid' => $requestBarcode['ptltaskid'],
-//                            ]);
-//                        }else{
-//                            $orderCommodity['order_id']=$order['id'];
-//                            $orderCommodity['commodity_id']=$commodity['id'];
-//                            $orderCommodity['amount']=$requestBarcode['fmqty_each']??0;
-//                            $orderCommodity['wms_ptltaskid']=$requestBarcode['ptltaskid']??0;
-//                        }
-//                        $allocation=$oracleAlloactions->where('orderno',$requestOrder['docno'])->where('sku',$commodity['sku'])->where('qty',$requestBarcode['fmqty_each'])->first();
-//                        if($allocation)
-//                            $orderCommodity['location'] = $allocation['location'];
-//                        $orderCommodity->save();
-//                    }
-//                }
-//            }
-//        }
-//        return response()->json(['Response'=>['return'=>['returnFlag'=>'1','returnCode'=>'0000',
-//            'returnDesc'=>'消息处理成功:Success','resultInfo'=>'']]])->setEncodingOptions(JSON_UNESCAPED_UNICODE);
+        !$requestArr?$requestArr=json_decode($request->getContent(),true):false;
+        $errors=$this->newBatchValidator($requestArr)->errors();
+        if(count($errors)>0){
+            app('LogService')->log(__METHOD__, 'error' . __FUNCTION__, 'fields wrong, see Errors report please.'.'|'.json_encode($request->all()).'|'.json_encode($errors));
+            return response()->json(['Response'=>['return'=>['returnFlag'=>'0','returnCode'=>'0001',
+                'returnDesc'=>':Failure','resultInfo'=>'','errors'=>$errors]]])->setEncodingOptions(JSON_UNESCAPED_UNICODE);
+        }
+        $requestBatches = $requestArr['request']?? '';
+
+        foreach ($requestBatches as $requestBatch){
+            $requestBatch['edittime']&&strpos(trim($requestBatch['edittime']),' ')?$editTimeFormat='Y-m-d H:i:s':$editTimeFormat='YmdHis';
+            $batch=Batch::query()->firstOrCreate(['code' => $requestBatch['waveno']]);
+
+            if(!$batch)$batch=new Batch();
+            $batch->fill([
+                    'code' => $requestBatch['waveno'],
+                    'wms_type' => $requestBatch['batch_type']??'',
+                    'wms_status' => $requestBatch['docstatus']??'',
+                    'status' => '未处理',
+                    'wms_created_at' => $requestBatch['edittime']?Carbon::createFromFormat($editTimeFormat,$requestBatch['edittime']):'',
+            ]);
+            $batch->save();
+            $oracleAlloactions=OracleActAllocationDetails::query()->where('waveno',$requestBatch['waveno'])->get();
+            foreach($requestBatch['order_list'] as $requestOrder){
+                $owner=Owner::query()->where('code',$requestOrder['customerid'])->first();
+                $order=app("OrderService")->first(['code'=>$requestOrder['docno']]);
+                if(!$order){
+                    $order=app("OrderService")->createOrder([
+                        'batch_id' => $batch['id'],
+                        'code' => $requestOrder['docno'],
+                        'owner_id' => $owner['id'],
+                        'wms_status' => $requestOrder['docstatus']??'波次下发',
+                        'status' => '未处理',
+                    ]);
+                    app('LogService')->log(__METHOD__,__FUNCTION__,'创建 Order'.json_encode($order));
+                }else{
+                    $order['batch_id']= $batch['id'] ;
+                    $order['owner_id']=$order['owner_id']??$owner['owner_id'];
+                    $order['wms_status']=$order['wms_status']??$requestOrder['docstatus']??'波次下发';
+                    $order['status']=$order['status']??'未处理';
+                }
+                $order->save();
+                OrderBin::query()->firstOrCreate([
+                    'order_id' => $order['id'],
+                    'number' => $requestOrder['reservedfield01'],
+                ]);
+                foreach($requestOrder['barcode_list'] as $requestBarcode){
+                    $orderCommodity=OrderCommodity::query()
+                        ->where('order_id',$order['id'])->where('wms_ptltaskid',$requestBarcode['ptltaskid'])->first();
+                    if(!$orderCommodity){
+                        /** @var CommodityService $commodityService */
+                        $commodityService=app('CommodityService');
+                        $commodity=$commodityService->syncBarcodes($requestBarcode['alternate_sku1'],$owner['id'],$requestBarcode['sku']);
+                        $orderCommodity=OrderCommodity::query()->firstOrCreate(['order_id'=>$order['id'],'commodity_id'=>$commodity['id']]);
+                        if(!$orderCommodity){
+                            $orderCommodity = new OrderCommodity([
+                                'order_id' => $order['id'],
+                                'commodity_id' => $commodity['id'],
+                                'amount' => $requestBarcode['fmqty_each']??0,
+                                'wms_ptltaskid' => $requestBarcode['ptltaskid'],
+                            ]);
+                        }else{
+                            $orderCommodity['order_id']=$order['id'];
+                            $orderCommodity['commodity_id']=$commodity['id'];
+                            $orderCommodity['amount']=$requestBarcode['fmqty_each']??0;
+                            $orderCommodity['wms_ptltaskid']=$requestBarcode['ptltaskid']??0;
+                        }
+                        $allocation=$oracleAlloactions->where('orderno',$requestOrder['docno'])->where('sku',$commodity['sku'])->where('qty',$requestBarcode['fmqty_each'])->first();
+                        if($allocation)
+                            $orderCommodity['location'] = $allocation['location'];
+                        $orderCommodity->save();
+                    }
+                }
+            }
+        }
+        return response()->json(['Response'=>['return'=>['returnFlag'=>'1','returnCode'=>'0000',
+            'returnDesc'=>'消息处理成功:Success','resultInfo'=>'']]])->setEncodingOptions(JSON_UNESCAPED_UNICODE);
     }
 
     protected function newBatchValidator(array $data)

+ 11 - 1
app/Http/Controllers/api/thirdPart/haochuang/SortingController.php

@@ -5,8 +5,10 @@ namespace App\Http\Controllers\Api\thirdPart\haochuang;
 use App\Batch;
 use App\CommodityBarcode;
 use App\Http\Controllers\Controller;
+use App\OracleDOCWaveDetails;
 use App\Order;
 use App\OrderCommodity;
+use App\Services\LogService;
 use App\SortingStation;
 use App\User;
 use App\UserToken;
@@ -82,7 +84,15 @@ class SortingController extends Controller
                 'owner'=>$order->owner()->first()['code'],
                 'status'=>$order['status']=='未处理'?'available':$order['status'],
                 'created_at'=>$order['created_at']->toDateTimeString(),
-                'bin'=>$order->bin()->first()['number'],
+                'bin'=>(function()use($order){
+                    $bin=$order->bin()->first()['number']??'';
+                    if(!$bin){
+                        $bin=OracleDOCWaveDetails::query()->where('orderno', 'SO201230003574')->get('seqno')->first()['seqno']??'';
+                        LogService::log(__METHOD__,__FUNCTION__,'bin缺失补查:'.$bin.'. order:'.$order->toJson());
+                        return $bin;
+                    }
+                    return $bin;
+                })(),
                 'barcodes'=>[]
             ];
             $order->orderCommodities()->each(function(OrderCommodity $orderCommodity)use(&$orderData,$request){

+ 5 - 5
app/Services/ForeignHaiRoboticsService.php

@@ -176,7 +176,7 @@ class ForeignHaiRoboticsService
 
     public function taskUpdate(
 //        $groupCode,
-        $taskCode,
+        $stationTaskMaterialBox_id, //实际对应传入的字段 taskCode, 这里用料箱任务号做taskCode
         $updateEventType,   //0:task_begin(取货)1:task_end(放货)
         $status,            //0:任务成功1:任务失败
         $binCode
@@ -187,10 +187,10 @@ class ForeignHaiRoboticsService
                     =$status)==1){
                 throw new ErrorException('海柔任务失败');
             }
-            if($boxNotMatch=
+            if($料箱不匹配=
                 !$stationTaskMaterialBox
-                    =(function()use($taskCode,$binCode){
-                    $stationTaskMaterialBox=StationTaskMaterialBox::query()->find($id=$taskCode);
+                    =(function()use($stationTaskMaterialBox_id,$binCode){
+                    $stationTaskMaterialBox=StationTaskMaterialBox::query()->find($id=$stationTaskMaterialBox_id);
                     if($stationTaskMaterialBox['materialBox']['code']==$binCode)return $stationTaskMaterialBox;
                     return null;
                 })()){
@@ -211,7 +211,7 @@ class ForeignHaiRoboticsService
                     }
                 })();
         }catch (\Exception $e){
-            $this->excepted($taskCode, $binCode, $e->getMessage());
+            $this->excepted($stationTaskMaterialBox_id, $binCode, $e->getMessage());
             return false;
         }
         return true;

+ 4 - 0
app/Services/LogService.php

@@ -16,6 +16,10 @@ class LogService
     protected $modelClass=Log::class;
     static public function log($class, $method, $description, $id_user = null,$type='log')
     {
+        $passingMethods=config('logging.passing_methods');
+        foreach ($passingMethods as $passingMethod){
+            if($passingMethod==$method)return;
+        }
         if (!$id_user) {
             $id_user = '';
             $user = auth()->user();

+ 3 - 0
app/Services/OrderService.php

@@ -733,6 +733,9 @@ class OrderService
         if($orderHeader->issuepartyname != null && $orderHeader->issuepartyname != '' ){
             $shop = $dataHandlerService->getKeyValue(['name'=>$orderHeader->issuepartyname ?? '','owner_id'=>$owner->id??''],$shop_map);
         }
+        if(!$batch['id']&&!($orderHeader['status']==90||$orderHeader['status']==00)&&$orderHeader['wave_no']!='*'){
+            LogService::log(__METHOD__,__FUNCTION__,'波次为空: code='.$orderHeader['orderno']);
+        }
         return [
             'code'=>$orderHeader['orderno'],
             'batch_id' =>$batch['id'] ?? null,

+ 1 - 1
composer.json

@@ -8,7 +8,7 @@
     ],
     "license": "MIT",
     "require": {
-        "php": "^7.1.3",
+        "php": "^7.2.34",
         "ext-json": "*",
         "ext-mbstring": "*",
         "ext-openssl": "*",

+ 4 - 1
config/logging.php

@@ -5,8 +5,11 @@ use Monolog\Handler\SyslogUdpHandler;
 
 return [
 
+    'passing_methods'=>[  //跳过日志的方法
+        'finishSave',
+    ],
 
-    'expire_duration'=>'150', //天数,日志超过时长的就在服务中删除
+    'expire_duration'=>'60', //天数,日志超过时长的就在服务中删除
     /*
     |--------------------------------------------------------------------------
     | Default Log Channel

+ 3 - 0
laravel-echo-server.lock

@@ -0,0 +1,3 @@
+{
+	"process": 19904
+}

+ 161 - 172
resources/views/control/panel.blade.php

@@ -53,78 +53,76 @@
                 </div>
             </div>
             <div class="row my-3">
-                <div class="col-sm-6 col-lg-6  col-xl-6 col-md-6">
+                <div class="col-6">
                     <div class="card">
                         <div class="card-header">
-                            <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"
-                                        type="date"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选起始日期">
-                                    </el-date-picker>
+                            <div class="row">
+                                <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">起始日期:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsDayShow"
+                                    v-model="orderCountingRecordsStart"
+                                    type="date"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选起始日期">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsDayShow"
-                                        v-model="orderCountingRecordsEnd"
-                                        type="date"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择结束日期">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsDayShow"
+                                    v-model="orderCountingRecordsEnd"
+                                    type="date"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择结束日期">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsMonthShow"
-                                        v-model="orderCountingRecordsStart"
-                                        type="month"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择起始月">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsMonthShow"
+                                    v-model="orderCountingRecordsStart"
+                                    type="month"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择起始月">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsMonthShow"
-                                        v-model="orderCountingRecordsEnd"
-                                        type="month"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择结束月">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsMonthShow"
+                                    v-model="orderCountingRecordsEnd"
+                                    type="month"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择结束月">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsYearShow"
-                                        v-model="orderCountingRecordsStart"
-                                        type="year"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择年">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsYearShow"
+                                    v-model="orderCountingRecordsStart"
+                                    type="year"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择年">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsYearShow"
-                                        v-model="orderCountingRecordsEnd"
-                                        type="year"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择年">
-                                    </el-date-picker>
-                                </div>
-                                <div class="btn-group btn-group-sm ml-2" role="group" >
+                                <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsYearShow"
+                                    v-model="orderCountingRecordsEnd"
+                                    type="year"
+                                    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="orderCountingRecordApi('日')"
                                                class="btn btn-secondary"
                                                v-model="orderCountingRecordsUnit">日
@@ -139,19 +137,18 @@
                                     </el-button>
                                 </div>
                                 <div class="ml-2">
-                                    <el-select  placeholder="请选择对应货主" multiple v-model="selectOrderOwners" size="small"  @change="orderCountingRecordApi('')">
+                                    <el-select placeholder="请选择对应货主" multiple v-model="selectOrderOwners" 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-option v-for="item in owners" :label="item.name" :value="item.id"
+                                                   :key="item.id"></el-option>
                                     </el-select>
                                 </div>
                             </div>
                         </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 class="card-body row">
+                            <div id="orderCountingRecords" class="col-12"
+                                 style="min-height: 500px"></div>
                         </div>
                     </div>
                 </div>
@@ -181,11 +178,8 @@
                             </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 id="logisticsCountingRecords" class="col-12"
+                                 style="min-height:500px;"></div>
                         </div>
                     </div>
                 </div>
@@ -211,11 +205,9 @@
                             </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  id="warehouseCountingRecords" class="col-12"
+                                 style=min-height:500px;"></div>
+
                         </div>
                     </div>
                 </div>
@@ -227,7 +219,8 @@
                             <div class="card-header">
                                 <div class="block row">
                                     <span class="demonstration"></span>
-                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration mt-1">起始日期:</span>
+                                    <span v-show="laborReportsCountingRecordsDayShow"
+                                          class="demonstration mt-1">起始日期:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -237,7 +230,8 @@
                                         value-format="yyyy-MM-dd"
                                         placeholder="选起始日期">
                                     </el-date-picker>
-                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
+                                    <span v-show="laborReportsCountingRecordsDayShow"
+                                          class="demonstration mt-1">结束日期:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -247,7 +241,8 @@
                                         value-format="yyyy-MM-dd"
                                         placeholder="选择结束日期">
                                     </el-date-picker>
-                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
+                                    <span v-show="laborReportsCountingRecordsMonthShow"
+                                          class="demonstration mt-1">起始月:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -258,7 +253,8 @@
                                         placeholder="选择起始月">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
+                                    <span v-show="laborReportsCountingRecordsMonthShow"
+                                          class="demonstration mt-1">结束月:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -269,7 +265,8 @@
                                         placeholder="选择结束月">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
+                                    <span v-show="laborReportsCountingRecordsYearShow"
+                                          class="demonstration mt-1">起始年:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -280,7 +277,8 @@
                                         placeholder="选择年">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
+                                    <span v-show="laborReportsCountingRecordsYearShow"
+                                          class="demonstration mt-1">结束年:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -307,12 +305,9 @@
                                 </div>
                             </div>
                             <div class="card-body row">
-                                <div v-show="laborReportsCountingRecordsShow" id="laborReportsCountingRecords"
-                                     class="col"
-                                     style="width: 100%;height:500px;"></div>
-                                <div v-show="!laborReportsCountingRecordsShow">
-                                    <h3>正在加载...</h3>
-                                </div>
+                                <div id="laborReportsCountingRecords"
+                                     class="col-12"
+                                     style="min-height:500px;"></div>
                             </div>
                         </div>
                     </div>
@@ -335,12 +330,9 @@
                                 </el-date-picker>
                             </div>
                             <div class="card-body row">
-                                <div v-show="laborReportsUserGroupsCountShow" id="laborReportsUserGroupsCount"
-                                     class="col"
-                                     style="width: 100%;height:500px;"></div>
-                                <div v-show="!laborReportsUserGroupsCountShow">
-                                    <h3>正在加载...</h3>
-                                </div>
+                                <div  id="laborReportsUserGroupsCount"
+                                     class="col-12"
+                                     style="min-height:500px;"></div>
                             </div>
                         </div>
                     </div>
@@ -352,11 +344,15 @@
                     <div class="card">
                         <div class="card-header">
                             <div class="row">
-                                <el-date-picker size="small" class="col-6 date" @blur="loadWeightInfo()" type="daterange" align="right"
-                                                v-model="searchOption.weightDate" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
+                                <el-date-picker size="small" class="col-6 date" @blur="loadWeightInfo()"
+                                                type="daterange" align="right"
+                                                v-model="searchOption.weightDate" unlink-panels range-separator="-"
+                                                start-placeholder="开始日期" end-placeholder="结束日期"
+                                                value-format="yyyy-MM-dd">
                                 </el-date-picker>
                                 <label class="col-3 offset-3">
-                                    <select class="form-control rounded" v-model="searchOption.weightSelect" @change="switchWeightDate()">
+                                    <select class="form-control rounded" v-model="searchOption.weightSelect"
+                                            @change="switchWeightDate()">
                                         <option v-for="(date,i) in dateOptions" :value="i">@{{ date.text }}</option>
                                     </select>
                                 </label>
@@ -374,8 +370,6 @@
 @endsection
 @section('lastScript')
     <script src="{{ mix('js/echarts.js') }}"></script>
-    <!-- 引入样式 -->
-    <!-- 引入组件库 -->
     <script src="{{ mix('js/element-ui.js') }}"></script>
     <script>
         let vue = new Vue({
@@ -384,15 +378,18 @@
                 myChart: null,
                 menus:{!! $menus !!},
                 owners:{!! $owners !!},
-                selectOrderOwners:[],
-                selectLogisticsOwners:[],
+                selectOrderOwners: [],
+                selectLogisticsOwners: [],
                 warehousesOrders:{!! $warehousesOrders !!},
-                orderCountingRecords:{!! $orderCountingRecords !!},
-                logisticsCountingRecords:{!! $logisticsCountingRecords !!},
-                warehouseCountingRecords:{!! $warehouseCountingRecords !!},
-                laborReportsCountingRecords:{!! $laborReportsCountingRecords !!},
-                laborReportsUserGroupsCount:{!! $laborReportsUserGroupsCount !!},
-                warehouses: {},
+                orderCountingRecords:{},
+                logisticsCountingRecords:{},
+                warehouseCountingRecords:{},
+                laborReportsCountingRecords:{},
+                laborReportsUserGroupsCount:{},
+                warehouses: {
+                    "WH01": '松江一仓',
+                    "WH02": '松江二仓',
+                    "WH03": '嘉定一仓',},
                 totalOrders: {
                     total: null,
                     createOrder: null,
@@ -452,11 +449,6 @@
                     moment(new Date()).format('yyyy-MM-DD')],
                 orderCountingRecordsUnit: '日',
                 laborReportsCountingRecordUnit: '日',
-                orderCountingRecordsShow: true,
-                logisticsCountingRecordsShow: true,
-                warehouseCountingRecordsShow: true,
-                laborReportsCountingRecordsShow: true,
-                laborReportsUserGroupsCountShow: true,
                 orderCountingRecordsDayShow: true,
                 orderCountingRecordsMonthShow: false,
                 orderCountingRecordsYearShow: false,
@@ -471,7 +463,6 @@
                     start_year: moment().subtract('12', 'month').format('yyyy-MM-DD'),
                     end_year: moment(new Date()).format('yyyy-MM-DD'),
                 },
-
                 laborReportsUnit: '日',
                 laborReportsData: {
                     start_day: moment().subtract('1', 'month').format('yyyy-MM-DD'),
@@ -511,17 +502,12 @@
                         this.selectLogisticsOwners.splice(val.indexOf('all'),1)
                 }
             },
-            mounted: function () {
+            mounted() {
+                $('#list').removeClass('d-none');
                 let index = 4;
                 this.searchOption.weightSelect = index;
-                this.searchOption.weightDate = [this.dateOptions[index].start,this.dateOptions[index].end];
-                $('#list').removeClass('d-none');
+                this.searchOption.weightDate = [this.dateOptions[index].start, this.dateOptions[index].end];
                 let _this = this;
-                this.warehouses = {
-                    "WH01": '松江一仓',
-                    "WH02": '松江二仓',
-                    "WH03": '嘉定一仓',
-                }
                 this.warehousesOrders.forEach(function (item) {
                     _this.totalOrders.total += parseInt(item.total);
                     _this.totalOrders.createOrder += item.createOrder;
@@ -530,24 +516,27 @@
                     _this.totalOrders.partPacking += item.partPacking;
                     _this.totalOrders.sowComplete += item.sowComplete;
                 });
-                if (this.orderCountingRecords[0]!=null) {
-                    this.initOrderCountingRecords();
-                    this.orderCountingRecordsChart = echarts.init(document.getElementById('orderCountingRecords'));
-                    this.initOrderCountingRecordsChart();
-                }
-
+                //订单量趋势
+                this.orderCountingRecordsChart = echarts.init(document.getElementById('orderCountingRecords'));
+                this.initOrderCountingRecordsChart();
+                this.orderCountingRecordApi('日');
+                //订单快递分布
                 this.logisticsCountingRecordsChart = echarts.init(document.getElementById('logisticsCountingRecords'));
                 this.initLogisticsCountingRecordsChart();
-
+                this.logisticsCountingRecordsApi();
+                //订单仓库分布
                 this.warehouseCountingRecordsChart = echarts.init(document.getElementById('warehouseCountingRecords'));
                 this.initWarehouseCountingRecordsChart();
+                this.warehouseCountingRecordsApi();
+
                 @can('人事管理-临时工报表-可见全部组')
-                this.initLaborReportsCountingRecords();
                 this.laborReportsCountingRecordsChart = echarts.init(document.getElementById('laborReportsCountingRecords'));
                 this.initLaborReportsCountingRecordsChart();
+                this.laborReportsCountingRecordApi('日');
 
                 this.laborReportsUserGroupsCountChart = echarts.init(document.getElementById('laborReportsUserGroupsCount'));
                 this.initLaborReportsUserGroupsCountChart();
+                this.laborReportsUserGroupsCountApi();
                 @endcan
 
                 @can("控制台-称重统计")
@@ -626,9 +615,10 @@
                     }
                 },
                 initOrderCountingRecordsChart(text) {
-                    if (text==null ||text==''||text==undefined) text='默认显示权限下所有货主订单数量';
+                    this.orderCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
+                    if (text == null || text == '' || text == undefined) text = '默认显示权限下所有货主订单数量';
                     this.orderCountingRecordsChart.setOption({
-                        title: {text: '订单量趋势',subtext: text,},
+                        title: {text: '订单量趋势', subtext: text,},
                         tooltip: {},
                         legend: {data: ['订单数']},
                         xAxis: {
@@ -644,6 +634,7 @@
                     });
                 },
                 initLaborReportsCountingRecordsChart() {
+                    this.laborReportsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     this.laborReportsCountingRecordsChart.setOption({
                         title: {text: '临时用工趋势'},
                         tooltip: {},
@@ -661,11 +652,12 @@
                     });
                 },
                 initLogisticsCountingRecordsChart(text) {
-                    if (text==null ||text==''||text==undefined) text='默认显示权限下所有货主快递分布';
+                    this.logisticsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
+                    if (text == null || text == '' || text == undefined) text = '默认显示权限下所有货主快递分布';
                     this.logisticsCountingRecordsChart.setOption({
                         title: {
                             text: '快递分布',
-                            subtext:text,
+                            subtext: text,
                             left: 'left'
                         },
                         tooltip: {
@@ -691,6 +683,7 @@
                     });
                 },
                 initWarehouseCountingRecordsChart() {
+                    this.warehouseCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     this.warehouseCountingRecordsChart.setOption({
                         title: {
                             text: '仓库分布',
@@ -719,6 +712,7 @@
                     });
                 },
                 initLaborReportsUserGroupsCountChart() {
+                    this.laborReportsUserGroupsCountChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     this.laborReportsUserGroupsCountChart.setOption({
                         title: {
                             text: '小组临时工分布',
@@ -755,6 +749,7 @@
                 },
 
                 orderCountingRecordApi(orderCountingRecordsUnit) {
+                    this.orderCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     if (orderCountingRecordsUnit === '') {
                         orderCountingRecordsUnit = this.orderCountingRecordsUnit;
                     }
@@ -778,49 +773,43 @@
                             break;
                     }
                     this.orderCountingRecordsUnit = 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;
                     let text = null;
-                    axios.post('{{url('apiLocal/control/panel/menu/orderCountingRecordApi')}}',{
-                        'start':this.orderCountingRecordsStart,'end':this.orderCountingRecordsEnd,
-                        'unit':orderCountingRecordsUnit,'owner_ids':this.selectOrderOwners}).then(function (res) {
+                    axios.post('{{url('apiLocal/control/panel/menu/orderCountingRecordApi')}}', {
+                        'start': this.orderCountingRecordsStart, 'end': this.orderCountingRecordsEnd,
+                        'unit': orderCountingRecordsUnit, 'owner_ids': this.selectOrderOwners
+                    }).then(function (res) {
                         if (res.status === 200) {
                             _this.orderCountingRecords = res.data.orderCountingRecords;
                             _this.orderCountingRecordsDateTarget = [];
                             _this.orderCountingRecordsData = [];
                             _this.initOrderCountingRecords();
-                            if (_this.selectOrderOwners.length>0) text='当前选中货主订单数量';
+                            if (_this.selectOrderOwners.length > 0) text = '当前选中货主订单数量';
                             _this.initOrderCountingRecordsChart(text);
-                            _this.orderCountingRecordsShow = true;
+                            _this.orderCountingRecordsChart.hideLoading();
                         }
                     });
                 },
                 logisticsCountingRecordsApi() {
+                    this.logisticsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     let text = null;
-                    this.logisticsCountingRecordsShow = false;
-                    // let formData = new FormData();
-                    // formData.append('start', this.logisticsCountingRecordsData[0]);
-                    // formData.append('end', this.logisticsCountingRecordsData[1]);
                     let _this = this;
-                    axios.post('{{url('apiLocal/control/panel/menu/logisticsCountingRecordsApi')}}',{
-                        'start':this.logisticsCountingRecordsData[0],'end':this.logisticsCountingRecordsData[1],'owner_ids':this.selectLogisticsOwners
+                    axios.post('{{url('apiLocal/control/panel/menu/logisticsCountingRecordsApi')}}', {
+                        'start': this.logisticsCountingRecordsData[0],
+                        'end': this.logisticsCountingRecordsData[1],
+                        'owner_ids': this.selectLogisticsOwners
                     }).then(function (res) {
                         if (res.status === 200) {
                             _this.logisticsCountingRecords = res.data.logisticsCountingRecords;
-                            if (_this.selectLogisticsOwners.length>0) text='当前选中货主快递分布';
+                            if (_this.selectLogisticsOwners.length > 0) text = '当前选中货主快递分布';
                             _this.initLogisticsCountingRecordsChart(text);
-                            _this.logisticsCountingRecordsShow = true;
+                            _this.logisticsCountingRecordsChart.hideLoading();
                         }
                     });
                 },
 
                 warehouseCountingRecordsApi() {
-                    this.warehouseCountingRecordsShow = false;
+                    this.warehouseCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     let formData = new FormData();
                     formData.append('start', this.warehouseCountingRecordsData[0]);
                     formData.append('end', this.warehouseCountingRecordsData[1]);
@@ -829,14 +818,14 @@
                         if (res.status === 200) {
                             _this.warehouseCountingRecords = res.data.warehouseCountingRecords;
                             _this.initWarehouseCountingRecordsChart();
-                            _this.warehouseCountingRecordsShow = true;
+                            _this.warehouseCountingRecordsChart.hideLoading();
 
                         }
                     });
                 },
 
                 laborReportsCountingRecordApi(laborReportsCountingRecordUnit) {
-                    this.laborReportsCountingRecordsShow = false;
+                    this.laborReportsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     if (laborReportsCountingRecordUnit === '') {
                         laborReportsCountingRecordUnit = this.laborReportsCountingRecordUnit;
                     }
@@ -873,12 +862,12 @@
                             _this.laborReportsCountingRecordsData = [];
                             _this.initLaborReportsCountingRecords();
                             _this.initLaborReportsCountingRecordsChart();
-                            _this.laborReportsCountingRecordsShow = true;
+                            _this.laborReportsCountingRecordsChart.hideLoading();
                         }
                     });
                 },
                 laborReportsUserGroupsCountApi() {
-                    this.laborReportsUserGroupsCountShow = false;
+                    this.laborReportsUserGroupsCountChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     let formData = new FormData();
                     formData.append('start', this.laborReportsUserGroupsCountDate[0]);
                     formData.append('end', this.laborReportsUserGroupsCountDate[1]);
@@ -887,7 +876,7 @@
                         if (res.status === 200) {
                             _this.laborReportsUserGroupsCount = res.data.laborReportsUserGroupsCount;
                             _this.initLaborReportsUserGroupsCountChart();
-                            _this.laborReportsUserGroupsCountShow = true;
+                            _this.laborReportsUserGroupsCountChart.hideLoading();
                         }
                     });
                 },
@@ -923,7 +912,7 @@
                         tooltip: {
                             trigger: 'item',
                             formatter: function (params) {
-                                return params.data.date+"<br>"+"总量:<span class='text-success font-weight-bold'>"+params.data.total+"</span><br>"+"已称:<span class='text-info font-weight-bold'>"+params.data.count+"</span>";
+                                return params.data.date + "<br>" + "总量:<span class='text-success font-weight-bold'>" + params.data.total + "</span><br>" + "已称:<span class='text-info font-weight-bold'>" + params.data.count + "</span>";
                             }
                         }, xAxis: {
                             data: title
@@ -933,17 +922,17 @@
                                 interval: 'auto',
                                 formatter: '{value} %'
                             },
-                            max:100
-                        }, label:{
-                            show:true,
+                            max: 100
+                        }, label: {
+                            show: true,
                             position: 'top',
                             formatter: '{c}%',
-                            color:"red"
+                            color: "red"
                         }, series: [{
                             type: "bar",
                             data: data,
-                            itemStyle:{
-                                color:"RGB(62,157,231)",
+                            itemStyle: {
+                                color: "RGB(62,157,231)",
                             }
                         }]
                     };

+ 1 - 1
resources/views/customer/project/create.blade.php

@@ -1560,4 +1560,4 @@
             },
         });
     </script>
-@stop
+@stop

+ 3 - 3
resources/views/customer/project/part/_three.blade.php

@@ -71,7 +71,7 @@
                                 <div v-for="(item,j) in operation.items" class="container-fluid">
                                     <div class="row">
                                         <div class="col-10">
-                                            <label>@{{ item.strategy }}</label>:
+                                            <label>@{{ item.strategy }} <span v-if="item.strategy!='起步'">续费</span></label>:
                                             <b>@{{ item.amount }}</b>&nbsp;@{{ poolMapping.units ? poolMapping.units[item.unit_id] : '' }} / <b>@{{ item.unit_price }}</b>元
                                             <span v-if="operation.isDiscount">&nbsp;(满减单价:<b>@{{ item.discount_price }}元</b>)</span>
                                         </div>
@@ -121,7 +121,7 @@
                                 <div v-for="(item,j) in operation.items" class="container-fluid">
                                     <div class="row">
                                         <div class="col-10">
-                                            <label>@{{ item.strategy }}</label>:
+                                            <label>@{{ item.strategy }}<span v-if="item.strategy!='起步'">续费</span></label>:
                                             <span v-if="item.amount > 0"><b>@{{ item.amount }}</b>&nbsp;@{{ poolMapping.units ? poolMapping.units[item.unit_id] : '' }} /</span><b>&nbsp;@{{ item.unit_price }}</b>元
                                             <span v-if="operation.isDiscount">&nbsp;(满减单价:
                                                 <span v-for="(value,k) in item.discount_price">
@@ -364,4 +364,4 @@
             </div>
         </div>
     </div>
-</div>
+</div>

+ 9 - 7
resources/views/maintenance/user/index.blade.php

@@ -59,13 +59,15 @@
         new Vue({
             el:"#list",
             data:{
-                users:[
-                    @foreach( $users as $user )
-                    {id:'{{$user->id}}',name:'{{$user->name}}',email:'{{$user->email}}',
-                        isSuperAdmin:'{{$user->isSuperAdmin}}',
-                        roles:{!! $user->roles !!},logistics:{!! $user->logistics !!},workgroup:{!! $user->userWorkgroups !!},created_at:'{{$user->created_at}}'},
-                    @endforeach
-                ],
+                {{--users:[--}}
+                {{--    @foreach( $users as $user )--}}
+                {{--    {id:'{{$user->id}}',name:'{{$user->name}}',email:'{{$user->email}}',--}}
+                {{--        isSuperAdmin:'{{$user->isSuperAdmin}}',--}}
+                {{--        roles:{!! $user->roles !!},logistics:{!! $user->logistics !!},workgroup:{!! $user->userWorkgroups !!},created_at:'{{$user->created_at}}'},--}}
+                {{--    @endforeach--}}
+                {{--],--}}
+                {{--users:{!! $users !!},--}}
+                users:{!! $users->toJson() !!}['data'],
                 form:'',
             },
             mounted:function(){

+ 1 - 1
resources/views/package/weigh/index.blade.php

@@ -75,7 +75,7 @@
                         logisticName:'{{$package->order ? ($package->order->logistic ? $package->order->logistic->name : '') : ''}}',
                         batchNumber:'{{$package->order ? ($package->order->batch ? $package->order->batch->code : '') : ''}}',
                         batchRule:'{{$package->order ? ($package->order->batch ? $package->order->batch->wms_type : '') : ''}}',
-                        recipient:'{{$package->order ? $package->order->consignee_name : ''}}',
+                        recipient:'{{$package->order ? preg_replace('/[\s\n]/','',$package->order->consignee_name) : ''}}',
                         recipientMobile:'{{$package->order ? $package->order->consignee_phone : ''}}',
                         logisticNumber:'{{$package->logistic_number}}',
                         measuringMachineName:'{{$package->measuringMachine ? $package->measuringMachine->name : ''}}',

+ 27 - 27
tests/Services/BatchService/AssignTasksTest.php

@@ -85,33 +85,33 @@ class AssignTasksTest extends TestCase
 
     function tearDown(): void
     {
-        MaterialBox::query()
-            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.materialBox.id')??[])
-            ->delete();
-        StationTaskMaterialBox::query()
-            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.id')??[])
-            ->delete();
-        StationTaskCommodity::query()
-            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskCommodities.*.id')??[])
-            ->delete();
-        StationTaskBatch::query()
-            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.id')??[])
-            ->delete();
-        StationTask::query()
-            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.id')??[])
-            ->delete();
-        StationRuleBatch::query()
-            ->whereIn('id',data_get($this->data['station_rule_batches'],'*.id')??[])
-            ->delete();
-        OrderCommodity::query()
-            ->whereIn('id',data_get($this->data['orderCommodities'],'*.id')??[])
-            ->delete();
-        Order::query()
-            ->whereIn('id',data_get($this->data['orders'],'*.id')??[])
-            ->delete();
-        Batch::query()
-            ->whereIn('id',data_get($this->data['batches'],'*.id')??[])
-            ->delete();
+//        MaterialBox::query()
+//            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.materialBox.id')??[])
+//            ->delete();
+//        StationTaskMaterialBox::query()
+//            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.id')??[])
+//            ->delete();
+//        StationTaskCommodity::query()
+//            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskCommodities.*.id')??[])
+//            ->delete();
+//        StationTaskBatch::query()
+//            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.id')??[])
+//            ->delete();
+//        StationTask::query()
+//            ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.id')??[])
+//            ->delete();
+//        StationRuleBatch::query()
+//            ->whereIn('id',data_get($this->data['station_rule_batches'],'*.id')??[])
+//            ->delete();
+//        OrderCommodity::query()
+//            ->whereIn('id',data_get($this->data['orderCommodities'],'*.id')??[])
+//            ->delete();
+//        Order::query()
+//            ->whereIn('id',data_get($this->data['orders'],'*.id')??[])
+//            ->delete();
+//        Batch::query()
+//            ->whereIn('id',data_get($this->data['batches'],'*.id')??[])
+//            ->delete();
         parent::tearDown();
     }
 }

+ 1 - 1
tests/webApi/thirdPart/haiq/storage.http

@@ -39,7 +39,7 @@ Content-Type: application/json
 POST http://bswas/api/thirdPart/haiq/storage/taskUpdate
 Content-Type: application/json
 
-{"groupCode": "1097","taskCode":"1531","updateEventType": "0","status":"0","binCode": "b741f766-b035-3ab8-ad90-34b8837ce051","kubotId":"x","description": "dd"}
+{"groupCode": "1159","taskCode":"1739","updateEventType": "0","status":"0","binCode": "8b839c28-f2e3-3d56-b34a-d9ac4fd81fa2","kubotId":"x","description": "dd"}
 ###
 
 POST http://bswas/api/thirdPart/haiq/storage/exception