import request from "@/http/request"; const downloadExcel = () => { return request.get('/test/testExcelExport', { responseType: 'blob' }) } const uploadExcel = (formData) => { return request({ url: '/test/testExcelImport', method: 'post', data: formData, timeout: 100000 }) } const uploadExcelParts = (data) => { return request({ url: '/excel/uploadStocks', method: 'post', data: data, timeout: 100000 }) } const downloadStockExcel = (params) => { return request({ url: '/excel/downloadStockExcel', method: 'get', responseType: 'blob', params: { stockStatus: params.stockStatus, goodsStatus: params.goodsStatus, locationId: params.locationId, vehicleId: params.vehicleId, goodsId: params.goodsId, goodsName: params.goodsName } }) } const downloadInRecordExcel = (params) => { return request({ url: '/excel/downloadInRecordExcel', method: 'get', responseType: 'blob', params: { vehicleId: params.vehicleId, goodsId: params.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, uploadExcelParts, downloadStockExcel, downloadMaterialExcel, downloadVehicleExcel, downloadInRecordExcel, downloadOutRecordExcel, downloadInventoryRecordExcel, downloadLocationsExcel }