|
@ -88,26 +88,24 @@ |
|
|
subList: [], //接口返回的任务subList |
|
|
subList: [], //接口返回的任务subList |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
toLocationCode: "", |
|
|
toLocationCode: "", |
|
|
toLocationInfo: {}, |
|
|
|
|
|
businessTypeInfo: {}, |
|
|
businessTypeInfo: {}, |
|
|
locationTypeList: [], |
|
|
managementList: [], |
|
|
managementList: [] |
|
|
tolocationTypeList:[] |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
|
this.id = option.id; |
|
|
this.id = option.id; |
|
|
if (this.id != undefined) { |
|
|
if (this.id != undefined) { |
|
|
// //新建的任务自动接收 |
|
|
// //新建的任务自动接收 |
|
|
// if (option.status == "JOB_PENDING") { |
|
|
if (option.status == "1") { |
|
|
// this.receive((callback => { |
|
|
this.receive((callback => { |
|
|
// this.received = true; |
|
|
this.received = true; |
|
|
// this.getDetail(); |
|
|
this.getDetail(); |
|
|
// })); |
|
|
})); |
|
|
// } else { |
|
|
} else { |
|
|
// this.getDetail(); |
|
|
|
|
|
// } |
|
|
|
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
//返回首页 |
|
|
//返回首页 |
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
@ -179,7 +177,6 @@ |
|
|
that.fromLocationCode = that.subList[0].fromLocationCode |
|
|
that.fromLocationCode = that.subList[0].fromLocationCode |
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) |
|
|
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) |
|
|
that.getLocationInfo(that.toLocationCode); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
that.showMessage('列表数据为0'); |
|
|
that.showMessage('列表数据为0'); |
|
|
} |
|
|
} |
|
@ -191,39 +188,6 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
createItemInfo(res) { |
|
|
|
|
|
let item = { |
|
|
|
|
|
itemCode: res.itemCode, |
|
|
|
|
|
itemName: res.itemName, |
|
|
|
|
|
stdPackQty: res.stdPackQty, |
|
|
|
|
|
stdPackUnit: res.stdPackUnit, |
|
|
|
|
|
qty: res.qty, |
|
|
|
|
|
handleQty: 0, |
|
|
|
|
|
uom: res.uom, |
|
|
|
|
|
subList: [] |
|
|
|
|
|
} |
|
|
|
|
|
return item; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
createDetailInfo(data) { |
|
|
|
|
|
data.scaned = false; |
|
|
|
|
|
// data.record = {}; |
|
|
|
|
|
let detail = data; |
|
|
|
|
|
return detail; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
calcScanCount(closeScan) { |
|
|
|
|
|
let items = this.subList.filter(r => { |
|
|
|
|
|
if (r.scaned) { |
|
|
|
|
|
return r; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.scanCount = items != null ? items.length : 0; |
|
|
|
|
|
if (this.scanCount == this.subList.length) { |
|
|
|
|
|
this.closeScanPopup(); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
calcHandleQty() { |
|
|
calcHandleQty() { |
|
|
calcHandleQty(this.detailSource) |
|
|
calcHandleQty(this.detailSource) |
|
|
this.continueScan() |
|
|
this.continueScan() |
|
@ -296,11 +260,11 @@ |
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
']不一致,是否继续上架?', res => { |
|
|
']不一致,是否继续出库?', res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
itemDetail.handleQty = result.label.qty; |
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
@ -312,8 +276,8 @@ |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
itemDetail.handleQty = result.label.qty; |
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
@ -379,17 +343,17 @@ |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
// transferIssueJobSubmit(this.id, params).then(res => { |
|
|
transferIssueJobSubmit(params).then(res => { |
|
|
// if (res.data) { |
|
|
if (res.data) { |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成调拨发出记录" + res.data.Number ) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成调拨出库记录" + res.data.Number ) |
|
|
// } else { |
|
|
} else { |
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// } |
|
|
} |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// }).catch(error => { |
|
|
}).catch(error => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
// }) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
this.showErrorMessage(res.message); |
|
|
this.showErrorMessage(res.message); |
|
@ -407,6 +371,8 @@ |
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
detail.packingNumber, detail.batch); |
|
|
detail.packingNumber, detail.batch); |
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
|
|
|
detail.toContainerNumber = ''; |
|
|
|
|
|
detail.toLocationCode = this.toLocationCode; |
|
|
detail.toBatch = info.batch; |
|
|
detail.toBatch = info.batch; |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
@ -448,15 +414,6 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getLocationInfo(locationCode) { |
|
|
|
|
|
getBasicLocationByCode(locationCode).then(res => { |
|
|
|
|
|
if (res.data.list.length > 0) { |
|
|
|
|
|
this.toLocationInfo = res.data.list[0] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessage(message) { |
|
|
showMessage(message) { |
|
|
this.$refs.comMessage.showMessage(message, res => { |
|
|
this.$refs.comMessage.showMessage(message, res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|