import service from '@/service'

export const supplierList = () => {
    return service({
        method: 'get',
        url: `/member/supplierlist/`,
    })
}
export const sellerList = () => {
    return service({
        method: 'get',
        url: '/accessory/sellerlist/'
    })
}
export const inquiryFilter = (users,status,days=7) => {
    return service({
        method: 'get',
        url: '/store/inquiryFilter',
        params: {
            users,
            status,
            days
        }
    })
}
export const inquiryList = (users,keys={},page=1,page_size=20) => {
    return service({
        method: 'post',
        url: '/store/inquiryList',
        data: {
            users,
            keys,
            page,
            page_size,
        }
    })
}
export const customerList = () => {
    return service({
        method: 'get',
        url: '/store/customerList'
    })
}
export const inquiryStatus = (ids) => {
    return service({
        method: 'post',
        url: '/store/inquiryStatus',
        data: {
            ids
        }
    })
}
export const createInquiry = (user_id,note='',subject='') => {
    return service({
        method: 'post',
        url: '/store/createInquiry',
        data: {
            user_id,
            note,
            subject
        }
    })
}
export const update = (id,data) => {
    return service({
        method: 'post',
        url: '/store/update/' + id,
        data
    })
}
export const removeInquiry = (ids) => {
    return service({
        method: 'post',
        url: '/store/removeInquiry',
        data: {
            ids
        }
    })
}
export const addInquiryGoods = (user_id,goods) => {
    return service({
        method: 'post',
        url: '/store/addInquiryGoods',
        data: {
            user_id,
            goods
        }
    })
}

export const inquiryInfo = (id) => {
    return service({
        method: 'get',
        url: '/store/info',
        params: {
            id
        }
    })
}

export const inquiryGoodsList = (id) => {
    return service({
        method: 'get',
        url: '/store/goodsList',
        params: {
            id
        }
    })
}
