The clustering of theSDSS-IV extended Baryon Oscillation Spectroscopic Survey DR14 quasar sample: measuring the anisotropic baryon acoustic oscillations with redshift weights