ソースを参照

Merge branch 'Haozi'

LD 5 年 前
コミット
f25af69a95

+ 24 - 0
app/Http/Controllers/InventoryAccountController.php

@@ -273,6 +273,30 @@ class InventoryAccountController extends Controller
         $inventoryAccountMission=$inventoryService->跳过盘点记录($inventoryAccountMissionId,$inventoryAccountId);
         return ['success'=>true,'inventoryAccountMission'=>$inventoryAccountMission];
     }
+    public function 确认盘点差异(Request $request){
+        if(!Gate::allows('库存管理-盘点')){return['success'=>false,'data'=>'没有权限'];}
+        $inventoryAccountMissionId=$request->inventoryAccountMissionId;
+        $inventoryAccountId=$request->input('inventoryAccountId');
+        if(is_null($inventoryAccountMissionId)){return ['success'=>false,'data'=>'传入id为空'];}
+        /** @var InventoryAccountService $inventoryService */
+        $inventoryService=app('inventoryAccountService');
+        $inventoryAccountMission=$inventoryService->确认盘点差异($inventoryAccountMissionId,$inventoryAccountId);
+        return ['success'=>true,'inventoryAccountMission'=>$inventoryAccountMission];
+    }
+    public function 批量跳过或确认差异(Request $request){
+        if(!Gate::allows('库存管理-盘点')){return['success'=>false,'data'=>'没有权限'];}
+        $checkData=$request->checkData;
+        if(is_null($checkData)){return ['success'=>false,'data'=>'传入勾选盘点记录为空'];}
+        $marks=[];
+        foreach ($checkData as $inventoryMission){
+            array_push($marks,$inventoryMission['mark']);
+        }
+        if (in_array('确认差异',$marks)||in_array('跳过',$marks)||in_array('无差异',$marks)||in_array('已复盘无差异',$marks))return ['success'=>false,'data'=>'传入勾选盘点记录存在不可操作项!'];
+        /** @var InventoryAccountService $inventoryService */
+        $inventoryService=app('inventoryAccountService');
+        $inventoryAccountMissions=$inventoryService->批量跳过或确认差异($checkData);
+        return ['success'=>true,'inventoryAccountMissions'=>$inventoryAccountMissions];
+    }
     public function exportInventoryAccountMission(Request $request){
         if(!Gate::allows("库存管理-盘点")){ return redirect(url('/'));  }
         $post = Http::post(config('go.export.url'),['type'=>'inventoryAccountMission','data'=>$request->data]);

+ 4 - 2
app/Http/Controllers/LaborReportController.php

@@ -87,6 +87,8 @@ class LaborReportController extends Controller
                 "enter_at" => $laborReport->enter_at,
                 "check_in_at" => $laborReport->check_in_at,
                 "check_out_at" => $laborReport->check_out_at,
+                "round_check_in_at" => $laborReport->round_check_in_at,
+                "round_check_out_at" => $laborReport->round_check_out_at,
                 "exit_at" => $laborReport->exit_at,
                 "verify_at" => $laborReport->verify_at,
                 "group_user_id" => $laborReport->user ? $laborReport->user->name : null,
@@ -222,8 +224,8 @@ class LaborReportController extends Controller
 
     //工作时长减午饭休息时间
     public function minusLunchTime($laborReport,$hour){
-        $checkInTime=$laborReport->check_in_at;
-        $checkOutTime=$laborReport->check_out_at;
+        $checkInTime=$laborReport->round_check_in_at;
+        $checkOutTime=$laborReport->round_check_out_at;
         $checkOutTime=Carbon::parse($checkOutTime)->format('H');
         $checkInTime=Carbon::parse($checkInTime);
         if ($checkInTime->lessThanOrEqualTo($checkInTime->clone()->setHours(11)->setMinutes(30))&&(int)$checkOutTime>=13){

+ 2 - 1
app/Http/Controllers/UserDutyCheckController.php

@@ -192,7 +192,8 @@ class UserDutyCheckController extends Controller
         if ($userDutyCheck&& !$userDutyCheck->id) return "<h1 style='color: red;text-align:center'>打卡异常,请联系相关人员!</h1>";
         $userLaborToken = $userDetail->getDutyCheckToken(config('users.token_check_in_expire_minutes'));
         $laborReportService = app('LaborReportService');
-        $laborReportService->makeOrChangeLaborReportByUserDutyCheck($userDutyCheck, $importAndExportQRCodeType);
+        $errorMessage = $laborReportService->makeOrChangeLaborReportByUserDutyCheck($userDutyCheck, $importAndExportQRCodeType);
+        if ($errorMessage) return $errorMessage;
         $laravelEchoPrefix = config('database.redis.options.prefix');
         return response()->view('personnel/checking-in/importAndExportSuccess',['full_name'=>$userDetail->full_name,'checked_at'=>$userDutyCheck->checked_at,'type'=>$userDutyCheck->type,'laravelEchoPrefix'=>$laravelEchoPrefix])
             ->cookie('userLaborToken', $userLaborToken, config('users.token_check_in_expire_minutes'), '/');

+ 1 - 1
app/InventoryAccount.php

@@ -33,7 +33,7 @@ class InventoryAccount extends Model
         return $this['total'] ? $this['total']-$this['processed']:0;
     }
     public function getProcessedAmount(){
-        return $this->inventoryMissions()->whereIn('checked',['是','跳过'])->where('inventory_account_id',$this['id'])->count();
+        return $this->inventoryMissions()->whereIn('checked',['是','跳过','确认差异'])->where('inventory_account_id',$this['id'])->count();
     }
     //复盘剩余数
     public function getCheckSurplusAttribute()

+ 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)->format('Y-m-d H:i:s');
+        if ($round_check_in_at>30&&$round_check_in_at<=59) return Carbon::parse($this['check_in_at'])->clone()->addHour()->setMinutes(00)->setSeconds(00)->format('Y-m-d H:i:s');
+    }
+    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)->format('Y-m-d H:i:s');
+        if ($round_check_out_at>30&&$round_check_out_at<=59) return Carbon::parse($this['check_out_at'])->clone()->addHour()->setMinutes(00)->setSeconds(00)->format('Y-m-d H:i:s');
+    }
     public function getRemarkAttribute(){
         return $this->hasOne('App\Sign','signable_id','id')
             ->where('field','remark')->where('signable_type','labor_reports')->value('mark');

+ 30 - 4
app/Services/InventoryAccountService.php

@@ -400,7 +400,6 @@ class InventoryAccountService
     public function 增加系统之外的盘点记录($location,$barcode,$inventoryId,$count,$owner_code,$param){
         if($param=='商品新增'||$param=='库位和商品新增'){
             $oracleBasSku=OracleBasSKU::query()->where('ALTERNATE_SKU1',$barcode)->where('customerid',$owner_code)->first();
-            //dd($oracleBasSku);
             $ownerId=Owner::query()->where('code',$owner_code)->value('id');
             $commodity=Commodity::query()->firstOrCreate([
                 'sku'=>$oracleBasSku->sku,
@@ -560,14 +559,41 @@ class InventoryAccountService
         }
         return $inventoryAccountMission;
     }
+    public function 确认盘点差异($inventoryAccountMissionId,$inventoryAccountId){
+        $inventoryAccountMission=InventoryAccountMission::query()->find($inventoryAccountMissionId);
+        $inventoryAccountMission->checked='确认差异';
+        $inventoryAccountMission->update();
+        LogService::log(__METHOD__,"跳过盘点记录修改checked状态",json_encode($inventoryAccountMissionId));
+        return $inventoryAccountMission;
+    }
+    public function 批量跳过或确认差异($checkData){
+        $inventoryAccountMissions=[];
+        $inventoryAccountId=null;
+        foreach ($checkData as $inventoryMission){
+            $inventoryAccountMission=InventoryAccountMission::query()->find($inventoryMission['id']);
+            $inventoryAccountId=$inventoryAccountMission->inventory_account_id;
+            if ($inventoryMission['mark']==='未盘')$inventoryAccountMission['checked']='跳过';
+            if ($inventoryMission['mark']==='未复盘有差异'||$inventoryMission['mark']==='已复盘无差异')$inventoryAccountMission['checked']='确认差异';
+            $inventoryAccountMission->update();
+            array_push($inventoryAccountMissions,$inventoryAccountMission);
+        }
+        LogService::log(__METHOD__,"批量跳过或确认差异",json_encode($checkData));
+        $inventoryAccount=InventoryAccount::query()->find($inventoryAccountId);
+        $inventoryAccount->processed=$inventoryAccount->getProcessedAmount();//已盘点数
+        $inventoryAccount->difference=$inventoryAccount->getDifferenceAmount();//盘点差异数
+        $inventoryAccount->returned=$inventoryAccount->getReturnedAmount(); //复盘归位数
+        $inventoryAccount->update();
+        Controller::logS(__METHOD__,'批量跳过或确认差异修改盘点任务信息'.__FUNCTION__,json_encode($inventoryAccountId));
+        return $inventoryAccountMissions;
+    }
     public function searchCommodityByBarcode($barcode,$owner_code){
         $oracleBasSku=OracleBasSKU::query()
             ->where('ALTERNATE_SKU1',$barcode)
             ->orWhere('ALTERNATE_SKU2',$barcode)
             ->orWhere('ALTERNATE_SKU3',$barcode)
             ->where('customerid',$owner_code)->first();
-            if (!$oracleBasSku)return null;
-            return $oracleBasSku;
+        if (!$oracleBasSku)return null;
+        return $oracleBasSku;
     }
     public function baseOnBlindReceive($location,$owner_code,$goodses,$inventoryId){
         $request=[
@@ -598,7 +624,7 @@ class InventoryAccountService
             array_push($inventoryAccountMissions,$inventoryAccountMission);
         }
         if (count($inventoryAccountMissions)<1) return null;
-            return $inventoryAccountMissions;
+        return $inventoryAccountMissions;
     }
 
 }

+ 1 - 0
app/Services/LaborReportService.php

@@ -66,6 +66,7 @@ class LaborReportService
         return $this->conditionQuery($params)->paginate($params['paginate'] ?? 50);
     }
     public function get(array $params){
+//        dd($this->conditionQuery($params)->without("userDutyCheck")->toSql());
         return $this->conditionQuery($params)->without("userDutyCheck")->get();
     }
 

+ 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",

+ 274 - 98
resources/views/inventory/stockInventory/inventoryMission.blade.php

@@ -39,6 +39,12 @@
             <button class="btn btn-sm" @click="盲收()" :class="listMode?'btn-dark':'btn-outline-dark'" v-if="!listMode&&!blindReceive">盲收</button>
                 <button class="btn btn-sm" @click="正常盘点()" :class="blindReceive?'btn-dark':'btn-outline-dark'" v-if="blindReceive">正常盘点</button>
             </span>
+            <span>
+                <button class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget"
+                        @click="批量跳过或确认差异()" v-if="!listMode" title="勾选指定盘点记录行,进行批量跳过或批量确认差异">
+                    批量跳过或确认差异
+                </button>
+            </span>
 
 
             <span class="form-group  mb-5">
@@ -85,12 +91,12 @@
         </span>
         </div>
 
-        <div v-if="blindReceive" class="container">
+        <div v-if="blindReceive">
             <audio src="{{asset('sound/warning_otherBarcode.mp3')}}" controls="controls" preload id="soundWarning" hidden>
             </audio>
             <audio src="{{asset('sound/ding.mp3')}}" controls="controls" preload id="soundDing" hidden>
             </audio>
-            <div class="row mt-2">
+            <div class="row mt-2 mb-2 rounded" style="border:solid 3px #999999;">
                 <div class="col-12" id="scanColumn">
                     <div class="card" :class="borderByMode">
                         <div class="card-body">
@@ -121,7 +127,7 @@
                                         <div class="btn btn-sm btn-outline-danger"
                                              @click="changeToScanInputBarcode" v-if="isManualInputtingBarcode">扫描输入</div>
                                     </div>
-                                    <input type="text" id="barcode" class="form-control" :disabled="status.barcodeDisable" placeholder="扫入条码" @focusin="focusOutDocument" @focusout="focusDocument" v-model="inputting.barcode">
+                                    <input type="text" id="barcode" class="form-control" :disabled="status.barcodeDisable" placeholder="扫入条码" @focusin="focusOutDocument" @focusout="focusDocument" v-model="inputting.barcode" autocomplete="off">
                                     <div v-if="inputMode=='regular'">
                                         <div class="card-title">
                                             生产日期:
@@ -144,13 +150,13 @@
                                                v-model="inputting.amount" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter"
                                                style='height: 40px;font-size: 1.6em;color:blue;font-weight: bolder;padding: 3px;text-align: center'>
                                     </div>
-{{--                                    <div class="card-title">--}}
-{{--                                        格口号:--}}
-{{--                                    </div>--}}
-{{--                                    <input type="number" id="bin" class="form-control mt-n2 mb-2"--}}
-{{--                                           v-model="inputting.bin"--}}
-{{--                                           :disabled="status.binDisable" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter"--}}
-{{--                                           style='height: 80px;font-size: 5em;color:red;font-weight: bolder;padding: 3px;text-align: center'>--}}
+                                    {{--                                    <div class="card-title">--}}
+                                    {{--                                        格口号:--}}
+                                    {{--                                    </div>--}}
+                                    {{--                                    <input type="number" id="bin" class="form-control mt-n2 mb-2"--}}
+                                    {{--                                           v-model="inputting.bin"--}}
+                                    {{--                                           :disabled="status.binDisable" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter"--}}
+                                    {{--                                           style='height: 80px;font-size: 5em;color:red;font-weight: bolder;padding: 3px;text-align: center'>--}}
                                     <div v-if="inputMode=='regular'">
                                         <div class="card-title">
                                             批次号:
@@ -168,7 +174,7 @@
                             <hr>
                             <table class="table table-sm  table-striped" v-if="goodses.length>0">
                                 <tr>
-{{--                                    <th>隔口号</th>--}}
+                                    {{--                                    <th>隔口号</th>--}}
                                     <th>数量</th>
                                     <th>条码</th>
                                     <th>生产日期</th>
@@ -177,7 +183,7 @@
                                     <th>操作</th>
                                 </tr>
                                 <tr v-for="goods in goodses">
-{{--                                    <td>@{{ goods.bin }}</td>--}}
+                                    {{--                                    <td>@{{ goods.bin }}</td>--}}
                                     <td>@{{ goods.amount }}</td>
                                     <td>@{{ goods.barcode }}</td>
                                     <td>@{{ goods.produce_date }}</td>
@@ -193,16 +199,16 @@
                 </div>
             </div>
         </div>
-        <div v-if="!blindReceive">
         <form id="form">
-            <div class="mt-3 form-inline " v-if="!listMode" :class="inventory.status=='盘点中' ||inventory.status=='待盘点'?'row-cols-3':'row-cols-5'">
+            <div v-if="!blindReceive">
+                <div class="mt-3 form-inline " v-if="!listMode" :class="inventory.status=='盘点中' ||inventory.status=='待盘点'?'row-cols-3':'row-cols-5'">
         <span class="form-group">
             <label for="location" class="text-secondary font-weight-bold">请输库位</label>
             <input id="locationInput"  @keypress="locationPress($event)"
                    @change="locationChange($event)"
                    name="location" type="text" class="form-control  input"  autocomplete="off" value="@if(old('location')){{old('location')}}@endif">
         </span>
-                <span class="form-group ml-4">
+                    <span class="form-group ml-4">
             <label for="barcode" class="text-secondary font-weight-bold">请输产品条码</label>
                 <input id="barcodeInput" name="barcode"  @keypress="barcodePress($event)"
                        @change="barcodeChange($event)"
@@ -210,11 +216,12 @@
 
         </span>
 
-                <span class="form-group ml-4" v-if="dataExtraStatus.addingNew" id="countBlock">
+                    <span class="form-group ml-4" v-if="dataExtraStatus.addingNew" id="countBlock">
                         <label for="count" class="text-secondary font-weight-bold">请输盘点数</label>
                         <input type="text" id="amountInput"  @keypress="amountPress($event)"
                                name="count" class="form-control input" value="@if(old('count')){{old('count')}}@endif"  autocomplete="off">
                     </span>
+                </div>
             </div>
             <!--相同库位和条码 pc端-->
 
@@ -305,13 +312,14 @@
             </label>
             <table class="table table-sm table-bordered d-none text-nowrap " id="headerRoll"></table>
             <table class="table table-sm table-striped d-none d-xl-block p-0 text-nowrap table-bordered"
-                   id="headerParent">
+                   id="headerParent" ref="boxPc">
                 <tr class="p-0" id="header"></tr>
-                <tr v-for="(inventoryMission,i) in inventoryMissions"
-                    :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}" :class="[
+                <tr {{--v-for="(inventoryMission,i) in inventoryMissions"--}} v-for="(inventoryMission, i) in 显示记录列" :key="i"
+                    :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':'','opacity': inventoryMission.mark==='确认差异'?'0.7':''}" :class="[
                     inventoryMission.mark==='已复盘有差异'?'td-cool':'',
                     inventoryMission.mark==='已复盘无差异'?'td-cool text-muted':'',
                     inventoryMission.mark==='未复盘有差异'?'td-warm font-weight-bold':'',
+                    inventoryMission.mark==='确认差异'?'td-warm font-weight-bold':'',
                     inventoryMission.mark==='无差异'?'text-muted':'',
                     inventoryMission.mark==='未盘'?'td-yellow':'',
                     inventoryMission.mark==='跳过'?'text-muted':'',
@@ -323,11 +331,11 @@
                     <td>@{{ i+1 }}</td>
                     <td>@{{ inventoryMission.location }}</td>
                     <td v-if="inventoryMission.commodity"><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.commodity.name }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.commodity.name }}</span>
                     </td>
                     <td>
                         <span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
                         <span
                             v-if="inventoryMission.commodity_barcodes && inventoryMission.commodity_barcodes.length>0">
                             <span v-if="inventoryMission.commodity_barcodes.length==1">
@@ -342,22 +350,22 @@
                     </td>
 
                     <td v-if="inventoryMission.commodity"><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.commodity.sku }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.commodity.sku }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.produced_at }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.produced_at }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.valid_at }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.valid_at }}</span>
                     </td>
                     <td class="text-muted"><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.batch_number }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.batch_number }}</span>
                     </td>
 
                     <td v-if="inventoryMission.stockInventoryPersons" class="text-muted"
                         :rowspan="inventoryMission.is_multi_row?2:''">
                         <span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
                         <a href="#" v-if="inventoryMission.stockInventoryPersons.length>0" class="dropdown-toggle"
                            data-toggle="dropdown">
                             @{{ inventoryMission.stockInventoryPersons[0].mark }}<b class="caret"></b>
