import request from '@/utils/request'

// 查询商品基本信息列表
export function listGoodsInfo(query) {
    return request({
        url: '/system/goodsInfo/list',
        method: 'get',
        params: query
    })
}

// 查询商品信息
export function goodsInfoList(query) {
    return request({
        url: '/system/goodsInfo/goodsInfoList',
        method: 'get',
        params: query
    })
}
// 查询商品基本信息详细
export function getGoodsInfo(id) {
    return request({
        url: `/system/goodsInfo/goodsDetails?` + `goodsInfoId=${id}`,
        // url: '/system/goodsInfo/goodsDetails/' + goodsInfoId,
        method: 'get'
    })
}

// 新增商品基本信息
export function addGoodsInfo(data) {
    return request({
        url: '/system/goodsInfo/add',
        method: 'post',
        data: data
    })
}
// 查询护理站信息列表
export function listStation(query) {
    return request({
        url: '/system/station/nurseStationByUserId',
        method: 'get',
        params: query
    })
}

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

    })
}
// 删除商品基本信息
export function delGoodsInfo(goodsInfoId) {
    return request({
        url: '/system/goodsInfo/' + goodsInfoId,
        method: 'delete'
    })
}
//取消
export function updatePicture(data) {
    return request({
        url: '/system/patientArchives/updatePicture',
        method: 'post',
        data: data
    })
}

