Labour, Plaid Cymru and the Liberal Democrats opposed new thresholds on when strikes can take place.
The vote against Conservative ministers' Trade Union Bill is not legally binding.
The UK and Welsh governments disagree over whether the assembly's permission is needed before the new rules apply to public sector workers in Wales.
The bill would require at least half of union members to take part in a ballot before a strike can happen.
In public services such as health, education and the fire service, industrial action would need at least 40% of eligible union members to vote in favour.
The Conservatives say the bill should apply to the whole of Britain, but Welsh government ministers say the assembly's consent is needed.
On Tuesday, AMs withheld their approval of the bill by voting down a motion in the Senedd chamber.
Labour has said it will try to overturn the bill if the UK government ignores the assembly' vote and pushes ahead.
If returned to power at May's assembly election, Labour would introduce its own legislation to repeal the bill.
Public Services Minister Leighton Andrews said: "In Wales we have a good record of resolving disputes.
"There was no junior doctors' strike in Wales, there was in England.
"Fire fighters took industrial action in England over pensions, they were not doing so in Wales.
"In contrast, we believe this bill, the Trade Union Bill, will lead to a confrontational relationship between employers and the workforce."
Welsh Conservative leader Andrew RT Davies said he supported the role of trade unions in standing up for members.
But, referring to the general secretary of the Unite union, he said: "Where I will not stand up and support is for Len McCluskey, or his mob, to use you lot [Labour AMs] to live their ambitions."
He added: "Where there is a discrepancy I would suggest is where general secretaries of unions choose to live their political dreams on the back of their members' subs, and that clearly is not acceptable."

The 23-year-old, who can also play in defence, made 56 league appearances for the Spireites.
He has signed too late to feature in Saturday's home game against Walsall.
Boss Kenny Jackett told the club website: "We have brought in a bright and energetic young player. He has a very good left-foot and adds versatility to our squad."
Find all the latest football transfers on our dedicated page.

The proposed space, part of the Central Square scheme near Cardiff Central rail station, would see the St David's House building on Wood Street demolished.
Three fully-let office buildings and a transport interchange, including office and residential units, have already been given the go-ahead.
Cardiff council's cabinet discussed the public space plan on Thursday.
Councillors gave the authority permission to dispose of leasehold interest in land north of Wood Street to enable the 270,000 sq ft (25,083 sq m) office block and square to be built.
The proposal will also include a new office development, which could accommodate 3,000 jobs, on the site of the old Western Mail and Echo building on Park Street.
The new BBC Wales Cymru headquarters, at the heart of the new Central Square development, is already under construction while a new transport hub has been given full planning permission.
Council leader Phil Bale said: "As anyone can see, the transformation on the south side of Wood Street facing the railway station is well under way with the BBC Wales HQ and No 2 Central Square beginning to take shape alongside No 1 Central Square which has been open for over a year.
"Now there are some really exciting plans coming forward for the north side of Wood Street on the old Western Mail and Echo site, which has been empty for several years, and on the St David's House site which fronts Wood Street."
Councillor Elizabeth Clark, leader of the Liberal Democrat opposition on Cardiff council, said: "The Labour run Cardiff council need to provide more detail on the use of the public square.
"For example, how will pedestrians, cyclists and the proposed metro be accommodated? It's important to get all this right."
Assembly members have voted against UK government proposals to restrict strike ballots in the public sector.
[NEXT_CONCEPT]
Portsmouth have signed Chesterfield midfielder Dion Donohue for an undisclosed fee on a two-year deal.
[NEXT_CONCEPT]
A new public square has been proposed as part of plans for the next phase of Cardiff city centre's regeneration.