|
|
@ -151,6 +151,11 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
fromInventoryStatus.value = null |
|
|
|
businessType.value = 'InventorymoveRequest' |
|
|
|
console.log(146 , businessType.value) |
|
|
|
}else { |
|
|
|
tableObject.params = { |
|
|
|
fromInventoryStatus: 'OK', |
|
|
|
toInventoryStatus:'SCRAP' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 修改 tableform 属性 |
|
|
@ -186,13 +191,6 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
delete item.tableForm.searchCondition |
|
|
|
} |
|
|
|
} |
|
|
|
if(item.field == "toInventoryStatus"){ |
|
|
|
if (fromInventoryStatus.value) { |
|
|
|
item.tableForm.disabled = true |
|
|
|
} else { |
|
|
|
item.tableForm.disabled = false |
|
|
|
} |
|
|
|
} |
|
|
|
if(item.field == "toLocationCode"){ |
|
|
|
if (toInventoryStatus.value) { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
@ -252,7 +250,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
}else if ( routeName.value == 'ScraptoholdRequestMain') { |
|
|
|
row['toInventoryStatus'] = "HOLD" |
|
|
|
}else{ |
|
|
|
row['toInventoryStatus'] = null |
|
|
|
row['toInventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
} |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
@ -287,7 +285,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
}else if ( routeName.value == 'ScraptoholdRequestMain') { |
|
|
|
setV['toInventoryStatus'] = "HOLD" |
|
|
|
}else{ |
|
|
|
setV['toInventoryStatus'] = null |
|
|
|
setV['toInventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
} |
|
|
|
} else { |
|
|
|
setV[formField] = val[0][searchField] |
|
|
@ -454,7 +452,20 @@ const handleExport = async () => { |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(setSearchParams) |
|
|
|
download.excel(data, '库存转移申请主.xlsx') |
|
|
|
if(routeName.value == 'OktoholdRequestMain'){ |
|
|
|
download.excel(data, '合格转隔离申请主.xlsx') |
|
|
|
}else if ( routeName.value == 'HoldtookRequestMain') { |
|
|
|
download.excel(data, '隔离转合格申请主.xlsx') |
|
|
|
}else if ( routeName.value == 'HoldtoscrapRequestMain') { |
|
|
|
download.excel(data, '隔离转报废申请主.xlsx') |
|
|
|
}else if ( routeName.value == 'OktoscrapRequestMain') { |
|
|
|
download.excel(data, '合格转报废申请主.xlsx') |
|
|
|
}else if ( routeName.value == 'ScraptoholdRequestMain') { |
|
|
|
download.excel(data, '报废转隔离申请主.xlsx') |
|
|
|
}else{ |
|
|
|
download.excel(data, '库存转移申请主.xlsx') |
|
|
|
} |
|
|
|
|
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|