|
|
@@ -2,64 +2,72 @@
|
|
|
@section('title')盘点-任务-{!! $inventoryAccount->id !!}@endsection
|
|
|
|
|
|
@section('content')
|
|
|
- @component('inventory.stockInventory.menu')
|
|
|
- <li class="nav-item">
|
|
|
- <a class="nav-link" href="{{URL::current()}}" :class="{active:isActive('enterStockInventory',3)}">盘点中({!! $inventoryAccount->id !!})</a>
|
|
|
- </li>
|
|
|
- @endcomponent
|
|
|
+ @component('inventory.stockInventory.menu')
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link" href="{{URL::current()}}" :class="{active:isActive('enterStockInventory',3)}">盘点中({!! $inventoryAccount->id !!})</a>
|
|
|
+ </li>
|
|
|
+ @endcomponent
|
|
|
<div id="list" class="d-none container-fluid" >
|
|
|
- <div class="mt-3 offset-1">
|
|
|
- <span class="form-group shadow-sm p-2 mb-5 bg-white rounded">
|
|
|
- <label class=" font-weight-bold">货主:</label><span>@{{ inventory.owner.name }}</span>
|
|
|
- </span>
|
|
|
- <span class="form-group shadow-sm p-2 mb-5 bg-white rounded">
|
|
|
- <label class=" font-weight-bold">盘点单号:</label><span>@{{ inventory.id }}</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="mt-3 offset-1">
|
|
|
- <span class="form-group shadow-sm p-2 mb-5 bg-white rounded">
|
|
|
- <label class=" font-weight-bold">时间范围:</label><span>@{{ inventory.start_at }}—@{{ inventory.end_at }}</span>
|
|
|
- </span>
|
|
|
+ <div class="mt-3">
|
|
|
|
|
|
- <span class="form-group shadow-sm p-2 mb-5 bg-white rounded" v-if="inventory.surplus!=0">
|
|
|
- <label class=" font-weight-bold">已盘点:</label><span>@{{ inventory.processed }}/总数:@{{ inventory.total }}</span>
|
|
|
- </span>
|
|
|
- <span class="form-group shadow-sm p-2 mb-5 bg-white rounded" v-if="inventory.surplus!=0">
|
|
|
- <label class=" font-weight-bold">剩余数:</label><span>@{{ inventory.surplus }}</span>
|
|
|
+ <span class="mt-3" >
|
|
|
+ <button class="btn btn-sm" @click="listMode?listMode=false:listMode=true" :class="listMode?'btn-dark':'btn-outline-dark'">
|
|
|
+ <span v-if="!listMode">切换为列表</span>
|
|
|
+ <span v-if="listMode">切换为盘点</span>
|
|
|
+ </button>
|
|
|
+ </span>
|
|
|
+ <span class="form-group mb-5">
|
|
|
+ <label class="text-muted">货主:</label><span class="font-weight-bold">@{{ inventory.owner.name }}</span>
|
|
|
</span>
|
|
|
- <span class="form-group shadow-sm p-2 mb-5 bg-white rounded" v-if="inventory.surplus==0">
|
|
|
- <label class=" font-weight-bold">盘点记录数:</label><span>@{{ inventory.total }}</span>
|
|
|
+ <span class="form-group p-2 mb-5" class="text-muted">
|
|
|
+ <label >盘点单号:</label><span>@{{ inventory.id }}</span>
|
|
|
</span>
|
|
|
- <span class="form-group shadow-sm p-2 mb-5 bg-white rounded" v-if="inventory.surplus==0">
|
|
|
- <label class=" font-weight-bold">复盘剩余数:</label><span>@{{ inventory.check_surplus }}/复盘总数:@{{ inventory.total }}</span>
|
|
|
+ <span class="form-group p-2 mb-5">
|
|
|
+ <label class="text-muted">时间范围:</label><span>@{{ inventory.start_at }} 至 @{{ inventory.end_at }}</span>
|
|
|
</span>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="mt-3">
|
|
|
+ <span class="h5">
|
|
|
+ <span class="form-group mb-5" v-if="inventory.surplus!=0">
|
|
|
+ <label class=" font-weight-bold">已盘点:</label><span>@{{ inventory.processed }}/总数:@{{ inventory.total }}</span>
|
|
|
+ </span>
|
|
|
+ <span class="form-group mb-5" v-if="inventory.surplus!=0">
|
|
|
+ <label class=" font-weight-bold">剩余数:</label><span>@{{ inventory.surplus }}</span>
|
|
|
+ </span>
|
|
|
+ <span class="form-group mb-5" v-if="inventory.surplus==0">
|
|
|
+ <label class=" font-weight-bold">盘点记录数:</label><span>@{{ inventory.total }}</span>
|
|
|
+ </span>
|
|
|
+ <span class="form-group mb-5" v-if="inventory.surplus==0">
|
|
|
+ <label class=" font-weight-bold">复盘剩余数:</label><span>@{{ inventory.check_surplus }}/复盘总数:@{{ inventory.total }}</span>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
|
|
|
- <div class="row offset-1 mt-3" >
|
|
|
- <span class="btn col-md-2 font-weight-bold" style="cursor: default;max-width: 160px" :class="inventory.surplus!=0?'bg-info':'btn-outline-info disabled'">
|
|
|
+ <div class="mt-3" >
|
|
|
+ <span v-if="!listMode" class="btn col-md-2 font-weight-bold" style="cursor: default;max-width: 160px" :class="inventory.surplus!=0?'bg-info':'btn-outline-info disabled'">
|
|
|
@{{ inventory.type }}
|
|
|
</span>
|
|
|
- <span class="btn col-md-2 font-weight-bold" style="cursor: default;max-width: 160px" :class="inventory.surplus!=0?'btn-outline-info disabled':'bg-info'">复盘</span>
|
|
|
+ <span v-if="!listMode" class="btn col-md-2 font-weight-bold" style="cursor: default;max-width: 160px" :class="inventory.surplus!=0?'btn-outline-info disabled':'bg-info'">复盘</span>
|
|
|
</div>
|
|
|
|
|
|
- <form id="form" class="row mt-3 offset-1">
|
|
|
- <div class="row form-inline" :class="inventory.surplus!=0?'row-cols-3':'row-cols-5'">
|
|
|
- <span>
|
|
|
+
|
|
|
+ <form id="form" class="mt-3 form-inline " v-if="!listMode" :class="inventory.surplus!=0?'row-cols-3':'row-cols-5'">
|
|
|
+ <span class="form-group">
|
|
|
<label for="location" class="text-secondary font-weight-bold">请输库位</label>
|
|
|
<input id="inventoryInput" name="location" type="text" class="form-control input" autocomplete="off" value="@if(old('location')){{old('location')}}@endif">
|
|
|
</span>
|
|
|
- <span>
|
|
|
+ <span class="form-group ml-4">
|
|
|
<label for="barcode" class="text-secondary font-weight-bold">请输产品条码</label>
|
|
|
<input id="barcode" name="barcode" type="text" value="@if(old('barcode')){{old('barcode')}}@endif" class="form-control input" autocomplete="off" @blur="searchBarcode">
|
|
|
</span>
|
|
|
- <span>
|
|
|
+ <span class="form-group ml-4">
|
|
|
<label for="count" class="text-secondary font-weight-bold">请输盘点数</label>
|
|
|
<input type="text" id="count" name="count" class="form-control input" value="@if(old('count')){{old('count')}}@endif" autocomplete="off">
|
|
|
</span>
|
|
|
|
|
|
- <span v-if="inventory.surplus==0">
|
|
|
+ <span v-if="inventory.surplus==0">
|
|
|
<label for="count" class="text-secondary font-weight-bold">上一次盘点数</label>
|
|
|
<span v-if="!inventoryMissionRecord.re_checked_amount">
|
|
|
<input type="text" id="count" name="count" v-model="inventoryMissionRecord.verified_amount" class="form-control input" readonly>
|
|
|
@@ -68,11 +76,10 @@
|
|
|
<input type="text" id="count" name="count" v-model="inventoryMissionRecord.re_checked_amount" class="form-control input" readonly>
|
|
|
</span>
|
|
|
</span>
|
|
|
- <span v-if="inventory.surplus==0">
|
|
|
+ <span v-if="inventory.surplus==0">
|
|
|
<label for="count" class="text-secondary font-weight-bold">盘点差异数</label>
|
|
|
<input type="text" id="count" name="count" v-model="inventoryMissionRecord.difference_amount" class="form-control input" readonly>
|
|
|
</span>
|
|
|
- </div>
|
|
|
</form>
|
|
|
|
|
|
|
|
|
@@ -95,7 +102,7 @@
|
|
|
<th>盘点差异</th>
|
|
|
<th>分配数量</th>
|
|
|
</tr>
|
|
|
- <tr v-for="(inventoryMission,i) in inventoryMissions" v-if="inventoryMission.checked=='是'" @click="selectedColor(inventoryMission.id)" :style="{'font-weight': inventory.id==selectedStyle?'bold':''}">
|
|
|
+ <tr v-for="(inventoryMission,i) in inventoryMissions" v-if="inventoryMission.checked=='是'||listMode" @click="selectedColor(inventoryMission.id)" :style="{'font-weight': inventory.id==selectedStyle?'bold':''}">
|
|
|
<td>@{{ i+1 }}</td>
|
|
|
<td>@{{ inventoryMission.location }}</td>
|
|
|
<td v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.name }}</td>
|
|
|
@@ -117,7 +124,7 @@
|
|
|
|
|
|
<table class="table table-striped table-sm table-bordered table-hover p-0 d-block d-sm-none" style="background: rgb(255, 255, 255);" >
|
|
|
<tbody>
|
|
|
- <tr v-for="inventoryMission in inventoryMissions" v-if="inventoryMission.checked=='是'">
|
|
|
+ <tr v-for="inventoryMission in inventoryMissions" v-if="inventoryMission.checked=='是'||listMode">
|
|
|
<td style="filter:grayscale(30%); ">
|
|
|
<div class="mt-3">
|
|
|
<div style="transform:scale(0.9)" class="pl-0">
|
|
|
@@ -125,9 +132,9 @@
|
|
|
<span class="mr-3 text-nowrap"><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"><span class="font-weight-bold">产品条码:</span><span style="color:#af7651" v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.barcode }}</span></span>
|
|
|
<div v-if="inventory.surplus==0">
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">盘点数量:</span><span style="color:#af7651">@{{ inventoryMission.verified_amount }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">复盘数量:</span><span style="color:#af7651">@{{ inventoryMission.re_checked_amount }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">盘点差异:</span><span >@{{ inventoryMission.difference_amount }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">盘点数量:</span><span style="color:#af7651">@{{ inventoryMission.verified_amount }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">复盘数量:</span><span style="color:#af7651">@{{ inventoryMission.re_checked_amount }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">盘点差异:</span><span >@{{ inventoryMission.difference_amount }}</span></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -150,11 +157,23 @@
|
|
|
checkData: [],
|
|
|
selectedStyle:'',
|
|
|
inventoryMissionRecord:{},
|
|
|
+ listMode:false,
|
|
|
},
|
|
|
mounted: function () {
|
|
|
+ let _this=this;
|
|
|
$(".tooltipTarget").tooltip({'trigger': 'hover'});
|
|
|
$("#list").removeClass('d-none');
|
|
|
- document.getElementById('inventoryInput').focus();
|
|
|
+
|
|
|
+ (function 焦点放置(){
|
|
|
+ let inventoryInput=$('#inventoryInput')
|
|
|
+ if(inventoryInput.length>0)
|
|
|
+ $('#inventoryInput').focus()
|
|
|
+ })();
|
|
|
+ (function 初始化列表模式(){
|
|
|
+ let listMode=getGetVal('listMode')
|
|
|
+ if(listMode==='true'){_this.listMode=true;return;}
|
|
|
+ _this.listMode=false;
|
|
|
+ })();
|
|
|
},
|
|
|
methods:{
|
|
|
selectedColor(id){
|
|
|
@@ -234,7 +253,7 @@
|
|
|
},
|
|
|
}
|
|
|
});
|
|
|
- $("#form").on("keydown","input",function(){
|
|
|
+ $("#form").on("keydown","input",function(){
|
|
|
let _this=this;
|
|
|
let e = event || window.event;
|
|
|
if(e && e.keyCode==13) {
|