@@ -380,10 +388,10 @@
                     </td>
 
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.erp_type_position }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.erp_type_position }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
                         <span v-if="listMode">@{{ inventoryMission.quality }}</span>
                         <select v-else class="form-control-sm" name="quality" id="quality"
                                 v-model="inventoryMission.quality"
@@ -394,28 +402,30 @@
                         </span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.stored_amount }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.stored_amount }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.valid_amount }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.valid_amount }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.verified_amount }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.verified_amount }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.re_checked_amount }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.re_checked_amount }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.difference_amount }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.difference_amount }}</span>
                     </td>
                     <td><span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.occupied_amount }}</span>
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.occupied_amount }}</span>
                     </td>
                     @can('库存管理-盘点')
                         <td>
-{{--                            <span class="btn  btn-sm btn-outline-danger" @click="删除盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">删除</span>--}}
+                            {{--                            <span class="btn  btn-sm btn-outline-danger" @click="删除盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">删除</span>--}}
                             <span class="btn  btn-sm btn-outline-secondary" v-if="inventoryMission.checked==='否'"
                                   @click="跳过盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">跳过</span>
+                            <span class="btn  btn-sm btn-outline-secondary" v-if="inventoryMission.mark==='已复盘有差异'||inventoryMission.mark==='未复盘有差异'"
+                                  @click="确认盘点差异(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">确认差异</span>
                             <span class="btn  btn-sm btn-outline-secondary"
                                   v-if="inventory.type=='动盘'&& inventoryMission.mark=='未盘' &&!listMode"
                                   @click="选中盘点起始位置(inventoryMission.id,inventoryMission.location)">以此为起点</span>
