On the barcode component properties, beside the barcode pattern configuration, click on the dataset icon with the magnifying glass. make sure that the GS1-241, GS1-10, and GS1-37 keys are all enabled.

Also, you don’t need the if statements in your code if the key parses using the Regex pattern correctly.
print result
txtPartNumber = result['GS1-241'][0]
txtLotNumber = result['GS1-10'][0]
numQty = result['GS1-37'][0]
event.source.parent.getComponent('txtPartNumber').text = txtPartNumber
event.source.parent.getComponent('txtLotNumber').text = txtLotNumber
event.source.parent.getComponent('numQty').int = numQty