Zhouzhendong 4 лет назад
Родитель
Сommit
99f7732500

+ 1 - 1
app/Http/Controllers/TestController.php

@@ -123,7 +123,7 @@ class TestController extends Controller
     }
     public function test()
     {
-
+        \App\Authority::query()->firstOrCreate(["name" => "入库管理-入库预约-预约管理-卸货完成"],["name" => "入库管理-入库预约-预约管理-卸货完成","alias_name"=>"入库管理-入库预约-预约管理-卸货完成"]);
     }
     public function orderCreateBill()
     {

+ 3 - 0
app/Services/ForeignHaiRoboticsService.php

@@ -517,6 +517,8 @@ class ForeignHaiRoboticsService
      * 填充缓存架
      *
      * @param \Illuminate\Database\Eloquent\Collection $stations
+     *
+     * @throws
      */
     public function paddingCacheShelf($stations)
     {
@@ -540,6 +542,7 @@ class ForeignHaiRoboticsService
             $stationCollection->add($station->code);
             $blacklist[] = $box->id;
         }
+        LogService::log("补充料箱","填充入口",json_encode($stationCollection->toArray(),JSON_UNESCAPED_UNICODE).' | '.json_encode($collection->toArray(),JSON_UNESCAPED_UNICODE));
         $this->fetchGroup_multiLocation($stationCollection,$collection,'','立架出至缓存架');
     }
 }

+ 2 - 0
database/migrations/2021_06_01_102357_add_authority_delivery_appointment_table_sign_id_data.php

@@ -14,6 +14,7 @@ class AddAuthorityDeliveryAppointmentTableSignIdData extends Migration
     public function up()
     {
         \App\Authority::query()->firstOrCreate(["name" => "入库管理-入库预约-预约管理-签到"],["name" => "入库管理-入库预约-预约管理-签到","alias_name"=>"入库管理-入库预约-预约管理-签到"]);
+        \App\Authority::query()->firstOrCreate(["name" => "入库管理-入库预约-预约管理-卸货完成"],["name" => "入库管理-入库预约-预约管理-卸货完成","alias_name"=>"入库管理-入库预约-预约管理-卸货完成"]);
     }
 
     /**
@@ -24,5 +25,6 @@ class AddAuthorityDeliveryAppointmentTableSignIdData extends Migration
     public function down()
     {
         \App\Authority::query()->where('name', '入库管理-入库预约-预约管理-签到')->delete();
+        \App\Authority::query()->where('name', '入库管理-入库预约-预约管理-卸货完成')->delete();
     }
 }

+ 8 - 1
resources/views/store/deliveryAppointment/list.blade.php

@@ -74,7 +74,7 @@
                 <td>@{{ i+1 }}</td>
                 <td>
                     <span v-if="info.status==0">
-                        @can("入库管理-入库预约-预约管理-签到")<button class="btn btn-sm btn-outline-success" @click="signIn(i,0)" v-if="info.status==0 && info.cars[0].status==0">签到</button>@endcan<br>
+                        @can("入库管理-入库预约-预约管理-签到")<button class="btn btn-sm btn-outline-success" @click="signIn(i,0)" v-if="info.status==0 && info.cars[0].status==0 && info.appointment_date==today">签到</button>@endcan<br>
                         <button type="button" @click="cancel(info.id,i)" class="btn btn-sm btn-outline-danger">取消预约</button><br>
                         <button type="button" @click="updateDeliveryDate(info,i)" class="btn btn-sm btn-outline-primary">修改预约</button>
                     </span>
@@ -202,6 +202,7 @@
                 periods:@json(\App\DeliveryAppointment::PERIOD),
                 printInfo:{},
                 infoShow:false,
+                today:"",
             },
             mounted(){
                 let status = [];
@@ -235,6 +236,12 @@
                 $(".up").slideUp();
                 $("#container").removeClass("d-none");
                 this._renderingForm();
+
+                let now = new Date();
+                let yy = now.getFullYear();
+                let mm = now.getMonth() + 1;
+                let dd = now.getDate();
+                this.today = yy+'-'+(mm<10 ? '0'+mm : mm)+'-'+(dd<10 ? '0'+dd : dd);
             },
             watch:{
                 checkData:{