Whatever deal Washington and Beijing reach over the trade war, President Trump has already scored a big victory: Companies are rethinking their reliance on China. The two sides are nearing an agreement, with Mr. Trump saying on Thursday that an “epic” trade pact could be weeks away and that he may soon meet with President Xi Jinping, China’s top leader. But already, spurred by tariffs and trade tensions, global companies are beginning to shift their supply chains away from China, just as some Trump administration officials had wanted.