import request from "@/http/request";

const downlocadExcel = () => {
    return request.get('/test/testExcelExport', {
        responseType: 'blob'
    })
}

const uploadExcel = (formData) => {
    return request({
        url: '/test/testExcelImport',
        method: 'post',
        data: formData,
        timeout: 100000
    })
}

const uploadExcelPeijian = (data) => {
    return request({
        url: '/excel/uploadExcelPeijian',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const uploadExcelHejian = (data) => {
    return request({
        url: '/excel/uploadExcelHejian',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const uploadExcelJinji = (data) => {
    return request({
        url: '/excel/uploadExcelJinji',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const uploadExcelKatePackage = (data) => {
    return request({
        url: '/excel/uploadExcelKatePackage',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const uploadExcelParts = (data) => {
    return request({
        url: '/excel/uploadPartInfos',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const uploadBoxConfig = (data) => {
    return request({
        url: '/excel/uploadBoxConfig',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const distributePeijianTasks = (data) => {
    return request({
        url: '/excel/distributePeijianTasks',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const distributeHejianTasks = (data) => {
    return request({
        url: '/excel/distributeHejianTasks',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const distributeJinjiTasks = (data) => {
    return request({
        url: '/excel/distributeJinjiTasks',
        method: 'post',
        data: data,
        timeout: 100000
    })
}

const downloadStockExcel = () => {
    return request({
        url: '/excel/downloadStockExcel',
        method: 'get',
        responseType: 'blob'
    })
}

const downloadKateTaskExcel = () => {
    return request({
        url: '/excel/downloadKateTaskExcel',
        method: 'get',
        responseType: 'blob'
    })
}

const downloadPeijianExcel = () => {
    return request({
        url: '/excel/downloadPeijianExcel',
        method: 'get',
        responseType: 'blob'
    })
}

const downloadRukuExcel = () => {
    return request({
        url: '/excel/downloadRukuExcel',
        method: 'get',
        responseType: 'blob'
    })
}

const downloadHejianExcel = () => {
    return request({
        url: '/excel/downloadHejianExcel',
        method: 'get',
        responseType: 'blob'
    })
}

const downloadJinjiExcel = () => {
    return request({
        url: '/excel/downloadJinjiExcel',
        method: 'get',
        responseType: 'blob'
    })
}

const downloadPackageExcel = () => {
    return request({
        url: '/excel/downloadPackageExcel',
        method: 'get',
        responseType: 'blob'
    })
}

const downloadMaterialExcel = () => {
    return request({
        url: '/excel/downloadMaterialExcel',
        method: 'get',
        responseType: 'blob'
    })
}

export {
    downlocadExcel,
    uploadExcel,
    uploadExcelPeijian,
    uploadExcelHejian,
    uploadExcelParts,
    distributePeijianTasks,
    distributeHejianTasks,
    downloadStockExcel,
    downloadKateTaskExcel,
    uploadExcelJinji,
    distributeJinjiTasks,
    downloadPeijianExcel,
    downloadRukuExcel,
    downloadHejianExcel,
    downloadJinjiExcel,
    downloadPackageExcel,
    uploadBoxConfig,
    uploadExcelKatePackage,
    downloadMaterialExcel
}