With the large-scale distributed PV connected to the grid, the random and intermittent nature of PV output, the non-linearity of the inverter, as well as the low daytime base-load and large-scale back feeding cause outstanding power quality problems such as overvoltage, three-phase unbalance, and high harmonic content at the end of the power supply system, which seriously affects the safe and stable operation of the grid and power efficiency. Based on the residual capacity of the inverter, this paper investigates a cooperative power quality control strategy that integrates active power filter, reactive power compensation, and inverter functions to achieve comprehensive power quality control and management without adding additional hardware equipment. The validation results show that the control strategy strongly improves the power quality, grid security, stability, and efficiency. This strategy indicates significant economic benefits.