|
|
@ -9,6 +9,7 @@ |
|
|
|
</view> |
|
|
|
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
@ -63,7 +64,7 @@ |
|
|
|
navigateBack, |
|
|
|
getCurrDateTime, |
|
|
|
getPackingNumberAndBatchByList, |
|
|
|
getInventoryStatusName |
|
|
|
getInventoryStatusName, |
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
@ -77,7 +78,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'returnDetail', |
|
|
|
name: 'inventoryMoveDetail', |
|
|
|
components: { |
|
|
|
winScanButton, |
|
|
|
winScanPack, |
|
|
@ -99,11 +100,18 @@ |
|
|
|
toLocationInfo: {}, |
|
|
|
businessTypeInfo: {}, |
|
|
|
locationTypeList: [], |
|
|
|
managementList: [] |
|
|
|
managementList: [], |
|
|
|
businessTypeCode: '', |
|
|
|
toLocationCode: '', |
|
|
|
toinventoryStatus: '' |
|
|
|
}; |
|
|
|
}, |
|
|
|
props: { |
|
|
|
|
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
this.id = option.id; |
|
|
|
this.businessTypeCode = option.businessTypeCode; |
|
|
|
if (this.id != undefined) { |
|
|
|
// //新建的任务自动接收 |
|
|
|
if (option.status == "1") { |
|
|
@ -114,6 +122,7 @@ |
|
|
|
} else { |
|
|
|
this.getDetail(); |
|
|
|
} |
|
|
|
this.initData(); |
|
|
|
} |
|
|
|
}, |
|
|
|
//返回首页 |
|
|
@ -151,6 +160,38 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
initData() { |
|
|
|
var name = "" |
|
|
|
if (this.businessTypeCode == "Move") { |
|
|
|
name = "库存转移"; |
|
|
|
} else if (this.businessTypeCode == "HoldToOk") { |
|
|
|
name = "隔离转合格"; |
|
|
|
this.toLocationCode = ''; |
|
|
|
this.toinventoryStatus = 'Ok'; |
|
|
|
} else if (this.businessTypeCode == "HoldToScrap") { |
|
|
|
name = "隔离转报废"; |
|
|
|
this.toLocationCode = 'Scrap'; |
|
|
|
this.toinventoryStatus = 'Scrap'; |
|
|
|
} else if (this.businessTypeCode == "OkToHold") { |
|
|
|
name = "合格转隔离"; |
|
|
|
this.toLocationCode = 'Hold'; |
|
|
|
this.toinventoryStatus = 'Hold'; |
|
|
|
} else if (this.businessTypeCode == "OktoScrap") { |
|
|
|
name = "合格转报废"; |
|
|
|
this.toLocationCode = 'Scrap'; |
|
|
|
this.toinventoryStatus = 'Scrap'; |
|
|
|
} else if (this.businessTypeCode == "ScrapToHold") { |
|
|
|
name = "报废转隔离"; |
|
|
|
this.toLocationCode = 'Hold'; |
|
|
|
this.toinventoryStatus = 'Hold'; |
|
|
|
} |
|
|
|
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: name + '详情' |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//接收 |
|
|
|
receive(callback) { |
|
|
|
uni.showLoading({ |
|
|
@ -209,7 +250,6 @@ |
|
|
|
this.$refs.jobDetailPopup.openPopup(item) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
updateData() { |
|
|
|
this.calcHandleQty(); |
|
|
|
}, |
|
|
@ -273,7 +313,7 @@ |
|
|
|
if (res) { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
itemDetail.fromInventoryStatus = result.balance.inventoryStatus; |
|
|
|
itemDetail.balance = result.balance; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
@ -293,7 +333,7 @@ |
|
|
|
} else { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
itemDetail.fromInventoryStatus = result.balance.inventoryStatus; |
|
|
|
itemDetail.balance = result.balance; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
@ -344,14 +384,14 @@ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//查询管理模式 |
|
|
|
this.managementList = []; |
|
|
|
var precisionStrategParams = this.setPrecisionStrategParams() |
|
|
|
getPrecisionStrategyList(precisionStrategParams, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
|
|
|
|
|
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
inventoryMoveSubmit(params).then(res => { |
|
|
@ -373,27 +413,27 @@ |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
setPrecisionStrategParams(){ |
|
|
|
|
|
|
|
setPrecisionStrategParams() { |
|
|
|
var itemList = [] |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
if (detail.scaned) { |
|
|
|
var filterResult = itemList.filter(res => { |
|
|
|
if (res.itemCode == item.itemCode |
|
|
|
&&res.locationCode == detail.toLocationCode) { |
|
|
|
if (res.itemCode == item.itemCode && |
|
|
|
res.locationCode == detail.toLocationCode) { |
|
|
|
return res |
|
|
|
} |
|
|
|
}) |
|
|
|
//去掉重复元素 |
|
|
|
if(filterResult.length==0){ |
|
|
|
if (filterResult.length == 0) { |
|
|
|
var result = { |
|
|
|
itemCode: item.itemCode, |
|
|
|
locationCode: detail.toLocationCode |
|
|
|
} |
|
|
|
itemList.push(result) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -412,8 +452,8 @@ |
|
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
|
detail.toBatch = info.batch; |
|
|
|
detail.toContainerNumber = ''; |
|
|
|
|
|
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
|
// detail.toLocationCode = this.toLocationCode; |
|
|
|
detail.toinventoryStatus=this.toinventoryStatus; |
|
|
|
subList.push(detail) |
|
|
|
} |
|
|
|
}) |
|
|
|