@@ -426,14 +436,15 @@
         </div>
         <!--盘点记录移动端-->
         <table id="listOnPad" class="table table-striped table-sm table-bordered table-hover p-0 d-table  d-xl-none"
-               style="background: rgb(255, 255, 255);">
+               style="background: rgb(255, 255, 255);" ref="box">
             <tbody>
-            <tr v-for="(inventoryMission,i) in inventoryMissions"
-                :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}"
+            <tr {{--v-for="(inventoryMission,i) in 显示记录列"--}} v-for="(inventoryMission, i) in 显示记录列" :key="i"
+                :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':'','opacity': inventoryMission.mark==='确认差异'?'0.7':''}"
                 :class="[
                     inventoryMission.mark==='已复盘有差异'?'td-cool':'',
                     inventoryMission.mark==='已复盘无差异'?'td-cool text-muted':'',
                     inventoryMission.mark==='未复盘有差异'?'td-warm font-weight-bold':'',
+                    inventoryMission.mark==='确认差异'?'td-warm font-weight-bold':'',
                     inventoryMission.mark==='无差异'?'text-muted':'',
                     inventoryMission.mark==='未盘'?'td-yellow':'',
                     inventoryMission.mark==='跳过'?'text-muted':'',
@@ -447,12 +458,12 @@
                                     style="color:#af7651">
                                     @{{ inventoryMission.location }}</span></span>
                             <span class="mr-3 text-nowrap"
