Jelajahi Sumber

Merge branch 'waybill_ZD'

# Conflicts:
#	resources/views/weight/package/index.blade.php
LD 6 tahun lalu
induk
melakukan
72f0a091ba

+ 4 - 4
app/Http/Controllers/WeighExceptedController.php

@@ -21,10 +21,10 @@ class WeighExceptedController extends Controller
         $paginate=$request->input('paginate');
         if ($paginate){
             $weightExcepteds=Package::select('id','status','logistic_number','logistic_id','measuring_machine_id','created_at','weight','length','width','height','bulk','paper_box_id')->
-            where('status','上传异常')->orWhere('status','测量异常')->orWhere('status','记录异常')->orWhere('status','已上传异常')->orderBy('created_at','DESC')->paginate($paginate);
+            where('status','上传异常')->orWhere('status','测量异常')->orderBy('created_at','DESC')->paginate($paginate);
         }else{
             $weightExcepteds=Package::select('id','status','logistic_number','logistic_id','measuring_machine_id','created_at','weight','length','width','height','bulk','paper_box_id')->
-            where('status','上传异常')->orWhere('status','测量异常')->orWhere('status','记录异常')->orWhere('status','已上传异常')->orderBy('created_at','DESC')->paginate(50);
+            where('status','上传异常')->orWhere('status','测量异常')->orderBy('created_at','DESC')->paginate(50);
         };
         return view('weight.weightExcepted.index',['weightExcepteds'=>$weightExcepteds,'view'=>'indexCreate']);
     }
@@ -34,10 +34,10 @@ class WeighExceptedController extends Controller
         $paginate=$request->input('paginate');
         if ($paginate){
             $weightExcepteds=Package::select('id','owner_id','logistic_number','created_at','delivery_number','batch_number','batch_rule','recipient','recipient_mobile','logistic_id')->
-            where('status','下发异常')->orderBy('created_at','DESC')->paginate($paginate);
+            where('status','下发异常')->orWhere('status','记录异常')->orWhere('status','已上传异常')->orderBy('created_at','DESC')->paginate($paginate);
         }else{
             $weightExcepteds=Package::select('id','owner_id','logistic_number','created_at','delivery_number','batch_number','batch_rule','recipient','recipient_mobile','logistic_id')->
-            where('status','下发异常')->orderBy('created_at','DESC')->paginate(50);
+            where('status','下发异常')->orWhere('status','记录异常')->orWhere('status','已上传异常')->orderBy('created_at','DESC')->paginate(50);
         };
         return view('weight.weightExcepted.index',['weightExcepteds'=>$weightExcepteds,'view'=>'indexIssued']);
     }

+ 3 - 0
app/Http/Controllers/api/thirdPart/weight/PackageController.php

@@ -85,6 +85,7 @@ class PackageController extends Controller
                     $packageBatch->width=$centre;
                     $packageBatch->height=$min;
                     $packageBatch->bulk=$max*$centre*$min;
+                    $packageBatch->weighed_at=$reqDate;
                     if (isset($paperBox_id))$packageBatch->paper_box_id=$paperBox_id;
                     $packageBatch->status="未上传";
                     $packageBatch->save();
@@ -104,6 +105,7 @@ class PackageController extends Controller
                 $package->width=$centre;
                 $package->height=$min;
                 $package->bulk=$max*$centre*$min;
+                $package->weighed_at=$reqDate;
                 if (isset($paperBox_id))$package->paper_box_id=$paperBox_id;
                 $package->status="未上传";
                 $this->log(__METHOD__,'Batch_'.__FUNCTION__,json_encode($package),null);
@@ -142,6 +144,7 @@ class PackageController extends Controller
                 'width'=>$centre,
                 'height'=>$min,
                 'bulk'=>$max*$centre*$min,
+                'weighed_at'=>$reqDate,
                 'status'=>"未下发",
             ]);
             if ($logistic)$createPackage->logistic_id=$logistic->id;

+ 1 - 1
app/Package.php

@@ -8,7 +8,7 @@ class Package extends Model
 {
     protected $fillable=[
         'owner_id','logistic_number','delivery_number','batch_number','batch_rule','recipient','recipient_mobile','logistic_id',
-        'measuring_machine_id','weight','length','width','height','bulk','paper_box_id','status'
+        'measuring_machine_id','weight','length','width','height','bulk','paper_box_id','status','weighed_at'
     ];
     protected $appends=[
         'owner_name',

+ 1 - 0
database/migrations/2020_02_10_103905_change_package_column.php

@@ -31,6 +31,7 @@ class ChangePackageColumn extends Migration
             $table->decimal('height')->nullable()->index()->comment('高(cm)');
             $table->decimal('bulk')->nullable()->comment('体积(cm³)');
             $table->bigInteger('paper_box_id')->nullable()->index()->comment('外键纸箱');
+            $table->dateTime('weighed_at')->nullable()->comment('称重时间');
             $table->enum('status',['无','未上传','已上传','未测量','未下发','上传异常','下发异常','记录异常','已上传异常'])->default('无')->comment('包裹信息状态');
             $table->timestamps();
         });

+ 2 - 1
resources/views/waybill/index.blade.php

@@ -25,7 +25,7 @@
         </div>
     </div>
     <div class="container-fluid" style="min-width: 3500px;">
-        <div id="list">
+        <div class="d-none" id="list">
 
             <form  method="GET" action="@if($uriType=='ZF'){{url('waybill/index/ZF')}}@elseif($uriType=='ZX'){{url('waybill/index/ZX')}}@else{{url('waybill/index')}}@endif" style="margin-top: 1%" id="optionSubmit">
                 <table class="table  table-sm table-bordered table-hover text-nowrap " style="background: #fff;">
@@ -283,6 +283,7 @@
             mounted:function(){
                 this.initInputs();
                 $(".tooltipTarget").tooltip({'trigger':'hover'});
+                $('#list').removeClass('d-none');
             },
             methods:{
                 initInputs:function(){

+ 2 - 1
resources/views/waybill/waybillFinancialSnapshot/index.blade.php

@@ -1,7 +1,7 @@
 @extends('layouts.app')
 
 @section('content')
-<div id="editingPanel">
+<div class="d-none" id="editingPanel">
 
     <div  class="card" id="nav2">
         @component('waybill.menu')@endcomponent
@@ -192,6 +192,7 @@
         mounted:function(){
             this.initInputs();
             $(".tooltipTarget").tooltip({'trigger':'hover'});
+            $('#editingPanel').removeClass('d-none');
         },
         methods:{
             initInputs:function(){

+ 3 - 4
resources/views/weight/measureMonitor/index.blade.php

@@ -54,7 +54,7 @@
                                         <th  class="tag" scope="row" scope="row">状态</th>
                                         <td style="border-right:thick double #aaaaaa;">@{{package.status}}</td>
                                         <th  class="tag" scope="row" scope="row">操作时间</th>
-                                        <td>@{{package.created_at}}</td>
+                                        <td>@{{package.weighed_at}}</td>
                                     </tr>
                                 </table>
                                 </h1>
@@ -81,7 +81,7 @@
                     {id:'',logistic_number:'',delivery_number:'',
                     weight:'',owner:'',paperBox:'',
                     measuringMachine:'',recipient:'',measuringMachine_status:'',
-                    status:'',created_at:'',bulk:'',logistic:''},
+                    status:'',weighed_at:'',bulk:'',logistic:''},
                 measuringMachines:[
                     @foreach($measuringMachines as $measuringMachine)
                     {id:'{{$measuringMachine->id}}',name:'{{$measuringMachine->name}}',code:'{{$measuringMachine->code}}',status:'{{$measuringMachine->status}}',},
@@ -150,13 +150,12 @@
                        });
                },
                updateData(_this,package){
-                   console.log(package)
                    _this.package.id=package.id;
                    _this.package.logistic_number=package.logistic_number;_this.package.delivery_number=package.delivery_number;
                    _this.package.weight=package.weight;_this.package.owner=package.owner_name;
                    _this.package.paperBox=package.paperBox_name;_this.package.measuringMachine=package.measuringMachine_name;
                    _this.package.recipient=package.recipient;_this.package.status=package.status;
-                   _this.package.created_at=package.created_at;_this.package.bulk=package.bulk;
+                   _this.package.weighed_at=package.weighed_at;_this.package.bulk=package.bulk;
                    _this.package.logistic=package.logistic_name;
                    _this.package.measuringMachine_status=package.measuringMachine_status;
                }

+ 5 - 3
resources/views/weight/package/index.blade.php

@@ -6,7 +6,7 @@
         @component('weight.menu')@endcomponent
         @component('weight.package.menu')@endcomponent
     </span>
-    <div id="list">
+    <div class="d-none" id="list">
         <div class="container-fluid mt-3">
             <div class="">
                 <div>
@@ -76,9 +76,9 @@
                                     <span class="text-muted">操作选定记录:</span>
                                 </td>
                                 <td colspan="9">
-                                    <select @change="packageExport" :class="[checkData>0?'btn-dark':'btn-outline-dark']"  class=" tooltipTarget form-control-sm" style=" vertical-align: middle"
+                                    <select @change="packageExport($event)" :class="[checkData>0?'btn-dark':'btn-outline-dark']"  class=" tooltipTarget form-control-sm" style=" vertical-align: middle"
                                              title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
-                                        <option >选择Excel</option>
+                                        <option >导出Excel</option>
                                         <option value="1">导出勾选内容</option>
                                         <option value="2">导出所有页</option>
                                     </select>
@@ -170,6 +170,8 @@
             },
             mounted:function(){
                 this.initInputs();
+                $(".tooltipTarget").tooltip({'trigger':'hover'});
+                $('#list').removeClass('d-none');
             },
             watch:{
                 checkData:{

+ 6 - 3
resources/views/weight/weightExcepted/index.blade.php

@@ -6,7 +6,7 @@
         @component('weight.menu')@endcomponent
         @component('weight.weightExcepted.menu')@endcomponent
     </span>
-    <div id="list">
+    <div class="d-none" id="list">
         <div class="container-fluid mt-3">
             <div class="card">
                 <div>
@@ -66,7 +66,7 @@
                             <th>异常类型</th>
                         @endif
                     </tr>
-                    <tr v-for="weightExcepted in weightExcepteds" style="color: red">
+                    <tr v-for="weightExcepted in weightExcepteds" :style="weightExcepted.status=='上传异常'||weightExcepted.status=='下发异常'?'':color">
                         <td>
                             <input class="checkItem" type="checkbox" :value="weightExcepted.id" v-model="checkData">
                         </td>
@@ -124,10 +124,13 @@
                     @endforeach
                 ],
                 filterData:{paginate:50},
-                checkData:[]
+                checkData:[],
+                color:'color: red',
             },
            mounted:function(){
                 this.initInputs();
+               $(".tooltipTarget").tooltip({'trigger':'hover'});
+               $('#list').removeClass('d-none');
             },
             watch:{
                 checkData:{