|
@ -74,6 +74,9 @@ |
|
|
:apiDelete="InventorymoveRequestDetailApi.deleteInventorymoveRequestDetail" |
|
|
:apiDelete="InventorymoveRequestDetailApi.deleteInventorymoveRequestDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@detailOpenForm="detailOpenForm" |
|
|
@detailOpenForm="detailOpenForm" |
|
|
|
|
|
:detailButtonIsShowAdd="false" |
|
|
|
|
|
:detailButtonIsShowEdit="false" |
|
|
|
|
|
:detailButtonIsShowDelete="false" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
@ -339,6 +342,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
locationCode: val[0][searchField] |
|
|
locationCode: val[0][searchField] |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
toManagementPrecision.value = res[0].ManagementPrecision |
|
|
toManagementPrecision.value = res[0].ManagementPrecision |
|
|
|
|
|
row.toManagementPrecision = toManagementPrecision.value |
|
|
}) |
|
|
}) |
|
|
if (toManagementPrecision.value == 'BY_BATCH') { |
|
|
if (toManagementPrecision.value == 'BY_BATCH') { |
|
|
if(row['fromBatch']==''){ |
|
|
if(row['fromBatch']==''){ |
|
@ -568,7 +572,24 @@ const buttonTableClick = async (val, row) => { |
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
|
|
|
if (type == 'create') { |
|
|
|
|
|
InventorymoveRequestMain.allSchemas.formSchema.forEach(item=>{ |
|
|
|
|
|
if(item.field == 'fromWarehouseCode'){ |
|
|
|
|
|
item.componentProps.enterSearch = true |
|
|
|
|
|
item.componentProps.isSearchList = true |
|
|
|
|
|
item.componentProps.disabled = false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
InventorymoveRequestMain.allSchemas.formSchema.forEach(item=>{ |
|
|
|
|
|
if(item.field == 'fromWarehouseCode'){ |
|
|
|
|
|
item.componentProps.enterSearch = false |
|
|
|
|
|
item.componentProps.isSearchList = false |
|
|
|
|
|
item.componentProps.disabled = true |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
@ -704,10 +725,10 @@ const submitForm = async (formType, submitData) => { |
|
|
message.warning('从库位和到库位不能相同') |
|
|
message.warning('从库位和到库位不能相同') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
let batchList = tableData.value.filter(item=>item.toBatchFormItemType&&item.toBatchFormItemType == 'FormDate') |
|
|
let batchList = tableData.value.filter(item=>item.fromBatchFormItemType&&item.fromBatchFormItemType == 'FormDate' && item.toManagementPrecision == 'BY_BATCH') |
|
|
let noBatch = batchList.some(item => !item.toBatch) |
|
|
let noBatch = batchList.find(item => !item.fromBatch) |
|
|
if(noBatch){ |
|
|
if(noBatch){ |
|
|
message.warning('请选择到批次') |
|
|
message.warning(`${noBatch.itemCode}没有填写批次,请填写`) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|