-                                  v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode"><span
+                                  v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode"><span
                                     class="font-weight-bold">产品名称:</span><span style="color:#af7651"
                                                                                v-if="inventoryMission.commodity">
                                     @{{ inventoryMission.commodity.name }}</span></span>
                             <span class="mr-3 text-nowrap"
-                                  v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
+                                  v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
                                 <span class="font-weight-bold">质量状态:</span>
                                 <span v-if="listMode">@{{ inventoryMission.quality }}</span>
                         <select v-else class="form-control-sm" name="quality" id="quality"
@@ -463,11 +474,11 @@
                          </select>
                             </span>
                             <span class="mr-3 text-nowrap"
-                                  v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
+                                  v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
                                 <span class="font-weight-bold">产品条码:</span>
 
                         <span
-                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
+                            v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
                         <span
                             v-if="inventoryMission.commodity_barcodes && inventoryMission.commodity_barcodes.length>0">
                             <span v-if="inventoryMission.commodity_barcodes.length==1">
@@ -497,6 +508,8 @@
 {{--                                <span class="btn  btn-sm btn-outline-danger" @click="删除盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">删除</span>--}}
                                 <span class="btn  btn-sm btn-outline-secondary" v-if="inventoryMission.checked==='否'"
                                       @click="跳过盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">跳过</span>
+                                     <span class="btn  btn-sm btn-outline-secondary" v-if="inventoryMission.mark==='已复盘有差异'||inventoryMission.mark==='未复盘有差异'"
+                                           @click="确认盘点差异(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">确认差异</span>
                                     <span class="btn  btn-sm btn-outline-secondary"
                                           v-if="inventory.type=='动盘'&& inventoryMission.mark=='未盘' &&!listMode"
                                           @click="选中盘点起始位置(inventoryMission.id,inventoryMission.location)">以此为起点</span>
