def new_bz_save(): total = Total() loan_apply_id = request.form["hiddenId"] # 先删除所有标准 total.deleteBZ(loan_apply_id) # 新增页面所有标准 total.addNewBZ(loan_apply_id, request) loan_apply = View_Query_Loan.query.filter_by(loan_apply_id=loan_apply_id).first() monitorList = SC_Monitor.query.filter_by(loan_apply_id=loan_apply_id).all() checkForm = getCheckForm(loan_apply_id, loan_apply) return render_template( "Process/dhgl/new_bz.html", loan_apply=loan_apply, monitorList=monitorList, checkForm=checkForm, loan_apply_id=loan_apply_id, )
def login(): if request.method == 'POST': user = SC_User.query.filter_by(login_name=request.form['login_name'], login_password=GetStringMD5(request.form['login_password'])).first() if user: if user.active == '0': flash('该用户被禁用,请联系管理员','error') return render_template("login.html") else: login_user(user) role = SC_UserRole.query.filter_by(user_id=current_user.id).first().role total = Total() data=total.getListSum(role) return render_template("welcome.html",role=role,data=data) else: flash('用户名或密码错误','error') return render_template("login.html") else: return render_template("login.html")
def welcome(): # privileges = SC_UserRole.query.filter_by(user_id=current_user.id).first().role.privileges role = SC_UserRole.query.filter_by(user_id=current_user.id).first().role total = Total() data=total.getListSum(role) return render_template("welcome.html",role=role,data=data)