|
@ -97,14 +97,14 @@ |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
fromLocationInfo: {}, |
|
|
fromLocationInfo: {}, |
|
|
fromLocationCode: "", |
|
|
fromLocationCode: "", |
|
|
toLocationCode: "", |
|
|
|
|
|
fromlocationTypeList: [], |
|
|
fromlocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
businessType: {}, |
|
|
businessType: {}, |
|
|
showToLoaction: true, |
|
|
showToLoaction: true, |
|
|
recommendLocationList: [] //推荐库位列表 |
|
|
recommendLocationList: [], //推荐库位列表 |
|
|
|
|
|
fromWarehouseCode: '' //来源仓库 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -143,12 +143,16 @@ |
|
|
return res |
|
|
return res |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (this.fromWarehouseCode == '') { |
|
|
|
|
|
this.fromWarehouseCode = balance.warehouseCode; |
|
|
|
|
|
} |
|
|
if (item == undefined) { |
|
|
if (item == undefined) { |
|
|
// 获取推荐库位 |
|
|
// 获取推荐库位 |
|
|
this.getRecommendLocation(balance, pack, toLocationCode => { |
|
|
this.getRecommendLocation(balance, pack, toLocation => { |
|
|
var itemp = createItemInfo(balance, pack); |
|
|
var itemp = createItemInfo(balance, pack); |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
newDetail.toLocationCode = toLocationCode; |
|
|
newDetail.toLocationCode = toLocation.code; |
|
|
|
|
|
newDetail.toWarehouseCode = toLocation.warehouseCode; |
|
|
itemp.subList.push(newDetail); |
|
|
itemp.subList.push(newDetail); |
|
|
this.detailSource.push(itemp) |
|
|
this.detailSource.push(itemp) |
|
|
}) |
|
|
}) |
|
@ -163,8 +167,12 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
this.getRecommendLocation(balance, pack, toLocation => { |
|
|
item.subList.push(newDetail); |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
|
|
newDetail.toLocationCode = toLocation.code; |
|
|
|
|
|
newDetail.toWarehouseCode = toLocation.warehouseCode; |
|
|
|
|
|
item.subList.push(newDetail); |
|
|
|
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
if (detail.scaned == true) { |
|
|
if (detail.scaned == true) { |
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") |
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") |
|
@ -190,14 +198,14 @@ |
|
|
itemCode: balance.itemCode, |
|
|
itemCode: balance.itemCode, |
|
|
locationCode: res.data.code |
|
|
locationCode: res.data.code |
|
|
}) |
|
|
}) |
|
|
callback(res.data.code); |
|
|
callback(res.data); |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
callback(recommend.locationCode); |
|
|
callback(recommend); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -259,27 +267,25 @@ |
|
|
this.$refs.scanPopup.getfocus(); |
|
|
this.$refs.scanPopup.getfocus(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
scanLocationCode(location, code) { |
|
|
// scanLocationCode(location, code) { |
|
|
this.toLocationCode = code |
|
|
// this.toLocationCode = code |
|
|
this.toLocationCode = location; |
|
|
// this.toLocationCode = location; |
|
|
|
|
|
|
|
|
}, |
|
|
// }, |
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
//查询库位零件关系 |
|
|
uni.showLoading({ |
|
|
|
|
|
title: "提交中....", |
|
|
// uni.showLoading({ |
|
|
mask: true |
|
|
// title: "提交中....", |
|
|
}); |
|
|
// mask: true |
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
//记录有目标库位,需要查询管理模式 |
|
|
//记录有目标库位,需要查询管理模式 |
|
|
let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource); |
|
|
let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource); |
|
|
//2:获取管理模式,封装参数 |
|
|
//2:获取管理模式,封装参数 |
|
|
getPrecisionStrategyList(precisionStrategyParams, this.toLocationCode, res => { |
|
|
getPrecisionStrategyList(precisionStrategyParams, res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.managementList = res.list; |
|
|
this.managementList = res.list; |
|
|
var params = this.setRecordParams(true) |
|
|
var params = this.setRecordParams() |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
putawayRecordSubmit(params).then(res => { |
|
|
putawayRecordSubmit(params).then(res => { |
|
@ -298,7 +304,6 @@ |
|
|
this.showErrorMessage(res.message); |
|
|
this.showErrorMessage(res.message); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -333,14 +338,16 @@ |
|
|
return itemList; |
|
|
return itemList; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setRecordParams(queryModel) { |
|
|
setRecordParams() { |
|
|
var subList = [] |
|
|
this.dataContent.creator = creator; |
|
|
|
|
|
this.dataContent.fromWarehouseCode = this.fromWarehouseCode; |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
|
|
|
|
var subList = [] |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
|
|
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
|
|
detail.packingNumber, detail.batch); |
|
|
detail.packingNumber, detail.toLocationCode, detail.batch); |
|
|
detail.toPackingNumber = info.packingNumber;; |
|
|
detail.toPackingNumber = info.packingNumber;; |
|
|
detail.toContainerNumber = detail.containerNumber |
|
|
detail.toContainerNumber = detail.containerNumber |
|
|
detail.toBatch = info.batch; |
|
|
detail.toBatch = info.batch; |
|
@ -351,8 +358,11 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (subList.length > 0) { |
|
|
|
|
|
this.dataContent.toWarehouseCode = subList[0].toWarehouseCode; |
|
|
|
|
|
} |
|
|
this.dataContent.subList = subList |
|
|
this.dataContent.subList = subList |
|
|
this.dataContent.creator = creator; |
|
|
debugger; |
|
|
return this.dataContent; |
|
|
return this.dataContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -401,8 +411,7 @@ |
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.fromLocationCode = ''; |
|
|
this.clear(); |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -414,6 +423,14 @@ |
|
|
this.detailSource.splice(i, 1) |
|
|
this.detailSource.splice(i, 1) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
clear() { |
|
|
|
|
|
this.fromLocationInfo = {}; |
|
|
|
|
|
this.fromLocationCode = ''; |
|
|
|
|
|
this.fromWarehouseCode = ''; |
|
|
|
|
|
this.toWarehouseCode = ''; |
|
|
|
|
|
this.detailSource = []; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|