@@ -560,7 +573,6 @@
                 </div>
             </div>
         </div>
-        </div>
     </div>
 
 
@@ -657,6 +669,7 @@
                 listMode:false,
                 blindReceive:false,
                 分割位置id:null,
+                显示记录列:[],
 
                 focusing:'document',
                 commitButtonVisible:false,
@@ -672,9 +685,12 @@
                     scanEndInputted:false,binDisable:false,barcodeDisable:true,amountDisable:false,
                 },
                 goodses:[],//{barcode,amount,bin,produce_date,valid_date,batch_number}
+                // 加载后盒子底部位置:'',
+                // 加载前盒子底部位置:'',
             },
             beforeMount: function () {
                 this.重排序并标记全列表类型();
+                this.加载下方数据并置空上方数据()//初始化先调用一次
             },
             watch: {
                 checkData: {
@@ -690,6 +706,9 @@
                     deep: true
                 }
             },
+            destroyed() {
+                window.removeEventListener('scroll', this.lazy)
+            },
             updated: function () {
                 $barcodeInput=$('#barcodeInput');
                 $locationInput=$('#locationInput');
@@ -697,6 +716,8 @@
             },
             mounted: function () {
                 let _this = this;
+                _this.lazy();
+                window.addEventListener('scroll', this.lazy);
                 (function 显示渲染后页面(){
                     $('#loadingPage').remove();
                     $('#list').removeClass('d-none');
@@ -742,6 +763,7 @@
                     {name: '跳过', value: '操作', neglect: true},
                 ];
                 setTimeout(function () {
+                    let _this=this;
                     let header = new Header({
                         el: "#header",
                         column: column,
@@ -755,6 +777,92 @@
                 _this.建立记录索引();
             },
             methods:{
+                lazy(){
+                    //可视区域高度(浏览器页面的高度)
+                    let height=window.innerHeight;
+                    //滚动区域高度
+                    let scrollHeight = document.documentElement.scrollTop || document.body.scrollTop;
+                    let _this=this;
+                    // 可视区域+滚动条距离顶部位置 = 浏览器窗口底部的位置
+                    const count = height + scrollHeight;
+                    //懒加载盒子高度+懒加载盒子距离顶部位置=计算出盒子底部的距离
+                    const box_bottom = _this.$refs.box.offsetHeight + _this.$refs.box.offsetTop-500;//移动
+                    const box_bottomPc = _this.$refs.boxPc.offsetHeight + _this.$refs.boxPc.offsetTop;//pc
+                    if (box_bottom===-500&&count >= box_bottomPc) {//pc端下划加载
+                        if (_this.显示记录列.length < _this.inventoryMissions.length) {
+                            _this.加载下方数据并置空上方数据();
+                        }
+                    }
+                    if (box_bottomPc===0&&count >= box_bottom) {//移动端下划加载
+                        if (_this.显示记录列.length < _this.inventoryMissions.length) {
+                            _this.加载下方数据并置空上方数据()
+                        }
+                    }
+                    // 窗口高,滚动条位置,页面长度,追加数据长度
+                    // 滚动条位置+窗口高度=当前显示中的页面底部Y
+                    // 页面长度-当前显示中的页面底部Y=(隐藏的高度!!!!+行高)->求出隐藏了多少行
+                    // 隐藏的高度- (func(去掉10行)=去掉后的隐藏高度)=10行去掉了高
+                    // 10行去掉了高/10=每行实际多高
+                    // 隐藏的高度/每行实际多高=去掉多少行可以把下方都清理干净
+                },
+                加载上方数据(){
+                    //1.找到显示中第一条ID
+                    let _this=this;
+                    let 去除空对象的显示数据列=[];
+                    let 空对象数据列=[];
+                    _this.显示记录列.forEach(function (inventoryMission) {
+                        if (!($.isEmptyObject(inventoryMission))){
+                            去除空对象的显示数据列.push(inventoryMission);
+                        }
+                        if (($.isEmptyObject(inventoryMission))){
+                            空对象数据列.push(inventoryMission);
+                        }
+                    })
+                    let 初条显示数据=去除空对象的显示数据列[0];
+                    let 末条显示数据=去除空对象的显示数据列[去除空对象的显示数据列.length-1];
+                    let 空对象条数=空对象数据列.length;
+                    //_this.清理下方数据(去除空对象的显示数据列);
+                    console.log(去除空对象的显示数据列)
+                    console.log(空对象条数)
+                    //console.log(_this.显示记录列)
+                    //2.以1的ID从总列表网上倒退找到N条(N=10)
+                    //2.5, 计算有空行到第几行
+                    //3.将显示中的列表从头清理N行,的2.5的结果下标后插入2的结果
+                },
+                // 清理上方数据(){
+                //
+                // },
+                // 清理下方数据(去除空对象的显示数据列){
+                //     let _this=this;
+                //     let index;
+                //     _this.显示记录列.forEach(function (inventoryMission,i) {
+                //         if (inventoryMission.id===去除空对象的显示数据列[去除空对象的显示数据列.length-6].id) index=i;
+                //         if (i>index) _this.显示记录列.splice(i,1);
+                //     })
+                // },
+                加载下方数据并置空上方数据(){
+                    let _this=this;
+                    const count = _this.显示记录列.length;
+                    if (count > 20) {
+                        _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.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length]);
+                                }
+                            }
+                        })
+                    } else {
+                        _this.inventoryMissions.map((inventoryMission, index) => {
+                            if (_this.显示记录列.length < 15 + count) {
+                                if (_this.显示记录列.length < _this.inventoryMissions.length) {
+                                    _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length])
+                                }
+                            }
+                        })
+                    }
+                },
                 cloneBlueTrDom($appointInventoryList) {
                     for(let i =0;i<$appointInventoryList.length;i++){
                         let newDom= $prototype_.clone();
@@ -861,6 +969,7 @@
                     _this.selectingId=id;
                     if(e.key==='Enter'){
                         this.放置焦点光标至正确位置();
+
                         let re=true;
                         _this.提交新增并盘点().then(function(result){
                             if(!result){
@@ -1034,10 +1143,9 @@
                                         $("#lastStockInventoryRecord").modal('show');
                                         return;
                                     }
-                                    _this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
-                                    _this.清空指定盘点记录列();
                                 }
-                                //
+                                _this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
+                                _this.清空指定盘点记录列();
                             }
                         })
                     });
