issue_template

Minimal example

Fork this JSFiddle and reproduce your issue.

Expected behaviour

I thought that by going to the page '...' and pressing the button '...' then '...' would happen.

Actual behaviour

Instead of '...', what I saw was that '...' happened instead.

Browsers affected

I tested on all major browsers and only IE 11 does not work.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
請你幫我檢from flask import Flask, render_template, request, redirect import openpyxl app = Flask(__name__) # 首页,录入数据页面 @app.route('/', methods=['GET', 'POST']) def index(): if request.method == 'POST': # 从表单中获取数据 confirm_date = request.form['confirm_date'] shift = request.form['shift'] machine_model = request.form['machine_model'] issue = request.form['issue'] issue_qty = request.form['issue_qty'] note = request.form['note'] # 打开Excel文件并写入数据 wb = openpyxl.load_workbook('D:/data.xlsx') ws = wb.active row_count = ws.max_row ws.cell(row=row_count+1, column=1, value=confirm_date) ws.cell(row=row_count+1, column=2, value=shift) ws.cell(row=row_count+1, column=3, value=machine_model) ws.cell(row=row_count+1, column=4, value=issue) ws.cell(row=row_count+1, column=5, value=int(issue_qty)) ws.cell(row=row_count+1, column=6, value=note) wb.save('D:/data.xlsx') return redirect('/') else: return render_template('index.html') # 查询记录页面 @app.route('/search_record', methods=['GET', 'POST']) def search_record(): if request.method == 'POST': # 从表单中获取查询条件 start_date = request.form['start_date'] end_date = request.form['end_date'] machine_model = request.form['machine_model'] # 打开Excel文件并查询数据 wb = openpyxl.load_workbook('D:/data.xlsx') ws = wb.active data = [] for row in ws.iter_rows(min_row=2): if start_date <= str(row[0].value) <= end_date: if row[2].value == machine_model or machine_model == '全部': data.append([row[0].value, row[1].value, row[2].value, row[3].value, row[4].value, row[5].value]) return render_template('search_record.html', data=data) else: return render_template('search_record.html') if __name__ == '__main__': app.run(debug=True,host="0.0.0.0")
06-10

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值