diff --git a/src/api/excel.js b/src/api/excel.js index 98f0d7e..c02fe18 100644 --- a/src/api/excel.js +++ b/src/api/excel.js @@ -66,72 +66,54 @@ const downloadStockExcel = (data) => { const downloadInRecordExcel = (data) => { return request({ url: '/excel/downloadInRecordExcel', - method: 'get', + method: 'post', responseType: 'blob', - params: { - vehicleId: data.vehicleId, - goodsId: data.goodsId - } + data: data }) } -const downloadOutRecordExcel = (params) => { +const downloadOutRecordExcel = (data) => { return request({ url: '/excel/downloadOutRecordExcel', - method: 'get', + method: 'post', responseType: 'blob', - params: { - vehicleId: params.vehicleId, - goodsId: params.goodsId - } + data: data }) } -const downloadInventoryRecordExcel = (params) => { +const downloadInventoryRecordExcel = (data) => { return request({ url: '/excel/downloadInventoryRecordExcel', - method: 'get', + method: 'post', responseType: 'blob', - params: { - vehicleId: params.vehicleId, - goodsId: params.goodsId - } + data: data }) } -const downloadMaterialExcel = () => { +const downloadGoodsExcel = (data) => { return request({ - url: '/excel/downloadMaterialExcel', - method: 'get', - responseType: 'blob' + url: '/excel/downloadGoodsExcel', + method: 'post', + responseType: 'blob', + data: data }) } -const downloadVehicleExcel = (vehicleQuery) => { +const downloadVehicleExcel = (data) => { return request({ url: '/excel/downloadVehicleExcel', - method: 'get', + method: 'post', responseType: 'blob', - params: { - vehicleId: vehicleQuery.vehicleId, - locationId: vehicleQuery.locationId, - isEmpty: vehicleQuery.isEmpty, - vehicleStatus: vehicleQuery.vehicleStatus - } + data: data }) } -const downloadLocationsExcel = (params) => { +const downloadLocationsExcel = (data) => { return request({ url: '/excel/downloadLocationsExcel', - method: 'get', + method: 'post', responseType: 'blob', - params: { - locationId: params.locationId, - areaId: params.areaId, - isLock: params.isLock, - locationStatus: params.locationStatus - } + data: data }) } @@ -160,7 +142,7 @@ export { uploadExcelOrders, uploadExcelInventoryList, downloadStockExcel, - downloadMaterialExcel, + downloadGoodsExcel, downloadVehicleExcel, downloadInRecordExcel, downloadOutRecordExcel, diff --git a/src/api/goods.js b/src/api/goods.js index fd64579..403cd00 100644 --- a/src/api/goods.js +++ b/src/api/goods.js @@ -1,5 +1,8 @@ import request from "@/http/request"; +/** + * 分页查找物料 + */ const getGoodsInfoByPage = (params) => { return request({ url: '/goods/getGoodsInfoByPage', @@ -8,6 +11,51 @@ const getGoodsInfoByPage = (params) => { }) } +/** + * 更新物料信息 + */ +const updateGoodsInfo = (params) => { + return request({ + url: '/goods/updateGoodsInfo', + method: 'post', + data: params + }) +} + +/** + * 查询所有物料信息 + */ +const getGoodsInfo = (params) => { + return request({ + url: '/goods/getGoodsInfo', + method: 'post', + data: params + }) +} + +/** + * 查询自动补全时可用的物料信息 + */ +const getGoodsInfoByGoodsId = (params) => { + return request({ + url: '/goods/getGoodsInfoByGoodsId', + method: 'post', + data: params + }) +} + +const deleteGoodsInfo = (params) => { + return request({ + url: '/goods/deleteGoodsInfo', + method: 'post', + data: params + }) +} + export { - getGoodsInfoByPage + getGoodsInfoByPage, + deleteGoodsInfo, + getGoodsInfoByGoodsId, + getGoodsInfo, + updateGoodsInfo } \ No newline at end of file diff --git a/src/excel/UploadExcelDbs.vue b/src/excel/UploadExcelDbs.vue index 10f1991..485a254 100644 --- a/src/excel/UploadExcelDbs.vue +++ b/src/excel/UploadExcelDbs.vue @@ -12,6 +12,7 @@ import store from '@/store' import { ref, reactive } from 'vue'; import { uploadExcelDbs } from '@/api/excel.js' import { ElMessage } from 'element-plus' +import { errorBox } from '@/utils/myMessageBox'; import { sizeFormatter } from '@/utils/formatter.js' import loading from '@/utils/loading.js' import { getHashString } from '@/utils/hashUtils.js' @@ -41,11 +42,11 @@ const changeFile = (uploadFile) => { const uploadRef = ref() const uploadDbs = () => { if (uploadForm == undefined || file.value == undefined) { - ElMessage.error('请选择文件之后再上传') + errorBox('请选择文件之后再上传') return } if (currentHash != '' && currentHash == uploadForm.data.hash) { - ElMessage.error('请勿重复上传') + errorBox('请勿重复上传') return } currentHash = uploadForm.data.hash @@ -68,13 +69,13 @@ const uploadDbs = () => { }) clearFileInfos() } else { - ElMessage.error(res.data.message) + errorBox(res.data.message) } }).catch(err => { loading.close() currentHash = '' console.log(err) - ElMessage.error('上传错误') + errorBox('上传错误') }) } const clearFileInfos = () => { diff --git a/src/excel/UploadExcelGoods.vue b/src/excel/UploadExcelGoods.vue index 1e1c7ed..4cd8973 100644 --- a/src/excel/UploadExcelGoods.vue +++ b/src/excel/UploadExcelGoods.vue @@ -12,6 +12,7 @@ import store from '@/store' import { ref, reactive } from 'vue'; import { uploadExcelGoods } from '@/api/excel.js' import { ElMessage } from 'element-plus' +import { errorBox } from '@/utils/myMessageBox'; import { sizeFormatter } from '@/utils/formatter.js' import loading from '@/utils/loading.js' import { getHashString } from '@/utils/hashUtils.js' @@ -41,11 +42,11 @@ const changeFile = (uploadFile) => { const uploadRef = ref() const uploadGoods = () => { if (uploadForm == undefined || file.value == undefined) { - ElMessage.error('请选择文件之后再上传') + errorBox('请选择文件之后再上传') return } if (currentHash != '' && currentHash == uploadForm.data.hash) { - ElMessage.error('请勿重复上传') + errorBox('请勿重复上传') return } currentHash = uploadForm.data.hash @@ -68,13 +69,13 @@ const uploadGoods = () => { }) clearFileInfos() } else { - ElMessage.error(res.data.message) + errorBox(res.data.message) } }).catch(err => { loading.close() currentHash = '' console.log(err) - ElMessage.error('上传错误') + errorBox('上传错误') }) } const clearFileInfos = () => { diff --git a/src/excel/UploadExcelInventoryList.vue b/src/excel/UploadExcelInventoryList.vue index bece2ac..e88042f 100644 --- a/src/excel/UploadExcelInventoryList.vue +++ b/src/excel/UploadExcelInventoryList.vue @@ -12,6 +12,7 @@ import store from '@/store' import { ref, reactive } from 'vue'; import { uploadExcelInventoryList } from '@/api/excel.js' import { ElMessage } from 'element-plus' +import { errorBox } from '@/utils/myMessageBox'; import { sizeFormatter } from '@/utils/formatter.js' import loading from '@/utils/loading.js' import { getHashString } from '@/utils/hashUtils.js' @@ -41,11 +42,11 @@ const changeFile = (uploadFile) => { const uploadRef = ref() const uploadInventory = () => { if (uploadForm == undefined || file.value == undefined) { - ElMessage.error('请选择文件之后再上传') + errorBox('请选择文件之后再上传') return } if (currentHash != '' && currentHash == uploadForm.data.hash) { - ElMessage.error('请勿重复上传') + errorBox('请勿重复上传') return } currentHash = uploadForm.data.hash @@ -68,13 +69,13 @@ const uploadInventory = () => { }) clearFileInfos() } else { - ElMessage.error(res.data.message) + errorBox(res.data.message) } }).catch(err => { loading.close() currentHash = '' console.log(err) - ElMessage.error('上传错误') + errorBox('上传错误') }) } const clearFileInfos = () => { diff --git a/src/excel/UploadExcelOrders.vue b/src/excel/UploadExcelOrders.vue index 309c0cf..071cf31 100644 --- a/src/excel/UploadExcelOrders.vue +++ b/src/excel/UploadExcelOrders.vue @@ -12,6 +12,7 @@ import store from '@/store' import { ref, reactive } from 'vue'; import { uploadExcelOrders } from '@/api/excel.js' import { ElMessage } from 'element-plus' +import { errorBox } from '@/utils/myMessageBox'; import { sizeFormatter } from '@/utils/formatter.js' import loading from '@/utils/loading.js' import { getHashString } from '@/utils/hashUtils.js' @@ -41,11 +42,11 @@ const changeFile = (uploadFile) => { const uploadRef = ref() const uploadOrders = () => { if (uploadForm == undefined || file.value == undefined) { - ElMessage.error('请选择文件之后再上传') + errorBox('请选择文件之后再上传') return } if (currentHash != '' && currentHash == uploadForm.data.hash) { - ElMessage.error('请勿重复上传') + errorBox('请勿重复上传') return } currentHash = uploadForm.data.hash @@ -68,13 +69,13 @@ const uploadOrders = () => { }) clearFileInfos() } else { - ElMessage.error(res.data.message) + errorBox(res.data.message) } }).catch(err => { loading.close() currentHash = '' console.log(err) - ElMessage.error('上传错误') + errorBox('上传错误') }) } const clearFileInfos = () => { diff --git a/src/excel/UploadExcelStationConfig.vue b/src/excel/UploadExcelStationConfig.vue index 15d0f99..46879dd 100644 --- a/src/excel/UploadExcelStationConfig.vue +++ b/src/excel/UploadExcelStationConfig.vue @@ -12,6 +12,7 @@ import store from '@/store' import { ref, reactive } from 'vue'; import { uploadStationConfig } from '@/api/excel.js' import { ElMessage } from 'element-plus' +import { errorBox } from '@/utils/myMessageBox'; import { sizeFormatter } from '@/utils/formatter.js' import loading from '@/utils/loading.js' import { getHashString } from '@/utils/hashUtils.js' @@ -41,11 +42,11 @@ const changeFile = (uploadFile) => { const uploadRef = ref() const uploadDbs = () => { if (uploadForm == undefined || file.value == undefined) { - ElMessage.error('请选择文件之后再上传') + errorBox('请选择文件之后再上传') return } if (currentHash != '' && currentHash == uploadForm.data.hash) { - ElMessage.error('请勿重复上传') + errorBox('请勿重复上传') return } currentHash = uploadForm.data.hash @@ -68,13 +69,13 @@ const uploadDbs = () => { }) clearFileInfos() } else { - ElMessage.error(res.data.message) + errorBox(res.data.message) } }).catch(err => { loading.close() currentHash = '' console.log(err) - ElMessage.error('上传错误') + errorBox('上传错误') }) } const clearFileInfos = () => { diff --git a/src/excel/UploadExcelStock.vue b/src/excel/UploadExcelStock.vue index 6abfc64..208192c 100644 --- a/src/excel/UploadExcelStock.vue +++ b/src/excel/UploadExcelStock.vue @@ -12,6 +12,7 @@ import store from '@/store' import { ref, reactive } from 'vue'; import { uploadExcelStock } from '@/api/excel.js' import { ElMessage } from 'element-plus' +import { errorBox } from '@/utils/myMessageBox'; import { sizeFormatter } from '@/utils/formatter.js' import loading from '@/utils/loading.js' import { getHashString } from '@/utils/hashUtils.js' @@ -41,11 +42,11 @@ const changeFile = (uploadFile) => { const uploadRef = ref() const uploadStock = () => { if (uploadForm == undefined || file.value == undefined) { - ElMessage.error('请选择文件之后再上传') + errorBox('请选择文件之后再上传') return } if (currentHash != '' && currentHash == uploadForm.data.hash) { - ElMessage.error('请勿重复上传') + errorBox('请勿重复上传') return } currentHash = uploadForm.data.hash @@ -68,13 +69,13 @@ const uploadStock = () => { }) clearFileInfos() } else { - ElMessage.error(res.data.message) + errorBox(res.data.message) } }).catch(err => { loading.close() currentHash = '' console.log(err) - ElMessage.error('上传错误') + errorBox('上传错误') }) } const clearFileInfos = () => { diff --git a/src/layout/callEmptyVehicle.vue b/src/layout/callEmptyVehicle.vue index 08bcbea..f4d05bb 100644 --- a/src/layout/callEmptyVehicle.vue +++ b/src/layout/callEmptyVehicle.vue @@ -64,7 +64,7 @@