@jca nailed it. As a sentient male of a certain age it is in my genes to flirt. When I check out at the supermarket I actually have to restrain myself from saying “I’m lucky to have gotten the lane with the best-looking cashier” but only because I do not recall how often I have actually used that line, and I do not want to be overly predictable and boring and a one-note-Johnny (and if you’ve really got your flirting shoes on you say that when the cashier is obviously not the youngest and prettiest girl in the store – although for me it is mandatory that she actually be female; YMMV, and that’s okay). So by all means flirt; that’s cool and human and natural and friendly and funny if you don’t have any particular expectations of a return on the investment. If I had a dollar for every woman who had ever been turned off by my flirting then I’d be more attractive to some of them.
But “asking her on a date” (at least while she’s on the job) crosses a line. It forces her – because of her ethics and training, if for no other reason – to say “No” to you and can even make her feel defensive, like “What’s his reaction to this refusal going to be? Is he one of the crazy ones, or what?”
Flirt if you feel like it, and then back off and she if she banters back or is “all business”, and act accordingly, but always like a gentleman.