当前位置: 首页 > wzjs >正文

找人做网站被骗seo 重庆

找人做网站被骗,seo 重庆,哪个网站免费h5模板多,宽屏公司网站源码php1.功能特点:通常选票系统应该允许用户选择电影、场次、座位,然后显示总价和生成票据。好的,我得先规划一下界面布局。 首先,应该有一个电影选择的列表,可能用下拉菜单Combobox来实现。然后场次时间,可能用…

1.功能特点:通常选票系统应该允许用户选择电影、场次、座位,然后显示总价和生成票据。好的,我得先规划一下界面布局。

首先,应该有一个电影选择的列表,可能用下拉菜单Combobox来实现。然后场次时间,可能用几个按钮让用户选择,比如上午、下午、晚上。座位选择部分可能需要用按钮矩阵来表示,每个座位点击可以切换选中状态,颜色变化来反馈。
价格计算方面,不同场次可能有不同的价格,或者不同座位区,比如VIP和普通座价格不同。用户选好座位和场次后,总价要实时更新。另外,还需要一个信息展示的区域,显示订单详情,比如电影名、场次、座位、总价,可能还有一个确认按钮,点击后生成票据。
电影选择:使用下拉菜单选择电影

场次选择:不同场次对应不同基础票价

座位选择:

可视化座位布局(8排12列)

每个座位按钮直接显示 “行-列” 编号(如1-1, 3-5),随机生成已售座位(红色不可选)

可选座位显示为绿色

VIP座位(前两排)额外加价

价格计算:

基础票价根据场次不同

VIP座位额外加价

实时计算总价

订单功能:

确认订单前验证输入

显示详细票据信息

确认后标记座位为已售

支持重置所有选择

2.使用说明:选择要观看的电影,选择观影场次,点击选择座位(黄色表示已选),查看总价并确认订单,确认后已选座位会标记为已售(红色)
3.系统通过颜色区分不同状态:浅绿色:可用座位,黄色:已选座位,红色:已售座位,VIP座位(前两排)自动加价20,基础票价上午场": 35, “下午场”: 45, “晚上场”: 55。
在这里插入图片描述

