|
|
@@ -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">
|
|
|
@@ -309,7 +315,7 @@
|
|
|
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==='跳过'||inventoryMission.mark==='确认差异'?'0.7':''}" :class="[
|
|
|
+ :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':'',
|
|
|
@@ -419,7 +425,7 @@
|
|
|
<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>
|
|
|
+ @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>
|
|
|
@@ -433,11 +439,12 @@
|
|
|
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':''}"
|
|
|
+ :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':'',
|
|
|
@@ -502,7 +509,7 @@
|
|
|
<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>
|
|
|
+ @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>
|
|
|
@@ -683,6 +690,7 @@
|
|
|
},
|
|
|
beforeMount: function () {
|
|
|
this.重排序并标记全列表类型();
|
|
|
+ this.加载下方数据并置空上方数据()//初始化先调用一次
|
|
|
},
|
|
|
watch: {
|
|
|
checkData: {
|
|
|
@@ -698,9 +706,6 @@
|
|
|
deep: true
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- this.加载下方数据并置空上方数据()//初始化先调用一次
|
|
|
- },
|
|
|
destroyed() {
|
|
|
window.removeEventListener('scroll', this.lazy)
|
|
|
},
|
|
|
@@ -850,7 +855,7 @@
|
|
|
})
|
|
|
} else {
|
|
|
_this.inventoryMissions.map((inventoryMission, index) => {
|
|
|
- if (_this.显示记录列.length < 10 + count) {
|
|
|
+ if (_this.显示记录列.length < 15 + count) {
|
|
|
if (_this.显示记录列.length < _this.inventoryMissions.length) {
|
|
|
_this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length])
|
|
|
}
|
|
|
@@ -964,6 +969,7 @@
|
|
|
_this.selectingId=id;
|
|
|
if(e.key==='Enter'){
|
|
|
this.放置焦点光标至正确位置();
|
|
|
+
|
|
|
let re=true;
|
|
|
_this.提交新增并盘点().then(function(result){
|
|
|
if(!result){
|
|
|
@@ -1137,9 +1143,9 @@
|
|
|
$("#lastStockInventoryRecord").modal('show');
|
|
|
return;
|
|
|
}
|
|
|
- _this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
|
|
|
- _this.清空指定盘点记录列();
|
|
|
}
|
|
|
+ _this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
|
|
|
+ _this.清空指定盘点记录列();
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
@@ -1207,10 +1213,6 @@
|
|
|
_this.已复盘无差异列.push(mission);
|
|
|
mission.mark = '已复盘无差异';
|
|
|
return;
|
|
|
- case '确认差异':
|
|
|
- _this.确认差异列.push(mission);
|
|
|
- mission.mark = '确认差异';
|
|
|
- return;
|
|
|
case '是':
|
|
|
if (parseInt(mission.difference_amount)) {
|
|
|
_this.未复盘有差异列.push(mission);
|
|
|
@@ -1220,6 +1222,10 @@
|
|
|
_this.无差异列.push(mission);
|
|
|
mission.mark = '无差异';
|
|
|
return;
|
|
|
+ case '确认差异':
|
|
|
+ _this.确认差异列.push(mission);
|
|
|
+ mission.mark = '确认差异';
|
|
|
+ return;
|
|
|
case '否':
|
|
|
_this.未盘列.push(mission);
|
|
|
mission.mark = '未盘';
|
|
|
@@ -1245,9 +1251,9 @@
|
|
|
_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.确认差异列);
|
|
|
_this.重推入(_this.inventoryMissions, _this.已复盘无差异列);
|
|
|
_this.重推入(_this.inventoryMissions, _this.无差异列);
|
|
|
_this.重推入(_this.inventoryMissions, _this.跳过列);
|
|
|
@@ -1367,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,
|
|
|
@@ -1388,7 +1392,7 @@
|
|
|
return true
|
|
|
});
|
|
|
}
|
|
|
- _this.重排序并标记全列表类型(_this.inventoryMissions);
|
|
|
+ _this.重排序并显示();
|
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '跳过盘点成功!');
|
|
|
}).catch(function (err) {
|
|
|
@@ -1398,9 +1402,7 @@
|
|
|
},
|
|
|
确认盘点差异(inventoryAccountMissionId, inventoryAccountId, name) {
|
|
|
let _this = this;
|
|
|
- if (!confirm('确定提交商品为:“' + name + '”的盘点差异吗?')) {
|
|
|
- return ;
|
|
|
- }
|
|
|
+ if (!confirm('确定提交商品为:“' + name + '”的盘点差异吗?')) {return ;}
|
|
|
let url = '{{url('inventory/确认盘点差异')}}';
|
|
|
axios.post(url, {
|
|
|
inventoryAccountMissionId: inventoryAccountMissionId,
|
|
|
@@ -1419,7 +1421,7 @@
|
|
|
return true
|
|
|
});
|
|
|
}
|
|
|
- _this.重排序并标记全列表类型(_this.inventoryMissions);
|
|
|
+ _this.重排序并显示();
|
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '提交盘点差异成功!');
|
|
|
}).catch(function (err) {
|
|
|
@@ -1427,6 +1429,39 @@
|
|
|
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;
|
|
|
@@ -1579,6 +1614,9 @@
|
|
|
this.inputs()[key]='';
|
|
|
}
|
|
|
},
|
|
|
+ 清空checkbox(){
|
|
|
+ this.checkData=[];
|
|
|
+ },
|
|
|
不覆盖() {
|
|
|
let _this = this;
|
|
|
_this.清空指定盘点记录列();
|
|
|
@@ -1691,7 +1729,7 @@
|
|
|
delete inventoryMission.commodity;
|
|
|
});
|
|
|
let data = JSON.stringify(this.checkData);
|
|
|
- excelExport(checkAllSign,data,url,this.sum,token);
|
|
|
+ //excelExport(checkAllSign,data,url,this.sum,token);
|
|
|
}
|
|
|
},
|
|
|
//盲收
|