After Width: | Height: | Size: 879 KiB |
After Width: | Height: | Size: 102 KiB |
@ -0,0 +1,186 @@
|
|||||||
|
import tkinter as tk
|
||||||
|
import tkinter.ttk as ttk
|
||||||
|
import random as r
|
||||||
|
class logIn:#登录界面
|
||||||
|
def __init__(self):
|
||||||
|
x=admin()
|
||||||
|
'''self.t=tk.Tk()
|
||||||
|
self.t.geometry("560x860+600+0")
|
||||||
|
self.t.title("登录管理员系统")
|
||||||
|
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=".\\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):#登录函数
|
||||||
|
self.t.destroy()
|
||||||
|
|
||||||
|
class admin:#管理员主界面
|
||||||
|
def __init__(self):
|
||||||
|
self.t=tk.Tk()
|
||||||
|
self.t.geometry("560x860+600+0")
|
||||||
|
sty=ttk.Style()
|
||||||
|
sty.configure("Treeview",font=(None,15))
|
||||||
|
file=tk.PhotoImage(file=".\\img 2\\4.png")
|
||||||
|
self.file2=tk.PhotoImage(file=".\\img 2\\food.png")
|
||||||
|
self.file3=tk.PhotoImage(file=".\\img 2\\bill.png")
|
||||||
|
self.file4=tk.PhotoImage(file=".\\img 2\\food.png")
|
||||||
|
self.file5=tk.PhotoImage(file=".\\img 2\\psd.png")
|
||||||
|
self.file6=tk.PhotoImage(file=".\\img 2\\cbill.png")
|
||||||
|
self.file7=tk.PhotoImage(file=".\\img 2\\sent.png")
|
||||||
|
self.file8=tk.PhotoImage(file=".\\img 2\\return.png")
|
||||||
|
self.file9=tk.PhotoImage(file=".\\img 2\\ckxx.png")
|
||||||
|
self.file10=tk.PhotoImage(file=".\\img 2\\zf.png")
|
||||||
|
self.file11=tk.PhotoImage(file=".\\img 2\\sf.png")
|
||||||
|
self.file12=tk.PhotoImage(file=".\\img 2\\cf.png")
|
||||||
|
self.file13=tk.PhotoImage(file=".\\img 2\\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.file5,command=self.psd,bg="orange")
|
||||||
|
|
||||||
|
self.b1.place(x=220,y=180)
|
||||||
|
self.b2.place(x=220,y=250)
|
||||||
|
self.b3.place(x=220,y=320)
|
||||||
|
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.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 bill1(self):
|
||||||
|
self.b1.destroy()
|
||||||
|
self.b2.destroy()
|
||||||
|
self.b3.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.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 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=2,text="餐品:2 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=3,text="餐品:3 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=4,text="餐品:4 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=5,text="餐品:5 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=6,text="餐品:6 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=7,text="餐品:7 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=8,text="餐品:8 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=9,text="餐品:9 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=10,text="餐品:10 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=11,text="餐品:11 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=12,text="餐品:12 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=13,text="餐品:13 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=14,text="餐品:14 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=15,text="餐品:15 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=16,text="餐品:16 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=17,text="餐品:17 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
self.tree2.insert("","end",iid=18,text="餐品:18 xxx菜品{} ¥{}".format(r.randint(1,10),r.randint(10,60)))
|
||||||
|
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 bill(self):
|
||||||
|
self.b1.destroy()
|
||||||
|
self.b2.destroy()
|
||||||
|
self.b3.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.b13=tk.Button(self.t,relief="raised",image=self.file8,bg="orange",command=self.re3)
|
||||||
|
self.b10.place(x=220,y=360)
|
||||||
|
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.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.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()
|
After Width: | Height: | Size: 750 KiB |
After Width: | Height: | Size: 560 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 750 KiB |
After Width: | Height: | Size: 560 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.1 KiB |
@ -0,0 +1,229 @@
|
|||||||
|
import tkinter as tk
|
||||||
|
import tkinter.ttk as ttk
|
||||||
|
import random as r
|
||||||
|
class logIn:#登录界面
|
||||||
|
def __init__(self):
|
||||||
|
self.t=tk.Tk()
|
||||||
|
self.t.geometry("560x860+600+0")
|
||||||
|
self.t.title("登录管理员系统")
|
||||||
|
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=".\\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):#登录函数
|
||||||
|
self.t.destroy()
|
||||||
|
x=admin()
|
||||||
|
class admin:#管理员主界面
|
||||||
|
def __init__(self):
|
||||||
|
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",iid="1",text="流水号:2213012390 桌号:100")
|
||||||
|
self.tree.insert("1","end",text="桌号:100")
|
||||||
|
self.tree.insert("1","end",text="点餐列表:")
|
||||||
|
self.tree.insert("1","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("1","end",iid="co",text="拿铁咖啡¥10")
|
||||||
|
self.tree.insert("co","end",text="90%纯奶添加¥5")
|
||||||
|
self.tree.insert("co","end",text="冰滴萃取¥3")
|
||||||
|
self.tree.insert("1","end",text="总计¥148")
|
||||||
|
self.tree.insert("","end",iid="2",text="流水号:2000123456 桌号:15")
|
||||||
|
self.tree.insert("2","end",text="桌号:15")
|
||||||
|
self.tree.insert("2","end",text="点餐列表:")
|
||||||
|
self.tree.insert("2","end",iid="pizz",text="九寸披萨¥60")
|
||||||
|
self.tree.insert("pizz","end",text="水果拼牛肉¥30")
|
||||||
|
self.tree.insert("pizz","end",text="加厚饼底¥10")
|
||||||
|
self.tree.insert("pizz","end",text="双份芝士¥30")
|
||||||
|
self.tree.insert("2","end",iid="coo",text="拿铁咖啡¥10")
|
||||||
|
self.tree.insert("coo","end",text="90%纯奶添加¥5")
|
||||||
|
self.tree.insert("coo","end",text="冰滴萃取¥3")
|
||||||
|
self.tree.insert("2","end",text="总计¥148")
|
||||||
|
self.tree.insert("","end",iid="3",text="流水号:2000987654 桌号:34")
|
||||||
|
self.tree.insert("3","end",text="桌号:34")
|
||||||
|
self.tree.insert("3","end",text="点餐列表:")
|
||||||
|
self.tree.insert("3","end",iid="pizzz",text="九寸披萨¥60")
|
||||||
|
self.tree.insert("pizzz","end",text="水果拼牛肉¥30")
|
||||||
|
self.tree.insert("pizzz","end",text="加厚饼底¥10")
|
||||||
|
self.tree.insert("pizzz","end",text="双份芝士¥30")
|
||||||
|
self.tree.insert("3","end",iid="cooo",text="拿铁咖啡¥10")
|
||||||
|
self.tree.insert("cooo","end",text="90%纯奶添加¥5")
|
||||||
|
self.tree.insert("cooo","end",text="冰滴萃取¥3")
|
||||||
|
self.tree.insert("3","end",text="总计¥148")
|
||||||
|
self.tree.insert("","end",iid="4",text="流水号:2000123456 桌号:99")
|
||||||
|
self.tree.insert("4","end",text="桌号:99")
|
||||||
|
self.tree.insert("4","end",text="点餐列表:")
|
||||||
|
self.tree.insert("4","end",iid="pizzzz",text="九寸披萨¥60")
|
||||||
|
self.tree.insert("pizzzz","end",text="水果拼牛肉¥30")
|
||||||
|
self.tree.insert("pizzzz","end",text="加厚饼底¥10")
|
||||||
|
self.tree.insert("pizzzz","end",text="双份芝士¥30")
|
||||||
|
self.tree.insert("4","end",iid="coooo",text="拿铁咖啡¥10")
|
||||||
|
self.tree.insert("coooo","end",text="90%纯奶添加¥5")
|
||||||
|
self.tree.insert("coooo","end",text="冰滴萃取¥3")
|
||||||
|
self.tree.insert("4","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",command=lambda:self.tree3.delete(1))
|
||||||
|
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()
|
@ -0,0 +1,464 @@
|
|||||||
|
import threading
|
||||||
|
import json
|
||||||
|
from PIL import Image, ImageTk
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import tkinter as tk
|
||||||
|
from tkinter import messagebox
|
||||||
|
from tkinter import ttk
|
||||||
|
from tkinterdnd2 import DND_FILES, TkinterDnD
|
||||||
|
import shutil
|
||||||
|
#image_references=[]
|
||||||
|
class logIn:#登录界面
|
||||||
|
def __init__(self):
|
||||||
|
self.t=tk.Tk()
|
||||||
|
windowsize="560x860+600+0"
|
||||||
|
self.t.geometry(windowsize)
|
||||||
|
self.t.title("登录管理员系统")
|
||||||
|
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)
|
||||||
|
self.t2=tk.Entry(self.t,width=40,show="*")
|
||||||
|
self.t2.place(x=130,y=390)
|
||||||
|
self.t2.select_clear()
|
||||||
|
file2=tk.PhotoImage(file=".\\img\\b11.png")
|
||||||
|
b=tk.Button(self.t,bg="#EEDBCA",relief="flat",image=file2,command=self.log,activebackground="#EEDBCA")
|
||||||
|
b.place(x=180,y=480)
|
||||||
|
self.t.mainloop()
|
||||||
|
def log(self):#登录函数
|
||||||
|
with open("pwd.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
if(data["pwd"]==self.t2.get()):
|
||||||
|
self.t.destroy()
|
||||||
|
x=admin()
|
||||||
|
else:
|
||||||
|
messagebox.showinfo("密码错误!","请重新输入!")
|
||||||
|
self.t2.delete("0","end")
|
||||||
|
class admin:#管理员主界面
|
||||||
|
def __init__(self):
|
||||||
|
self.t=TkinterDnD.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")
|
||||||
|
self.fileqr=tk.PhotoImage(file=".\\img\\qr.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="flat",image=self.file2,command=self.bill,bg="#EEDBCA",activebackground="#EEDBCA")
|
||||||
|
self.b2=tk.Button(self.t,relief="flat",image=self.file3,command=self.customer,bg="#EEDBCA",activebackground="#EEDBCA")
|
||||||
|
self.b3=tk.Button(self.t,relief="flat",image=self.file4,command=self.food,bg="#EEDBCA",activebackground="#EEDBCA")
|
||||||
|
self.b4=tk.Button(self.t,relief="flat",image=self.file5,command=self.psd,bg="#EEDBCA",activebackground="#EEDBCA")
|
||||||
|
self.b1.place(x=180,y=100)
|
||||||
|
self.b2.place(x=180,y=300)
|
||||||
|
self.b3.place(x=180,y=500)
|
||||||
|
self.b4.place(x=180,y=700)
|
||||||
|
def bif(self):
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f2.destroy()
|
||||||
|
self.admin_main()
|
||||||
|
def re2(self):
|
||||||
|
self.b9.destroy()
|
||||||
|
self.f2.destroy()
|
||||||
|
self.tree.destroy()
|
||||||
|
self.flag=False
|
||||||
|
self.admin_main()
|
||||||
|
def rfo(self):
|
||||||
|
self.b10.destroy()
|
||||||
|
self.b11.destroy()
|
||||||
|
self.b12.destroy()
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.image_references=[]
|
||||||
|
style = ttk.Style(self.t)
|
||||||
|
style.configure('Treeview', rowheight="")
|
||||||
|
self.admin_main()
|
||||||
|
def re4(self):
|
||||||
|
self.b14.destroy()
|
||||||
|
self.b15.destroy()
|
||||||
|
self.e1.destroy()
|
||||||
|
self.e2.destroy()
|
||||||
|
self.admin_main()
|
||||||
|
def customerbill(self,last):
|
||||||
|
with open("customerconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
if(last!=data):
|
||||||
|
last=data
|
||||||
|
self.tree=ttk.Treeview(self.f2,height=15,show="tree")
|
||||||
|
for i in data:
|
||||||
|
self.tree.insert("","end",iid=i,text="桌号:{}".format(i))
|
||||||
|
for jj in (data[i]):
|
||||||
|
for j in jj:
|
||||||
|
self.tree.insert(i,"end",text="餐品:{} 价格:{}".format(j,jj[j]))
|
||||||
|
self.tree.place(x=0,y=0,width=510)
|
||||||
|
time.sleep(1)
|
||||||
|
if self.flag: self.customerbill(last)
|
||||||
|
def customer(self):
|
||||||
|
self.flag=True
|
||||||
|
self.b1.destroy()
|
||||||
|
self.b2.destroy()
|
||||||
|
self.b3.destroy()
|
||||||
|
self.b4.destroy()
|
||||||
|
self.f2=tk.Frame(height=312,width=520,relief='sunken',bd=5)
|
||||||
|
self.f2.place(x=20,y=50)
|
||||||
|
self.th=threading.Thread(target=lambda:self.customerbill(""))
|
||||||
|
self.th.start()
|
||||||
|
self.b9=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.re2)
|
||||||
|
self.b9.place(x=180,y=520)
|
||||||
|
|
||||||
|
|
||||||
|
def bill(self):
|
||||||
|
with open("bill.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
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)
|
||||||
|
b=data["billist"]
|
||||||
|
o=0
|
||||||
|
for i in b:
|
||||||
|
o+=1
|
||||||
|
self.tree2.insert("","end",id="42030000"+str(o))
|
||||||
|
total=0
|
||||||
|
for j in i:
|
||||||
|
for jj in j:
|
||||||
|
self.tree2.insert("42030000"+str(o),"end",text="餐品名:{} 价格{}".format(jj,j[jj]))
|
||||||
|
total+=j[jj]
|
||||||
|
self.tree2.item("42030000"+str(o),text="流水号:42030000"+str(o)+" 总价:"+str(total))
|
||||||
|
self.b18=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.bif)
|
||||||
|
self.b18.place(x=180,y=480)
|
||||||
|
def changefood(self,id):
|
||||||
|
with open("foodconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
id=id.replace("I","")
|
||||||
|
id=int(id)
|
||||||
|
print(id)
|
||||||
|
cfood=data[id-1]
|
||||||
|
del data[id-1]
|
||||||
|
with open("foodconfig.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(data,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
self.b10.destroy()
|
||||||
|
self.b11.destroy()
|
||||||
|
self.b12.destroy()
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.imglabel=tk.Label(self.t,text="请把食物图片拖动到这里")
|
||||||
|
self.imglabel.place(x=120,y=120,width=280,height=280)
|
||||||
|
self.t1=tk.Label(self.t,text="食物名称",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t2=tk.Label(self.t,text="售价",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t.drop_target_register(DND_FILES)
|
||||||
|
self.t.dnd_bind('<<Drop>>', self.on_drop)
|
||||||
|
self.selected_image_path = None
|
||||||
|
self.e1=tk.Entry(self.t)
|
||||||
|
self.e2=tk.Entry(self.t)
|
||||||
|
self.t1.place(x=80,y=450)
|
||||||
|
self.t2.place(x=100,y=480)
|
||||||
|
self.e1.place(x=180,y=452)
|
||||||
|
self.e2.place(x=180,y=484)
|
||||||
|
self.qr=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.fileqr,bg="#EEDBCA",command=self.qrc)
|
||||||
|
self.qr.place(x=180,y=520)
|
||||||
|
self.b19=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.qrrc)
|
||||||
|
self.b19.place(x=180,y=630)
|
||||||
|
filepath=cfood['img']
|
||||||
|
self.selected_image_path=filepath
|
||||||
|
image = Image.open(filepath)
|
||||||
|
image.thumbnail((275, 275))
|
||||||
|
photo = ImageTk.PhotoImage(image)
|
||||||
|
self.imglabel.config(image=photo)
|
||||||
|
self.imglabel.photo=photo
|
||||||
|
self.e1.insert("0",cfood['name'])
|
||||||
|
self.e2.insert("0",cfood['price'])
|
||||||
|
return
|
||||||
|
with open("foodconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
id=id.replace("I","")
|
||||||
|
id=int(id)
|
||||||
|
print(id)
|
||||||
|
cfood=data[id-1]
|
||||||
|
del data[id-1]
|
||||||
|
with open("foodconfig.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(data,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
self.b10.destroy()
|
||||||
|
self.b11.destroy()
|
||||||
|
self.b12.destroy()
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.imglabel=tk.Label(self.t,text="请把食物图片拖动到这里")
|
||||||
|
self.imglabel.place(x=120,y=120,width=280,height=280)
|
||||||
|
self.t1=tk.Label(self.t,text="食物名称",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t2=tk.Label(self.t,text="售价",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t.drop_target_register(DND_FILES)
|
||||||
|
self.t.dnd_bind('<<Drop>>', self.on_drop)
|
||||||
|
self.selected_image_path = None
|
||||||
|
self.e1=tk.Entry(self.t)
|
||||||
|
self.e2=tk.Entry(self.t)
|
||||||
|
self.t1.place(x=80,y=450)
|
||||||
|
self.t2.place(x=100,y=480)
|
||||||
|
self.e1.place(x=180,y=452)
|
||||||
|
self.e2.place(x=180,y=484)
|
||||||
|
self.qr=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.fileqr,bg="#EEDBCA",command=self.qrc)
|
||||||
|
self.qr.place(x=180,y=520)
|
||||||
|
self.b19=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.qrrc)
|
||||||
|
self.b19.place(x=180,y=630)
|
||||||
|
filepath=cfood['img']
|
||||||
|
self.selected_image_path=filepath
|
||||||
|
image = Image.open(filepath)
|
||||||
|
image.thumbnail((275, 275))
|
||||||
|
photo = ImageTk.PhotoImage(image)
|
||||||
|
self.imglabel.config(image=photo)
|
||||||
|
self.imglabel.photo=photo
|
||||||
|
self.e1.insert("0",cfood['name'])
|
||||||
|
self.e2.insert("0",cfood['price'])
|
||||||
|
with open("foodconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
id=id.replace("I","")
|
||||||
|
id=int(id)
|
||||||
|
print(id)
|
||||||
|
cfood=data[id-1]
|
||||||
|
del data[id-1]
|
||||||
|
with open("foodconfig.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(data,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
self.b10.destroy()
|
||||||
|
self.b11.destroy()
|
||||||
|
self.b12.destroy()
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.imglabel=tk.Label(self.t,text="请把食物图片拖动到这里")
|
||||||
|
self.imglabel.place(x=120,y=120,width=280,height=280)
|
||||||
|
self.t1=tk.Label(self.t,text="食物名称",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t2=tk.Label(self.t,text="售价",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t.drop_target_register(DND_FILES)
|
||||||
|
self.t.dnd_bind('<<Drop>>', self.on_drop)
|
||||||
|
self.selected_image_path = None
|
||||||
|
self.e1=tk.Entry(self.t)
|
||||||
|
self.e2=tk.Entry(self.t)
|
||||||
|
self.t1.place(x=80,y=450)
|
||||||
|
self.t2.place(x=100,y=480)
|
||||||
|
self.e1.place(x=180,y=452)
|
||||||
|
self.e2.place(x=180,y=484)
|
||||||
|
self.qr=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.fileqr,bg="#EEDBCA",command=self.qrc)
|
||||||
|
self.qr.place(x=180,y=520)
|
||||||
|
self.b19=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.qrrc)
|
||||||
|
self.b19.place(x=180,y=630)
|
||||||
|
filepath=cfood['img']
|
||||||
|
self.selected_image_path=filepath
|
||||||
|
image = Image.open(filepath)
|
||||||
|
image.thumbnail((275, 275))
|
||||||
|
photo = ImageTk.PhotoImage(image)
|
||||||
|
self.imglabel.config(image=photo)
|
||||||
|
self.imglabel.photo=photo
|
||||||
|
self.e1.insert("0",cfood['name'])
|
||||||
|
self.e2.insert("0",cfood['price'])
|
||||||
|
def food(self):
|
||||||
|
with open("foodconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
#global image_references
|
||||||
|
print(data)
|
||||||
|
self.b1.destroy()
|
||||||
|
self.b2.destroy()
|
||||||
|
self.b3.destroy()
|
||||||
|
self.b4.destroy()
|
||||||
|
self.f3=tk.Frame(height=380,width=520,relief='sunken',bd=5)
|
||||||
|
#
|
||||||
|
name=[na['name'] for na in data]
|
||||||
|
price=[pr['price'] for pr in data]
|
||||||
|
image_paths=[pa['img'] for pa in data]
|
||||||
|
#image_paths = [os.path.join('static/images', filename) for filename in os.listdir('static/images') if filename.endswith('.jpg')]
|
||||||
|
thumbnail_size = (80, 80) # 设置缩略图大小
|
||||||
|
thumbnails = [self.load_image(path, thumbnail_size[1]) for path in image_paths]
|
||||||
|
max_thumbnail_height = max(img.height() for img in thumbnails)
|
||||||
|
style = ttk.Style(self.t)
|
||||||
|
style.configure('Treeview', rowheight=max_thumbnail_height + 5)
|
||||||
|
treeview = ttk.Treeview(self.f3,height=4, columns=('Filename', 'Empty'), style='Treeview')
|
||||||
|
treeview.heading('#0', text='Image') # 用于图片的默认列
|
||||||
|
treeview.heading('Filename', text='foodname')
|
||||||
|
treeview.heading('Empty', text='price')
|
||||||
|
treeview.column('#0', width=180) # 设置图像列宽度
|
||||||
|
treeview.column('Filename',width=150)
|
||||||
|
treeview.column('Empty',width=120)
|
||||||
|
self.f3.place(x=20,y=50)
|
||||||
|
treeview.place(x=0,y=0,width=510)
|
||||||
|
|
||||||
|
# 用于保存所有图片引用的列表,避免被垃圾回收
|
||||||
|
self.image_references = thumbnails
|
||||||
|
# 将缩略图插入到Treeview
|
||||||
|
for path, img,na,pr in zip(image_paths, thumbnails,name,price):
|
||||||
|
try:
|
||||||
|
filename = os.path.basename(path)
|
||||||
|
treeview.insert('', 'end', text='', image=img, values=(na, pr))
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error loading {filename}: {e}")
|
||||||
|
self.b10=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file10,bg="#EEDBCA",command=self.addfood)
|
||||||
|
self.b11=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file11,bg="#EEDBCA",command=lambda:self.delfood(treeview.selection()[0]))
|
||||||
|
self.b12=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file12,bg="#EEDBCA",command=lambda:self.changefood(treeview.selection()[0]))
|
||||||
|
self.b18=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.rfo)
|
||||||
|
self.b10.place(x=180,y=460)
|
||||||
|
self.b11.place(x=180,y=550)
|
||||||
|
self.b12.place(x=180,y=640)
|
||||||
|
self.b18.place(x=180,y=730)
|
||||||
|
def addfood(self):
|
||||||
|
self.b10.destroy()
|
||||||
|
self.b11.destroy()
|
||||||
|
self.b12.destroy()
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.imglabel=tk.Label(self.t,text="请把食物图片拖动到这里")
|
||||||
|
self.imglabel.place(x=120,y=120,width=280,height=280)
|
||||||
|
self.t1=tk.Label(self.t,text="食物名称",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t2=tk.Label(self.t,text="售价",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t.drop_target_register(DND_FILES)
|
||||||
|
self.t.dnd_bind('<<Drop>>', self.on_drop)
|
||||||
|
self.selected_image_path = None
|
||||||
|
self.e1=tk.Entry(self.t)
|
||||||
|
self.e2=tk.Entry(self.t)
|
||||||
|
self.t1.place(x=80,y=450)
|
||||||
|
self.t2.place(x=100,y=480)
|
||||||
|
self.e1.place(x=180,y=452)
|
||||||
|
self.e2.place(x=180,y=484)
|
||||||
|
self.qr=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.fileqr,bg="#EEDBCA",command=self.qrc)
|
||||||
|
self.qr.place(x=180,y=520)
|
||||||
|
self.b19=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.qrrc)
|
||||||
|
self.b19.place(x=180,y=630)
|
||||||
|
return
|
||||||
|
self.b10.destroy()
|
||||||
|
self.b11.destroy()
|
||||||
|
self.b12.destroy()
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.imglabel=tk.Label(self.t,text="请把食物图片拖动到这里")
|
||||||
|
self.imglabel.place(x=120,y=120,width=280,height=280)
|
||||||
|
self.t1=tk.Label(self.t,text="食物名称",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t2=tk.Label(self.t,text="售价",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t.drop_target_register(DND_FILES)
|
||||||
|
self.t.dnd_bind('<<Drop>>', self.on_drop)
|
||||||
|
self.selected_image_path = None
|
||||||
|
self.e1=tk.Entry(self.t)
|
||||||
|
self.e2=tk.Entry(self.t)
|
||||||
|
self.t1.place(x=80,y=450)
|
||||||
|
self.t2.place(x=100,y=480)
|
||||||
|
self.e1.place(x=180,y=452)
|
||||||
|
self.e2.place(x=180,y=484)
|
||||||
|
self.qr=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.fileqr,bg="#EEDBCA",command=self.qrc)
|
||||||
|
self.qr.place(x=180,y=520)
|
||||||
|
self.b19=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.qrrc)
|
||||||
|
self.b19.place(x=180,y=630)
|
||||||
|
self.b10.destroy()
|
||||||
|
self.b11.destroy()
|
||||||
|
self.b12.destroy()
|
||||||
|
self.b18.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.imglabel=tk.Label(self.t,text="请把食物图片拖动到这里")
|
||||||
|
self.imglabel.place(x=120,y=120,width=280,height=280)
|
||||||
|
self.t1=tk.Label(self.t,text="食物名称",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t2=tk.Label(self.t,text="售价",bg="#EEDBCA",font=(None,16))
|
||||||
|
self.t.drop_target_register(DND_FILES)
|
||||||
|
self.t.dnd_bind('<<Drop>>', self.on_drop)
|
||||||
|
self.selected_image_path = None
|
||||||
|
self.e1=tk.Entry(self.t)
|
||||||
|
self.e2=tk.Entry(self.t)
|
||||||
|
self.t1.place(x=80,y=450)
|
||||||
|
self.t2.place(x=100,y=480)
|
||||||
|
self.e1.place(x=180,y=452)
|
||||||
|
self.e2.place(x=180,y=484)
|
||||||
|
self.qr=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.fileqr,bg="#EEDBCA",command=self.qrc)
|
||||||
|
self.qr.place(x=180,y=520)
|
||||||
|
self.b19=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.qrrc)
|
||||||
|
self.b19.place(x=180,y=630)
|
||||||
|
def delfood(self,id):
|
||||||
|
with open("foodconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
id=id.replace("I","")
|
||||||
|
id=int(id)
|
||||||
|
print(id)
|
||||||
|
del data[id-1]
|
||||||
|
with open("foodconfig.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(data,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
self.t.destroy()
|
||||||
|
new=admin()
|
||||||
|
new.food()
|
||||||
|
def qrc(self):
|
||||||
|
with open("foodconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
data.append({"name":self.e1.get(),"price":eval(self.e2.get()),"img":'static/images/'+self.selected_image_path.split("/")[-1]})
|
||||||
|
with open("foodconfig.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(data,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
shutil.copy(self.selected_image_path, 'static/images')
|
||||||
|
self.t.destroy()
|
||||||
|
admin()
|
||||||
|
def on_drop(self,ev):
|
||||||
|
filepath=ev.data
|
||||||
|
self.selected_image_path=filepath
|
||||||
|
image = Image.open(filepath)
|
||||||
|
image.thumbnail((275, 275))
|
||||||
|
photo = ImageTk.PhotoImage(image)
|
||||||
|
self.imglabel.config(image=photo)
|
||||||
|
self.imglabel.photo=photo
|
||||||
|
def qrrc(self):
|
||||||
|
self.t1.destroy()
|
||||||
|
self.t2.destroy()
|
||||||
|
self.e1.destroy()
|
||||||
|
self.e2.destroy()
|
||||||
|
self.f3.destroy()
|
||||||
|
self.b19.destroy()
|
||||||
|
self.qr.destroy()
|
||||||
|
self.food()
|
||||||
|
pass
|
||||||
|
def load_image(self,path, max_height=None):
|
||||||
|
image = Image.open(path)
|
||||||
|
if max_height:
|
||||||
|
ratio = max_height / image.height
|
||||||
|
new_height = max_height
|
||||||
|
new_width = int(image.width * ratio)
|
||||||
|
image = image.resize((new_width, new_height))
|
||||||
|
return ImageTk.PhotoImage(image)
|
||||||
|
def changepwd(self):
|
||||||
|
with open("pwd.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
if (self.e1.get()==data["pwd"]):
|
||||||
|
data["pwd"]=self.e2.get()
|
||||||
|
with open("pwd.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(data,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
messagebox.showinfo("更改密码成功","即将返回登陆页")
|
||||||
|
self.t.destroy()
|
||||||
|
logIn()
|
||||||
|
else:
|
||||||
|
messagebox.showinfo("原密码错误","请重新输入!")
|
||||||
|
|
||||||
|
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="flat",activebackground="#EEDBCA",image=self.file13,bg="#EEDBCA",command=self.changepwd)
|
||||||
|
self.b15=tk.Button(self.t,relief="flat",activebackground="#EEDBCA",image=self.file8,bg="#EEDBCA",command=self.re4)
|
||||||
|
self.b14.place(x=180,y=480)
|
||||||
|
self.b15.place(x=180,y=580)
|
||||||
|
pass
|
||||||
|
|
||||||
|
start=logIn()
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"billist": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"鸡排": 88
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"鸡排": 88
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"鸡排": 88
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"鸡排": 88
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
{}
|
@ -0,0 +1,7 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"img": "static/images/12.jpg",
|
||||||
|
"name": "煎饼",
|
||||||
|
"price": 123
|
||||||
|
}
|
||||||
|
]
|
After Width: | Height: | Size: 688 KiB |
After Width: | Height: | Size: 688 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 56 KiB |
@ -0,0 +1,125 @@
|
|||||||
|
$def with(foods,num)
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-cn">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>美食自由</title>
|
||||||
|
<style>
|
||||||
|
table{
|
||||||
|
margin: 5em 0em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="static/jquery/jquery-1.12.4.min.js"></script>
|
||||||
|
<!--包括所有已编译的插件-->
|
||||||
|
<script src="static/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
<!--引入Bootstrap-->
|
||||||
|
<link href="static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<!--引入CSS-->
|
||||||
|
<link href="static/spiceFood.css" rel="stylesheet" type="text/css" media="all">
|
||||||
|
<script>
|
||||||
|
function add(food,price){
|
||||||
|
$$("#hidep").append("{'"+food.name+"':"+food.price+"},")
|
||||||
|
var ordimg="<img decoding='async' src="+food.img+" class='img-thumbnail' width='100' >"
|
||||||
|
$$("#ord").append("<tr><td>"+ordimg+food.name+"</td><td>¥"+food.price+"</td><td>"+"取消"+"</td></tr>")
|
||||||
|
t=$$("#total").text()
|
||||||
|
$$("#total").text((Number(t)+Number(price)))
|
||||||
|
}
|
||||||
|
function orderok(){
|
||||||
|
var ord1=$$("#hidep").text()
|
||||||
|
$$.post("$num/ord","["+ord1+"]",function(state){
|
||||||
|
if (state=="success"){alert("提交成功!");
|
||||||
|
$$("#bi").append($$("#ord").html())
|
||||||
|
$$('#ord').empty()
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function bill(){
|
||||||
|
var ord1=$$("#hidep").text()
|
||||||
|
$$.post("$num/bill","bill",function(state){
|
||||||
|
if (state=="success"){alert("提交成功!");
|
||||||
|
location.reload();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="head-top navbar-fixed-top">
|
||||||
|
<ul class="nav nav-pills ">
|
||||||
|
<li><a href="#order" data-toggle="pill">点餐</a></li>
|
||||||
|
<li><a href="#ordered" data-toggle="pill">已点</a></li>
|
||||||
|
<li><a href="#call" data-toggle="pill">备注/反馈</a></li>
|
||||||
|
<li><a href="#bill" data-toggle="pill">结算账单</a></li>
|
||||||
|
<li><p class="navbar-text"> 桌号:$num</p></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<div id="content" class="tab-content">
|
||||||
|
<div class="tab-pane fade" id="ordered">
|
||||||
|
<form action="/ord" method="post">
|
||||||
|
<textarea id="hidep"></textarea>
|
||||||
|
</form>
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>餐品</th>
|
||||||
|
<th>价格</th>
|
||||||
|
<th>取消</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="ord">
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="bill">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>餐品</th>
|
||||||
|
<th>价格</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="bi">
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div ><span><a class="morebtn" onclick="bill()">付款</a></span></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade in active" id="order">
|
||||||
|
<div class="hot">
|
||||||
|
<div class="container">
|
||||||
|
$for food in foods:
|
||||||
|
<div class="col-md-3" style="margin: 2em 2em;">
|
||||||
|
<h3>$food["name"]</h3>
|
||||||
|
<img src="$food['img']" class="img-responsive" alt="">
|
||||||
|
<div>
|
||||||
|
<p class="glyphicon glyphicon-thumbs-up">两种口味可供选择</p>
|
||||||
|
<div class="cur">
|
||||||
|
<span class="add" onclick="add($food,$food['price'])"><a class="morebtn">添加到购物车</a></span>
|
||||||
|
<span><h6>一口价:¥$food["price"]</h6></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<nav class="head-bottom navbar-fixed-bottom">
|
||||||
|
<ul class="nav nav-pills ">
|
||||||
|
<li><a onclick="orderok()"><span class="glyphicon glyphicon-shopping-cart"></span>确认点餐</a></li>
|
||||||
|
<li><a>¥</a></li>
|
||||||
|
<li><a id="total">0</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1 @@
|
|||||||
|
IPv4 華硊 . . . . . . . . . . . . : 10.8.70.55
|
@ -0,0 +1,52 @@
|
|||||||
|
import web
|
||||||
|
import json
|
||||||
|
urls = (
|
||||||
|
'/(.*)/ord','add',
|
||||||
|
'/(.*)/bill','bill',
|
||||||
|
'/(.*)', 'hello',
|
||||||
|
|
||||||
|
)
|
||||||
|
app = web.application(urls, globals())
|
||||||
|
render=web.template.render('./')
|
||||||
|
def getfood():
|
||||||
|
with open("foodconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
return data
|
||||||
|
def getcustomer():
|
||||||
|
with open("customerconfig.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
return data
|
||||||
|
def getbill():
|
||||||
|
with open("bill.json",encoding='utf-8') as f:
|
||||||
|
data=json.load(f)
|
||||||
|
return data
|
||||||
|
def writebill(d):
|
||||||
|
with open("bill.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(d,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
def writecustomer(d):
|
||||||
|
with open("customerconfig.json",'w',encoding='utf-8') as f:
|
||||||
|
json.dump(d,f,indent=2,sort_keys=True,ensure_ascii=False)
|
||||||
|
class bill:
|
||||||
|
def POST(slef,b):
|
||||||
|
d=getcustomer()
|
||||||
|
bi=getbill()
|
||||||
|
bi["billist"].append(d[str(b)])
|
||||||
|
d.pop(str(b))
|
||||||
|
writecustomer(d)
|
||||||
|
writebill(bi)
|
||||||
|
return "success"
|
||||||
|
class add:
|
||||||
|
def POST(self,num):
|
||||||
|
i=web.input()
|
||||||
|
i=eval(eval(str(i)[10:-6]))
|
||||||
|
c={str(num):i}
|
||||||
|
d=getcustomer()
|
||||||
|
d[str(num)]=d.setdefault(str(num),[])+c[num]
|
||||||
|
writecustomer(d)
|
||||||
|
return "success"
|
||||||
|
class hello:
|
||||||
|
def GET(self,num):
|
||||||
|
foods=getfood()
|
||||||
|
return render.index(foods,num)
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run()
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"pwd": "aaa123"
|
||||||
|
}
|
@ -0,0 +1,587 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||||
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
|
.btn-default,
|
||||||
|
.btn-primary,
|
||||||
|
.btn-success,
|
||||||
|
.btn-info,
|
||||||
|
.btn-warning,
|
||||||
|
.btn-danger {
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.btn-default:active,
|
||||||
|
.btn-primary:active,
|
||||||
|
.btn-success:active,
|
||||||
|
.btn-info:active,
|
||||||
|
.btn-warning:active,
|
||||||
|
.btn-danger:active,
|
||||||
|
.btn-default.active,
|
||||||
|
.btn-primary.active,
|
||||||
|
.btn-success.active,
|
||||||
|
.btn-info.active,
|
||||||
|
.btn-warning.active,
|
||||||
|
.btn-danger.active {
|
||||||
|
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||||
|
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||||
|
}
|
||||||
|
.btn-default.disabled,
|
||||||
|
.btn-primary.disabled,
|
||||||
|
.btn-success.disabled,
|
||||||
|
.btn-info.disabled,
|
||||||
|
.btn-warning.disabled,
|
||||||
|
.btn-danger.disabled,
|
||||||
|
.btn-default[disabled],
|
||||||
|
.btn-primary[disabled],
|
||||||
|
.btn-success[disabled],
|
||||||
|
.btn-info[disabled],
|
||||||
|
.btn-warning[disabled],
|
||||||
|
.btn-danger[disabled],
|
||||||
|
fieldset[disabled] .btn-default,
|
||||||
|
fieldset[disabled] .btn-primary,
|
||||||
|
fieldset[disabled] .btn-success,
|
||||||
|
fieldset[disabled] .btn-info,
|
||||||
|
fieldset[disabled] .btn-warning,
|
||||||
|
fieldset[disabled] .btn-danger {
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.btn-default .badge,
|
||||||
|
.btn-primary .badge,
|
||||||
|
.btn-success .badge,
|
||||||
|
.btn-info .badge,
|
||||||
|
.btn-warning .badge,
|
||||||
|
.btn-danger .badge {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
.btn:active,
|
||||||
|
.btn.active {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-default {
|
||||||
|
text-shadow: 0 1px 0 #fff;
|
||||||
|
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
|
||||||
|
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #dbdbdb;
|
||||||
|
border-color: #ccc;
|
||||||
|
}
|
||||||
|
.btn-default:hover,
|
||||||
|
.btn-default:focus {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-default:active,
|
||||||
|
.btn-default.active {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
border-color: #dbdbdb;
|
||||||
|
}
|
||||||
|
.btn-default.disabled,
|
||||||
|
.btn-default[disabled],
|
||||||
|
fieldset[disabled] .btn-default,
|
||||||
|
.btn-default.disabled:hover,
|
||||||
|
.btn-default[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-default:hover,
|
||||||
|
.btn-default.disabled:focus,
|
||||||
|
.btn-default[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-default:focus,
|
||||||
|
.btn-default.disabled.focus,
|
||||||
|
.btn-default[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-default.focus,
|
||||||
|
.btn-default.disabled:active,
|
||||||
|
.btn-default[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-default:active,
|
||||||
|
.btn-default.disabled.active,
|
||||||
|
.btn-default[disabled].active,
|
||||||
|
fieldset[disabled] .btn-default.active {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-primary {
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #245580;
|
||||||
|
}
|
||||||
|
.btn-primary:hover,
|
||||||
|
.btn-primary:focus {
|
||||||
|
background-color: #265a88;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-primary:active,
|
||||||
|
.btn-primary.active {
|
||||||
|
background-color: #265a88;
|
||||||
|
border-color: #245580;
|
||||||
|
}
|
||||||
|
.btn-primary.disabled,
|
||||||
|
.btn-primary[disabled],
|
||||||
|
fieldset[disabled] .btn-primary,
|
||||||
|
.btn-primary.disabled:hover,
|
||||||
|
.btn-primary[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-primary:hover,
|
||||||
|
.btn-primary.disabled:focus,
|
||||||
|
.btn-primary[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-primary:focus,
|
||||||
|
.btn-primary.disabled.focus,
|
||||||
|
.btn-primary[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-primary.focus,
|
||||||
|
.btn-primary.disabled:active,
|
||||||
|
.btn-primary[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-primary:active,
|
||||||
|
.btn-primary.disabled.active,
|
||||||
|
.btn-primary[disabled].active,
|
||||||
|
fieldset[disabled] .btn-primary.active {
|
||||||
|
background-color: #265a88;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
|
||||||
|
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #3e8f3e;
|
||||||
|
}
|
||||||
|
.btn-success:hover,
|
||||||
|
.btn-success:focus {
|
||||||
|
background-color: #419641;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-success:active,
|
||||||
|
.btn-success.active {
|
||||||
|
background-color: #419641;
|
||||||
|
border-color: #3e8f3e;
|
||||||
|
}
|
||||||
|
.btn-success.disabled,
|
||||||
|
.btn-success[disabled],
|
||||||
|
fieldset[disabled] .btn-success,
|
||||||
|
.btn-success.disabled:hover,
|
||||||
|
.btn-success[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-success:hover,
|
||||||
|
.btn-success.disabled:focus,
|
||||||
|
.btn-success[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-success:focus,
|
||||||
|
.btn-success.disabled.focus,
|
||||||
|
.btn-success[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-success.focus,
|
||||||
|
.btn-success.disabled:active,
|
||||||
|
.btn-success[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-success:active,
|
||||||
|
.btn-success.disabled.active,
|
||||||
|
.btn-success[disabled].active,
|
||||||
|
fieldset[disabled] .btn-success.active {
|
||||||
|
background-color: #419641;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-info {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
|
||||||
|
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #28a4c9;
|
||||||
|
}
|
||||||
|
.btn-info:hover,
|
||||||
|
.btn-info:focus {
|
||||||
|
background-color: #2aabd2;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-info:active,
|
||||||
|
.btn-info.active {
|
||||||
|
background-color: #2aabd2;
|
||||||
|
border-color: #28a4c9;
|
||||||
|
}
|
||||||
|
.btn-info.disabled,
|
||||||
|
.btn-info[disabled],
|
||||||
|
fieldset[disabled] .btn-info,
|
||||||
|
.btn-info.disabled:hover,
|
||||||
|
.btn-info[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-info:hover,
|
||||||
|
.btn-info.disabled:focus,
|
||||||
|
.btn-info[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-info:focus,
|
||||||
|
.btn-info.disabled.focus,
|
||||||
|
.btn-info[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-info.focus,
|
||||||
|
.btn-info.disabled:active,
|
||||||
|
.btn-info[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-info:active,
|
||||||
|
.btn-info.disabled.active,
|
||||||
|
.btn-info[disabled].active,
|
||||||
|
fieldset[disabled] .btn-info.active {
|
||||||
|
background-color: #2aabd2;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-warning {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
|
||||||
|
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #e38d13;
|
||||||
|
}
|
||||||
|
.btn-warning:hover,
|
||||||
|
.btn-warning:focus {
|
||||||
|
background-color: #eb9316;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-warning:active,
|
||||||
|
.btn-warning.active {
|
||||||
|
background-color: #eb9316;
|
||||||
|
border-color: #e38d13;
|
||||||
|
}
|
||||||
|
.btn-warning.disabled,
|
||||||
|
.btn-warning[disabled],
|
||||||
|
fieldset[disabled] .btn-warning,
|
||||||
|
.btn-warning.disabled:hover,
|
||||||
|
.btn-warning[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-warning:hover,
|
||||||
|
.btn-warning.disabled:focus,
|
||||||
|
.btn-warning[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-warning:focus,
|
||||||
|
.btn-warning.disabled.focus,
|
||||||
|
.btn-warning[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-warning.focus,
|
||||||
|
.btn-warning.disabled:active,
|
||||||
|
.btn-warning[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-warning:active,
|
||||||
|
.btn-warning.disabled.active,
|
||||||
|
.btn-warning[disabled].active,
|
||||||
|
fieldset[disabled] .btn-warning.active {
|
||||||
|
background-color: #eb9316;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-danger {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
|
||||||
|
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #b92c28;
|
||||||
|
}
|
||||||
|
.btn-danger:hover,
|
||||||
|
.btn-danger:focus {
|
||||||
|
background-color: #c12e2a;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-danger:active,
|
||||||
|
.btn-danger.active {
|
||||||
|
background-color: #c12e2a;
|
||||||
|
border-color: #b92c28;
|
||||||
|
}
|
||||||
|
.btn-danger.disabled,
|
||||||
|
.btn-danger[disabled],
|
||||||
|
fieldset[disabled] .btn-danger,
|
||||||
|
.btn-danger.disabled:hover,
|
||||||
|
.btn-danger[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-danger:hover,
|
||||||
|
.btn-danger.disabled:focus,
|
||||||
|
.btn-danger[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-danger:focus,
|
||||||
|
.btn-danger.disabled.focus,
|
||||||
|
.btn-danger[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-danger.focus,
|
||||||
|
.btn-danger.disabled:active,
|
||||||
|
.btn-danger[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-danger:active,
|
||||||
|
.btn-danger.disabled.active,
|
||||||
|
.btn-danger[disabled].active,
|
||||||
|
fieldset[disabled] .btn-danger.active {
|
||||||
|
background-color: #c12e2a;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.thumbnail,
|
||||||
|
.img-thumbnail {
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.dropdown-menu > li > a:hover,
|
||||||
|
.dropdown-menu > li > a:focus {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||||
|
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.dropdown-menu > .active > a,
|
||||||
|
.dropdown-menu > .active > a:hover,
|
||||||
|
.dropdown-menu > .active > a:focus {
|
||||||
|
background-color: #2e6da4;
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.navbar-default {
|
||||||
|
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
|
||||||
|
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-nav > .open > a,
|
||||||
|
.navbar-default .navbar-nav > .active > a {
|
||||||
|
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
|
||||||
|
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.navbar-brand,
|
||||||
|
.navbar-nav > li > a {
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
|
||||||
|
}
|
||||||
|
.navbar-inverse {
|
||||||
|
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
|
||||||
|
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.navbar-inverse .navbar-nav > .open > a,
|
||||||
|
.navbar-inverse .navbar-nav > .active > a {
|
||||||
|
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
|
||||||
|
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||||
|
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||||
|
}
|
||||||
|
.navbar-inverse .navbar-brand,
|
||||||
|
.navbar-inverse .navbar-nav > li > a {
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
|
||||||
|
}
|
||||||
|
.navbar-static-top,
|
||||||
|
.navbar-fixed-top,
|
||||||
|
.navbar-fixed-bottom {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a,
|
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
|
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
|
||||||
|
color: #fff;
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.alert {
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
}
|
||||||
|
.alert-success {
|
||||||
|
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
|
||||||
|
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #b2dba1;
|
||||||
|
}
|
||||||
|
.alert-info {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
|
||||||
|
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #9acfea;
|
||||||
|
}
|
||||||
|
.alert-warning {
|
||||||
|
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
|
||||||
|
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #f5e79e;
|
||||||
|
}
|
||||||
|
.alert-danger {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
|
||||||
|
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #dca7a7;
|
||||||
|
}
|
||||||
|
.progress {
|
||||||
|
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
|
||||||
|
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar {
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-success {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
|
||||||
|
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-info {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
|
||||||
|
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-warning {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
|
||||||
|
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-danger {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
|
||||||
|
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||||
|
}
|
||||||
|
.list-group {
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.list-group-item.active,
|
||||||
|
.list-group-item.active:hover,
|
||||||
|
.list-group-item.active:focus {
|
||||||
|
text-shadow: 0 -1px 0 #286090;
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #2b669a;
|
||||||
|
}
|
||||||
|
.list-group-item.active .badge,
|
||||||
|
.list-group-item.active:hover .badge,
|
||||||
|
.list-group-item.active:focus .badge {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
.panel {
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
}
|
||||||
|
.panel-default > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||||
|
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-primary > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-success > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
|
||||||
|
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-info > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
|
||||||
|
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-warning > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
|
||||||
|
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-danger > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
|
||||||
|
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.well {
|
||||||
|
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
|
||||||
|
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #dcdcdc;
|
||||||
|
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||||
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=bootstrap-theme.css.map */
|
After Width: | Height: | Size: 106 KiB |
@ -0,0 +1,13 @@
|
|||||||
|
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||||
|
require('../../js/transition.js')
|
||||||
|
require('../../js/alert.js')
|
||||||
|
require('../../js/button.js')
|
||||||
|
require('../../js/carousel.js')
|
||||||
|
require('../../js/collapse.js')
|
||||||
|
require('../../js/dropdown.js')
|
||||||
|
require('../../js/modal.js')
|
||||||
|
require('../../js/tooltip.js')
|
||||||
|
require('../../js/popover.js')
|
||||||
|
require('../../js/scrollspy.js')
|
||||||
|
require('../../js/tab.js')
|
||||||
|
require('../../js/affix.js')
|
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 55 KiB |
@ -0,0 +1,78 @@
|
|||||||
|
/*设置body元素字体为Microso YaHei*/
|
||||||
|
body,button,input,select,h3,h6{font-family: Microsoft YaHei;}
|
||||||
|
.head-top{
|
||||||
|
background: #04bcd8;
|
||||||
|
padding:0.8em 0;
|
||||||
|
}
|
||||||
|
.head-bottom{
|
||||||
|
background: #04bcd8;
|
||||||
|
padding:0.8em 0;
|
||||||
|
}
|
||||||
|
#hidep {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
/*热卖商品*/
|
||||||
|
.hot h3{
|
||||||
|
color:#1A1A1A;
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 0 0 1em;
|
||||||
|
padding: 0 0 0.5em;
|
||||||
|
border-bottom: 2px solid #eeeeee;
|
||||||
|
}
|
||||||
|
.hot p{
|
||||||
|
color:#5fa022;
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.8em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
.hot{
|
||||||
|
padding: 5em 0;
|
||||||
|
border: 2px solid #eee;
|
||||||
|
margin: 0 0;
|
||||||
|
}
|
||||||
|
.hot h6{
|
||||||
|
color:#dd0929;
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: 400;
|
||||||
|
margin: 1em 1em;
|
||||||
|
}
|
||||||
|
a.morebtn{
|
||||||
|
display: block;
|
||||||
|
font-size: 1em;
|
||||||
|
color:#FFF;
|
||||||
|
text-decoration: none; /*去除下划线*/
|
||||||
|
font-weight: 400;
|
||||||
|
background: #dc0489;
|
||||||
|
padding: 10px 18px;
|
||||||
|
transition: 0.5s all ease;
|
||||||
|
-webkit-transition: 0.5s all ease;
|
||||||
|
border-radius: 3px;
|
||||||
|
-weblit-border-radius:3px;
|
||||||
|
}
|
||||||
|
a.morebtn:hover{
|
||||||
|
background:#03ed9f;
|
||||||
|
}
|
||||||
|
/*设置选项卡菜单的字体颜色*/
|
||||||
|
.nav-pills>li>a{
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
.nav-pills>li>p{
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
.nav-pills>li.active>a{
|
||||||
|
color:rgb(224, 116, 44);
|
||||||
|
}
|
||||||
|
.nav-pills>li.active>a:active{
|
||||||
|
color:rgb(4, 195, 224)
|
||||||
|
}
|
||||||
|
.nav-pills>li.active>a:hover{
|
||||||
|
color:#bee307;
|
||||||
|
background-color: #5A9522;
|
||||||
|
}
|
||||||
|
.choose{
|
||||||
|
border:1px solid rgb(237, 192, 11);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
import tkinter as tk
|
||||||
|
from tkinterdnd2 import DND_FILES, TkinterDnD
|
||||||
|
from PIL import Image, ImageTk
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
def on_drop(event):
|
||||||
|
file_path = event.data
|
||||||
|
if file_path.endswith(('.jpg', '.jpeg', '.png', '.gif')):
|
||||||
|
display_thumbnail(file_path)
|
||||||
|
|
||||||
|
def display_thumbnail(file_path):
|
||||||
|
global selected_image_path
|
||||||
|
selected_image_path = file_path
|
||||||
|
|
||||||
|
image = Image.open(file_path)
|
||||||
|
image.thumbnail((200, 200))
|
||||||
|
|
||||||
|
photo = ImageTk.PhotoImage(image)
|
||||||
|
|
||||||
|
image_label.config(image=photo)
|
||||||
|
image_label.photo = photo
|
||||||
|
|
||||||
|
def save_image():
|
||||||
|
if selected_image_path:
|
||||||
|
if not os.path.exists('static/images'):
|
||||||
|
os.makedirs('static/images')
|
||||||
|
|
||||||
|
shutil.copy(selected_image_path, 'static/images')
|
||||||
|
image_label.config(image="")
|
||||||
|
else:
|
||||||
|
image_label.config(text='No Image Selected!')
|
||||||
|
|
||||||
|
root = TkinterDnD.Tk()
|
||||||
|
root.title('Image Uploader')
|
||||||
|
|
||||||
|
image_label = tk.Label(root, text='Drop an image here', width=200, height=200)
|
||||||
|
image_label.pack(pady=10)
|
||||||
|
|
||||||
|
root.drop_target_register(DND_FILES)
|
||||||
|
root.dnd_bind('<<Drop>>', on_drop)
|
||||||
|
|
||||||
|
save_button = tk.Button(root, text='Save Image', command=save_image)
|
||||||
|
save_button.pack()
|
||||||
|
|
||||||
|
selected_image_path = None
|
||||||
|
|
||||||
|
root.mainloop()
|
@ -0,0 +1,2 @@
|
|||||||
|
python admin.py
|
||||||
|
pause
|
@ -0,0 +1,2 @@
|
|||||||
|
python myweb.py 172.20.10.2:80
|
||||||
|
pause
|
@ -0,0 +1,2 @@
|
|||||||
|
python myweb.py
|
||||||
|
pause
|