Here's the OED's definition and earliest two quotations:
2.c. Usu. in pl. Dealing, treatment; esp. in phr. fair do's. colloq. (orig. dial.).
1859 T. Hughes Scouring of White Horse vi. 122 Only seemed to want what they called ‘fair doos’.
1862 C. C. Robinson Dial. Leeds & Neighbourhood 282 ‘A shabby dew’, says a man who has had twopence given him for getting a waggon-load of coals in. ‘A fairish dew’, says another who has got a shilling and a lot of victuals away with him for the same.
The other quotations use these spellings: Fair do's, fair do's, fair dos, Fair do,
fair do's. The first of these is from 1941:
1941 L. A. G. Strong Bay 168 Come on, Doctor. Fair do's.
The spellings are usually a variation of the noun do (under which the phrase is listed in the OED), because a do is something done, a dealing or treatment.