This movie from 1987[0], featuring a youngish Bruce Willis, and Kim Basinger, featured this kind of office dynamic.
Willis plays a somewhat scruffy workaholic, that gets a lot done, and his coworker is a vapid womanizer that gets nothing done, but all the promotions.
It was an extremely funny movie, too.