wms_client_kate_suzhou/src/api/excel.js

172 lines
3.8 KiB
JavaScript
Raw Normal View History

2024-07-02 08:16:55 +08:00
import request from "@/http/request";
2024-08-07 23:12:42 +08:00
const uploadExcelStock = (data) => {
2024-07-02 08:16:55 +08:00
return request({
url: '/excel/uploadStocks',
method: 'post',
data: data,
timeout: 100000
})
}
2024-08-07 23:12:42 +08:00
const uploadExcelGoods = (data) => {
return request({
url: '/excel/uploadGoods',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadStationConfig = (data) => {
return request({
url: '/excel/uploadStationConfig',
method: 'post',
data: data,
timeout: 100000
})
}
2024-08-07 23:12:42 +08:00
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) => {
2024-07-02 08:16:55 +08:00
return request({
url: '/excel/downloadStockExcel',
method: 'post',
2024-07-19 13:46:52 +08:00
responseType: 'blob',
2024-08-07 23:12:42 +08:00
data: data
2024-07-02 08:16:55 +08:00
})
}
2024-08-07 23:12:42 +08:00
const downloadInRecordExcel = (data) => {
2024-07-02 08:16:55 +08:00
return request({
2024-07-19 13:46:52 +08:00
url: '/excel/downloadInRecordExcel',
2024-07-02 08:16:55 +08:00
method: 'get',
2024-07-19 13:46:52 +08:00
responseType: 'blob',
params: {
2024-08-07 23:12:42 +08:00
vehicleId: data.vehicleId,
goodsId: data.goodsId
2024-07-19 13:46:52 +08:00
}
2024-07-02 08:16:55 +08:00
})
}
2024-07-19 13:46:52 +08:00
const downloadOutRecordExcel = (params) => {
2024-07-02 08:16:55 +08:00
return request({
2024-07-19 13:46:52 +08:00
url: '/excel/downloadOutRecordExcel',
2024-07-02 08:16:55 +08:00
method: 'get',
2024-07-19 13:46:52 +08:00
responseType: 'blob',
params: {
vehicleId: params.vehicleId,
goodsId: params.goodsId
}
2024-07-02 08:16:55 +08:00
})
}
2024-07-19 13:46:52 +08:00
const downloadInventoryRecordExcel = (params) => {
2024-07-02 08:16:55 +08:00
return request({
2024-07-19 13:46:52 +08:00
url: '/excel/downloadInventoryRecordExcel',
2024-07-02 08:16:55 +08:00
method: 'get',
2024-07-19 13:46:52 +08:00
responseType: 'blob',
params: {
vehicleId: params.vehicleId,
goodsId: params.goodsId
}
2024-07-02 08:16:55 +08:00
})
}
2024-07-19 13:46:52 +08:00
const downloadMaterialExcel = () => {
2024-07-02 08:16:55 +08:00
return request({
2024-07-19 13:46:52 +08:00
url: '/excel/downloadMaterialExcel',
2024-07-02 08:16:55 +08:00
method: 'get',
responseType: 'blob'
})
}
2024-07-19 13:46:52 +08:00
const downloadVehicleExcel = (vehicleQuery) => {
2024-07-02 08:16:55 +08:00
return request({
2024-07-19 13:46:52 +08:00
url: '/excel/downloadVehicleExcel',
2024-07-02 08:16:55 +08:00
method: 'get',
2024-07-19 13:46:52 +08:00
responseType: 'blob',
params: {
vehicleId: vehicleQuery.vehicleId,
locationId: vehicleQuery.locationId,
isEmpty: vehicleQuery.isEmpty,
vehicleStatus: vehicleQuery.vehicleStatus
}
2024-07-02 08:16:55 +08:00
})
}
2024-07-19 13:46:52 +08:00
const downloadLocationsExcel = (params) => {
2024-07-02 08:16:55 +08:00
return request({
2024-07-19 13:46:52 +08:00
url: '/excel/downloadLocationsExcel',
2024-07-02 08:16:55 +08:00
method: 'get',
2024-07-19 13:46:52 +08:00
responseType: 'blob',
params: {
locationId: params.locationId,
areaId: params.areaId,
isLock: params.isLock,
locationStatus: params.locationStatus
}
2024-07-02 08:16:55 +08:00
})
}
const queryUploadRecord = (data) => {
return request({
url: '/excel/queryUploadRecord',
method: 'post',
data: data,
timeout: 100000
})
}
const downloadClcKanbanRequirementExcel = (data) => {
return request({
url: '/excel/downloadClcKanbanRequirementExcel',
method: 'post',
responseType: 'blob',
data: data
})
}
2024-07-02 08:16:55 +08:00
export {
2024-08-07 23:12:42 +08:00
uploadExcelStock,
uploadExcelGoods,
uploadExcelDbs,
uploadExcelOrders,
uploadExcelInventoryList,
2024-07-02 08:16:55 +08:00
downloadStockExcel,
2024-07-19 13:46:52 +08:00
downloadMaterialExcel,
downloadVehicleExcel,
downloadInRecordExcel,
downloadOutRecordExcel,
downloadInventoryRecordExcel,
downloadLocationsExcel,
uploadStationConfig,
queryUploadRecord,
downloadClcKanbanRequirementExcel
2024-07-02 08:16:55 +08:00
}