Commit 8303e884 authored by jingnan's avatar jingnan 👀

退库管理增加试飞退库

parent dd13a4eb
......@@ -69,6 +69,8 @@ export default {
this.cmpOptions = { typeName: 'ErpInventory', layKey: 'InventoryBackAddItemLs' }
} else if (val === 'MatchStockBackRequest' || val === 'InternalStockBackRequest') {
this.cmpOptions = { typeName: 'JobResponseSorting', layKey: 'add_MatchStockBackRequestItem' }
} else if (val === 'RetirementTestFlyBack') {
this.cmpOptions = { typeName: 'JobResponseOutStorageMatch', layKey: 'add_InStorageBackItem_testFlight' }
}
}
}
......@@ -92,7 +94,7 @@ export default {
let aoNo = ''
if (valid && this.selection) {
let responseName = ''
if (this.hasTop) { // 库内退库/配套退库
if (this.hasTop) { // 库内退库(线边库退库)/配套退库
maxAmount = this.$utils.subNum(this.selection.outsideAmount, -this.selection.backedAmount, -this.selection.backAmount, scrapCount)
aoNo = (typeof this.basicData.extProcessPlan === 'string' && this.basicData.extProcessPlan.includes('+') ? this.basicData.extProcessPlan.split('+')[0] : this.basicData.extProcessPlan.serialNumber) || this.basicData.aoPlan
inventoryData = this.selection.erpInventory
......@@ -103,10 +105,14 @@ export default {
} else {
responseName = 'jobResponseSorting'
}
} else if (this.basicData.subTypeName === 'InventoryStockBackRequest') { // 台账退库
} else if (this.basicData.subTypeName === 'InventoryStockBackRequest') { // 台账退库(ERP退库)
maxAmount = this.selection.usableAmount
inventoryData = this.selection
responseName = 'erpInventory'
} else if (this.basicData.subTypeName === 'RetirementTestFlyBack') { // 试飞退库
maxAmount = this.selection.outsideAmount
inventoryData = this.selection.inventory
responseName = 'oldOutStorage'
}
if (this.applyForm.reqAmount > maxAmount) return this.$utils.showMessageWarning(`当前选中物料的退库数量不足!`)
const data = [{
......@@ -114,15 +120,15 @@ export default {
'material': inventoryData.extMaterial,
'materialId': inventoryData.extMaterialId,
'testNo': inventoryData.testNo,
'batchNo': this.selection.batchNumber,
'serialNo': this.selection.serialNo,
'batchNo': this.basicData.subTypeName === 'RetirementTestFlyBack' ? inventoryData.lotNo : this.selection.batchNumber,
'serialNo': this.basicData.subTypeName === 'RetirementTestFlyBack' ? inventoryData.serno : this.selection.serialNo,
'uniqueId': this.selection.id,
'backAmount': this.selection.backAmount || 0,
'scrapCount': this.selection.scrapCount || 0,
'backedAmount': this.selection.backedAmount || 0,
'outsideAmount': this.selection.outsideAmount || 0,
'reqAmount': this.applyForm.reqAmount,
'unit': this.selection.unit,
'unit': this.basicData.subTypeName === 'RetirementTestFlyBack' ? inventoryData.extUnit.unitName : this.selection.unit,
'reqNo': this.selection.reqNo || '',
'aoPlan': aoNo,
'mdsItemCode': inventoryData.extMaterial.resCode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment