9 lines
413 B
Python
9 lines
413 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import SelectField, IntegerField
|
|
from wtforms.validators import DataRequired
|
|
|
|
class TransactionForm(FlaskForm):
|
|
product_id = SelectField('商品', coerce=int, validators=[DataRequired()])
|
|
type = SelectField('類型', choices=[('in', '入庫'), ('out', '出庫')], validators=[DataRequired()])
|
|
quantity = IntegerField('數量', validators=[DataRequired()])
|