China and Japan are close to a deal that would ease a long-running dispute over offshore gas fields, reports from Japan say.