소스 검색

Merge branch 'waybill_ZD'

LD 6 년 전
부모
커밋
b01a35bc7c

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

@@ -20,12 +20,12 @@ class WeighExceptedController extends Controller
     {
         if(!Gate::allows('称重管理-查看异常')){ return redirect(url('/'));  }
         $paginate=$request->input('paginate');
+        $weightExcepteds=Package::select('id','status','logistic_number','logistic_id','measuring_machine_id','weighed_at','weight','length','width','height','bulk','paper_box_id')->
+        where('status','上传异常')->orWhere('status','测量异常')->orderBy('created_at','DESC');
         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','测量异常')->orderBy('created_at','DESC')->paginate($paginate);
+            $weightExcepteds=$weightExcepteds->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','测量异常')->orderBy('created_at','DESC')->paginate(50);
+            $weightExcepteds=$weightExcepteds->paginate(50);
         };
         return view('weight.weightExcepted.index',['weightExcepteds'=>$weightExcepteds,'view'=>'indexCreate']);
     }
@@ -34,12 +34,12 @@ class WeighExceptedController extends Controller
     {
         if(!Gate::allows('称重管理-查看异常')){ return redirect(url('/'));  }
         $paginate=$request->input('paginate');
+        $weightExcepteds=Package::select('id','owner_id','logistic_number','created_at','delivery_number','batch_number','batch_rule','recipient','recipient_mobile','logistic_id')->
+        where('status','下发异常')->orWhere('status','记录异常')->orWhere('status','已上传异常')->orderBy('created_at','DESC');
         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','下发异常')->orWhere('status','记录异常')->orWhere('status','已上传异常')->orderBy('created_at','DESC')->paginate($paginate);
+            $weightExcepteds=$weightExcepteds->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','下发异常')->orWhere('status','记录异常')->orWhere('status','已上传异常')->orderBy('created_at','DESC')->paginate(50);
+            $weightExcepteds=$weightExcepteds->paginate(50);
         };
         return view('weight.weightExcepted.index',['weightExcepteds'=>$weightExcepteds,'view'=>'indexIssued']);
     }

+ 1 - 1
database/factories/UserFactory.php

@@ -22,7 +22,7 @@ $factory->define(User::class, function (Faker $faker) {
         'email' =>  $faker->unique()->safeEmail,
         'email_verified_at' => now(),
         'password' => '$2y$10$vvcID/Akq2KjOZwRUUgBJOpVyGi.nTDT8Yb7gxiy5Xj9/5GnpzBMi', // password
-        'api_token' => $faker->md5,
+        //'api_token' => $faker->md5,
         'remember_token' => Str::random(10),
     ];
 });

+ 0 - 3
laravel-echo-server.lock

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

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