@@ -1087,6 +1195,7 @@
                     _this.已复盘有差异列 = [];
                     _this.未复盘有差异列 = [];
                     _this.已复盘无差异列 = [];
+                    _this.确认差异列=[];
                     _this.无差异列 = [];
                     _this.未盘列 = [];
                     _this.跳过列 = [];
@@ -1113,6 +1222,10 @@
                                 _this.无差异列.push(mission);
                                 mission.mark = '无差异';
                                 return;
+                            case '确认差异':
+                                _this.确认差异列.push(mission);
+                                mission.mark = '确认差异';
+                                return;
                             case '否':
                                 _this.未盘列.push(mission);
                                 mission.mark = '未盘';
@@ -1127,20 +1240,20 @@
                     _this.未复盘有差异列 = _this.按库位排序_且合并SKU一起(_this.未复盘有差异列);
                     _this.已复盘无差异列 = _this.按库位排序_且合并SKU一起(_this.已复盘无差异列);
                     _this.无差异列 = _this.按库位排序_且合并SKU一起(_this.无差异列);
-
                     _this.未盘列 = _this.按库位排序_且合并SKU一起(_this.未盘列);
                     if (_this.未盘列.length>0&&!_this.分割位置id) _this.分割位置id = _this.未盘列[0].id;
                     _this.分割位置id = _this.更新分割位置(_this.未盘分隔列2, _this.分割位置id);
                     _this.未盘分隔列 = _this.分隔_基于分割位置(_this.未盘列, _this.分割位置id);
                     _this.未盘分隔列1 = _this.按库位排序_且合并SKU一起(_this.未盘分隔列[0]);
                     _this.未盘分隔列2 = _this.按库位排序_且合并SKU一起(_this.未盘分隔列[1]);
-
+                    _this.确认差异列 = _this.按库位排序_且合并SKU一起(_this.确认差异列);
                     _this.跳过列 = _this.按库位排序_且合并SKU一起(_this.跳过列);
                     _this.inventoryMissions = [];
                     _this.重推入(_this.inventoryMissions, _this.已复盘有差异列);
                     _this.重推入(_this.inventoryMissions, _this.未复盘有差异列);
                     _this.重推入(_this.inventoryMissions, _this.未盘分隔列2);
                     _this.重推入(_this.inventoryMissions, _this.未盘分隔列1);
+                    _this.重推入(_this.inventoryMissions, _this.确认差异列);
                     _this.重推入(_this.inventoryMissions, _this.已复盘无差异列);
                     _this.重推入(_this.inventoryMissions, _this.无差异列);
                     _this.重推入(_this.inventoryMissions, _this.跳过列);
@@ -1260,9 +1373,7 @@
                 },
                 跳过盘点记录(inventoryAccountMissionId, inventoryAccountId, name) {
                     let _this = this;
-                    if (!confirm('确定要跳过商品为:“' + name + '”的盘点记录吗?')) {
-                        return ;
-                    }
+                    if (!confirm('确定要跳过商品为:“' + name + '”的盘点记录吗?')) {return ;}
                     let url = '{{url('inventory/跳过盘点记录')}}';
                     axios.post(url, {
                         inventoryAccountMissionId: inventoryAccountMissionId,
@@ -1281,7 +1392,7 @@
                                     return true
                                 });
                             }
-                            _this.重排序并标记全列表类型(_this.inventoryMissions);
+                            _this.重排序并显示();
                             tempTip.setDuration(3000);
                             tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '跳过盘点成功!');
                         }).catch(function (err) {
@@ -1289,8 +1400,69 @@
                         tempTip.show('跳过盘点记录失败,网络链接错误!' + err);
                     });
                 },
-                完结盘点任务(id, owner_name, type) {
+                确认盘点差异(inventoryAccountMissionId, inventoryAccountId, name) {
+                    let _this = this;
+                    if (!confirm('确定提交商品为:“' + name + '”的盘点差异吗?')) {return ;}
+                    let url = '{{url('inventory/确认盘点差异')}}';
+                    axios.post(url, {
+                        inventoryAccountMissionId: inventoryAccountMissionId,
+                        inventoryAccountId: inventoryAccountId
+                    }).then(
+                        function (response) {
+                            if (!response.data.success) {
+                                tempTip.setDuration(3000);
+                                tempTip.show('盘点单号:' + inventoryAccountMissionId + '提交盘点差异失败!' + response.data.data);
+                            } else {
+                                _this.inventoryMissions.every(function (inventoryAccountMission) {
+                                    if (inventoryAccountMission.id === inventoryAccountMissionId) {
+                                        inventoryAccountMission.checked = response.data.inventoryAccountMission.checked;
+                                        return false;
+                                    }
+                                    return true
+                                });
+                            }
+                            _this.重排序并显示();
+                            tempTip.setDuration(3000);
+                            tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '提交盘点差异成功!');
+                        }).catch(function (err) {
+                        tempTip.setDuration(3000);
+                        tempTip.show('提交盘点差异记录失败,网络链接错误!' + err);
+                    });
+                },
+                批量跳过或确认差异(){
                     let _this = this;
+                    if (!confirm('确定对勾选内容进行批量操作吗?')) {return ;}
+                    let url = '{{url('inventory/批量跳过或确认差异')}}';
+                    axios.post(url, {checkData: _this.checkData}).then(
+                        function (response) {
+                            if (!response.data.success) {
+                                tempTip.setDuration(3000);
+                                tempTip.show('批量操作失败!' + response.data.data);
+                            } else {
+                                response.data.inventoryAccountMissions.forEach(function (mission) {
+                                    _this.库位索引_记录[mission.location].forEach(function(missionInIndex){
+                                        if(parseInt(missionInIndex.id)===parseInt(mission.id)){
+                                            missionInIndex.checked=mission.checked;
+                                        }
+                                    });
+                                });
+                            }
+                            _this.重排序并显示();
+                            _this.清空checkbox();
+                            tempTip.setDuration(3000);
+                            tempTip.showSuccess('批量操作成功!');
+                        }).catch(function (err) {
+                        tempTip.setDuration(3000);
+                        tempTip.show('批量操作失败,网络链接错误!' + err);
+                    });
+                },
+                重排序并显示(){
+                    let _this=this;
+                    _this.显示记录列=[];
+                    _this.重排序并标记全列表类型(_this.inventoryMissions);
+                    _this.加载下方数据并置空上方数据();
+                },
+                完结盘点任务(id, owner_name, type) {
                     if (!confirm('确定完结货主为:“' + owner_name + '”的“' + type + '”任务吗?')) {
                         return;
                     }
@@ -1442,6 +1614,9 @@
                         this.inputs()[key]='';
                     }
                 },
