wms_client_kate_suzhou/src/api/excel.js
2024-08-07 23:12:44 +08:00

159 lines
3.4 KiB
JavaScript

import request from "@/http/request";
const downloadExcel = () => {
return request.get('/test/testExcelExport', {
responseType: 'blob'
})
}
const uploadExcel = (data) => {
return request({
url: '/test/testExcelImport',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelStock = (data) => {
return request({
url: '/excel/uploadStocks',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelGoods = (data) => {
return request({
url: '/excel/uploadGoods',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelDbs = (data) => {
return request({
url: '/excel/uploadDbs',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelOrders = (data) => {
return request({
url: '/excel/uploadKateOrders',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelInventoryList = (data) => {
return request({
url: '/excel/uploadInventoryList',
method: 'post',
data: data,
timeout: 100000
})
}
const downloadStockExcel = (data) => {
return request({
url: '/excel/downloadStockExcel',
method: 'post',
responseType: 'blob',
data: data
})
}
const downloadInRecordExcel = (data) => {
return request({
url: '/excel/downloadInRecordExcel',
method: 'get',
responseType: 'blob',
params: {
vehicleId: data.vehicleId,
goodsId: data.goodsId
}
})
}
const downloadOutRecordExcel = (params) => {
return request({
url: '/excel/downloadOutRecordExcel',
method: 'get',
responseType: 'blob',
params: {
vehicleId: params.vehicleId,
goodsId: params.goodsId
}
})
}
const downloadInventoryRecordExcel = (params) => {
return request({
url: '/excel/downloadInventoryRecordExcel',
method: 'get',
responseType: 'blob',
params: {
vehicleId: params.vehicleId,
goodsId: params.goodsId
}
})
}
const downloadMaterialExcel = () => {
return request({
url: '/excel/downloadMaterialExcel',
method: 'get',
responseType: 'blob'
})
}
const downloadVehicleExcel = (vehicleQuery) => {
return request({
url: '/excel/downloadVehicleExcel',
method: 'get',
responseType: 'blob',
params: {
vehicleId: vehicleQuery.vehicleId,
locationId: vehicleQuery.locationId,
isEmpty: vehicleQuery.isEmpty,
vehicleStatus: vehicleQuery.vehicleStatus
}
})
}
const downloadLocationsExcel = (params) => {
return request({
url: '/excel/downloadLocationsExcel',
method: 'get',
responseType: 'blob',
params: {
locationId: params.locationId,
areaId: params.areaId,
isLock: params.isLock,
locationStatus: params.locationStatus
}
})
}
export {
downloadExcel,
uploadExcel,
uploadExcelStock,
uploadExcelGoods,
uploadExcelDbs,
uploadExcelOrders,
uploadExcelInventoryList,
downloadStockExcel,
downloadMaterialExcel,
downloadVehicleExcel,
downloadInRecordExcel,
downloadOutRecordExcel,
downloadInventoryRecordExcel,
downloadLocationsExcel
}