feat: add quantity input for manual stock selection
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
@ -77,6 +77,17 @@
|
||||
<el-table-column prop="name" label="名称" />
|
||||
<el-table-column prop="standard" label="规格" />
|
||||
<el-table-column prop="available_quantity" label="可用库存" />
|
||||
<el-table-column label="本次出库" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-model="row.export_quantity"
|
||||
:min="1"
|
||||
:max="row.available_quantity"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<el-button @click="manualDialogVisible = false">取消</el-button>
|
||||
@ -150,7 +161,8 @@ const openManualSelect = async () => {
|
||||
...i,
|
||||
name: i.name || i.material_name || i.product_name,
|
||||
standard: i.standard || i.spec_model,
|
||||
uniqueKey: i.id + '_' + i.type
|
||||
uniqueKey: i.id + '_' + i.type,
|
||||
export_quantity: 1
|
||||
}))
|
||||
filteredStockData.value = allStockData.value
|
||||
}
|
||||
@ -169,7 +181,6 @@ const confirmManualAdd = () => {
|
||||
const newItems = tempSelection.value.filter(item =>
|
||||
!selectedItems.value.find(existing => existing.uniqueKey === item.uniqueKey)
|
||||
)
|
||||
newItems.forEach(i => i.export_quantity = 1)
|
||||
selectedItems.value.push(...newItems)
|
||||
manualDialogVisible.value = false
|
||||
tempSelection.value = []
|
||||
|
||||
Reference in New Issue
Block a user