The problem here isn't that the coders are spending alot of time slacking off, talking about football, or browsing the web. The problem is that their output is of poor quality and consistently late.
If the code was high quality and delivered on time, than the apparent slacking behaviour could go on indefinitely unnoticed. Or who knows, perhaps even noticed. But when somebody in upper management walks through and questions the slacking, the direct manager would be in a position to say "the code is good and is delivered on time." Ask the same question now, and the direct manager would have no defense.
Situations like this can not go on indefinitely. The quality of work may improve (unlikely) and this will no longer be a problem. Management may lay down the law and put a stop to the slacking (somewhat likely). Your customers may get fed up with a poor quality product (quite likely) and take their business elsewhere putting you and your team out of work. In either case, don't think that nobody will notice your effort. If you have a strong work ethic, stick true to it. If and when the axe falls, you might be spared. And even if your not spared, some day you might wind up working for one of the slackers you were working with and that work ethic of yours will likely be the reason they remembered you.