We propose a generalist predator-prey model with stage structure for prey to explore the bifurcations and complex dynamics of tea green leafhopper pest and predatory mite. Using qualitative and bifurcation theory of dynamical systems, we carry out bifurcation analysis of the three-dimensional nonlinear system, including saddle-node bifurcation of codimension 1 and 2, Hopf bifurcation, Bogdanov-Takens bifurcation, and bifurcations of nilpotent singularities of elliptic and focus type of codimension 3. We find that the nilpotent focus of codimension 4 serves as an organizing center to connect all the codimension 3 bifurcations in the two-dimensional center manifold of the system, and the bifurcations are also associated with a third order cubic Liénard system. Moreover, we present a classification of the nilpotent singularities of the system using the hatching rate of pest eggs as the parameter. Our results suggest that extending the incubation time of pest eggs can be beneficial for pest control.