1、优化库存详情分类查询,支持选择父分类查询;

This commit is contained in:
chenlin 2024-11-06 18:38:41 +08:00
parent 602f73a7a9
commit 6172ceaa66

View File

@ -2784,7 +2784,12 @@ func (m *ErpStockCommodityListReq) buildQueryConditions(qs *gorm.DB, nType uint3
}
if m.ErpCategoryId != 0 { //商品分类id
qs = qs.Where("erp_category_id=?", m.ErpCategoryId)
categoryList, _ := GetSubcategoryIds(m.ErpCategoryId)
if categoryList == nil {
categoryList = append(categoryList, m.ErpCategoryId)
}
qs = qs.Where("erp_category_id in ?", categoryList)
}
if m.IMEI != "" { //商品串码