SLAM is significant to autonomous mobile robots. In order to realize drift-free state estimation and provide accurate localization results for the subsequent navigation, we develop an optimization-based framework consisting of a high-frequency Inertial-Wheel Odometry(IWO), Visual-Inertial-Wheel Odometry(VIWO) and a global fusion module. To fuse the local state with the position provided by GNSS, we perform ternary edge in factor graph optimization to estimate the transformation between the local frame and ENU coordinate. Thanks to the tightly-coupled VIWO, the localization property of the odometry presents more robustness, and improve the accuracy of global fusion. A noise repropagation strategy is introduced to ensure the consistency of the IMU and wheel odometer. We evaluate the proposed system on public datasets and test it in real-world scenario. The experimental results show that our system achieves accurate pose estimation in outdoor environments.