fix(intake): replace unsafe cast in sku export empty row builder

adding the optional rowNumber field to NonIntegratedSkuExportRow made the Object.fromEntries cast insufficient for the production build type check; build the empty import row explicitly instead.
This commit is contained in:
WuYongJie 2026-09-04 17:49:31 +08:00
parent f4712cd1a2
commit 4f6510271f

View File

@ -309,9 +309,31 @@ function getFuzzyImportColumnKey(value: string) {
}
function createEmptyImportRow(): NonIntegratedSkuExportRow {
return Object.fromEntries(
NON_INTEGRATED_SKU_TEMPLATE_COLUMNS.map((column) => [column.key, '']),
) as NonIntegratedSkuExportRow
return {
spu: '',
model: '',
skuCode: '',
barcode: '',
setCount: '',
specName: '',
size: '',
color: '',
material: '',
boardMaterialType: '',
versionNo: '',
attributeCode: '',
drawingId: '',
installMethod: '',
executeStandard: '',
nationalStandardCompliant: '',
manufacturer: '',
manufacturerCode: '',
minimumOrderQuantity: '',
salesStatus: '',
batchNo: '',
batchChangeType: '',
dingTalkFlowNo: '',
}
}
export async function parseNonIntegratedSkuWorkbook(