A Distributed Consensus Algorithm for Task Allocation in Supply Chain Management