Implement product Excel file import functionality, including new service methods for handling Excel attachments. Update the ProductController to list imported Excel files by product code. Enhance BmsProduct and related entities to store references to the imported Excel files. Update front-end components to support displaying and managing Excel file attachments for products.
This commit is contained in:
@@ -182,7 +182,7 @@ const props = defineProps({
|
||||
buildModeDirty: { type: Boolean, default: false }
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:psvId', 'update:priceBuildMode'])
|
||||
const emit = defineEmits(['update:psvId', 'update:priceBuildMode', 'update:pefId'])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { bms_tax_mode } = useDict('bms_tax_mode')
|
||||
const { hydrateRow } = useDetailCascade(props.refData)
|
||||
@@ -447,6 +447,9 @@ async function runImportAsync(uploadFile) {
|
||||
details: isModifyImport.value ? (props.details || []) : undefined
|
||||
})
|
||||
const data = res.data || {}
|
||||
if (data.pefId != null) {
|
||||
emit('update:pefId', data.pefId)
|
||||
}
|
||||
const products = isModifyImport.value ? (props.products || []) : (data.products || [])
|
||||
applyLocalDraft(products, data.details || [])
|
||||
importProgressPercent.value = 100
|
||||
|
||||
Reference in New Issue
Block a user