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