import { main,baseServer } from '@/api'
import request from '@/utils/require'

// 上报列表
export function reserveSizeGet(data) {
    return request({
        url: `${main}/client/reserveSize/get`,
        method: 'get',
		params:data
    })
}
//上报详情-查看
// /cbl/client/reserveSize/{id}
export function reserveSizeId(data) {
    return request({
        url: `${main}/client/reserveSize/${data.id}`,
        method: 'get',
		data:data
    })
}
//接收页面-列表
export function reserveSizeAccept(data) {
    return request({
        url: `${main}/client/reserveSize/accept`,
        method: 'get',
		params:data
    })
}
//储备规模上报--保存--提交
export function reserveSizeReport(data) {
    return request({
        url: `${main}/client/reserveSize/report`,
        method: 'post',
		data:data
    })
}
//接收--撤销---驳回保存
export function reserveSizeAcceptId(data) {
    return request({
        url: `${main}/client/reserveSize/accept/${data.id}/${data.status}`,
        method: 'post',
		data:data
    })
}

//汇总删除
export function reserveSizeSummaryDel(data) {
    return request({
        url: `${main}/client/reserveSize/summary/delete/${data.id}`,
        method: 'delete',
		data:data
    })
}

//汇总列表
export function reserveSizeSummaryList(data) {
    return request({
        url: `${main}/client/reserveSize/summary/year`,
        method: 'get',
		params:data
    })
}
//生成汇总表
export function rSSummaryGetAccepted(data) {
    return request({
        url: `${main}/client/reserveSize/summary/getAccepted`,
        method: 'get',
		params:data
    })
}
//储备规模汇总---查看
export function rSSummaryId(data) {
    return request({
        url: `${main}/client/reserveSize/summary/${data.id}`,
        method: 'get',
		params:data
    })
}
//接收列表--查看
export function reserveSizeGetId(data) {
    return request({
        url: `${main}/client/reserveSize/get/${data.id}`,
        method: 'get',
		params:data
    })
}
//储备规模汇总--汇总保存

export function rSizeSummarySummarize(data) {
    return request({
        url: `${main}/client/reserveSize/summary/summarize`,
        method: 'put',
		data:data
    })
}
//储备规模汇总---按名称查询
// /client/reserveSize/summary/name/{id}
export function rSSummaryNameId(data) {
    return request({
        url: `${main}/client/reserveSize/summary/name/${data.id}`,
        method: 'get',
		params:data
    })
}
//储备规模汇总--导出

export function reserveSizeSummaryExport(data) {
    return request({
        url: `${main}//client/reserveSize/summary/export/${data.id}`,
        method: 'get',
		responseType: "blob",
        params:data
    })
}
//库点下拉
export function companyList() {
    return request({
        url: `${baseServer}/companyList`,
        method: 'post',
        data: {}
    })
}