fix: 入库 search-base 物料选择加公司隔离,恢复半成品批号按本公司历史自动递增
This commit is contained in:
@ -43,6 +43,11 @@ class ProductInboundService:
|
||||
MaterialBase.company_name.ilike(kw)
|
||||
)
|
||||
)
|
||||
# ★ 行级公司隔离:只能搜索/选择本公司的物料(超管/跨域不受限)
|
||||
from app.utils.decorators import get_current_company_filter
|
||||
company_limit = get_current_company_filter()
|
||||
if company_limit is not None:
|
||||
query = query.filter(MaterialBase.company_name == company_limit)
|
||||
query = query.order_by(MaterialBase.id.desc())
|
||||
pagination = query.paginate(page=page, per_page=limit, error_out=False)
|
||||
results = []
|
||||
|
||||
Reference in New Issue
Block a user