feat: 导入物料明细时可默认批次号
This commit is contained in:
parent
c4539260a8
commit
f82db7bb6f
|
@ -145,6 +145,10 @@ def daoru_mioitems(path:str, mio:MIO):
|
||||||
material = Material.objects.get(number=material_number)
|
material = Material.objects.get(number=material_number)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ParseError(f"未找到物料:{material_number} {e}")
|
raise ParseError(f"未找到物料:{material_number} {e}")
|
||||||
|
if not batch and material.bin_number_main:
|
||||||
|
batch = material.bin_number_main
|
||||||
|
else:
|
||||||
|
raise ParseError(f"第{ind}行批次为空")
|
||||||
count = sheet[f"c{ind}"].value
|
count = sheet[f"c{ind}"].value
|
||||||
warehouse_name = sheet[f"d{ind}"].value
|
warehouse_name = sheet[f"d{ind}"].value
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue