import request from '@/utils/request'

// 查询商品基本信息列表
export function goodsInfoList(query) {
    return request({
        url: '/system/operateGoodInfo/goodsInfoList',
        method: 'get',
        params: query
    })
}
//所属护理站
export function stationList(query) {
    return request({
        url: '/system/station/list',
        method: 'get',
        params: query
    })
}

// 查询商品基本信息详细
export function getGoodsInfo(id) {
    return request({
        url: `/system/operateGoodInfo/goodsDetails?` + `goodsInfoId=${id}`,
        method: 'get'
    })
}
//取消
export function updatePicture(data) {
    return request({
        url: '/system/patientArchives/updatePicture',
        method: 'post',
        data: data
    })
}

// 新增商品基本信息
export function addGoodsInfo(data) {
    return request({
        url: '/system/operateGoodInfo/add',
        method: 'post',
        data: data
    })
}

// 查询商品分类列表
export function goodsCategory(query) {
    return request({
        url: '/system/goodsCategory/list ',
        method: 'get',
        params: query
    })
}
// 修改商品基本信息
export function updateGoodsInfo(data) {
    return request({
        url: '/system/operateGoodInfo/edit',
        method: 'POST',
        data: data
    })
}
// 修改上架下架状态
// system/goodsInfo/editGoodsWhetherShelf
export function editGoodsWhetherShelf(data) {
    return request({
        url: '/system/operateGoodInfo/editGoodsWhetherShelf',
        method: 'post',
        data: data

    })
}
// 删除商品基本信息
export function delGoodsInfo(goodsInfoId) {
    return request({
        url: '/system/operateGoodInfo/' + goodsInfoId,
        method: 'delete'
    })
}
