The article investigates the problem of task assignment of vehicles for a production company. The presented problem is a complex decision-making issue which has not been analyzed in the literature before. Two stages must be passed through in order to solve the task assignment problem of the vehicles for the production company. The first stage is to designate the tasks, the other one is to determine the number of the vehicles that is needed to perform these tasks. The task in the analyzed problem is defined as transporting the cargo from the suppliers to the warehouses and from the warehouses to the production company. The number of the tasks depends on the type of the vehicle which carries out a given task. In order to solve the presented problem, the mathematical model has been developed, i.e., decision variables, constraints, and criterion functions. There are three types of decision variables occurring in the model, which means that this problem is quite complex. The first type of the decision variables determines the volume of the cargo which flows among the facilities on a given working day, the second type of the decision variables determines the use of a given type of the vehicle in the task, and the third type of the decision variables determines the number of the vehicles which perform the task. The criterion functions take the following form: the fuel consumption costs, the transition costs of the cargo via the warehouses, the purchase costs of the cargo, and the task completion time. In order to solve the task assignment problem of the vehicles, a genetic algorithm has been developed. The proposed method of task assignment solution is unique due to the coding method of individuals and related recombination procedures. The construction stages of this algorithm are presented. The algorithm has been verified by the use of the real input data. The developed model and method of its solution are unique in the application to the service of manufacturing enterprises. Due to the high efficiency and multi-aspect approach, it can be applied in enterprises of various industries as support for decision-makers in the optimization of resources.