From 386ed14035a6a5f3327dabc2c3c2a224a06f50dd Mon Sep 17 00:00:00 2001 From: liangzhou <594755172@qq.com> Date: Fri, 20 Sep 2024 18:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/excel.js | 58 ++++++---------- src/api/goods.js | 50 +++++++++++++- src/excel/UploadExcelDbs.vue | 9 +-- src/excel/UploadExcelGoods.vue | 9 +-- src/excel/UploadExcelInventoryList.vue | 9 +-- src/excel/UploadExcelOrders.vue | 9 +-- src/excel/UploadExcelStationConfig.vue | 9 +-- src/excel/UploadExcelStock.vue | 9 +-- src/layout/callEmptyVehicle.vue | 7 +- src/layout/clcKanban.vue | 5 +- src/layout/clcNoPlan.vue | 6 +- src/layout/dbsTable.vue | 10 +-- src/layout/doKitting.vue | 7 +- src/layout/eLocationConfig.vue | 10 +-- src/layout/eLocationTable.vue | 4 +- src/layout/finishKitting.vue | 33 ++++----- src/layout/goods.vue | 52 ++++++++------ src/layout/goodsIn.vue | 86 ++++++++++++++++++----- src/layout/goodsInForPDA.vue | 2 +- src/layout/goodsOut.vue | 2 +- src/layout/goodsToStation.vue | 2 +- src/layout/inTaskRecord.vue | 5 +- src/layout/inventory.vue | 7 +- src/layout/kateOrdersTable.vue | 10 +-- src/layout/location.vue | 2 +- src/layout/locationsTable.vue | 94 +++++++++++++------------- src/layout/outTaskRecord.vue | 5 +- src/layout/outsideVehiclesMonitor.vue | 2 +- src/layout/pickTaskMonitor.vue | 5 +- src/layout/sortBoxs.vue | 19 +++--- src/layout/standSettings.vue | 2 +- src/layout/stationConfig.vue | 19 ++++-- src/layout/stock.vue | 89 ++++++++++++++++++++++-- src/layout/taskMonitor.vue | 7 +- src/layout/vehicle.vue | 34 ++++++---- src/layout/wmsConfig.vue | 5 +- src/layout/workFlow.vue | 5 +- src/layout/workSummary.vue | 2 +- src/utils/myMessageBox.js | 16 ++--- src/views/login.vue | 2 +- 40 files changed, 458 insertions(+), 260 deletions(-) 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 @@
+ controls-position="right" :min="0" :max="20" />
@@ -90,7 +90,8 @@ @@ -233,7 +234,7 @@ export default { callEmptyVehicle(request).then(res => { const response = res.data if (response.code == 0) { - successBox(response.message) + ElMessage.success(response.message) this.resetForms() } else { errorBox(response.message) diff --git a/src/layout/clcKanban.vue b/src/layout/clcKanban.vue index 3700ab8..12e6e47 100644 --- a/src/layout/clcKanban.vue +++ b/src/layout/clcKanban.vue @@ -235,7 +235,8 @@ import store from '@/store' import { getClcKanbanRequirement } from '@/api/kateWork' import { downloadClcKanbanRequirementExcel } from '@/api/excel' import { dateFormatter } from '@/utils/formatter.js' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' +import { ElMessage } from 'element-plus' import { reactive, ref } from 'vue' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' @@ -300,7 +301,7 @@ export default { this.workFormEntity.NumOfBoxOf811 = response.returnData.NumOfBoxOf811 this.workFormEntity.NumOfBoxOf911 = response.returnData.NumOfBoxOf911 this.workFormEntity.NumOfBoxOf822 = response.returnData.NumOfBoxOf822 - successBox("获取CLC看板需求成功。") + ElMessage.success("获取CLC看板需求成功。") } else { this.resetForms() errorBox(response.message) diff --git a/src/layout/clcNoPlan.vue b/src/layout/clcNoPlan.vue index b0fca3d..6a742c1 100644 --- a/src/layout/clcNoPlan.vue +++ b/src/layout/clcNoPlan.vue @@ -183,7 +183,7 @@ @@ -233,7 +234,7 @@ export default { this.workFormEntity.tip = response.returnData.tip warningBox(this.workFormEntity.tip) } else { - successBox(response.message) + ElMessage.success(response.message) } this.resetForms() } @@ -270,7 +271,7 @@ export default { this.workFormEntity.tip = response.returnData.tip } this.resetForms() - successBox(response.message) + ElMessage.success(response.message) } else { errorBox(response.message) } diff --git a/src/layout/eLocationConfig.vue b/src/layout/eLocationConfig.vue index 8fc48d2..4d80b5b 100644 --- a/src/layout/eLocationConfig.vue +++ b/src/layout/eLocationConfig.vue @@ -85,7 +85,7 @@ @@ -225,7 +226,7 @@ export default { confirmFinishedWork(confirmParams).then(res => { const response = res.data if (response.code == 0) { - successBox('response.message') + ElMessage.success('response.message') this.resetForms() } else { errorBox(response.message) diff --git a/src/layout/goods.vue b/src/layout/goods.vue index 20f4a96..8d4e3d3 100644 --- a/src/layout/goods.vue +++ b/src/layout/goods.vue @@ -174,14 +174,14 @@ diff --git a/src/layout/goodsIn.vue b/src/layout/goodsIn.vue index 0698153..802f8c0 100644 --- a/src/layout/goodsIn.vue +++ b/src/layout/goodsIn.vue @@ -50,7 +50,7 @@
@@ -101,7 +101,8 @@ import store from '@/store' import { sendGoodsInTask } from '@/api/task' import { replaceEnglishAndNumberIGAI } from '@/utils/formatter' import { reactive, ref } from 'vue' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' +import { ElMessage, ElMessageBox } from 'element-plus' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' @@ -119,7 +120,8 @@ export default { workFormRef: ref(), workFormEntity: reactive({ vehicleId: '', - goodsId: '' + goodsId: '', + goodsNum: null }), rules: reactive({ vehicleId: [ @@ -141,31 +143,79 @@ export default { resetForms() { this.workFormEntity = reactive({ vehicleId: '', - goodsId: '' + goodsId: '', + goodsNum: null }) }, addTempTask() { this.workFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.workFormEntity.vehicleId) if (this.workFormEntity.vehicleId != '' && this.workFormEntity.goodsId != '' && this.workFormEntity.goodsNum != null && this.workFormEntity.goodsNum > 0) { + if (this.workFormEntity.vehicleId == this.workFormEntity.goodsId) { + errorBox('料箱号与料号不能相同') + return + } + if (this.workFormEntity.goodsId == this.workFormEntity.goodsNum) { + errorBox('料号与数量不能相同') + return + } + if (this.workFormEntity.vehicleId == this.workFormEntity.goodsNum) { + errorBox('料箱号与数量不能相同') + return + } if (this.currentVehicleId != '' && this.currentVehicleId != this.workFormEntity.vehicleId) { errorBox('请下发之前料箱的任务后再继续绑定新的料箱') return } - const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId) - if (sameIndex != -1) {// 绑定过相同物料 - var sameGoods = this.tempTasks[sameIndex] - sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum - } else { - this.tempTasks.push({ - vehicleId: this.workFormEntity.vehicleId, - goodsId: this.workFormEntity.goodsId, - goodsNum: this.workFormEntity.goodsNum + if (this.workFormEntity.goodsNum == 9999) { + ElMessageBox.confirm( + '当前数量达最大值9999。\n是否继续', + '警告', + { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + } + ).then(() => { + const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId) + if (sameIndex != -1) {// 绑定过相同物料 + var sameGoods = this.tempTasks[sameIndex] + sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum + } else { + this.tempTasks.push({ + vehicleId: this.workFormEntity.vehicleId, + goodsId: this.workFormEntity.goodsId, + goodsNum: this.workFormEntity.goodsNum + }) + } + this.currentVehicleId = this.workFormEntity.vehicleId + this.workFormEntity.goodsId = '' + this.workFormEntity.goodsNum = null + this.$refs.goodsId.focus() + return + }).catch(() => { + ElMessage.info('操作取消') + this.workFormEntity.goodsNum = null + this.$refs.goodsNum.focus() + return }) + } else { + const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId) + if (sameIndex != -1) {// 绑定过相同物料 + var sameGoods = this.tempTasks[sameIndex] + sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum + } else { + this.tempTasks.push({ + vehicleId: this.workFormEntity.vehicleId, + goodsId: this.workFormEntity.goodsId, + goodsNum: this.workFormEntity.goodsNum + }) + } + this.currentVehicleId = this.workFormEntity.vehicleId + this.workFormEntity.goodsId = '' + this.workFormEntity.goodsNum = null + this.$refs.goodsId.focus() + return } - this.currentVehicleId = this.workFormEntity.vehicleId - this.workFormEntity.goodsId = '' - this.workFormEntity.goodsNum = null - this.$refs.goodsId.focus() } else { if (this.workFormEntity.vehicleId == '') { this.$refs.vehicleId.focus() @@ -200,7 +250,7 @@ export default { sendGoodsInTask(request).then(res => { const response = res.data if (response.code == 0) { - successBox('入库确认成功。') + ElMessage.success('入库确认成功。') this.resetForms() this.currentVehicleId = '' this.tempTasks = [] diff --git a/src/layout/goodsInForPDA.vue b/src/layout/goodsInForPDA.vue index 1585188..a6733df 100644 --- a/src/layout/goodsInForPDA.vue +++ b/src/layout/goodsInForPDA.vue @@ -126,7 +126,7 @@ import { sendGoodsInTask, callEmptyVehicle } from '@/api/task' import { queryPartInfoByPartNo } from '@/api/goods' import { reactive, ref } from 'vue' import { ElMessage } from 'element-plus' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import UploadExcelPart from '@/excel/UploadExcelPart.vue' const taskInRequestRef = ref() diff --git a/src/layout/goodsOut.vue b/src/layout/goodsOut.vue index a13dade..69a5fb7 100644 --- a/src/layout/goodsOut.vue +++ b/src/layout/goodsOut.vue @@ -135,7 +135,7 @@ import { sendGoodsOutTask, getTasksByPage, getTasks, finishPickingAndBack } from import { taskStatusFormatter, dueFormatter, timeFormatter } from '@/utils/formatter.js' import { reactive, ref } from 'vue' import { ElMessage } from 'element-plus' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' const taskOutRequestRef = ref() const pickConfirmRef = ref() diff --git a/src/layout/goodsToStation.vue b/src/layout/goodsToStation.vue index 416a657..24ef81d 100644 --- a/src/layout/goodsToStation.vue +++ b/src/layout/goodsToStation.vue @@ -88,7 +88,7 @@ import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js' import { ElMessage } from 'element-plus' import { ref, reactive } from 'vue' import { dateFormatter, timeFormatter } from '@/utils/formatter.js' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' import { Search } from '@element-plus/icons-vue' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' diff --git a/src/layout/inTaskRecord.vue b/src/layout/inTaskRecord.vue index 38d66b2..7dc1e3c 100644 --- a/src/layout/inTaskRecord.vue +++ b/src/layout/inTaskRecord.vue @@ -44,7 +44,7 @@ import { getTaskRecords } from '@/api/record.js' import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js' import { downloadInRecordExcel } from '@/api/excel.js' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' @@ -176,7 +177,7 @@ export default { this.workFormEntity.tip = response.returnData.tip } this.resetForms() - successBox(response.message) + ElMessage.success(response.message) } }).catch(err => { console.log(err) @@ -217,7 +218,7 @@ export default { this.workFormEntity.tip = response.returnData.tip } this.resetForms() - successBox(response.message) + ElMessage.success(response.message) } else { errorBox(response.message) } diff --git a/src/layout/kateOrdersTable.vue b/src/layout/kateOrdersTable.vue index 3e49c9b..fa20d21 100644 --- a/src/layout/kateOrdersTable.vue +++ b/src/layout/kateOrdersTable.vue @@ -158,8 +158,8 @@ import store from '@/store' import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' -import { ElMessageBox } from 'element-plus' -import { errorBox, infoBox, successBox } from '@/utils/myMessageBox.js' +import { ElMessageBox, ElMessage } from 'element-plus' +import { errorBox } from '@/utils/myMessageBox.js' import { ref, reactive } from 'vue' import { dateFormatter, timeFormatter } from '@/utils/formatter.js' import UploadExcelOrders from '@/excel/UploadExcelOrders.vue' @@ -264,7 +264,7 @@ export default { } deleteOrders(params).then(res => { if (res.data.code == 0) { - successBox('删除工单信息成功。') + ElMessage.success('删除工单信息成功。') this.search() } else { errorBox(res.data.message) @@ -274,7 +274,7 @@ export default { errorBox('删除工单信息成功') }) }).catch(() => { - infoBox('操作取消') + ElMessage.info('操作取消') }) }, submitOrdersInfo(formData) { @@ -292,7 +292,7 @@ export default { updateOrders(params).then(res => { if (res.data.code == 0) { this.dialogVisible = false - successBox('更新工单成功。') + ElMessage.success('更新工单成功。') this.search() } else { errorBox(res.data.message) diff --git a/src/layout/location.vue b/src/layout/location.vue index 80fc1b3..633ad65 100644 --- a/src/layout/location.vue +++ b/src/layout/location.vue @@ -66,7 +66,7 @@ import store from '@/store' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import { getLocations, updateLocation } from '@/api/location.js' import { ElMessage, ElLoading } from 'element-plus' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' import { reactive } from 'vue' diff --git a/src/layout/outTaskRecord.vue b/src/layout/outTaskRecord.vue index e618a71..998a57e 100644 --- a/src/layout/outTaskRecord.vue +++ b/src/layout/outTaskRecord.vue @@ -41,7 +41,7 @@ import { getTaskRecords } from '@/api/record.js' import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js' import { downloadOutRecordExcel } from '@/api/excel.js' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import { ElMessage } from 'element-plus' import store from '@/store' @@ -113,7 +113,8 @@ export default { exportExcel() { const params = { vehicleId: this.vehicleIdQuery.trim(), - goodsId: this.goodsIdQuery.trim() + goodsId: this.goodsIdQuery.trim(), + userName: store.getters.userName } downloadOutRecordExcel(params).then(res => { const link = document.createElement('a');//创建a标签 diff --git a/src/layout/outsideVehiclesMonitor.vue b/src/layout/outsideVehiclesMonitor.vue index f3b6af4..331c99b 100644 --- a/src/layout/outsideVehiclesMonitor.vue +++ b/src/layout/outsideVehiclesMonitor.vue @@ -86,7 +86,7 @@ import store from '@/store' import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js' import { ElMessage } from 'element-plus' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' import { ref, reactive } from 'vue' import { dateFormatter, timeFormatter } from '@/utils/formatter.js' import { Search } from '@element-plus/icons-vue' diff --git a/src/layout/pickTaskMonitor.vue b/src/layout/pickTaskMonitor.vue index 48a666a..67939e0 100644 --- a/src/layout/pickTaskMonitor.vue +++ b/src/layout/pickTaskMonitor.vue @@ -85,7 +85,8 @@ @@ -107,20 +108,20 @@ export default { errorBox('请输入大盒子号') return } - if (this.workFormEntity.orderOfOrders == null) { - errorBox('请输入工单顺序') - return - } + // if (this.workFormEntity.orderOfOrders == null) { + // errorBox('请输入工单顺序') + // return + // } const request = { standId: this.standId, bigBoxNo: this.workFormEntity.bigBoxNo, - orderOfOrders: this.workFormEntity.orderOfOrders, + // orderOfOrders: this.workFormEntity.orderOfOrders, userName: store.getters.getUserName } requestSortBox(request).then(res => { const response = res.data if (response.code == 0) { - successBox('请根据灯光拣选盒子。') + ElMessage.success('请根据灯光拣选盒子。') this.resetForms() } else { errorBox(response.message) diff --git a/src/layout/standSettings.vue b/src/layout/standSettings.vue index f3b6af4..331c99b 100644 --- a/src/layout/standSettings.vue +++ b/src/layout/standSettings.vue @@ -86,7 +86,7 @@ import store from '@/store' import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js' import { ElMessage } from 'element-plus' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' import { ref, reactive } from 'vue' import { dateFormatter, timeFormatter } from '@/utils/formatter.js' import { Search } from '@element-plus/icons-vue' diff --git a/src/layout/stationConfig.vue b/src/layout/stationConfig.vue index b497493..8b07755 100644 --- a/src/layout/stationConfig.vue +++ b/src/layout/stationConfig.vue @@ -27,6 +27,7 @@ + @@ -102,6 +103,12 @@ + + + + + @@ -153,8 +160,8 @@ @@ -252,12 +263,47 @@ export default { label: '库存锁定' } ], + goodsList: [], } }, mounted() { this.search() + this.loadAllGoodsInfo() }, methods: { + loadAllGoodsInfo() { + const request = { + userName: store.getters.getUserName + } + getGoodsInfoByGoodsId(request).then(res => { + const tableResponse = res.data + if (tableResponse.code == 0) { + this.goodsList = tableResponse.returnData + } else { + errorBox(tableResponse.message) + } + }).catch(err => { + console.log(err) + errorBox('查询物料信息异常。') + }) + }, + filterGoodsId(queryString, cb) { + const results = queryString + ? this.goodsList.filter(this.createFilter(queryString)) + : this.goodsList + // call callback function to return suggestion objects + cb(results) + }, + createFilter(queryString) { + return (restaurant) => { + return ( + restaurant.goodsId.toLowerCase().indexOf(queryString.toLowerCase()) != -1 + ) + } + }, + handleSelectGoodsId(item) { + this.goodsIdQuery = item.goodsId + }, locationFormat: (row, column, cellValue, index) => { return locationFormatter(cellValue) }, @@ -350,6 +396,7 @@ export default { goodsId: this.goodsIdQuery.trim(), vehicleId: this.vehicleIdQuery.trim(), locationId: this.locationIdQuery.trim(), + userName: store.getters.getUserName } downloadStockExcel(params).then(res => { const link = document.createElement('a');//创建a标签 @@ -374,7 +421,7 @@ export default { } }).catch(err => { console.log(err) - errorBox('导出失败') + errorBox('导出失败') }) }, editCurrentRowStock(row) { @@ -411,7 +458,7 @@ export default { updateStockInfo(request).then(res => { if (res.data.code == 0) { this.dialogVisible = false - successBox('更新库存成功') + ElMessage.success('更新库存成功') this.search() } else { errorBox(res.data.message) @@ -447,4 +494,32 @@ export default { .el-row .el-form-item .el-input-number { width: 100% !important; } + +.my-autocomplete li { + width: 196px; + line-height: normal; + padding: 7px; +} + +.my-autocomplete li .name { + text-overflow: ellipsis; + overflow: hidden; +} + +.my-autocomplete li .addr { + font-size: 12px; + color: #b4b4b4; +} + +.my-autocomplete li .highlighted .addr { + color: #ddd; +} + +.my-autocomplete li .goods_id { + color: brown; +} + +.my-autocomplete li .goods_name { + color: cornflowerblue; +} \ No newline at end of file diff --git a/src/layout/taskMonitor.vue b/src/layout/taskMonitor.vue index 5a8d878..c722573 100644 --- a/src/layout/taskMonitor.vue +++ b/src/layout/taskMonitor.vue @@ -131,7 +131,8 @@ import { getTasksByPage, updateTaskInfo } from '@/api/task.js' import { dateFormatter, taskStatusFormatter, timeFormatter, dueFormatter } from '@/utils/formatter.js' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' -import { errorBox, successBox } from '@/utils/myMessageBox.js' +import { errorBox } from '@/utils/myMessageBox.js' +import { ElMessage } from 'element-plus' import store from '@/store' import { ref, reactive } from 'vue' @@ -220,7 +221,7 @@ export default { }, { value: 999, - label: '任务完成' + label: '任务异常' } ], availableLocationOptions: [] @@ -332,7 +333,7 @@ export default { updateTaskInfo(request).then(res => { if (res.data.code == 0) { this.dialogVisible = false - successBox('修改任务成功') + ElMessage.success('修改任务成功') this.search() } else { errorBox(res.data.message) diff --git a/src/layout/vehicle.vue b/src/layout/vehicle.vue index 9095e40..1a41bdc 100644 --- a/src/layout/vehicle.vue +++ b/src/layout/vehicle.vue @@ -1,15 +1,17 @@