+                清空checkbox(){
+                    this.checkData=[];
+                },
                 不覆盖() {
                     let _this = this;
                     _this.清空指定盘点记录列();
@@ -1468,11 +1643,11 @@
                     _this.清空指定盘点记录列();
                     let url = '{{url('inventory/盘点选中任务')}}';
                     axios.post(url, {id:id,count:count,inventoryId:inventoryId,produced_at:produced_at,valid_at:valid_at,batch_number:batch_number}).then(function (response) {
-                            if (!response.data.success) {
-                                tempTip.setDuration(2000);
-                                tempTip.show('盘点失败!' + '   ' + response.data.data);
-                                return;
-                            }else {
+                        if (!response.data.success) {
+                            tempTip.setDuration(2000);
+                            tempTip.show('盘点失败!' + '   ' + response.data.data);
+                            return;
+                        }else {
                             if (_this.inventory.id === response.data.inventory.id) {
                                 _this.inventory.processed = response.data.inventory.processed;
                                 _this.inventory.surplus = response.data.inventory.surplus;
@@ -1513,15 +1688,15 @@
                                         return false;
                                     }
                                     return true;
-                                 })
-                                }
+                                })
+                            }
                             _this.重排序并标记全列表类型(_this.inventoryMissions);
                             _this.清空inputs();
                             _this.清空指定盘点记录列();
                             tempTip.setDuration(3000);
                             tempTip.showSuccess('盘点成功!');
-                            }
-                        }).catch(function (err) {
+                        }
+                    }).catch(function (err) {
                         tempTip.setDuration(2000);
                         tempTip.show('盘点失败!' + '网络错误' + err);
                     })
@@ -1553,20 +1728,20 @@
                             delete inventoryMission.stockInventoryPersons;
                             delete inventoryMission.commodity;
                         });
-                        console.log(data);
                         let data = JSON.stringify(this.checkData);
-                        excelExport(checkAllSign,data,url,this.sum,token);
+                        //excelExport(checkAllSign,data,url,this.sum,token);
                     }
                 },
                 //盲收
                 盲收(){
-                  let _this=this;
-                  _this.blindReceive=true;
-                  _this.scanListening();
+                    let _this=this;
+                    _this.blindReceive=true;
+                    _this.scanListening();
                 },
                 正常盘点(){
-                  let _this=this;
-                  _this.blindReceive=false;
+                    let _this=this;
+                    _this.blindReceive=false;
+                    $(document).off('keypress');
                 },
                 changeToManualInputAmount:function(){
                     this.status.amountDisable=false;
@@ -1634,6 +1809,8 @@
                                 case 'increasing': data.commitGoodsOnIncreasingMode();break;
                                 case 'multiIncreasing': data.commitGoodsOnMultiIncreasingMode();break;
                             }
+                            //$('#amount').focus();
+                            //$(document).off('keypress');
                         }
                     });
                 },
@@ -1654,13 +1831,13 @@
                             data.focusOutDocument();
                             data.alertVibrate();
                             window.tempTip.setInputType('number');
-                                data.inputting.amount=1;
-                                data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
-                                data.status.binDisable=true;
-                                window.tempTip.setDuration(500);
-                                window.tempTip.showSuccess('保存成功');
-                                data.focusDocument();
-                                data.audioDing();
+                            data.inputting.amount=1;
+                            data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
+                            data.status.binDisable=true;
+                            window.tempTip.setDuration(500);
+                            window.tempTip.showSuccess('保存成功');
+                            data.focusDocument();
+                            data.audioDing();
                             // window.tempTip.inputVal('该商品第一件递增请输入隔口号:',function(bin){
                             //     if(bin===''){
                             //         window.tempTip.setDuration(1500);
@@ -1707,13 +1884,13 @@
                         data.focusOutDocument();
                         data.alertVibrate();
                         window.tempTip.setInputType('number');
-                            data.inputting.amount=1;
-                            data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
-                            data.status.binDisable=true;
-                            window.tempTip.setDuration(500);
-                            window.tempTip.showSuccess('保存成功');
-                            data.focusDocument();
-                            data.audioDing();
+                        data.inputting.amount=1;
+                        data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
+                        data.status.binDisable=true;
+                        window.tempTip.setDuration(500);
+                        window.tempTip.showSuccess('保存成功');
+                        data.focusDocument();
+                        data.audioDing();
                         // window.tempTip.inputVal('该商品第一件递增请输入隔口号:',function(bin){
                         //     if(bin===''){
                         //         window.tempTip.setDuration(1500);
@@ -1801,7 +1978,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);
@@ -1850,7 +2027,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;
                     }
                 },
