haozi 5 жил өмнө
parent
commit
3cf0a00a98

+ 13 - 1
app/LaborReport.php

@@ -20,7 +20,7 @@ class LaborReport extends Model
     ];
     protected $appends = [
         'is_exportGroup','is_export', 'exit_at','enter_at','sequence', 'amountOfJoined','remark','thisRecordOnlineTime','thisRecordWorkingTime',
-        'totalOnlineTime','verifyPerson','userDutyCheckVerifyUserId','isAdult',
+        'totalOnlineTime','verifyPerson','userDutyCheckVerifyUserId','isAdult','round_check_in_at','round_check_out_at'
     ];
     protected $tempFields = [
         'temEnteringRecord',
@@ -46,6 +46,18 @@ class LaborReport extends Model
     public function laborReportStatus(){
         return $this->hasMany('App\LaborReportStatus','labor_report_id','id');
     }
+    public function getRoundCheckInAtAttribute(){
+        if (!$this['check_in_at'])return null;
+        $round_check_in_at=Carbon::parse($this['check_in_at'])->format('i');
+        if ($round_check_in_at>0&&$round_check_in_at<30) return Carbon::parse($this['check_in_at'])->clone()->setMinutes(00)->setSeconds(00);
+        if ($round_check_in_at>30&&$round_check_in_at<=59) return Carbon::parse($this['check_in_at'])->clone()->addHour()->setMinutes(00)->setSeconds(00);
+    }
+    public function getRoundCheckOutAtAttribute(){
+        if (!$this['check_out_at'])return null;
+        $round_check_out_at=Carbon::parse($this['check_out_at'])->format('i');
+        if ($round_check_out_at>0&&$round_check_out_at<30) return Carbon::parse($this['check_out_at'])->clone()->setMinutes(00)->setSeconds(00);
+        if ($round_check_out_at>30&&$round_check_out_at<=59) return Carbon::parse($this['check_out_at'])->clone()->addHour()->setMinutes(00)->setSeconds(00);
+    }
     public function getRemarkAttribute(){
         return $this->hasOne('App\Sign','signable_id','id')
             ->where('field','remark')->where('signable_type','labor_reports')->value('mark');

+ 1 - 1
package-lock.json

@@ -8763,7 +8763,7 @@
         },
         "socket.io-client": {
             "version": "2.3.0",
-            "resolved": "https://registry.npm.taobao.org/socket.io-client/download/socket.io-client-2.3.0.tgz",
+            "resolved": "https://registry.npm.taobao.org/socket.io-client/download/socket.io-client-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsocket.io-client%2Fdownload%2Fsocket.io-client-2.3.0.tgz",
             "integrity": "sha1-FNW6LgC5vNFFrkQ6uWs/hsvMG7Q=",
             "requires": {
                 "backo2": "1.0.2",

+ 12 - 4
resources/views/inventory/stockInventory/inventoryMission.blade.php

@@ -789,6 +789,12 @@
                             _this.加载下方数据并置空上方数据(count)
                         }
                     }
+                    // 窗口高,滚动条位置,页面长度,追加数据长度
+                    // 滚动条位置+窗口高度=当前显示中的页面底部Y
+                    // 页面长度-当前显示中的页面底部Y=(隐藏的高度!!!!+行高)->求出隐藏了多少行
+                    // 隐藏的高度- (func(去掉10行)=去掉后的隐藏高度)=10行去掉了高
+                    // 10行去掉了高/10=每行实际多高
+                    // 隐藏的高度/每行实际多高=去掉多少行可以把下方都清理干净
                 },
                 加载上方数据(){
                     //1.找到显示中第一条ID
@@ -832,13 +838,14 @@
                         _this.inventoryMissions.map((inventoryMission, index) => {
                             if (_this.显示记录列.length < 5 + count) {
                                 if (_this.显示记录列.length < _this.inventoryMissions.length) {
-                                    //_this.显示记录列.splice(_this.显示记录列.length-30,1);
-                                    //_this.显示记录列.unshift({});
+                                    _this.显示记录列.splice(_this.显示记录列.length-30,1);
+                                    _this.显示记录列.unshift({});
                                     _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length]);
                                     _this.向下加载时浏览器底部位置 = height;
                                 }
                             }
                         })
