|
|
@ -42,6 +42,8 @@ |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
:isOpenSearchTable="true" |
|
|
|
fieldTableColumn="fromPackingNumber" |
|
|
|
@success="getList" |
|
|
|
:rules="InventorymoveRequestMainRules" |
|
|
|
:formAllSchemas="InventorymoveRequestMain.allSchemas" |
|
|
@ -329,26 +331,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
nextTick(() => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
if(formField == 'fromPackingNumber'){ |
|
|
|
row['fromPackingNumber'] = val[0]['packingNumber'] |
|
|
|
row['fromContainerNumber'] = val[0]['containerNumber'] |
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
row['fromBatch'] = val[0]['batch'] |
|
|
|
row['fromInventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
row['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
|
|
|
|
val.forEach(item=>{ |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow['fromPackingNumber'] = item['packingNumber'] |
|
|
|
newRow['fromContainerNumber'] = item['containerNumber'] |
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
newRow['fromBatch'] = item['batch'] |
|
|
|
newRow['fromInventoryStatus'] = item['inventoryStatus'] |
|
|
|
newRow['fromLocationCode'] = item['locationCode'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
if(routeName.value == 'OktoholdRequestMain'){ |
|
|
|
row['toInventoryStatus'] = "HOLD" |
|
|
|
newRow['toInventoryStatus'] = "HOLD" |
|
|
|
}else if ( routeName.value == 'HoldtookRequestMain') { |
|
|
|
row['toInventoryStatus'] = "OK" |
|
|
|
newRow['toInventoryStatus'] = "OK" |
|
|
|
}else if ( routeName.value == 'HoldtoscrapRequestMain') { |
|
|
|
row['toInventoryStatus'] = "SCRAP" |
|
|
|
newRow['toInventoryStatus'] = "SCRAP" |
|
|
|
}else if ( routeName.value == 'OktoscrapRequestMain') { |
|
|
|
row['toInventoryStatus'] = "SCRAP" |
|
|
|
newRow['toInventoryStatus'] = "SCRAP" |
|
|
|
}else if ( routeName.value == 'ScraptoholdRequestMain') { |
|
|
|
row['toInventoryStatus'] = "HOLD" |
|
|
|
newRow['toInventoryStatus'] = "HOLD" |
|
|
|
}else{ |
|
|
|
row['toInventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
newRow['toInventoryStatus'] = item['inventoryStatus'] |
|
|
|
} |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|