@@ -436,7 +436,8 @@
                 waybillExport(e){
                     let val=e.target.value;
                     let data=this.filterData;
-                    if (val===1) {
+                    console.log(val)
+                    if (val==1) {
                         if (this.checkData.length <= 0) {
                             tempTip.setDuration(4000);
                             tempTip.showSuccess('没有勾选任何记录');

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

@@ -224,7 +224,7 @@
             waybillExport(e){
                 let val=e.target.value;
                 let data=this.filterData;
-                if (val===1) {
+                if (val==1) {
                     if (this.checkData.length <= 0) {
                         tempTip.setDuration(4000);
                         tempTip.showSuccess('没有勾选任何记录');

+ 4 - 4
resources/views/weight/package/index.blade.php

@@ -110,7 +110,7 @@
                         <th>纸箱</th>
                         <th>状态</th>
                         <th>波次规则</th>
-                        <th>创建时间</th>
+                        <th>称重时间</th>
                         <th>收件人</th>
                         <th>收件人电话</th>
                     </tr>
@@ -131,7 +131,7 @@
                         <td>@{{package.paperBoxName}}</td>
                         <td :class="[package.status==='已上传'?'text-success':'']">@{{package.status}}</td>
                         <td class="text-muted">@{{package.batchRule}}</td>
-                        <td class="text-muted">@{{package.created_at}}</td>
+                        <td class="text-muted">@{{package.weighed_at}}</td>
                         <td class="text-muted">@{{package.recipient}}</td>
                         <td class="text-muted">@{{package.recipientMobile}}</td>
                     </tr>
@@ -156,7 +156,7 @@
                         ,measuringMachineName:'{{$package->measuringMachine_name}}',
                         weight:'{{$package->weight}}', length:'{{$package->length}}',width:'{{$package->width}}',height:'{{$package->height}}',
                         bulk:'{{$package->bulk}}',paperBoxName:'{{$package->paperBox_name}}',
-                        status:'{{$package->status}}',created_at:'{{$package->created_at}}'},
+                        status:'{{$package->status}}',created_at:'{{$package->created_at}}',weighed_at:'{{$package->weighed_at}}'},
                     @endforeach
                 ],
                 i:0,
@@ -238,7 +238,7 @@
                 packageExport(e){
                     let val=e.target.value;
                     let data=this.filterData;
-                    if (val===1){
+                    if (val==1){
                         if (this.checkData&&this.checkData.length<=0){
                             tempTip.setDuration(4000);
                             tempTip.showSuccess('没有勾选任何记录');

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

@@ -84,7 +84,7 @@
                             <td>@{{weightExcepted.recipientMobile}}</td>
                         @else
                             <td>@{{weightExcepted.measuringMachineName}}</td>
-                            <td class="text-muted">@{{weightExcepted.createdAt}}</td>
+                            <td class="text-muted">@{{weightExcepted.weighedAt}}</td>
                             <td>@{{weightExcepted.weight}}</td>
                             <td>@{{weightExcepted.length}}</td>
                             <td>@{{weightExcepted.width}}</td>
@@ -118,7 +118,7 @@
                             recipientMobile:'{{$weightExcepted->recipient_mobile}}',carrierName:'{{$weightExcepted->logistic_name}}'},
                         @else
                             {id:'{{$weightExcepted->id}}',logisticNumber:'{{$weightExcepted->logistic_number}}',carrierName:'{{$weightExcepted->logistic_name}}',
-                            measuringMachineName:'{{$weightExcepted->measuringMachine_name}}',createdAt:'{{$weightExcepted->created_at}}',
+                            measuringMachineName:'{{$weightExcepted->measuringMachine_name}}',weighedAt:'{{$weightExcepted->weighed_at}}',
                             weight:'{{$weightExcepted->weight}}', length:'{{$weightExcepted->length}}',width:'{{$weightExcepted->width}}',height:'{{$weightExcepted->height}}',
                             bulk:'{{$weightExcepted->bulk}}',paperBoxName:'{{$weightExcepted->paperBox_name}}',status:'{{$weightExcepted->status}}',},
                         @endif
@@ -178,7 +178,7 @@
                 },
                 weightExport(e){
                     let val=e.target.value;
-                    if (val===1) {
+                    if (val==1) {
                         if (this.checkData.length <= 0) {
                             tempTip.setDuration(4000);
                             tempTip.showSuccess('没有勾选任何记录');

+ 1 - 0
tests/Unit/CarTypeTest.php

@@ -38,6 +38,7 @@ class CarTypeTest extends TestCase
     public function testUser(Role $role){
         $user=factory(User::class)->create();
         DB::table('user_role')->insert(['id_user'=>$user->id,'id_role'=>$role->id]);
+        $user->touchToken();
         $this->assertNotEmpty($user->id);
         return $user;
     }

+ 1 - 0
tests/Unit/CarrierTest.php

@@ -38,6 +38,7 @@ class CarrierTest extends TestCase
     public function testUser(Role $role){
         $user=factory(User::class)->create();
         DB::table('user_role')->insert(['id_user'=>$user->id,'id_role'=>$role->id]);
+        $user->touchToken();
         $this->assertNotEmpty($user->id);
         return $user;
     }

+ 1 - 0
tests/Unit/CityTest.php

@@ -37,6 +37,7 @@ class CityTest extends TestCase
     public function testUser(Role $role){
         $user=factory(User::class)->create();
         DB::table('user_role')->insert(['id_user'=>$user->id,'id_role'=>$role->id]);
+        $user->touchToken();
         $this->assertNotEmpty($user->id);
         return $user;
     }

+ 1 - 0
tests/Unit/MeasureMonitorTest.php

@@ -36,6 +36,7 @@ class MeasureMonitorTest extends TestCase
     public function testUser(Role $role){
         $user=factory(User::class)->create();
         DB::table('user_role')->insert(['id_user'=>$user->id,'id_role'=>$role->id]);
+        $user->touchToken();
         $this->assertNotEmpty($user->id);
         return $user;
     }

+ 1 - 0
tests/Unit/MeasuringMachineTest.php

@@ -37,6 +37,7 @@ class MeasuringMachineTest extends TestCase
     public function testUser(Role $role){
         $user=factory(User::class)->create();
         DB::table('user_role')->insert(['id_user'=>$user->id,'id_role'=>$role->id]);
+        $user->touchToken();
         $this->assertNotEmpty($user->id);
         return $user;
     }

+ 1 - 0
tests/Unit/PackageTest.php

@@ -37,6 +37,7 @@ class PackageTest extends TestCase
     public function testUser(Role $role){
         $user=factory(User::class)->create();
         DB::table('user_role')->insert(['id_user'=>$user->id,'id_role'=>$role->id]);
+        $user->touchToken();
         $this->assertNotEmpty($user->id);
         return $user;
     }