Your two sentences contain two different prepositional phrases which, as you thought, function as an adverbial and adjectival phrase, respectively.
- We were served by a very impolite salesgirl at the supermarket.
- We were served by a very impolite salesgirl from the supermarket.
The adverbial phrase in the first sentence tells us that the serving took place at the supermarket. We know that the speakers were served at the supermarket, and by a rude salesgirl.
The adjectival phrase in the second sentence modifies salesgirl by telling us about her place of origin. The assumption is that the supermarket is where she works. The adjectival phrase doesn't tell us where the rude service was endured by the speakers, though. It may have been at the bus station, on a roller coaster, or at the supermarket.
Like an adverb, an adverbial prepositional phrase can be moved around in a sentence. If we express the main clause in the first sentence in the passive voice, we can place the adverbial prepositional phrase before the subject:
- At the supermarket, a very impolite salesgirl served us.
If we express the main clause in the second sentence in the passive voice, we cannot change the position of the adjectival prepositional phrase relative to the noun it modifies. Unlike adjectives, which usually precede the nouns they modify, an adjectival prepositional phrase follows the noun it modifies. Here, the prepositional phrase modifies salesgirl and must immediately follow it:
- A very impolite salesgirl from the supermarket served us.