|
|
@@ -309,10 +309,11 @@
|
|
|
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="[
|
|
|
+ :style="{'opacity': inventoryMission.mark==='跳过'||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':'',
|
|
|
@@ -324,11 +325,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">
|
|
|
@@ -343,22 +344,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>
|
|
|
@@ -381,10 +382,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"
|
|
|
@@ -395,28 +396,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-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>
|
|
|
@@ -448,12 +451,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"
|
|
|
@@ -464,11 +467,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">
|
|
|
@@ -498,6 +501,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>
|
|
|
@@ -673,7 +678,8 @@
|
|
|
scanEndInputted:false,binDisable:false,barcodeDisable:true,amountDisable:false,
|
|
|
},
|
|
|
goodses:[],//{barcode,amount,bin,produce_date,valid_date,batch_number}
|
|
|
- 向下加载时浏览器底部位置:'',
|
|
|
+ // 加载后盒子底部位置:'',
|
|
|
+ // 加载前盒子底部位置:'',
|
|
|
},
|
|
|
beforeMount: function () {
|
|
|
this.重排序并标记全列表类型();
|
|
|
@@ -767,7 +773,7 @@
|
|
|
},
|
|
|
methods:{
|
|
|
lazy(){
|
|
|
- //可视区域高度
|
|
|
+ //可视区域高度(浏览器页面的高度)
|
|
|
let height=window.innerHeight;
|
|
|
//滚动区域高度
|
|
|
let scrollHeight = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
@@ -777,16 +783,14 @@
|
|
|
//懒加载盒子高度+懒加载盒子距离顶部位置=计算出盒子底部的距离
|
|
|
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);
|
|
|
+ _this.加载下方数据并置空上方数据();
|
|
|
}
|
|
|
}
|
|
|
if (box_bottomPc===0&&count >= box_bottom) {//移动端下划加载
|
|
|
if (_this.显示记录列.length < _this.inventoryMissions.length) {
|
|
|
- _this.加载下方数据并置空上方数据(count)
|
|
|
+ _this.加载下方数据并置空上方数据()
|
|
|
}
|
|
|
}
|
|
|
// 窗口高,滚动条位置,页面长度,追加数据长度
|
|
|
@@ -820,32 +824,30 @@
|
|
|
//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);
|
|
|
- })
|
|
|
- },
|
|
|
- 加载下方数据并置空上方数据(height){
|
|
|
+ // 清理上方数据(){
|
|
|
+ //
|
|
|
+ // },
|
|
|
+ // 清理下方数据(去除空对象的显示数据列){
|
|
|
+ // 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.显示记录列.splice(_this.显示记录列.length-30,1);
|
|
|
+ //_this.显示记录列.unshift({});
|
|
|
_this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length]);
|
|
|
- _this.向下加载时浏览器底部位置 = height;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- console.log('加载',_this.显示记录列.length)
|
|
|
} else {
|
|
|
_this.inventoryMissions.map((inventoryMission, index) => {
|
|
|
if (_this.显示记录列.length < 10 + count) {
|
|
|
@@ -854,7 +856,6 @@
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- console.log('初始',_this.显示记录列.length)
|
|
|
}
|
|
|
},
|
|
|
cloneBlueTrDom($appointInventoryList) {
|
|
|
@@ -1188,6 +1189,7 @@
|
|
|
_this.已复盘有差异列 = [];
|
|
|
_this.未复盘有差异列 = [];
|
|
|
_this.已复盘无差异列 = [];
|
|
|
+ _this.确认差异列=[];
|
|
|
_this.无差异列 = [];
|
|
|
_this.未盘列 = [];
|
|
|
_this.跳过列 = [];
|
|
|
@@ -1205,6 +1207,10 @@
|
|
|
_this.已复盘无差异列.push(mission);
|
|
|
mission.mark = '已复盘无差异';
|
|
|
return;
|
|
|
+ case '确认差异':
|
|
|
+ _this.确认差异列.push(mission);
|
|
|
+ mission.mark = '确认差异';
|
|
|
+ return;
|
|
|
case '是':
|
|
|
if (parseInt(mission.difference_amount)) {
|
|
|
_this.未复盘有差异列.push(mission);
|
|
|
@@ -1228,18 +1234,18 @@
|
|
|
_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.确认差异列);
|
|
|
_this.重推入(_this.inventoryMissions, _this.未盘分隔列2);
|
|
|
_this.重推入(_this.inventoryMissions, _this.未盘分隔列1);
|
|
|
_this.重推入(_this.inventoryMissions, _this.已复盘无差异列);
|
|
|
@@ -1390,6 +1396,37 @@
|
|
|
tempTip.show('跳过盘点记录失败,网络链接错误!' + err);
|
|
|
});
|
|
|
},
|
|
|
+ 确认盘点差异(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.重排序并标记全列表类型(_this.inventoryMissions);
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '提交盘点差异成功!');
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('提交盘点差异记录失败,网络链接错误!' + err);
|
|
|
+ });
|
|
|
+ },
|
|
|
完结盘点任务(id, owner_name, type) {
|
|
|
if (!confirm('确定完结货主为:“' + owner_name + '”的“' + type + '”任务吗?')) {
|
|
|
return;
|