Yes. A work permit is tied to your employer. When you resign, the permit is cancelled; if there is a gap before its expiry date, it does not simply run out on its own — the cancellation takes effect once it is processed.
Nationwide (all cities)
Tied to your employer
Your work permit does not remain valid simply because it has not reached its expiry date. The permit is tied to your employer, and leaving that employer ends it.
How it works
The Shenzhen Guangming District government explains how this works in the context of leaving China. A work permit is not a personal document that keeps running; it authorises you to work for a specific employer. When you resign, the permit must be handled as part of your departure.
Two scenarios
There are two scenarios. If your last working day coincides with, or is very close to, the permit's expiry date, there is no need to cancel it separately — it expires on its own. But if there is a significant gap between your resignation and the expiry date, you must cancel the permit and obtain a work permit cancellation certificate from the Bureau of Foreign Experts Affairs.
The answer
So the answer is: resigning does affect your existing permit. A permit with time still to run does not stay valid for you to keep using; it is cancelled when your employment ends, and the cancellation takes effect once processed.