How to get phased haplotype from vcf file?
You should be able reformat BAM files to VCF files with PGDSpider.

I find using specific softwares for this type data formatting tends to be error prone and not practical when having a large number of files to reformat, so I personally like to simply read about the format standard and write the code to reformat myself but that's very much a matter of personal preference.