A weapon can be an arcane focus in some cases, but you've gotten a few things confused/wrong.
Arcane focus staffs work as quarterstaffs; not all quarterstaffs work as arcane focuses
I read online that a quarterstaff can double as a weapon and an arcane focus
This is not accurate. To phrase it more accurately, as the section on staffs under the "Magic Item Categories" heading on DMG p. 140 states:
Unless a staff’s description says otherwise, a staff can be used as a quarterstaff.
This means that any magic item staff can also function as a quarterstaff.
This does not, however, mean that the converse is true; not all quarterstaffs can necessarily serve as arcane focuses. There's a reason that a regular quarterstaff costs 2 sp, while an arcane focus staff costs 5 gp; the latter is specially built/designed to serve as a focus for magical energies. Later in the chapter, it specifies:
Arcane Focus. An arcane focus is a special item - an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item - designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.
Shocking grasp doesn't involve a spellcasting focus
A spellcasting focus, such as an arcane focus staff, replaces the material components of a spell:
A character can use a component pouch or a spellcasting focus in place of the [material] components specified for a spell.
However, the shocking grasp spell only has Verbal and Somatic components:
Components: V, S
As such, no spellcasting focus is involved in the casting of the spell. A focus (or component pouch) is only used to cast a spell if the spell has material components.
Some things let you use a weapon as a spellcasting focus
As far as I know, there exist two class features (a bard subclass feature and a warlock eldritch invocation) and one magic item that allow you to use a weapon as a spellcasting focus:
The Ruby of the War Mage, a common magic item from Xanathar's
Guide to Everything (p. 138), allows a character of any class to use
their weapon as a spellcasting focus - even if their class doesn't
normally allow them to use a spellcasting focus:
Etched with eldritch runes, this 1-inch-diameter ruby allows you to
use a simple or martial weapon as a spellcasting focus for your
The College of Swords bard subclass from Xanathar's Guide to
Everything (p. 15) gains the Bonus Proficiencies feature at 3rd
level when they gain the subclass. One of its benefits is:
If you’re proficient with a simple or martial melee weapon, you can
use it as a spellcasting focus for your bard spells.
Pact of the Blade warlocks can create a pact weapon or
transform an existing magic weapon into a pact weapon. Xanathar's
Guide to Everything (p. 57) adds the Improved Pact Weapon eldritch
invocation option, which modifies this pact weapon and its
options in a few ways, one of which is:
You can use any weapon you summon with your Pact of the Blade feature
as a spellcasting focus for your warlock spells.
Simultaneous timing is rare
Finally, ravery's answer already addresses the issue with timing. Very few spells involve a weapon attack being made as part of the casting of the spell itself (which is separate from the effects of the spell, which follow its casting). Even if a spell affects a weapon, it usually does not involve an attack being made with it while the spell is still in the process of being cast.
In general, either you're using your spellcasting focus to cast a spell, or you're making an attack with a weapon; you're virtually never doing both at the exact same time.
The only exceptions to that involve the booming blade and green-flame blade cantrips from the Sword Coast Adventurer's Guide (p. 142-143). Both have the components listed as:
V, M (a weapon)
And both spells begin with the following text:
As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails.
This suggests that in that particular case, you could technically be using the weapon as a focus (assuming you meet one of the 3 criteria above) and as a weapon at the exact same time... However, since both those spells have no other material components, and involve an attack being made with the weapon, there's really no difference to whether you're using your weapon as a focus or as the actual material component itself in those specific cases.
Beyond that edge case, virtually none of your actions happen simultaneously with each other; they usually occur sequentially. Even if you do multiple things on the same turn (e.g. hit an enemy with your quarterstaff, then cast a Quickened shocking grasp), they're not happening at the exact same time.