ていては is a structure often seen with verbs that will express that 'if one continues with (A), (B)'. In most cases, this will indicate a negative outcome.
ていては is a combination of the て-form of a verb, 居(い)る 'to be' in its て-form, and は. The final ては is often considered its own conjunctive structure that may either exhibit hypothetical situations, or repetitive actions. In this case, it's a bit of a mix of both, depending on the verb it is attached to.
毎日(まいにち)お菓子(かし)ばかりを食(た)べていては、いつまで経(た)っても痩(や)せませんよ。
If you only keep eating snacks, you will never lose any weight.
毎晩(まいばん)遊(あそ)んでいてはお金(かね)はたまりませんよ。
If you keep going out every night, you will not be able to save up money.
仕事(しごと)の事(こと)ばかりを気(き)にしていては、旅行(りょこう)は楽(たの)しめませんよ。
If you keep worrying about work, you will not be able to enjoy your trip.
Fun-fact - Apart from the inclusion of ている to the base verb in order to show continuation, the ては in ていては is the same ては that appears with other set patterns such as てはいけない, てはならない, and てはだめ when expressing something negative.