AFAIK Joseph is not mentioned in the Quran in relation to Mary. He is mentioned in a seperate chapter as one of the 12 sons of jacob and rachel ( 12 tribes of israel). Both jacob and joseph are believed to be prophets sent by God.
As for Mary ; there is a whole chapter in the quran dedicated to her and the miracle birth of jesus ( Isa) but no mention of joseph in that chapter.
Some verses quoted from the Quran mentioned below:
"Relate in the Book (the story of) Mary, when she withdrew from her family to a place in the East. She placed a screen (to screen herself) from them. Then We sent her our angel, and he appeared before her as a man in all respects. She said, 'I seek refuge from you to God Most Gracious! Do not come near me, if you fear God!' He said, 'No, I am only a messenger from your Lord, (to announce) to you the gift of a holy son.' She said, 'How shall I have a son, seeing that no man has touched me, and I am not unchaste?' He said, 'So (it will be). Your Lord says, 'That is easy for Me, and (We wish) to appoint him as a Sign unto men, and a Mercy from Us. It is a matter (so) decreed'" (19:16-21, the Chapter of Mary)