|
@ -95,7 +95,6 @@ |
|
|
managementList: [], |
|
|
managementList: [], |
|
|
fromLocationCode: "", |
|
|
fromLocationCode: "", |
|
|
toLocationCode: "", |
|
|
toLocationCode: "", |
|
|
toLocationInfo: {}, |
|
|
|
|
|
tolocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
@ -103,15 +102,14 @@ |
|
|
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(); |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//返回首页 |
|
|
//返回首页 |
|
@ -173,7 +171,6 @@ |
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes) |
|
|
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes) |
|
|
that.detailSource = getDataSource(that.subList) |
|
|
that.detailSource = getDataSource(that.subList) |
|
|
that.getLocationInfo(that.toLocationCode); |
|
|
|
|
|
updateTitle(this.jobContent.number); |
|
|
updateTitle(this.jobContent.number); |
|
|
} else { |
|
|
} else { |
|
|
that.showMessage('列表数据为0'); |
|
|
that.showMessage('列表数据为0'); |
|
@ -185,16 +182,6 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getLocationInfo(locationCode) { |
|
|
|
|
|
if (locationCode != '') { |
|
|
|
|
|
getBasicLocationByCode(locationCode).then(res => { |
|
|
|
|
|
if (res.data.list.length > 0) { |
|
|
|
|
|
this.toLocationInfo = res.data.list[0] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
calcHandleQty() { |
|
|
calcHandleQty() { |
|
|
calcHandleQty(this.detailSource); |
|
|
calcHandleQty(this.detailSource); |
|
|
this.continueScan() |
|
|
this.continueScan() |
|
@ -247,6 +234,7 @@ |
|
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
try { |
|
|
try { |
|
|
|
|
|
var supplierCode =result.package.supplierCode |
|
|
var packingNumber = result.balance.packingNumber; |
|
|
var packingNumber = result.balance.packingNumber; |
|
|
var batch = result.balance.batch; |
|
|
var batch = result.balance.batch; |
|
|
var qty = result.balance.qty; |
|
|
var qty = result.balance.qty; |
|
@ -278,7 +266,14 @@ |
|
|
']不一致,是否继续上架?', res => { |
|
|
']不一致,是否继续上架?', res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty); |
|
|
itemDetail.supplierCode =supplierCode |
|
|
|
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
|
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
|
|
itemDetail.balance = result.balance; |
|
|
|
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
|
|
|
itemDetail.balance.stdPackQty =result.package.stdPackQty |
|
|
|
|
|
itemDetail.balance.stdPackUnit =result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
} else { |
|
|
} else { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
@ -286,7 +281,14 @@ |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty); |
|
|
itemDetail.supplierCode = supplierCode |
|
|
|
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
|
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
|
|
itemDetail.balance = result.balance; |
|
|
|
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
|
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
|
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -376,23 +378,24 @@ |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
console.log("提交参数",JSON.stringify(params)); |
|
|
console.log("提交参数",JSON.stringify(params)); |
|
|
|
|
|
|
|
|
// productionReceiptJobSubmit(params).then(res => { |
|
|
productionReceiptJobSubmit(params).then(res => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// if (res.data) { |
|
|
if (res.data) { |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成发料接收记录" + res.data) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录" + res.data) |
|
|
// } else { |
|
|
} else { |
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// } |
|
|
} |
|
|
// }).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); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
|
var subList = [] |
|
|
var subList = [] |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
@ -402,8 +405,11 @@ |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
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.toBatch =info.batch; |
|
|
detail.toBatch =info.batch; |
|
|
|
|
|
detail.toContainerNumber = ""; |
|
|
|
|
|
detail.toLocationCode =this.toLocationCode; |
|
|
|
|
|
|
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|