msl 1 year ago
parent 38949313db
commit 11468396c7

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

@ -1,28 +1,196 @@
import tkinter as tk
class logIn:
import tkinter.ttk as ttk
import random as r
class logIn:#登录界面
def __init__(self):
self.t=tk.Tk()
self.t.geometry("524x804+600+0")
self.t.geometry("560x860+600+0")
self.t.title("登录管理员系统")
file=tk.PhotoImage(file="C:\\Users\\yaoyao\\Desktop\\rjgc2.png")
img=tk.Canvas(self.t,width=524,height=804)
img.create_image(262,402,image=file)
file=tk.PhotoImage(file=".\\img\\3.png")
img=tk.Canvas(self.t,width=560,height=860)
img.create_image(280,430,image=file)
img.place(x=0,y=0)
t2=tk.Entry(self.t,width=40)
t2.place(x=130,y=390)
t2.select_clear()
file2=tk.PhotoImage(file="C:\\Users\\yaoyao\\Desktop\\login5.png")
b=tk.Button(self.t,image=file2,relief="raised",bg="#00afaf",activebackground="#000f0f")
b.place(x=200,y=440)
file2=tk.PhotoImage(file=".\\img\\b11.png")
b=tk.Button(self.t,bg="orange",relief="raised",image=file2,command=self.log)
b.place(x=230,y=480)
self.t.mainloop()
def log(self):
def log(self):#登录函数
self.t.destroy()
x=admin()
class admin:
class admin:#管理员主界面
def __init__(self):
t=tk.Tk()
t.geometry("500x300+600+400")
t.mainloop()
self.t=tk.Tk()
self.t.geometry("560x860+600+0")
sty=ttk.Style()
sty.configure("Treeview",font=(None,15))
file=tk.PhotoImage(file=".\\img\\4.png")
self.file2=tk.PhotoImage(file=".\\img\\bill.png")
self.file3=tk.PhotoImage(file=".\\img\\cus.png")
self.file4=tk.PhotoImage(file=".\\img\\food.png")
self.file5=tk.PhotoImage(file=".\\img\\psd.png")
self.file6=tk.PhotoImage(file=".\\img\\cbill.png")
self.file7=tk.PhotoImage(file=".\\img\\sent.png")
self.file8=tk.PhotoImage(file=".\\img\\return.png")
self.file9=tk.PhotoImage(file=".\\img\\ckxx.png")
self.file10=tk.PhotoImage(file=".\\img\\zf.png")
self.file11=tk.PhotoImage(file=".\\img\\sf.png")
self.file12=tk.PhotoImage(file=".\\img\\cf.png")
self.file13=tk.PhotoImage(file=".\\img\\qrxg.png")
img=tk.Canvas(self.t,width=560,height=860)
img.create_image(280,430,image=file)
img.place(x=0,y=0)
self.admin_main()
self.t.mainloop()
def admin_main(self):
self.b1=tk.Button(self.t,relief="raised",image=self.file2,command=self.bill,bg="orange")
self.b2=tk.Button(self.t,relief="raised",image=self.file3,command=self.customer,bg="orange")
self.b3=tk.Button(self.t,relief="raised",image=self.file4,command=self.food,bg="orange")
self.b4=tk.Button(self.t,relief="raised",image=self.file5,command=self.psd,bg="orange")
self.b1.place(x=100,y=180)
self.b2.place(x=300,y=180)
self.b3.place(x=100,y=380)
self.b4.place(x=300,y=380)
def re1(self):
self.b5.destroy()
self.b6.destroy()
self.b7.destroy()
self.f1.destroy()
self.tree.destroy()
self.admin_main()
def re2(self):
self.b8.destroy()
self.b9.destroy()
self.f2.destroy()
self.tree2.destroy()
self.admin_main()
def re3(self):
self.b10.destroy()
self.b11.destroy()
self.b12.destroy()
self.b13.destroy()
self.f3.destroy()
self.tree3.destroy()
self.admin_main()
def re4(self):
self.b14.destroy()
self.b15.destroy()
self.e1.destroy()
self.e2.destroy()
self.admin_main()
def bill(self):
self.b1.destroy()
self.b2.destroy()
self.b3.destroy()
self.b4.destroy()
self.f1=tk.Frame(height=312,width=520,relief='sunken',bd=5)
self.tree=ttk.Treeview(self.f1,height=15,show="tree")
self.f1.place(x=20,y=50)
self.tree.place(x=0,y=0,width=510)
self.tree.insert("","end",text="流水号:2213012390")
self.tree.insert("","end",text="桌号:100")
self.tree.insert("","end",text="点餐列表:")
self.tree.insert("","end",iid="piz",text="九寸披萨¥60")
self.tree.insert("piz","end",text="水果拼牛肉¥30")
self.tree.insert("piz","end",text="加厚饼底¥10")
self.tree.insert("piz","end",text="双份芝士¥30")
self.tree.insert("","end",iid="co",text="拿铁咖啡¥10")
self.tree.insert("co","end",text="90%纯奶添加¥5")
self.tree.insert("co","end",text="冰滴萃取¥3")
self.tree.insert("","end",text="总计¥148")
self.b5=tk.Button(self.t,relief="raised",image=self.file6,bg="orange")
self.b6=tk.Button(self.t,relief="raised",image=self.file7,bg="orange")
self.b7=tk.Button(self.t,relief="raised",image=self.file8,bg="orange",command=self.re1)
self.b5.place(x=220,y=400)
self.b6.place(x=220,y=460)
self.b7.place(x=220,y=520)
def customer(self):
self.b1.destroy()
self.b2.destroy()
self.b3.destroy()
self.b4.destroy()
self.f2=tk.Frame(height=372,width=520,relief='sunken',bd=5)
self.tree2=ttk.Treeview(self.f2,height=18,show="tree")
self.f2.place(x=20,y=50)
self.tree2.place(x=0,y=0,width=510)
self.b8=tk.Button(self.t,relief="raised",image=self.file9,bg="orange")
self.b9=tk.Button(self.t,relief="raised",image=self.file8,bg="orange",command=self.re2)
self.b8.place(x=220,y=460)
self.b9.place(x=220,y=520)
self.tree2.insert("","end",iid=1,text="桌号:1 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=2,text="桌号:2 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=3,text="桌号:3 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=4,text="桌号:4 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=5,text="桌号:5 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=6,text="桌号:6 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=7,text="桌号:7 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=8,text="桌号:8 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=9,text="桌号:9 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=10,text="桌号:10 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=11,text="桌号:11 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=12,text="桌号:12 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=13,text="桌号:13 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=14,text="桌号:14 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=15,text="桌号:15 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=16,text="桌号:16 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=17,text="桌号:17 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
self.tree2.insert("","end",iid=18,text="桌号:18 {}人 ¥{}".format(r.randint(1,10),r.randint(100,500)))
for i in range(1,18):
self.tree2.insert(i,"end",text="菜品1:xxxxxxx")
self.tree2.insert(i,"end",text="菜品2:xxxxxxx")
self.tree2.insert(i,"end",text="菜品3:xxxxxxx")
pass
def food(self):
self.b1.destroy()
self.b2.destroy()
self.b3.destroy()
self.b4.destroy()
self.f3=tk.Frame(height=312,width=520,relief='sunken',bd=5)
self.tree3=ttk.Treeview(self.f3,height=15,show="tree")
self.f3.place(x=20,y=40)
self.tree3.place(x=0,y=0,width=510)
self.b10=tk.Button(self.t,relief="raised",image=self.file10,bg="orange")
self.b11=tk.Button(self.t,relief="raised",image=self.file11,bg="orange")
self.b12=tk.Button(self.t,relief="raised",image=self.file12,bg="orange")
self.b13=tk.Button(self.t,relief="raised",image=self.file8,bg="orange",command=self.re3)
self.b10.place(x=220,y=360)
self.b11.place(x=220,y=420)
self.b12.place(x=220,y=480)
self.b13.place(x=220,y=540)
self.tree3.insert("","end",iid=1,text="拿铁咖啡")
self.tree3.insert("","end",iid=2,text="摩卡咖啡")
self.tree3.insert("","end",iid=3,text="卡布奇诺")
self.tree3.insert("","end",iid=4,text="港式奶茶")
self.tree3.insert("","end",iid=5,text="珍珠奶茶")
self.tree3.insert("","end",iid=6,text="9寸披萨")
self.tree3.insert("","end",iid=7,text="12寸披萨")
self.tree3.insert("","end",iid=8,text="菠萝烧肉")
self.tree3.insert("","end",iid=9,text="红烧牛肉")
self.tree3.insert("","end",iid=10,text="糖醋里脊")
for i in range(1,11):
self.tree3.insert(i,"end",text="糖度:xxxxxxx")
self.tree3.insert(i,"end",text="浓度:xxxxxxx")
self.tree3.insert(i,"end",text="用料:xxxxxxx")
pass
def psd(self):
self.b1.destroy()
self.b2.destroy()
self.b3.destroy()
self.b4.destroy()
self.e1=tk.Entry(self.t,width=50)
self.e1.insert("end","请输入原密码")
self.e1.place(x=100,y=200)
self.e2=tk.Entry(self.t,width=50)
self.e2.insert("end","请输入新密码")
self.e2.place(x=100,y=300)
self.b14=tk.Button(self.t,relief="raised",image=self.file13,bg="orange")
self.b15=tk.Button(self.t,relief="raised",image=self.file8,bg="orange",command=self.re4)
self.b14.place(x=220,y=480)
self.b15.place(x=220,y=540)
pass
start=logIn()
Loading…
Cancel
Save