The Oklahoma attorney general and Purdue Pharma have agreed to a $270 million settlement to resolve claims that the company played a major role in creating the nationwide opioid crisis.