Facing the problem of low working efficiency of the medical staff in tasks of the repeated and mechanical delivery of medical supplies, the multiple robots are used as a replacement, and an intelligent task allocation algorithm based on near-field (location of the task) subset partitioning method is proposed for the multi-robot group system. Firstly, ant colony algorithm is used to arrange the tasks in an orderly manner to form a near-field related task chain. Then, an objective optimization function is designed according to the time taken to complete tasks and the cost of robot path. After the task chain is divided into subsets by genetic algorithm, the task subsets are assigned to individual robots. Finally, the application scenes of the hospital wards are simulated, and a transportation and allocation system of medical supplies is designed for multiple robots. On the operating platform of the system, users can release new tasks in real time, view the allocation results of the released tasks and view the robot paths by a visual interface. Based on the simulated experimental platform, 3 different task allocation algorithms are compared and analyzed. And the allocation result of the proposed algorithm is the most reasonable one, as all tasks are completed within a specified time, and the traveling distance of robots is greatly reduced. Therefore, the proposed multi-robot task allocation algorithm can effectively solve the problem of medical supplies allocation in medical environments, and can improve the working efficiency of the system.