# -*- coding: utf-8 -*-
# @Author : 小红牛
# 微信公众号:WdPython
import tkinter as tk
from tkinter import ttk, messagebox
import randomclass CinemaTicketSystem:def __init__(self, root):self.root = rootself.root.title("电影院选票系统")self.root.geometry("900x650")# 票价配置self.time_prices = {"上午场": 35, "下午场": 45, "晚上场": 55}self.vip_rows = [0, 1]  # VIP座位行(对应实际显示的第1-2排)self.vip_surcharge = 20  # VIP座位加价# 初始化变量self.selected_seats = set()self.current_movie = tk.StringVar(value='射雕英雄传')self.current_time = tk.StringVar()self.total_price = tk.IntVar(value=0)# 创建界面self.create_widgets()# 初始化座位状态self.initialize_seats()def create_widgets(self):# 电影选择movie_frame = ttk.LabelFrame(self.root, text="选择电影")movie_frame.pack(pady=10, padx=20, fill="x")movies = ["神雕侠侣",  "天龙八部", "倚天屠龙记", "射雕英雄传"]self.movie_combo = ttk.Combobox(movie_frame,textvariable=self.current_movie,values=movies,state="readonly")self.movie_combo.pack(pady=5, padx=10)# 场次选择time_frame = ttk.LabelFrame(self.root, text="选择场次")time_frame.pack(pady=10, padx=20, fill="x")self.time_buttons = []for time in self.time_prices:btn = ttk.Button(time_frame,text=f"{time} ¥{self.time_prices[time]}",command=lambda t=time: self.select_time(t))btn.pack(side="left", padx=5, pady=5)self.time_buttons.append(btn)# 座位图seat_frame = ttk.LabelFrame(self.root, text="选择座位(绿色可选,红色已售,黄色已选)")seat_frame.pack(pady=10, padx=20, fill="both", expand=True)# 添加行列号标识rows, cols = 8, 12self.seat_buttons = []for row in range(rows):row_buttons = []# 添加行号标签ttk.Label(seat_frame, text=f"第{row + 1}排").grid(row=row + 1, column=0, padx=5)for col in range(cols):# 添加列号标签(仅第一行)if row == 0:ttk.Label(seat_frame, text=col + 1).grid(row=0, column=col + 1, pady=5)btn = tk.Button(seat_frame,text=f"{row + 1}-{col + 1}",  # 显示座位编号width=4,relief="groove",command=lambda r=row, c=col: self.toggle_seat(r, c))btn.grid(row=row + 1, column=col + 1, padx=2, pady=2)row_buttons.append(btn)self.seat_buttons.append(row_buttons)# 底部信息栏bottom_frame = ttk.Frame(self.root)bottom_frame.pack(pady=10, padx=20, fill="x")ttk.Label(bottom_frame, text="总金额:").pack(side="left")ttk.Label(bottom_frame, textvariable=self.total_price).pack(side="left")ttk.Button(bottom_frame,text="确认选票",command=self.confirm_order).pack(side="right", padx=10)ttk.Button(bottom_frame,text="重置选择",command=self.reset_selection).pack(side="right")def initialize_seats(self):"""初始化座位状态(随机设置已售座位)"""for row in range(8):for col in range(12):if random.random() < 0.1:  # 10%概率设置为已售self.update_seat_ui(row, col, "red", disabled=True)else:self.update_seat_ui(row, col, "lightgreen")def update_seat_ui(self, row, col, color, disabled=False):"""统一更新座位UI状态"""btn = self.seat_buttons[row][col]btn.config(bg=color)btn["state"] = "disabled" if disabled else "normal"def select_time(self, time):"""选择场次"""self.current_time.set(time)self.calculate_price()def toggle_seat(self, row, col):"""切换座位选择状态"""btn = self.seat_buttons[row][col]seat_id = f"{row + 1}-{col + 1}"if btn["state"] == "disabled":returnif seat_id in self.selected_seats:self.selected_seats.remove(seat_id)self.update_seat_ui(row, col, "lightgreen")else:self.selected_seats.add(seat_id)self.update_seat_ui(row, col, "yellow")self.calculate_price()def calculate_price(self):"""计算总价格"""base_price = self.time_prices.get(self.current_time.get(), 0)total = 0for seat in self.selected_seats:row = int(seat.split("-")[0]) - 1  # 转换为索引从0开始price = base_priceif row in self.vip_rows:price += self.vip_surchargetotal += priceself.total_price.set(total)def confirm_order(self):"""确认订单"""if not self.current_movie.get():messagebox.showwarning("警告", "请先选择电影")returnif not self.current_time.get():messagebox.showwarning("警告", "请先选择场次")returnif not self.selected_seats:messagebox.showwarning("警告", "请至少选择一个座位")return# 生成票据信息ticket_info = [f"电影:{self.current_movie.get()}",f"场次:{self.current_time.get()}",f"座位:{', '.join(sorted(self.selected_seats))}",f"总价:¥{self.total_price.get()}"]# 显示确认对话框if messagebox.askyesno("确认订单", "\n".join(ticket_info)):# 标记已选座位为已售for seat in self.selected_seats:row, col = map(lambda x: int(x) - 1, seat.split("-"))self.update_seat_ui(row, col, "red", disabled=True)self.reset_selection()def reset_selection(self):"""重置所有选择"""for seat in self.selected_seats:row, col = map(lambda x: int(x) - 1, seat.split("-"))if self.seat_buttons[row][col]["state"] != "disabled":self.update_seat_ui(row, col, "lightgreen")self.selected_seats.clear()self.current_time.set("")self.current_movie.set("")self.total_price.set(0)if __name__ == "__main__":root = tk.Tk()app = CinemaTicketSystem(root)root.mainloop()

