|
|
@ -97,14 +97,14 @@ |
|
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
|
fromLocationInfo: {}, |
|
|
|
fromLocationCode: "", |
|
|
|
toLocationCode: "", |
|
|
|
fromlocationTypeList: [], |
|
|
|
tolocationTypeList: [], |
|
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
|
businessType: {}, |
|
|
|
showToLoaction: true, |
|
|
|
recommendLocationList: [] //推荐库位列表 |
|
|
|
recommendLocationList: [], //推荐库位列表 |
|
|
|
fromWarehouseCode: '' //来源仓库 |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
@ -143,12 +143,16 @@ |
|
|
|
return res |
|
|
|
} |
|
|
|
}) |
|
|
|
if (this.fromWarehouseCode == '') { |
|
|
|
this.fromWarehouseCode = balance.warehouseCode; |
|
|
|
} |
|
|
|
if (item == undefined) { |
|
|
|
// 获取推荐库位 |
|
|
|
this.getRecommendLocation(balance, pack, toLocationCode => { |
|
|
|
this.getRecommendLocation(balance, pack, toLocation => { |
|
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
|
newDetail.toLocationCode = toLocationCode; |
|
|
|
newDetail.toLocationCode = toLocation.code; |
|
|
|
newDetail.toWarehouseCode = toLocation.warehouseCode; |
|
|
|
itemp.subList.push(newDetail); |
|
|
|
this.detailSource.push(itemp) |
|
|
|
}) |
|
|
@ -163,9 +167,10 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
if (detail == undefined) { |
|
|
|
this.getRecommendLocation(balance, pack, toLocationCode => { |
|
|
|
this.getRecommendLocation(balance, pack, toLocation => { |
|
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
newDetail.toLocationCode = toLocationCode; |
|
|
|
newDetail.toLocationCode = toLocation.code; |
|
|
|
newDetail.toWarehouseCode = toLocation.warehouseCode; |
|
|
|
item.subList.push(newDetail); |
|
|
|
}); |
|
|
|
} else { |
|
|
@ -193,14 +198,14 @@ |
|
|
|
itemCode: balance.itemCode, |
|
|
|
locationCode: res.data.code |
|
|
|
}) |
|
|
|
callback(res.data.code); |
|
|
|
callback(res.data); |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
callback(recommend.locationCode); |
|
|
|
callback(recommend); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -262,19 +267,17 @@ |
|
|
|
this.$refs.scanPopup.getfocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
scanLocationCode(location, code) { |
|
|
|
this.toLocationCode = code |
|
|
|
this.toLocationCode = location; |
|
|
|
// scanLocationCode(location, code) { |
|
|
|
// this.toLocationCode = code |
|
|
|
// this.toLocationCode = location; |
|
|
|
|
|
|
|
}, |
|
|
|
// }, |
|
|
|
|
|
|
|
commit() { |
|
|
|
//查询库位零件关系 |
|
|
|
|
|
|
|
// uni.showLoading({ |
|
|
|
// title: "提交中....", |
|
|
|
// mask: true |
|
|
|
// }); |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
//记录有目标库位,需要查询管理模式 |
|
|
|
let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource); |
|
|
@ -301,7 +304,6 @@ |
|
|
|
this.showErrorMessage(res.message); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -337,8 +339,10 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
setRecordParams() { |
|
|
|
var subList = [] |
|
|
|
this.dataContent.creator = creator; |
|
|
|
this.dataContent.fromWarehouseCode = this.fromWarehouseCode; |
|
|
|
var creator = this.$store.state.user.id |
|
|
|
var subList = [] |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
if (detail.scaned) { |
|
|
@ -354,8 +358,11 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if (subList.length > 0) { |
|
|
|
this.dataContent.toWarehouseCode = subList[0].toWarehouseCode; |
|
|
|
} |
|
|
|
this.dataContent.subList = subList |
|
|
|
this.dataContent.creator = creator; |
|
|
|
debugger; |
|
|
|
return this.dataContent; |
|
|
|
}, |
|
|
|
|
|
|
@ -404,8 +411,7 @@ |
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
this.fromLocationCode = ''; |
|
|
|
|
|
|
|
this.clear(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
@ -417,6 +423,14 @@ |
|
|
|
this.detailSource.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
clear() { |
|
|
|
this.fromLocationInfo = {}; |
|
|
|
this.fromLocationCode = ''; |
|
|
|
this.fromWarehouseCode = ''; |
|
|
|
this.toWarehouseCode = ''; |
|
|
|
this.detailSource = []; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|