|
|
@@ -121,7 +121,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">
|
|
|
生产日期:
|
|
|
@@ -193,8 +193,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form id="form">
|
|
|
- <div v-if="!blindReceive">
|
|
|
+ <form id="form">
|
|
|
+ <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>
|
|
|
@@ -216,100 +216,100 @@
|
|
|
name="count" class="form-control input" value="@if(old('count')){{old('count')}}@endif" autocomplete="off">
|
|
|
</span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!--相同库位和条码 pc端-->
|
|
|
+ </div>
|
|
|
+ <!--相同库位和条码 pc端-->
|
|
|
|
|
|
- <div class="row d-none d-xl-block">
|
|
|
- <div class="col-12 col-md-12 col-sm-12 showBlueTable d-none">
|
|
|
- <table class="table table-sm table-bordered table-info mt-2" v-if="!listMode" id="blueTablePc">
|
|
|
- <tr>
|
|
|
- <td class="font-weight-bold">输入盘点数</td>
|
|
|
- <td>操作</td>
|
|
|
- <td>库位</td>
|
|
|
- <td>产品名</td>
|
|
|
- <td>产品条码</td>
|
|
|
- <td>产品编码</td>
|
|
|
- <td>生产日期</td>
|
|
|
- <td>失效时期</td>
|
|
|
- <td>批号</td>
|
|
|
- <th>属性仓</th>
|
|
|
- <th>质量状态</th>
|
|
|
- <td>盘点数量</td>
|
|
|
- <td>复盘数量</td>
|
|
|
- <td>复盘差异</td>
|
|
|
- </tr>
|
|
|
- <tr class="selectingRow" id="blueTrPc">
|
|
|
- <td>
|
|
|
- <input type="text" onkeypress="listVue.selectingRow(event)" name="amount" class="form-control-sm blueAmountPc" autocomplete="off" oninput="inputs.amount=event.target.value">
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span class="btn btn-sm btn-outline-primary stockButtonPc" onclick="listVue.盘点选中任务(event)">选定盘点</span>
|
|
|
- </td>
|
|
|
- <td class="location"></td>
|
|
|
- <td class="commodity_name"></td>
|
|
|
- <td class="commodity_barcode"></td>
|
|
|
- <td class="commodity_sku"></td>
|
|
|
- <td><input type="date" class="form-control-sm produced_at" name="produced_at" onchange="producedAtChange(event)"></td>
|
|
|
- <td><input type="date" class="form-control-sm valid_at" name="valid_at" onchange="validAtChange(event)"></td>
|
|
|
- <td><input type="text" class="form-control-sm batch_number" name="batch_number" onchange="batchNumberChange(event)"></td>
|
|
|
- <td class="erp_type_position"></td>
|
|
|
- <td class="quality"></td>
|
|
|
- <td class="verified_amount"></td>
|
|
|
- <td class="re_checked_amount"></td>
|
|
|
- <td class="difference_amount"></td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
+ <div class="row d-none d-xl-block">
|
|
|
+ <div class="col-12 col-md-12 col-sm-12 showBlueTable d-none">
|
|
|
+ <table class="table table-sm table-bordered table-info mt-2" v-if="!listMode" id="blueTablePc">
|
|
|
+ <tr>
|
|
|
+ <td class="font-weight-bold">输入盘点数</td>
|
|
|
+ <td>操作</td>
|
|
|
+ <td>库位</td>
|
|
|
+ <td>产品名</td>
|
|
|
+ <td>产品条码</td>
|
|
|
+ <td>产品编码</td>
|
|
|
+ <td>生产日期</td>
|
|
|
+ <td>失效时期</td>
|
|
|
+ <td>批号</td>
|
|
|
+ <th>属性仓</th>
|
|
|
+ <th>质量状态</th>
|
|
|
+ <td>盘点数量</td>
|
|
|
+ <td>复盘数量</td>
|
|
|
+ <td>复盘差异</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="selectingRow" id="blueTrPc">
|
|
|
+ <td>
|
|
|
+ <input type="text" onkeypress="listVue.selectingRow(event)" name="amount" class="form-control-sm blueAmountPc" autocomplete="off" oninput="inputs.amount=event.target.value">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <span class="btn btn-sm btn-outline-primary stockButtonPc" onclick="listVue.盘点选中任务(event)">选定盘点</span>
|
|
|
+ </td>
|
|
|
+ <td class="location"></td>
|
|
|
+ <td class="commodity_name"></td>
|
|
|
+ <td class="commodity_barcode"></td>
|
|
|
+ <td class="commodity_sku"></td>
|
|
|
+ <td><input type="date" class="form-control-sm produced_at" name="produced_at" onchange="producedAtChange(event)"></td>
|
|
|
+ <td><input type="date" class="form-control-sm valid_at" name="valid_at" onchange="validAtChange(event)"></td>
|
|
|
+ <td><input type="text" class="form-control-sm batch_number" name="batch_number" onchange="batchNumberChange(event)"></td>
|
|
|
+ <td class="erp_type_position"></td>
|
|
|
+ <td class="quality"></td>
|
|
|
+ <td class="verified_amount"></td>
|
|
|
+ <td class="re_checked_amount"></td>
|
|
|
+ <td class="difference_amount"></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
- <!--相同库位和条码 移动端-->
|
|
|
- <div class="showBlueTable d-none">
|
|
|
- <table class="table table-striped table-sm table-bordered table-hover p-0 d-table d-xl-none mt-2" style="background: rgb(179, 214, 245);" v-if="!listMode" id="blueTable">
|
|
|
- <tr class="selectingRow移动端" id="blueTr">
|
|
|
- <td style="filter:grayscale(30%); ">
|
|
|
- <div class="mt-3">
|
|
|
- <div>
|
|
|
+ </div>
|
|
|
+ <!--相同库位和条码 移动端-->
|
|
|
+ <div class="showBlueTable d-none">
|
|
|
+ <table class="table table-striped table-sm table-bordered table-hover p-0 d-table d-xl-none mt-2" style="background: rgb(179, 214, 245);" v-if="!listMode" id="blueTable">
|
|
|
+ <tr class="selectingRow移动端" id="blueTr">
|
|
|
+ <td style="filter:grayscale(30%); ">
|
|
|
+ <div class="mt-3">
|
|
|
+ <div>
|
|
|
<span class="mr-3 text-nowrap"><span class="font-weight-bold">输入盘点数:</span>
|
|
|
<span>
|
|
|
<input type="text" onkeypress="listVue.selectingRow(event)" name="amount" class="form-control-sm blueAmount" autocomplete="off" oninput="inputs.amount=event.target.value">
|
|
|
</span>
|
|
|
</span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">操作:</span><span class="btn btn-sm btn-outline-primary stockButton" onclick="listVue.盘点选中任务(event)">选定盘点</span></span>
|
|
|
- </div>
|
|
|
- <div style="transform:scale(0.9)" class="pl-0">
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">库位:</span><span class="location"></span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品名称:</span><span class="commodity_name"></span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品条码:</span><span class="commodity_barcode"></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">操作:</span><span class="btn btn-sm btn-outline-primary stockButton" onclick="listVue.盘点选中任务(event)">选定盘点</span></span>
|
|
|
+ </div>
|
|
|
+ <div style="transform:scale(0.9)" class="pl-0">
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">库位:</span><span class="location"></span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品名称:</span><span class="commodity_name"></span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品条码:</span><span class="commodity_barcode"></span>
|
|
|
</span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品编码:</span><span class="commodity_sku"></span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">生产日期:</span><input type="date" class="form-control-sm produced_at" name="produced_at" onchange="producedAtChange(event)"></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">失效时期:</span><input type="date" class="form-control-sm valid_at" name="valid_at" onchange="validAtChange(event)"></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">批号:</span><input type="text" class="form-control-sm batch_number" name="batch_number" onchange="batchNumberChange(event)"></span>
|
|
|
- <span class="mr-3 text-nowrap"><span>属性仓:</span><span class="erp_type_position"></span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span>质量状态:</span><span class="quality"></span></span>
|
|
|
- <div>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">盘点数量:</span><span style="color:#af7651" class="verified_amount"></span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">复盘数量:</span><span style="color:#af7651" class="re_checked_amount"></span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">盘点差异:</span><span class="difference_amount"></span></span>
|
|
|
- </div>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品编码:</span><span class="commodity_sku"></span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">生产日期:</span><input type="date" class="form-control-sm produced_at" name="produced_at" onchange="producedAtChange(event)"></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">失效时期:</span><input type="date" class="form-control-sm valid_at" name="valid_at" onchange="validAtChange(event)"></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">批号:</span><input type="text" class="form-control-sm batch_number" name="batch_number" onchange="batchNumberChange(event)"></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span>属性仓:</span><span class="erp_type_position"></span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span>质量状态:</span><span class="quality"></span></span>
|
|
|
+ <div>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000">盘点数量:</span><span style="color:#af7651" class="verified_amount"></span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000">复盘数量:</span><span style="color:#af7651" class="re_checked_amount"></span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000">盘点差异:</span><span class="difference_amount"></span></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
|
|
|
|
|
|
- <div class="card-body pt-1" ref="box">
|
|
|
- <label for="all" class="d-none" id="cloneCheckAll">
|
|
|
- <input id="all" type="checkbox" @click="checkAll($event)">全选
|
|
|
- </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">
|
|
|
- <tr class="p-0" id="header"></tr>
|
|
|
- <tr {{--v-for="(inventoryMission,i) in inventoryMissions"--}} v-for="(inventoryMission, i) in 显示记录列" :key="i"
|
|
|
- :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}" :class="[
|
|
|
+ <div class="card-body pt-1">
|
|
|
+ <label for="all" class="d-none" id="cloneCheckAll">
|
|
|
+ <input id="all" type="checkbox" @click="checkAll($event)">全选
|
|
|
+ </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" ref="boxPc">
|
|
|
+ <tr class="p-0" id="header"></tr>
|
|
|
+ <tr {{--v-for="(inventoryMission,i) in inventoryMissions"--}} v-for="(inventoryMission, i) in 显示记录列" :key="i"
|
|
|
+ :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}" :class="[
|
|
|
inventoryMission.mark==='已复盘有差异'?'td-cool':'',
|
|
|
inventoryMission.mark==='已复盘无差异'?'td-cool text-muted':'',
|
|
|
inventoryMission.mark==='未复盘有差异'?'td-warm font-weight-bold':'',
|
|
|
@@ -317,16 +317,16 @@
|
|
|
inventoryMission.mark==='未盘'?'td-yellow':'',
|
|
|
inventoryMission.mark==='跳过'?'text-muted':'',
|
|
|
]">
|
|
|
- <td>
|
|
|
- <input type="checkbox" :value="inventoryMission" v-model="checkData">
|
|
|
- <span :id="'lockLine'+(i+1)"></span>
|
|
|
- </td>
|
|
|
- <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>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
+ <td>
|
|
|
+ <input type="checkbox" :value="inventoryMission" v-model="checkData">
|
|
|
+ <span :id="'lockLine'+(i+1)"></span>
|
|
|
+ </td>
|
|
|
+ <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>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
<span
|
|
|
v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
|
|
|
<span
|
|
|
@@ -340,23 +340,23 @@
|
|
|
</span>
|
|
|
</span>
|
|
|
</span>
|
|
|
- </td>
|
|
|
+ </td>
|
|
|
|
|
|
- <td v-if="inventoryMission.commodity"><span
|
|
|
- v-if="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>
|
|
|
- </td>
|
|
|
- <td><span
|
|
|
- v-if="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>
|
|
|
- </td>
|
|
|
+ <td v-if="inventoryMission.commodity"><span
|
|
|
+ v-if="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>
|
|
|
+ </td>
|
|
|
+ <td><span
|
|
|
+ v-if="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>
|
|
|
+ </td>
|
|
|
|
|
|
- <td v-if="inventoryMission.stockInventoryPersons" class="text-muted"
|
|
|
- :rowspan="inventoryMission.is_multi_row?2:''">
|
|
|
+ <td v-if="inventoryMission.stockInventoryPersons" class="text-muted"
|
|
|
+ :rowspan="inventoryMission.is_multi_row?2:''">
|
|
|
<span
|
|
|
v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
|
|
|
<a href="#" v-if="inventoryMission.stockInventoryPersons.length>0" class="dropdown-toggle"
|
|
|
@@ -378,13 +378,13 @@
|
|
|
</table>
|
|
|
</div>
|
|
|
</span>
|
|
|
- </td>
|
|
|
+ </td>
|
|
|
|
|
|
- <td><span
|
|
|
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.erp_type_position }}</span>
|
|
|
- </td>
|
|
|
- <td><span
|
|
|
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
|
|
|
+ <td><span
|
|
|
+ v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.erp_type_position }}</span>
|
|
|
+ </td>
|
|
|
+ <td><span
|
|
|
+ v-if="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"
|
|
|
@@ -393,45 +393,45 @@
|
|
|
<option value="残次">残次</option>
|
|
|
</select>
|
|
|
</span>
|
|
|
+ </td>
|
|
|
+ <td><span
|
|
|
+ v-if="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>
|
|
|
+ </td>
|
|
|
+ <td><span
|
|
|
+ v-if="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>
|
|
|
+ </td>
|
|
|
+ <td><span
|
|
|
+ v-if="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>
|
|
|
+ </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-secondary" v-if="inventoryMission.checked==='否'"
|
|
|
+ @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>
|
|
|
</td>
|
|
|
- <td><span
|
|
|
- v-if="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>
|
|
|
- </td>
|
|
|
- <td><span
|
|
|
- v-if="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>
|
|
|
- </td>
|
|
|
- <td><span
|
|
|
- v-if="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>
|
|
|
- </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-secondary" v-if="inventoryMission.checked==='否'"
|
|
|
- @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>
|
|
|
- </td>
|
|
|
- @endcan
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </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);" ref="box">
|
|
|
- <tbody>
|
|
|
- <tr {{--v-for="(inventoryMission,i) in 显示记录列"--}} v-for="(inventoryMission, i) in 显示记录列" :key="i"
|
|
|
- :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}"
|
|
|
- :class="[
|
|
|
+ @endcan
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </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);" ref="box">
|
|
|
+ <tbody>
|
|
|
+ <tr {{--v-for="(inventoryMission,i) in 显示记录列"--}} v-for="(inventoryMission, i) in 显示记录列" :key="i"
|
|
|
+ :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}"
|
|
|
+ :class="[
|
|
|
inventoryMission.mark==='已复盘有差异'?'td-cool':'',
|
|
|
inventoryMission.mark==='已复盘无差异'?'td-cool text-muted':'',
|
|
|
inventoryMission.mark==='未复盘有差异'?'td-warm font-weight-bold':'',
|
|
|
@@ -439,21 +439,21 @@
|
|
|
inventoryMission.mark==='未盘'?'td-yellow':'',
|
|
|
inventoryMission.mark==='跳过'?'text-muted':'',
|
|
|
]">
|
|
|
- <td style="filter:grayscale(30%); ">
|
|
|
- <span :id="'lockLinePhone'+(i+1)"></span>
|
|
|
- <div class="mt-3">
|
|
|
- <div style="transform:scale(0.9)" class="pl-0">
|
|
|
- <span type="hidden">@{{ i+1 }}</span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">库位:</span><span
|
|
|
- style="color:#af7651">
|
|
|
+ <td style="filter:grayscale(30%); ">
|
|
|
+ <span :id="'lockLinePhone'+(i+1)"></span>
|
|
|
+ <div class="mt-3">
|
|
|
+ <div style="transform:scale(0.9)" class="pl-0">
|
|
|
+ <span type="hidden">@{{ i+1 }}</span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">库位:</span><span
|
|
|
+ style="color:#af7651">
|
|
|
@{{ inventoryMission.location }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"
|
|
|
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode"><span
|
|
|
- class="font-weight-bold">产品名称:</span><span style="color:#af7651"
|
|
|
- v-if="inventoryMission.commodity">
|
|
|
+ <span class="mr-3 text-nowrap"
|
|
|
+ v-if="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">
|
|
|
+ <span class="mr-3 text-nowrap"
|
|
|
+ v-if="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,8 +463,8 @@
|
|
|
<option value="残次">残次</option>
|
|
|
</select>
|
|
|
</span>
|
|
|
- <span class="mr-3 text-nowrap"
|
|
|
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
|
|
|
+ <span class="mr-3 text-nowrap"
|
|
|
+ v-if="inventoryMission.checked==='是'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
|
|
|
<span class="font-weight-bold">产品条码:</span>
|
|
|
|
|
|
<span
|
|
|
@@ -481,18 +481,18 @@
|
|
|
</span>
|
|
|
</span>
|
|
|
</span>
|
|
|
- <div v-if="inventory.status==='复盘中'">
|
|
|
+ <div v-if="inventory.status==='复盘中'">
|
|
|
<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">
|
|
|
+ <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>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">盘点差异:</span><span>
|
|
|
@{{ inventoryMission.difference_amount }}</span></span>
|
|
|
- </div>
|
|
|
- @can('库存管理-盘点')
|
|
|
- <div>
|
|
|
+ </div>
|
|
|
+ @can('库存管理-盘点')
|
|
|
+ <div>
|
|
|
<span class="mr-3 text-nowrap" v-if="!listMode"><span
|
|
|
class="font-weight-bold">操作:</span>
|
|
|
{{-- <span class="btn btn-sm btn-outline-danger" @click="删除盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">删除</span>--}}
|
|
|
@@ -502,65 +502,65 @@
|
|
|
v-if="inventory.type=='动盘'&& inventoryMission.mark=='未盘' &&!listMode"
|
|
|
@click="选中盘点起始位置(inventoryMission.id,inventoryMission.location)">以此为起点</span>
|
|
|
</span>
|
|
|
- </div>
|
|
|
- @endcan
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- <!--上次盘点记录-->
|
|
|
- <div class="modal" id="lastStockInventoryRecord" tabindex="-1" role="dialog">
|
|
|
- <div class="modal-dialog modal-xl">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title font-weight-bold">该盘点记录已存在,是否覆盖之前记录?</h5>
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <table class="table table-sm table-striped table-bordered">
|
|
|
- <tr class="text-muted text-center">
|
|
|
- <th>库位</th>
|
|
|
- <th>产品条码</th>
|
|
|
- <th>盘点人</th>
|
|
|
- <th>盘点数量</th>
|
|
|
- <th>产品名</th>
|
|
|
- <th>产品编号</th>
|
|
|
- <th>属性仓</th>
|
|
|
- <th>质量状态</th>
|
|
|
- <th>库存数量</th>
|
|
|
- <th>盘点差异</th>
|
|
|
- <th>时间</th>
|
|
|
- </tr>
|
|
|
- <tr class="text-center ">
|
|
|
- <td>@{{ lastStockInventoryRecord.location }}</td>
|
|
|
- <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.barcode }}</span></td>
|
|
|
- <td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[stockInventoryPersons.length-1].mark }}</span></td>
|
|
|
- <td>@{{ lastStockInventoryRecord.verified_amount }}</td>
|
|
|
- <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity_name }}</span></td>
|
|
|
- <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.sku }}</span>
|
|
|
- </td>
|
|
|
- <td>@{{ lastStockInventoryRecord.erp_type_position }}</td>
|
|
|
- <td>@{{ lastStockInventoryRecord.quality }}</td>
|
|
|
- <td>@{{ lastStockInventoryRecord.stored_amount }}</td>
|
|
|
- <td>@{{ lastStockInventoryRecord.difference_amount }}</td>
|
|
|
- <td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[stockInventoryPersons.length-1].created_at }}</span>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true" class="btn btn-outline-secondary" @click="不覆盖()">否</span>
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="覆盖()">是</button>
|
|
|
+ </div>
|
|
|
+ @endcan
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <!--上次盘点记录-->
|
|
|
+ <div class="modal" id="lastStockInventoryRecord" tabindex="-1" role="dialog">
|
|
|
+ <div class="modal-dialog modal-xl">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title font-weight-bold">该盘点记录已存在,是否覆盖之前记录?</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <table class="table table-sm table-striped table-bordered">
|
|
|
+ <tr class="text-muted text-center">
|
|
|
+ <th>库位</th>
|
|
|
+ <th>产品条码</th>
|
|
|
+ <th>盘点人</th>
|
|
|
+ <th>盘点数量</th>
|
|
|
+ <th>产品名</th>
|
|
|
+ <th>产品编号</th>
|
|
|
+ <th>属性仓</th>
|
|
|
+ <th>质量状态</th>
|
|
|
+ <th>库存数量</th>
|
|
|
+ <th>盘点差异</th>
|
|
|
+ <th>时间</th>
|
|
|
+ </tr>
|
|
|
+ <tr class="text-center ">
|
|
|
+ <td>@{{ lastStockInventoryRecord.location }}</td>
|
|
|
+ <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.barcode }}</span></td>
|
|
|
+ <td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[stockInventoryPersons.length-1].mark }}</span></td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.verified_amount }}</td>
|
|
|
+ <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity_name }}</span></td>
|
|
|
+ <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.sku }}</span>
|
|
|
+ </td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.erp_type_position }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.quality }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.stored_amount }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.difference_amount }}</td>
|
|
|
+ <td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[stockInventoryPersons.length-1].created_at }}</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true" class="btn btn-outline-secondary" @click="不覆盖()">否</span>
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="覆盖()">是</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@@ -673,6 +673,7 @@
|
|
|
scanEndInputted:false,binDisable:false,barcodeDisable:true,amountDisable:false,
|
|
|
},
|
|
|
goodses:[],//{barcode,amount,bin,produce_date,valid_date,batch_number}
|
|
|
+ 向下加载时浏览器底部位置:'',
|
|
|
},
|
|
|
beforeMount: function () {
|
|
|
this.重排序并标记全列表类型();
|
|
|
@@ -692,7 +693,7 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.addArr()//初始化先调用一次
|
|
|
+ this.加载下方数据并置空上方数据()//初始化先调用一次
|
|
|
},
|
|
|
destroyed() {
|
|
|
window.removeEventListener('scroll', this.lazy)
|
|
|
@@ -774,29 +775,75 @@
|
|
|
// 可视区域+滚动条距离顶部位置 = 浏览器窗口底部的位置
|
|
|
const count = height + scrollHeight;
|
|
|
//懒加载盒子高度+懒加载盒子距离顶部位置=计算出盒子底部的距离
|
|
|
- const box_bottom = _this.$refs.box.offsetHeight + _this.$refs.box.offsetTop-500;
|
|
|
- if (count >= box_bottom) { //懒加载条件限制判断
|
|
|
- if (_this.显示记录列.length < _this.inventoryMissions.length) {//做一次判断
|
|
|
- _this.addArr()//达到条件后执行这个函数
|
|
|
+ const box_bottom = _this.$refs.box.offsetHeight + _this.$refs.box.offsetTop-500;//移动
|
|
|
+ const box_bottomPc = _this.$refs.boxPc.offsetHeight + _this.$refs.boxPc.offsetTop;//pc
|
|
|
+ //console.log('pc',box_bottomPc)
|
|
|
+ //console.log('移动',box_bottom)
|
|
|
+ if (box_bottom===-500&&count >= box_bottomPc) {//pc端下划加载
|
|
|
+ if (_this.显示记录列.length < _this.inventoryMissions.length) {
|
|
|
+ _this.加载下方数据并置空上方数据(count);
|
|
|
}
|
|
|
}
|
|
|
+ if (box_bottomPc===0&&count >= box_bottom) {//移动端下划加载
|
|
|
+ if (_this.显示记录列.length < _this.inventoryMissions.length) {
|
|
|
+ _this.加载下方数据并置空上方数据(count)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 加载上方数据(){
|
|
|
+ //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);
|
|
|
+ })
|
|
|
},
|
|
|
- addArr() {
|
|
|
+ 加载下方数据并置空上方数据(height){
|
|
|
let _this=this;
|
|
|
const count = _this.显示记录列.length;
|
|
|
- if (count >= 20) {
|
|
|
+ if (count > 20) {
|
|
|
_this.inventoryMissions.map((inventoryMission, index) => {
|
|
|
if (_this.显示记录列.length < 5 + count) {
|
|
|
if (_this.显示记录列.length < _this.inventoryMissions.length) {
|
|
|
- _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length])//注意push原数组下标为当前新数组长度
|
|
|
+ //_this.显示记录列.splice(_this.显示记录列.length-30,1);
|
|
|
+ //_this.显示记录列.unshift({});
|
|
|
+ _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length]);
|
|
|
+ _this.向下加载时浏览器底部位置 = height;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
_this.inventoryMissions.map((inventoryMission, index) => {
|
|
|
- if (_this.显示记录列.length < 10 + count) {//每次执行加载5条
|
|
|
+ if (_this.显示记录列.length < 10 + count) {
|
|
|
if (_this.显示记录列.length < _this.inventoryMissions.length) {
|
|
|
- _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length])//注意push原数组下标为当前新数组长度
|
|
|
+ _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length])
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -1084,7 +1131,6 @@
|
|
|
_this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
|
|
|
_this.清空指定盘点记录列();
|
|
|
}
|
|
|
- //
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
@@ -1680,6 +1726,8 @@
|
|
|
case 'increasing': data.commitGoodsOnIncreasingMode();break;
|
|
|
case 'multiIncreasing': data.commitGoodsOnMultiIncreasingMode();break;
|
|
|
}
|
|
|
+ //$('#amount').focus();
|
|
|
+ //$(document).off('keypress');
|
|
|
}
|
|
|
});
|
|
|
},
|