itemCategory.js 1.08 KB
import request from '@/utils/request'

// 获取品项分类映射(内部编码 → 显示名/颜色),供全局 catName 过滤器使用
export function getItemCategoryMapping() {
  return request({
    url: '/api/Extend/LqItemCategoryConfig/Actions/GetMapping',
    method: 'get'
  })
}

// 品项分类配置分页列表(管理页用)
export function getItemCategoryList(data) {
  return request({
    url: '/api/Extend/LqItemCategoryConfig',
    method: 'get',
    data
  })
}

// 品项分类配置全量列表(管理页用)
export function getItemCategoryAllList(data) {
  return request({
    url: '/api/Extend/LqItemCategoryConfig/Actions/GetNoPagingList',
    method: 'get',
    data
  })
}

// 新增/编辑品项分类配置
export function saveItemCategory(data) {
  return request({
    url: '/api/Extend/LqItemCategoryConfig/Actions/Save',
    method: 'post',
    data
  })
}

// 启用/停用品项分类配置
export function toggleItemCategoryEnabled(data) {
  return request({
    url: '/api/Extend/LqItemCategoryConfig/Actions/ToggleEnabled',
    method: 'post',
    data
  })
}