+                        console.log('加载',_this.显示记录列.length)
                     } else {
                         _this.inventoryMissions.map((inventoryMission, index) => {
                             if (_this.显示记录列.length < 10 + count) {
@@ -847,6 +854,7 @@
                                 }
                             }
                         })
+                        console.log('初始',_this.显示记录列.length)
                     }
                 },
                 cloneBlueTrDom($appointInventoryList) {
@@ -1895,7 +1903,7 @@
                     window.tempTip.setDuration(3500);
                     if(!data.inputting.barcode){window.tempTip.show('请扫入条码');return;}
                     else if(!data.inputting.amount){window.tempTip.show('请输入数量');return;}
-                    else if(!data.inputting.bin){window.tempTip.show('请输入隔口号');return;}
+                    //else if(!data.inputting.bin){window.tempTip.show('请输入隔口号');return;}
                     data.recordOrPlusGoods();
                     window.tempTip.setDuration(1500);
                     window.tempTip.showSuccess('成功提交:' + data.inputting.barcode);
@@ -1944,7 +1952,7 @@
                 },
                 showCommitButton: function () {
                     let data = this;
-                    if(data.inputting.barcode && data.inputting.amount && data.inputting.bin){
+                    if(data.inputting.barcode && data.inputting.amount){
                         data.commitButtonVisible=true;
                     }
                 },

+ 5 - 0
resources/views/personnel/laborReport/index.blade.php

@@ -74,6 +74,8 @@
                 <td class="text-muted">@{{laborReport.enter_at}}</td>
                 <td>@{{laborReport.checkInAt}}</td>
                 <td class="text-muted">@{{laborReport.checkOutAt}}</td>
+                <td class="text-muted">@{{laborReport.round_check_in_at}}</td>
+                <td class="text-muted">@{{laborReport.round_check_out_at}}</td>
                 <td >@{{ laborReport.exit_at }}</td>
                 <td class="text-muted">@{{laborReport.verifyAt}}</td>
                 <td class="text-muted"><span v-if="laborReport.verifyPerson">@{{laborReport.verifyPerson}}</span></td>
@@ -287,6 +289,7 @@
                             is_exportGroup:'{{$laborReport->is_exportGroup}}',is_export:'{{$laborReport->is_export}}',
                             verifyAt:'{{$laborReport->verify_at}}',groupUserId:'{{$laborReport->group_user_id}}',verifyPerson:'{{$laborReport->user['name']}}',
                             checkOutAt:'{{$laborReport->check_out_at}}',onlineDuration:'{{$laborReport->online_duration}}',
+                            round_check_in_at:'{{$laborReport->round_check_in_at}}',round_check_out_at:'{{$laborReport->round_check_out_at}}',
                             workingDuration:'{{$laborReport->working_duration}}', created_at:'{{$laborReport->created_at}}',
                             enter_at:'{{$laborReport->enter_at}}',exit_at:'{{$laborReport->exit_at}}',
                             thisRecordOnlineTime:'{{$laborReport->thisRecordOnlineTime}}',
@@ -429,6 +432,8 @@
                         {name:'enter_at',value: '进场时间'},
                         {name:'checkInAt',value: '进组时间'},
                         {name:'checkOutAt',value: '退组时间'},
+                        {name:'round_check_in_at',value: '进组取整时间'},
+                        {name:'round_check_out_at',value: '退组取整时间'},
                         {name:'exit_at',value: '退场时间'},
                         {name:'verifyAt',value: '审核时间'},
                         {name:'verifyPerson',value: '审核人'},