@@ -1882,7 +2059,7 @@
                                         if (response.data.inventoryMissions.length >0) {
                                             response.data.inventoryMissions.forEach(function (mission) {
                                                 let isToEdit=false;
-                                               data.inventoryMissions.every(function (inventoryMission){
+                                                data.inventoryMissions.every(function (inventoryMission){
                                                     if (parseInt(inventoryMission.id) === parseInt(mission.id)){
                                                         isToEdit=true;
                                                         inventoryMission.checked = mission.checked;
@@ -1909,7 +2086,6 @@
                                     }else{
                                         window.tempTip.setDuration(1500);
                                         window.tempTip.show('盲收盘点失败:'+response.data.fail_info);
-                                        console.log(response);
                                         data.focusDocument();
                                         data.alertVibrate()
                                     }
@@ -1936,17 +2112,17 @@
 
 
 
-                // 单条排序并着色(inventoryMission){
-                //     let _this=this;
-                //     let 所在临时分类列=[];
-                //     switch(inventoryMission.mark){
-                //         case '已复盘有差异':所在临时分类列=_this.已复盘有差异列;break;
-                //         case '已复盘无差异':所在临时分类列=_this.已复盘无差异列;break;
-                //         case '未复盘有差异':所在临时分类列=_this.未复盘有差异列;break;
-                //         case '无差异':所在临时分类列=_this.无差异列;break;
-                //         case '未盘':所在临时分类列=_this.未盘列;break;
-                //     }
-                // },
+            // 单条排序并着色(inventoryMission){
+            //     let _this=this;
+            //     let 所在临时分类列=[];
+            //     switch(inventoryMission.mark){
+            //         case '已复盘有差异':所在临时分类列=_this.已复盘有差异列;break;
+            //         case '已复盘无差异':所在临时分类列=_this.已复盘无差异列;break;
+            //         case '未复盘有差异':所在临时分类列=_this.未复盘有差异列;break;
+            //         case '无差异':所在临时分类列=_this.无差异列;break;
+            //         case '未盘':所在临时分类列=_this.未盘列;break;
+            //     }
+            // },
 
         });
     </script>

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

@@ -37,7 +37,7 @@
     </div>
 
 
-    <script src="{{ asset('js/app.js?202002111414') }}"></script>
+    <script src="{{ asset('js/app201009.js') }}"></script>
     <script>
         new Vue({
             el:"#page",

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

@@ -30,7 +30,7 @@
     </div>
 
 
-    <script src="{{ asset('js/app.js?202002111414') }}"></script>
+    <script src="{{ asset('js/app201009.js') }}"></script>
     <script>
         function computeDiffMicroTime_fromNow(dateComparing) {
             let now=new Date();

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

@@ -27,7 +27,7 @@
         <h5 style="margin-top: 0;color: red">下班登出成功</h5>
     @endif
 </div>
-<script src="{{ asset('js/app.js?202002111414') }}"></script>
+<script src="{{ asset('js/app201009.js') }}"></script>
 <script>
     new Vue({
         el:'#page',

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

@@ -16,7 +16,7 @@
         <h5 v-else style="margin-top: 0;color: red">等待组长确认登入,请勿关闭:<span id="_lefttime" ></span></h5>
     </div>
 </div>
-<script src="{{ asset('js/app.js?202002111414') }}"></script>
+<script src="{{ asset('js/app201009.js') }}"></script>
 <script>
     new Vue({
         el:'#page',

+ 6 - 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}}',
@@ -385,6 +388,7 @@
                                     laborReport.thisRecordWorkingTime=labor.thisRecordWorkingTime;
                                     laborReport.is_exportGroup=labor.is_exportGroup;
                                     laborReport.checkOutAt=labor.check_out_at;
+                                    laborReport.round_check_out_at=labor.round_check_out_at;
                                     if (labor.relax_time){
                                         laborReport.relax_time=labor.relax_time;
                                     }
@@ -429,6 +433,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: '审核人'},

+ 2 - 0
routes/web.php

@@ -384,6 +384,8 @@ Route::group(['prefix'=>'inventory'],function(){
     Route::get('syncOwners','InventoryAccountController@syncOwners');
     Route::any('删除盘点记录','InventoryAccountController@删除盘点记录');
     Route::post('跳过盘点记录','InventoryAccountController@跳过盘点记录');
+    Route::post('确认盘点差异','InventoryAccountController@确认盘点差异');
+    Route::post('批量跳过或确认差异','InventoryAccountController@批量跳过或确认差异');
     Route::get('完结盘点任务/{id}','InventoryAccountController@完结盘点任务');
     Route::post('修改质量状态','InventoryAccountController@修改质量状态');
     Route::post('增加系统之外的盘点记录','InventoryAccountController@增加系统之外的盘点记录');

+ 10 - 8
serves/excelExportGo/api/controller/laborReportController.go

@@ -2,7 +2,7 @@ package controller
 
 func LaborReportFormat(data []map[string]string) ([]interface{}, [][]interface{})  {
 	row := []interface{}{
-		"进厂编号","小组","临时工","电话","身份证号","劳务所","进场时间","进组时间","退组时间",
+		"进厂编号","小组","临时工","电话","身份证号","劳务所","进场时间","进组时间","退组时间","进组取整时间","退组取整时间",
 		"退场时间","审核时间","审核人","晚饭时间(分)","在线时长","本次工作时长","备注",
 	}
 	column := map[string]int{
@@ -15,13 +15,15 @@ func LaborReportFormat(data []map[string]string) ([]interface{}, [][]interface{}
 		"enter_at" : 6,
 		"check_in_at" : 7,
 		"check_out_at" : 8,
-		"exit_at" : 9,
-		"verify_at" : 10,
-		"group_user_id" : 11,
-		"relax_time" : 12,
-		"online_duration" : 13,
-		"working_duration" : 14,
-		"remark" : 15,
+		"round_check_in_at" : 9,
+		"round_check_out_at" : 10,
+		"exit_at" : 11,
+		"verify_at" : 12,
+		"group_user_id" : 13,
+		"relax_time" : 14,
+		"online_duration" : 15,
+		"working_duration" : 16,
+		"remark" : 17,
 	}
 	list := make([][]interface{},len(data))
 	for k,v := range data{