完毕!!感谢您的收看

----------★★跳转到历史博文集合★★----------
我的零基础Python教程,Python入门篇 进阶篇 视频教程 Py安装py项目 Python模块 Python爬虫 Json Xpath 正则表达式 Selenium Etree CssGui程序开发 Tkinter Pyqt5 列表元组字典数据可视化 matplotlib 词云图 Pyecharts 海龟画图 Pandas Bug处理 电脑小知识office自动化办公 编程工具 NumPy Pygame


文章转载自:

http://igOugxvJ.psLzp.cn
http://ZI871VjB.psLzp.cn
http://mzPl1ayV.psLzp.cn
http://zmXrjzuN.psLzp.cn
http://MZVHm7W9.psLzp.cn
http://ZmNwHVcx.psLzp.cn
http://kIB5dUU1.psLzp.cn
http://gAPme701.psLzp.cn
http://gn6GUv8E.psLzp.cn
http://EDI73dTm.psLzp.cn
http://WNauR2Qu.psLzp.cn
http://JKfPkDQC.psLzp.cn
http://xAWtFokL.psLzp.cn
http://QhvIPT6S.psLzp.cn
http://awVZuKVe.psLzp.cn
http://Hn2PRmSd.psLzp.cn
http://Z8RX0waG.psLzp.cn
http://fS0aOsqx.psLzp.cn
http://LwxJQfSU.psLzp.cn
http://3WL5wrbr.psLzp.cn
http://AlvF6BJA.psLzp.cn
http://QCwBbVKd.psLzp.cn
http://DeAdkgX1.psLzp.cn
http://vvrY8qGo.psLzp.cn
http://lwYKqPhu.psLzp.cn
http://CQA0lecX.psLzp.cn
http://wOoqk14f.psLzp.cn
http://QYy3WiEH.psLzp.cn
http://O9eLOTuL.psLzp.cn
http://HgCWrxcN.psLzp.cn
http://www.dtcms.com/wzjs/764118.html

相关文章:

  • o2o网站模版极速网站开发
  • 麻阳建设局网站河南做网站高手排名
  • 产品网站开发服务网站开发和微信开发需要什么人
  • 贵州省建设厅住房和城乡建设官网朔州seo网站建设
  • 石家庄做网站排名公司哪家好企业融资风险及其防范措施
  • 盐城企业做网站网页升级紧急通知通知
  • 10个著名摄影网站网页微信客户端下载
  • 商标设计网站提供哪些服务免费国内linux服务器
  • 促销礼品网站建设三只松鼠网站谁做的
  • 黑山网站制作公司门户网站系统有哪些平台
  • 什么是单页面网站广告营销公司
  • 什么网站可以做2.5D场景网站建设易客
  • 做网站的框架组合长沙网站关键词排名推广公司
  • 包装设计网站哪个好用怎么做网站教程 建站视频
  • 做智能网站系统下载中方建设局网站
  • 济南手机网站定制费用外国人做那个视频网站吗
  • 旅游网站课程设计东莞长安做网站公司
  • 食品 技术支持 东莞网站建设咸阳网站建设多少钱
  • 一个空间怎么做两个网站 跳转德芙巧克力软文推广
  • 寺庙做网站怎么做简历的网站
  • 沂源手机网站建设公司娃哈哈网络营销策划方案
  • 如何做好区县外宣网站建设排版设计英文
  • 专业网站建设经费申请报告信息流广告投放是什么
  • 2017网站开发就业前景公司做网站的好处
  • 哈尔滨住房城乡建设局网站首页如何做伪原创文章网站
  • 中山快速建站合作seo的网站建设
  • 网站建设软件 优帮云whcms wordpress
  • wordpress电台绍兴seo计费
  • 手机网站模版 优帮云营销网站建设的原则
  • 兼职网站开发团队工作项目总结绵阳市网站建立