2026-01-27 15:50:23 +08:00
|
|
|
|
from flask import Blueprint
|
2026-02-09 11:44:24 +08:00
|
|
|
|
|
|
|
|
|
|
# 首先创建主蓝图,避免子模块导入时出现循环依赖
|
|
|
|
|
|
inbound_bp = Blueprint('inbound', __name__)
|
|
|
|
|
|
|
|
|
|
|
|
# 导入各子模块的蓝图(此时 inbound_bp 已定义,子模块可以安全导入它)
|
2026-01-27 15:50:23 +08:00
|
|
|
|
from .buy import inbound_buy_bp
|
2026-01-28 17:44:39 +08:00
|
|
|
|
from .semi import inbound_semi_bp
|
2026-01-27 18:10:09 +08:00
|
|
|
|
from .base import inbound_base_bp
|
2026-01-29 09:27:56 +08:00
|
|
|
|
from .product import inbound_product_bp
|
2026-02-05 14:30:11 +08:00
|
|
|
|
from .inbound_summary import bp as inbound_summary_bp
|
2026-02-09 13:15:48 +08:00
|
|
|
|
from .stock import bp as inbound_stock_bp
|
2026-04-08 18:34:48 +08:00
|
|
|
|
from .repair import inbound_repair_bp
|
2026-01-27 18:10:09 +08:00
|
|
|
|
|
2026-02-09 11:44:24 +08:00
|
|
|
|
# 导入 service 模块,使其路由装饰器可以正常注册到 inbound_bp 上
|
|
|
|
|
|
from . import service
|
2026-02-09 11:34:09 +08:00
|
|
|
|
|
2026-02-09 11:44:24 +08:00
|
|
|
|
# 注册子蓝图
|
2026-01-27 15:50:23 +08:00
|
|
|
|
inbound_bp.register_blueprint(inbound_buy_bp, url_prefix='/buy')
|
2026-01-28 17:44:39 +08:00
|
|
|
|
inbound_bp.register_blueprint(inbound_semi_bp, url_prefix='/semi')
|
2026-01-29 09:27:56 +08:00
|
|
|
|
inbound_bp.register_blueprint(inbound_base_bp, url_prefix='/base')
|
2026-02-05 14:30:11 +08:00
|
|
|
|
inbound_bp.register_blueprint(inbound_product_bp, url_prefix='/product')
|
2026-02-06 10:16:37 +08:00
|
|
|
|
inbound_bp.register_blueprint(inbound_summary_bp, url_prefix='/summary')
|
2026-02-09 13:15:48 +08:00
|
|
|
|
inbound_bp.register_blueprint(inbound_stock_bp, url_prefix='/stock')
|
2026-04-08 18:34:48 +08:00
|
|
|
|
inbound_bp.register_blueprint(inbound_repair_bp, url_prefix='/repair')
|
2026-02-05 14:30:11 +08:00
|
|
|
|
|
2026-02-09 11:44:24 +08:00
|
|
|
|
# service 模块的路由已经直接附加到 inbound_bp,无需再注册子蓝图
|