Similar thing happened on a 2000 Dakota 4.7L a family member of mine had. According to my wife's uncle (certified dodge mechanic) there is some sort of memory thing in the PCM that "remembers" Jump starts and bad batteries and causes the rough idle. For the Battery dying thing, the truck was owned by my wife's grandfather, I t/s it down to a short in the trailer brake assembly. For some strange reason the trailer brake was draining the battery. I hope this helps, as far as fix goes; I'm not sure because to make a long story short, the old man died and his wife traded in the truck...
I would have the parts store check the battery, and the alternator. then start looking at things that may have a short and cause them to run all the time, i.e. hood light, brake controller, radio, etc...
I would have the parts store check the battery, and the alternator. then start looking at things that may have a short and cause them to run all the time, i.e. hood light, brake controller, radio, etc...