|
|
|
@ -387,7 +387,9 @@ export default { |
|
|
|
printData: {}, |
|
|
|
partNo:"", // 物料编码 |
|
|
|
transactionId:"", // 关联单号 |
|
|
|
accountingId:"", // 会计科目 |
|
|
|
quantity:"", // 本次退料数量 |
|
|
|
qtyReversed:0, // 已退料数量 |
|
|
|
batchNo:"", // 批次号 |
|
|
|
printLabelList: [], |
|
|
|
// 编辑弹框相关 |
|
|
|
@ -400,6 +402,7 @@ export default { |
|
|
|
}, |
|
|
|
editIndex: -1, // 当前编辑的标签索引 |
|
|
|
unissureQty:0, // 需求数量 |
|
|
|
itemNo:'', // 物料ID |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -435,6 +438,8 @@ export default { |
|
|
|
orderNo: this.orderNo, |
|
|
|
orderType: this.orderType, |
|
|
|
site: this.$store.state.user.site, |
|
|
|
batchNo: this.batchNo, |
|
|
|
componentPartNo: this.partNo, |
|
|
|
}; |
|
|
|
|
|
|
|
// 模拟生产退料标签验证 |
|
|
|
@ -454,9 +459,11 @@ export default { |
|
|
|
id: Date.now(), |
|
|
|
labelCode: labelCode, |
|
|
|
partNo: data.labelInfo.partNo, |
|
|
|
quantity: data.labelInfo.quantity, |
|
|
|
quantity: data.labelInfo.availableQty, |
|
|
|
batchNo: data.labelInfo.batchNo, |
|
|
|
returnReason: data.labelInfo.returnReason, |
|
|
|
locationId: data.labelInfo.locationId , |
|
|
|
warehouseId: data.labelInfo.warehouseId , |
|
|
|
}); |
|
|
|
|
|
|
|
this.$message.success("操作成功"); |
|
|
|
@ -556,20 +563,31 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.returnReason) { |
|
|
|
/* if (!this.returnReason) { |
|
|
|
this.$message.warning("请选择退料原因"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} */ |
|
|
|
|
|
|
|
const returnParams = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
orderNo: this.orderNo, |
|
|
|
workOrderNo: this.orderNo, |
|
|
|
orderType: this.orderType, |
|
|
|
labels: this.labelList.map((label) => ({ |
|
|
|
batchNo: this.batchNo, |
|
|
|
componentPartNo: this.partNo, |
|
|
|
warehouseId: '1', |
|
|
|
transactionId: this.transactionId, |
|
|
|
accountingId:this.accountingId, |
|
|
|
itemNo:this.itemNo, |
|
|
|
ifsReversedQty:this.qtyReversed, |
|
|
|
issueQty: this.quantity, |
|
|
|
// 退料标签列表 |
|
|
|
selectedMaterials: this.labelList.map((label) => ({ |
|
|
|
labelCode: label.labelCode, |
|
|
|
quantity: label.quantity, |
|
|
|
issueQty: label.quantity, |
|
|
|
batchNo: label.batchNo, |
|
|
|
partNo: label.partNo, |
|
|
|
locationId: label.locationId, |
|
|
|
wdrNo: label.wdrNo || '*', |
|
|
|
})), |
|
|
|
}; |
|
|
|
|
|
|
|
@ -792,14 +810,18 @@ export default { |
|
|
|
|
|
|
|
mounted() { |
|
|
|
// 获取路由参数 |
|
|
|
this.orderNo = this.$route.params.orderNo; |
|
|
|
this.orderType = this.$route.params.orderType || "workOrder"; |
|
|
|
this.partNo = this.$route.params.partNo |
|
|
|
this.transactionId = this.$route.params.transactionId |
|
|
|
this.quantity = this.$route.params.quantity |
|
|
|
this.batchNo = this.$route.params.batchNo |
|
|
|
this.unissureQty = this.$route.params.unissureQty |
|
|
|
console.log("订单号:", this.orderNo, "订单类型:", this.orderType,"物料编码:",this.partNo); |
|
|
|
console.log("路由参数:", this.$route.params.material); |
|
|
|
|
|
|
|
this.orderNo = this.$route.params.workOrderNo; |
|
|
|
this.orderType = this.$route.params.material.orderType || "workOrder"; |
|
|
|
this.partNo = this.$route.params.material.partNo |
|
|
|
this.transactionId = this.$route.params.material.ifsTransactionID |
|
|
|
this.accountingId = this.$route.params.material.ifsAccountingID |
|
|
|
this.quantity = this.$route.params.material.quantity |
|
|
|
this.batchNo = this.$route.params.material.batchNo |
|
|
|
this.unissureQty = this.$route.params.material.unissureQty |
|
|
|
this.itemNo = this.$route.params.material.itemNo |
|
|
|
this.qtyReversed= this.$route.params.material.qtyReversedBy || 0 |
|
|
|
|
|
|
|
if (!this.orderNo) { |
|
|
|
this.$message.error("参数错误"); |
|
|
|
|