Explorar o código

临时工申请系统

ANG YU %!s(int64=4) %!d(string=hai) anos
pai
achega
a571e8edbf

+ 0 - 6
app/Http/Controllers/LaborApplyController.php

@@ -78,12 +78,6 @@ class LaborApplyController extends Controller
         return redirect(route('laborApply.index'))->with('success', '填写实到人数成功!');
     }
 
-    /**
-     * Remove the specified resource from storage.
-     *
-     * @param \App\LaborApply $laborApply
-     * @return \Illuminate\Http\Response
-     */
     public function destroy(LaborApply $laborApply)
     {
         $laborApply->delete();

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

@@ -55,7 +55,7 @@ class LaborCompanyDispatchController extends Controller
         );
         /** @var Carbon $dispatch_date */
         $dispatch_date = $laborCompanyDispatch->dispatch_date;
-
+        //更新创建日期为 分配日期前一天的全部申请状态为 劳务接单
         LaborApply::query()
             ->whereDate('created_at', $dispatch_date->subDay()->toDateString())
             ->where('warehouse_id', $laborCompanyDispatch->laborCompany->warehouse_id)

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

@@ -659,7 +659,7 @@ sql;
 
     public function init_SettlementBillReportTask()
     {
-        $this->dispatch(new SettlementBillReportJob('2021-08-01',[]));
+        $this->dispatch(new SettlementBillReportJob('2021-09-01',[]));
     }
     public function test2(){
         $source_file ="E:\OneDrive\桌面\工作目录\文件库\\5.jpg";

+ 1 - 1
app/Services/LaborApplyService.php

@@ -68,7 +68,7 @@ class LaborApplyService
 
         //查询全部仓库
         $warehouses = Warehouse::all();
-        //按照仓库,
+        //给每个仓库计算分配数据 更改申请状态为指派成功
         foreach ($warehouses as $warehouse) {
             //查询当日的的申请,将申请的男女工分别加和
             $apply_man_nums = DB::table('labor_applies')

+ 16 - 13
resources/views/personnel/laborApply/create.blade.php

@@ -2,7 +2,7 @@
 @section('title')录入-临时工申请协调@endsection
 
 @section('content')
-    <div class="container-fluid" id="list">
+    <div class="container-fluid d-none" id="list">
         <div class="card col-md-8 offset-md-2">
             <div class="card-body">
                 <!--
@@ -12,21 +12,24 @@
                    3 临时开放
                 -->
                 @can('人事管理')
-                <form v-if="can_create_status === 2" action="{{ route('laborApply.temporaryOpen') }}" method="post" accept-charset="UTF-8">
-                    {{ csrf_field() }}
-                    {{ method_field('PUT') }}
-                    <div class="form-group">
-                        <button type="submit" class="btn btn-outline-secondary btn-sm">
-                            <i class="far fa-trash-alt"></i> 临时开放
-                        </button>
-                    </div>
-                </form>
+                    <form v-if="can_create_status === 2" action="{{ route('laborApply.temporaryOpen') }}" method="post"
+                          accept-charset="UTF-8">
+                        {{ csrf_field() }}
+                        {{ method_field('PUT') }}
+                        <div class="form-group">
+                            <button type="submit" class="btn btn-outline-secondary btn-sm">
+                                <i class="far fa-trash-alt"></i> 临时开放
+                            </button>
+                        </div>
+                    </form>
                 @endcan
                 <h2 v-if="can_create_status === 2"
-                    style="text-align: center;color: red;font-size: 28px">超过申请时间无法提交申请,联系管理员:152 2169 4191 , 173 1630 6907 </h2>
+                    style="text-align: center;color: red;font-size: 28px">超过申请时间无法提交申请,联系管理员:152 2169 4191 , 173 1630
+                    6907 </h2>
                 <h2 v-if="can_create_status === 3"
                     style="text-align: center;color: red;font-size: 28px">系统临时开放,请尽快提交</h2>
-                <form v-if="(can_create_status === 1) || (can_create_status === 3)" action="{{ route('laborApply.store') }}" method="POST" accept-charset="UTF-8">
+                <form v-if="(can_create_status === 1) || (can_create_status === 3)"
+                      action="{{ route('laborApply.store') }}" method="POST" accept-charset="UTF-8">
                     @csrf
                     @include('shared._error')
                     {{--仓库--}}
@@ -96,7 +99,7 @@
                 can_create_status: {!! $can_create_status !!}
             },
             mounted() {
-
+                $('#list').removeClass('d-none');
             },
 
             methods: {}

+ 1 - 2
resources/views/personnel/laborApply/index.blade.php

@@ -8,7 +8,7 @@
             <div class="ml-3 form-inline" id="btn">
                 @can('人事管理')
                     <span class="ml-1">
-                        <a href="{{ route('laborApply.createDispatch') }}" type="button"
+                        <a title="00:00 - 01:00 禁止生成数据" href="{{ route('laborApply.createDispatch') }}" type="button"
                            class="btn btn-sm ml-2 btn-outline-danger">重新生成劳务派遣数据</a>
                     </span>
                 @endcan
@@ -102,7 +102,6 @@
                 selectTr: 0
             },
             mounted() {
-                console.log(this.labor_applies);
                 $('#list').removeClass('d-none');
                 let _this = this;
                 $(".up").slideUp();

+ 1 - 1
routes/web.php

@@ -50,7 +50,7 @@ Route::get('personnel/checking-in/importAndExportQRCode','QRCodeController@impor
 Route::post('personnel/checking-in/refreshQRCode','QRCodeController@refreshQRCode');
 
 //人事管理
-Route::group(['prefix'=>'personnel'],function() {
+Route::group(['prefix'=>'personnel','middleware'=>'auth'],function() {
     //临时开放录入
     Route::put('laborApply/temporaryOpen','LaborApplyController@temporaryOpen')->name('laborApply.temporaryOpen');
     Route::get('laborApply/createDispatch','LaborApplyController@createDispatch')->name('laborApply.createDispatch');