On-Shell Techniques for the Standard-Model Effective Field Theories