Phase transition in the randomly diluted triangular-lattice antiferromagnet with single-ion anisotropy in an external field