Переглянути джерело

完善人事管理相关逻辑

haozi 5 роки тому
батько
коміт
1a4bcb5cbc

+ 3 - 4
app/Http/Controllers/UserDutyCheckController.php

@@ -274,16 +274,15 @@ class UserDutyCheckController extends Controller
     }
     //修改临时工报表数据
     public function updateLaborReportData($laborReport,$userDutyCheck){
-        $check_in_at=$laborReport['check_in_at'];
         $laborReport->check_out_at=$userDutyCheck->checked_at;
-        $checkInDate=Carbon::parse($check_in_at);
+        $checkInDate=Carbon::parse($laborReport['check_in_at']);
         $checkOutDate=Carbon::parse($userDutyCheck->checked_at);
         $hour=($checkOutDate->diffInSeconds($checkInDate))/3600; //在线时长
         $laborReport['online_duration']=$hour;
         $laborReport['working_duration']=$hour;
         $laborReport->update();
-        $date=Carbon::parse($laborReport->check_in_at)->format('Y-m-d');
-        if ($userDutyCheck->checked_at>$date." 14:00:00"){
+        $date=Carbon::parse($laborReport['check_in_at'])->format('Y-m-d');
+        if ($laborReport->check_out_at>$date." 14:00:00"){
             $userDutyCheckStart=UserDutyCheck::where('user_id',$laborReport->user_id)->where('workgroup_id',$laborReport->user_workgroup_id)->where('checked_at','>=',$date." 11:00".":00")
                 ->where('checked_at','<=',$date." 14:00:00")->where('type','登出')->first();
             $userDutyCheckEnd=UserDutyCheck::where('user_id',$laborReport->user_id)->where('workgroup_id',$laborReport->user_workgroup_id)->where('checked_at','>=',$date." 11:00".":00")

BIN
public/images/QRCodeIMG/1.png


BIN
public/images/QRCodeIMG/2.png


+ 1 - 1
resources/views/personnel/checking-in/createUserDetail.blade.php

@@ -62,7 +62,7 @@
                 </select>
                 </div>
             </div>
-            <input  name="userWorkgroupID" value="{{$userWorkgroupID}}">
+            <input type="hidden" name="userWorkgroupID" value="{{$userWorkgroupID}}">
             <div class="form-group row pt-3">
                 <button type="submit" class="col-8 offset-3 btn btn-success">登记</button>
             </div>

+ 2 - 2
resources/views/personnel/laborReport/index.blade.php

@@ -62,7 +62,7 @@
                                     <input style="width: 150px" type="date" name="created_at_end" v-model="filterData.created_at_end" :class="filterData.created_at_end?'bg-warning':''" class="form-control-sm tooltipTarget" title="选择显示指定日期的结束时间">
                                 </td>
                                 <td >
-                                    <input type="text" title="支持15内模糊搜索与15天外精确搜索" name="mobile_phone" class="form-control-sm  tooltipTarget" v-model="filterData.mobile_phone"  :class="filterData.mobile_phone?'bg-warning':''" style="vertical-align: middle" placeholder="电话号"></td>
+                                    <input type="text"  name="mobile_phone" class="form-control-sm  tooltipTarget" v-model="filterData.mobile_phone"  :class="filterData.mobile_phone?'bg-warning':''" style="vertical-align: middle" placeholder="电话号"></td>
                             </tr>
                             <tr>
                                 <td>
@@ -129,7 +129,7 @@
                             <td class="text-muted">@{{laborReport.checkOutAt}}</td>
                             <td class="text-muted"><span v-if="laborReport.beginLunch&&laborReport.endLunch&&laborReport.beginLunch<laborReport.endLunch">@{{laborReport.beginLunch}}-@{{laborReport.endLunch}}</span></td>
                             <td class="text-muted"><span v-if="laborReport.onlineDuration">@{{laborReport.onlineDuration}}</span></td>
-                            <td class="text-muted"><span  v-if="laborReport.workingDuration">@{{laborReport.workingDuration}}</span></td>
+                            <td class="text-muted"><span v-if="laborReport.workingDuration">@{{laborReport.workingDuration}}</span></td>
                         </tr>
                     </table>
                 </div>