代码更新:

1.修改报错弹框样式
This commit is contained in:
梁州 2024-09-12 16:56:20 +08:00
parent ca2c30eb85
commit 1326ab0b33
37 changed files with 520 additions and 1115 deletions

View File

@ -56,9 +56,9 @@ const finishPickingAndBack = (params) => {
})
}
const changeTaskStatus = (params) => {
const updateTaskInfo = (params) => {
return request({
url: '/taskDeal/changeTaskStatus',
url: '/taskMonitor/updateTaskInfo',
method: 'post',
data: params
})
@ -199,7 +199,7 @@ export {
finishInventoryTask,
getTasks,
finishPickingAndBack,
changeTaskStatus,
updateTaskInfo,
getWorkByStandAndGoods,
confirmFinishedWork,
confirmFinishWork,

View File

@ -90,8 +90,8 @@
<script setup>
import store from '@/store'
import { callEmptyVehicle } from '@/api/task'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -216,17 +216,11 @@ export default {
},
confirmTask() {
if (this.workFormEntity.vehicleType2 == '') {
ElMessage({
message: '请选择物料种类',
type: 'error',
})
errorBox('请选择物料种类')
return
}
if (this.workFormEntity.needNum <= 0) {
ElMessage({
message: '料箱数量必须为大于0的整数',
type: 'error',
})
errorBox('料箱数量必须为大于0的整数')
return
}
const request = {
@ -239,17 +233,14 @@ export default {
callEmptyVehicle(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: response.message,
type: 'success',
})
successBox(response.message)
this.resetForms()
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('出空箱异常')
errorBox('出空箱异常')
})
}
}

View File

@ -235,8 +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 { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -300,15 +300,15 @@ export default {
this.workFormEntity.NumOfBoxOf811 = response.returnData.NumOfBoxOf811
this.workFormEntity.NumOfBoxOf911 = response.returnData.NumOfBoxOf911
this.workFormEntity.NumOfBoxOf822 = response.returnData.NumOfBoxOf822
ElMessage.success("获取CLC看板需求成功。")
successBox("获取CLC看板需求成功。")
} else {
this.resetForms()
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('获取CLC看板需求错误')
errorBox('获取CLC看板需求错误')
})
},
resetForms() {
@ -353,18 +353,12 @@ export default {
document.body.removeChild(link)
url.revokeObjectURL(link.href)//url
} catch (e) {
ElMessage({
message: '下载文件失败:: ' + e,
type: 'error',
showClose: true
})
console.log(e)
errorBox('下载文件失败')
}
}).catch(err => {
ElMessage({
message: '导出失败:: ' + err,
type: 'error',
showClose: true
})
console.log(err)
errorBox('导出失败:')
})
},
}

View File

@ -183,6 +183,7 @@
<script setup>
import store from '@/store'
import { clcNoPlan, clcNoPlanConfirmBack } from '@/api/task'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { getStockNumByGoodsId } from '@/api/stock'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
@ -235,12 +236,12 @@ export default {
this.workFormEntity.stockNum = response.returnData.remainNum
} else {
this.workFormEntity.stockNum = 0
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
this.workFormEntity.stockNum = null
ElMessage.error('查询库存余量发生错误。')
errorBox('查询库存余量发生错误。')
})
},
getCurrentGoodsPickNumMethod() {
@ -257,76 +258,75 @@ export default {
//
resetForms() {
this.workFormEntity = reactive({
goodsId: '',
planPickNum: 0,
remainNumOrigin: null,
remainNumReal: null,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
})
this.$refs.goodsId.focus()
},
//
createTask() {
if (this.standId == '' || this.workFormEntity.goodsId == '') {
ElMessage({
message: '站台号和料号不可缺少',
type: 'error',
})
return
}
const requestParams = {
goodsId: '',
stockNum: null,
needNum: null,
workOrder: '',
smallVehicleNo: '',
callReason: '',
callReason: ''
})
this.$refs.goodsId.focus()
},
resetConfirmForms() {
this.confirmFormEntity = reactive({
vehicleId: '',
goodsId: '',
realPickNum: null
})
},
//
createTask() {
if (this.standId == '' || this.workFormEntity.goodsId == '') {
errorBox('站台号和料号不可缺少')
return
}
const requestParams = {
goodsId: this.workFormEntity.goodsId,
stockNum: this.workFormEntity.stockNum,
needNum: this.workFormEntity.needNum,
workOrder: this.workFormEntity.workOrder,
smallVehicleNo: this.workFormEntity.smallVehicleNo,
callReason: this.workFormEntity.callReason,
standId: this.standId,
userName: store.getters.getUserName
}
clcNoPlan(requestParams).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage.success(response.message)
successBox(response.message)
this.resetForms()
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('请求时发生异常。')
errorBox('请求时发生异常。')
})
},
//
confirmPick() {
if (this.standId == '' || this.workFormEntity.goodsId == '') {
ElMessage({
message: '站台号和料号不可缺少',
type: 'error',
})
errorBox('站台号和料号不可缺少')
return
}
const confirmParams = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId,
vehicleId: this.workFormEntity.vehicleId,
realPickNum: this.workFormEntity.realPickNum,
goodsId: this.confirmFormEntity.goodsId,
vehicleId: this.confirmFormEntity.vehicleId,
realPickNum: this.confirmFormEntity.realPickNum,
userName: store.getters.getUserName
}
clcNoPlanConfirmBack(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage.success(response.message)
successBox(response.message)
this.resetConfirmForms()
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常。')
errorBox('确认时发生异常。')
})
},
}

View File

@ -131,7 +131,8 @@
import store from '@/store'
import { getDbs, deleteDbs, updateDbs } from '@/api/kateWork.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessageBox } from 'element-plus'
import { errorBox, infoBox, successBox } from '@/utils/myMessageBox.js'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import UploadExcelDbs from '@/excel/UploadExcelDbs.vue'
@ -181,10 +182,11 @@ export default {
this.dbsList = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询DBS错误' + err.message)
console.log(err)
errorBox('查询DBS错误')
})
this.loading = false
},
@ -229,23 +231,17 @@ export default {
}
deleteDbs(params).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '删除DBS信息成功',
type: 'success',
})
successBox('删除DBS信息成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('删除DBS信息成功')
errorBox('删除DBS信息成功')
})
}).catch(() => {
ElMessage({
type: 'info',
message: '操作取消',
})
infoBox('操作取消')
})
},
submitDbsInfo(formData) {
@ -260,16 +256,14 @@ export default {
updateDbs(params).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新DBS成功。',
type: 'success',
})
successBox('更新DBS成功。')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新DBS失败。')
console.log(err)
errorBox('更新DBS失败。')
})
},
getCurrentRow(row) {
@ -303,7 +297,7 @@ export default {
}
}).catch(err => {
console.log(err)
ElMessage.error('发生异常')
errorBox('发生异常')
})
this.uploadDialogVisible = true
},

View File

@ -24,10 +24,10 @@
label-width="150px" style="max-width: 100%" :rules="rules" status-icon>
<div style="display: flex;">
<div style="display: block; margin: 5px;">
<el-dialog v-model="dialogVisible" title="提醒" width="40%" draggable
<!-- <el-dialog v-model="dialogVisible" title="提醒" width="40%" draggable
:show-close="true">
<span style="color: green; margin-right: 16px; font-size: 35px;"> {{ workFormEntity.tip }}</span>
</el-dialog>
</el-dialog> -->
<div style="display: flex;">
<div style="display: flex; flex-direction: column;">
<div class="display-title-div">
@ -140,8 +140,8 @@
<script setup>
import store from '@/store'
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task'
import { errorBox, successBox, warningBox } from '@/utils/myMessageBox.js'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -171,7 +171,6 @@ export default {
{ required: true, message: '请输入料号' }
]
}),
dialogVisible: false,
}
},
mounted() {
@ -206,16 +205,16 @@ export default {
this.workFormEntity.tip = response.returnData.tip
if (this.workFormEntity.remainNumOrigin == 0) {
this.workFormEntity.tip = "理论剩余库存为0请确认。"
this.dialogVisible = true
warningBox(this.workFormEntity.tip)
}
} else {
this.resetForms()
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
errorBox('查询工作信息错误')
})
},
//
@ -232,18 +231,9 @@ export default {
if (response.code == 0) {
if (response.returnData != null && response.returnData.tip != '') {
this.workFormEntity.tip = response.returnData.tip
this.dialogVisible = true
// ElMessage({
// message: response.returnData.tip,
// type: 'warning',
// showClose: true
// })
warningBox(this.workFormEntity.tip)
} else {
ElMessage({
message: response.message,
type: 'success',
showClose: true
})
successBox(response.message)
}
this.resetForms()
}
@ -263,10 +253,7 @@ export default {
//
confirmTask() {
if (this.standId == '' || this.workFormEntity.goodsId == '') {
ElMessage({
message: '站台号和料号不可缺少',
type: 'error',
})
errorBox('站台号和料号不可缺少')
return
}
const confirmParams = {
@ -283,13 +270,13 @@ export default {
this.workFormEntity.tip = response.returnData.tip
}
this.resetForms()
ElMessage.success(response.message)
successBox(response.message)
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
errorBox('确认时发生异常')
})
}
}

View File

@ -85,6 +85,7 @@
<script setup>
import store from '@/store'
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { ElMessage } from 'element-plus'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'

View File

@ -85,6 +85,7 @@
<script setup>
import store from '@/store'
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { ElMessage } from 'element-plus'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'

View File

@ -139,8 +139,8 @@
<script setup>
import store from '@/store'
import { getFinishedWorkInfo, confirmFinishedWork, requestPrintData } from '@/api/task'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -199,7 +199,7 @@ export default {
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
errorBox('查询工作信息错误')
})
},
resetForms() {
@ -215,10 +215,7 @@ export default {
confirmWork() {
console.log('完成确认')
if (this.standId == '') {
ElMessage({
message: '站台号不可缺少',
type: 'error',
})
errorBox('站台号不可缺少')
return
}
const confirmParams = {
@ -228,17 +225,14 @@ export default {
confirmFinishedWork(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: response.message,
type: 'success',
})
successBox('response.message')
this.resetForms()
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
errorBox('确认时发生异常')
})
},
requestPrint() {
@ -251,11 +245,11 @@ export default {
if (res.data.code == 0) {
this.printTabs = res.data.returnData
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('获取标签数据时异常')
errorBox('获取标签数据时异常')
})
}
}

View File

@ -53,7 +53,8 @@
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
@current-change="search" />
<el-dialog v-model="dialogVisible" title="物料信息" width="40%" draggable :show-close="false">
<div style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
<div
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
<el-form ref="goodsFormRef" :model="goodsFormEntity" :label-position="labelPosition"
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
<el-row :gutter="16">
@ -89,8 +90,7 @@
<el-col :span="12">
<el-form-item label="重量" prop="weight">
<el-input-number v-model.number="goodsFormEntity.weight" controls-position="right"
:precision="3" :step="0.1"
:min="0" clearable />
:precision="3" :step="0.1" :min="0" clearable />
</el-form-item>
</el-col>
</el-row>
@ -102,8 +102,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="每盒数量" prop="quantityPerBox">
<el-input-number v-model.number="goodsFormEntity.quantityPerBox" controls-position="right"
:min="0" clearable />
<el-input-number v-model.number="goodsFormEntity.quantityPerBox"
controls-position="right" :min="0" clearable />
</el-form-item>
</el-col>
</el-row>
@ -139,8 +139,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="补货点" prop="feedingValue">
<el-input-number v-model.number="goodsFormEntity.feedingValue" controls-position="right"
:min="0" clearable />
<el-input-number v-model.number="goodsFormEntity.feedingValue"
controls-position="right" :min="0" clearable />
</el-form-item>
</el-col>
</el-row>
@ -176,11 +176,11 @@
import store from '@/store'
import { getGoodsInfoByPage } from '@/api/goods.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessageBox } from 'element-plus'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { errorBox, infoBox, successBox } from '@/utils/myMessageBox.js'
import UploadExcelGoods from '@/excel/UploadExcelGoods.vue'
import UploadExcelStationConfig from '@/excel/UploadExcelStationConfig.vue'
import { downloadMaterialExcel } from '@/api/excel.js'
import { Search } from '@element-plus/icons-vue'
</script>
@ -223,10 +223,11 @@ export default {
this.goodsList = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询物料错误' + err.message)
console.log(err)
errorBox('查询物料错误')
})
this.loading = false
},
@ -278,39 +279,30 @@ export default {
}
deleteAllKateTasks(params).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '删除物料信息成功',
type: 'success',
})
successBox('删除物料信息成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('删除物料信息失败')
errorBox('删除物料信息失败')
})
}).catch(() => {
ElMessage({
type: 'info',
message: '操作取消',
})
infoBox('操作取消')
})
},
submitGoodsInfo(formData) {
updatePartInfo(formData).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新零件信息成功',
type: 'success',
})
successBox('更新物料信息成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新零件信息失败')
errorBox('更新物料信息失败')
})
},
getCurrentRow(row) {
@ -335,18 +327,12 @@ export default {
document.body.removeChild(link)
url.revokeObjectURL(link.href)//url
} catch (e) {
ElMessage({
message: '下载文件失败:: ' + e,
type: 'error',
showClose: true
})
console.log(e)
errorBox('下载文件失败')
}
}).catch(err => {
ElMessage({
message: '导出失败:: ' + err,
type: 'error',
showClose: true
})
console.log(err)
errorBox('导出失败')
})
},
},

View File

@ -101,7 +101,7 @@ import store from '@/store'
import { sendGoodsInTask } from '@/api/task'
import { replaceEnglishAndNumberIGAI } from '@/utils/formatter'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -148,10 +148,7 @@ export default {
this.workFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.workFormEntity.vehicleId)
if (this.workFormEntity.vehicleId != '' && this.workFormEntity.goodsId != '' && this.workFormEntity.goodsNum != null && this.workFormEntity.goodsNum > 0) {
if (this.currentVehicleId != '' && this.currentVehicleId != this.workFormEntity.vehicleId) {
ElMessage({
message: '请下发之前料箱的任务后再继续绑定新的料箱',
type: 'error',
})
errorBox('请下发之前料箱的任务后再继续绑定新的料箱')
return
}
const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
@ -192,10 +189,7 @@ export default {
},
confirmTask() {
if (this.currentVehicleId == '') {
ElMessage({
message: '必须输入料箱号',
type: 'error',
})
errorBox('必须输入料箱号')
return
}
const request = {
@ -206,20 +200,17 @@ export default {
sendGoodsInTask(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: '入库确认成功。',
type: 'success',
})
successBox('入库确认成功。')
this.resetForms()
this.currentVehicleId = ''
this.tempTasks = []
this.$refs.vehicleId.focus()
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('入库处理异常')
errorBox('入库处理异常')
})
}
}

View File

@ -126,6 +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 zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import UploadExcelPart from '@/excel/UploadExcelPart.vue'
const taskInRequestRef = ref()

View File

@ -135,6 +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 zhCn from 'element-plus/dist/locale/zh-cn.mjs'
const taskOutRequestRef = ref()
const pickConfirmRef = ref()

View File

@ -88,6 +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 { Search } from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>

View File

@ -1,4 +1,3 @@
<template>
<div style="margin-bottom: 15px">
<el-config-provider :locale="zhCn">
@ -13,8 +12,9 @@
<el-table :data="tasks" stripe border v-loading="loading" style="width: 100%" max-height="684px"
class="table-class" :header-cell-style="{ 'text-align': 'center' }"
:cell-style="{ 'text-align': 'center' }">
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" />
<el-table-column prop="goodsType" label="型号" min-width="120px" />
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat"
min-width="120px" />
<el-table-column prop="goodsType" label="型号" min-width="120px" />
<el-table-column prop="specification" label="规格" min-width="120px" />
<el-table-column prop="batchNo" label="批次号" min-width="120px" />
<el-table-column prop="taskGroup" label="任务单号" min-width="120px" />
@ -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 { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
</script>
<script>
export default {
@ -97,11 +97,11 @@ export default {
this.tasks = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('查询任务记录错误')
errorBox('查询任务记录错误')
})
this.loading = false
},
@ -133,18 +133,12 @@ export default {
document.body.removeChild(link)
url.revokeObjectURL(link.href)//url
} catch (e) {
ElMessage({
message: '下载文件失败:: ' + e,
type: 'error',
showClose: true
})
console.log(e)
errorBox('下载文件失败')
}
}).catch(err => {
ElMessage({
message: '导出失败:: ' + err,
type: 'error',
showClose: true
})
console.log(e)
errorBox('导出失败')
})
},
},

View File

@ -88,7 +88,7 @@
import store from '@/store'
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import UploadExcelInventoryList from '@/excel/UploadExcelInventoryList.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -152,12 +152,12 @@ export default {
this.workFormEntity.tip = response.returnData.tip
} else {
this.resetForms()
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
errorBox('查询工作信息错误')
})
},
//
@ -176,7 +176,7 @@ export default {
this.workFormEntity.tip = response.returnData.tip
}
this.resetForms()
ElMessage.success(response.message)
successBox(response.message)
}
}).catch(err => {
console.log(err)
@ -201,10 +201,7 @@ export default {
//
confirmTask() {
if (this.standId == '' || this.workFormEntity.goodsId == '') {
ElMessage({
message: '站台号和料号不可缺少',
type: 'error',
})
errorBox('站台号和料号不可缺少')
return
}
const confirmParams = {
@ -220,13 +217,13 @@ export default {
this.workFormEntity.tip = response.returnData.tip
}
this.resetForms()
ElMessage.success(response.message)
successBox(response.message)
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
errorBox('确认时发生异常')
})
}
}

View File

@ -59,7 +59,7 @@
import { getTaskRecords } from '@/api/record.js'
import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus'
import { errorBox } from '@/utils/myMessageBox.js'
import store from '@/store'
</script>
<script>
@ -117,12 +117,12 @@ export default {
this.tasks = tableResponse.rows
this.total = tableResponse.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('查询盘点记录错误')
errorBox('查询盘点记录错误')
})
this.loading = false
},

View File

@ -27,11 +27,11 @@
</template>
</el-table-column>
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" />
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsId" label="料号" min-width="120px" />
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
<el-table-column prop="item" label="Item" min-width="120px" />
<el-table-column prop="description" label="描述" min-width="120px" />
<el-table-column prop="description" label="描述" min-width="120px" show-overflow-tooltip />
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
<el-table-column prop="type" label="Type" min-width="120px" />
<el-table-column prop="originStatus" label="Status" min-width="120px" />
@ -158,7 +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 { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessageBox } from 'element-plus'
import { errorBox, infoBox, successBox } from '@/utils/myMessageBox.js'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
@ -212,10 +213,11 @@ export default {
this.ordersList = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询工单错误' + err.message)
console.log(err)
errorBox('查询工单错误')
})
this.loading = false
},
@ -262,23 +264,17 @@ export default {
}
deleteOrders(params).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '删除工单信息成功',
type: 'success',
})
successBox('删除工单信息成功。')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('删除工单信息成功')
errorBox('删除工单信息成功')
})
}).catch(() => {
ElMessage({
type: 'info',
message: '操作取消',
})
infoBox('操作取消')
})
},
submitOrdersInfo(formData) {
@ -296,16 +292,14 @@ export default {
updateOrders(params).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新工单成功。',
type: 'success',
})
successBox('更新工单成功。')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新工单失败。')
console.log(err)
errorBox('更新工单失败。')
})
},
getCurrentRow(row) {
@ -339,7 +333,7 @@ export default {
}
}).catch(err => {
console.log(err)
ElMessage.error('发生异常')
errorBox('发生异常')
})
this.uploadDialogVisible = true
},

View File

@ -66,6 +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 { reactive } from 'vue'
</script>
<script>

View File

@ -132,7 +132,7 @@ import store from '@/store'
import { getLocations, updateLocation } from '@/api/location.js'
import { Search } from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { ref, reactive } from 'vue'
import { locationStatusFormatter, locationFormatter } from '@/utils/formatter.js'
</script>
@ -200,10 +200,11 @@ export default {
this.locations = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询库位信息错误' + err.message)
console.log(err)
errorBox('查询库位信息错误')
})
this.loading = false
},
@ -258,16 +259,14 @@ export default {
updateLocation(request).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新库位信息成功',
type: 'success',
})
successBox('更新库位信息成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新库位信息失败:' + err)
console.log(err)
errorBox('更新库位信息失败')
})
},
getCurrentRow(row) {

View File

@ -41,6 +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 zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus'
import store from '@/store'

View File

@ -86,6 +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 { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { Search } from '@element-plus/icons-vue'

View File

@ -85,7 +85,7 @@
<script setup>
import store from '@/store'
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { Search } from '@element-plus/icons-vue'
@ -148,10 +148,11 @@ export default {
this.pickTaskList = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询拣选任务错误' + err.message)
console.log(err)
errorBox('查询拣选任务错误')
})
this.loading = false
},
@ -200,16 +201,14 @@ export default {
updatePickTaskInfo(params).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新拣选任务成功。',
type: 'success',
})
successBox('更新拣选任务成功。')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新拣选任务失败。')
console.log(err)
errorBox('更新拣选任务失败。')
})
},
getCurrentRow(row) {

View File

@ -66,7 +66,7 @@
import store from '@/store'
import { requestSortBox } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -104,17 +104,11 @@ export default {
},
confirmTask() {
if (this.workFormEntity.bigBoxNo == '') {
ElMessage({
message: '请输入大盒子号',
type: 'error',
})
errorBox('请输入大盒子号')
return
}
if (this.workFormEntity.orderOfOrders == null) {
ElMessage({
message: '请输入工单顺序',
type: 'error',
})
errorBox('请输入工单顺序')
return
}
const request = {
@ -126,17 +120,14 @@ export default {
requestSortBox(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: '请根据灯光拣选盒子。',
type: 'success',
})
successBox('请根据灯光拣选盒子。')
this.resetForms()
} else {
ElMessage.error(response.message)
errorBox(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('请求发生异常。')
errorBox('请求发生异常。')
})
}
}

View File

@ -86,6 +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 { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { Search } from '@element-plus/icons-vue'

View File

@ -153,7 +153,8 @@
<script setup>
import store from '@/store'
import { getStationConfigs, deleteStationConfigs, updateStationConfigs } from '@/api/kateWork.js'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessageBox } from 'element-plus'
import { errorBox, successBox, infoBox } from '@/utils/myMessageBox.js'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import UploadExcelStationConfig from '@/excel/UploadExcelStationConfig.vue'
@ -206,10 +207,11 @@ export default {
this.stationConfigList = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询工站配置错误' + err.message)
console.log(err)
errorBox('查询工站配置错误')
})
this.loading = false
},
@ -258,23 +260,17 @@ export default {
}
deleteStationConfigs(params).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '删除工站配置信息成功',
type: 'success',
})
successBox('工站配置信息删除成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('删除工站配置信息成功')
errorBox('删除工站配置信息失败')
})
}).catch(() => {
ElMessage({
type: 'info',
message: '操作取消',
})
infoBox('操作取消')
})
},
submitConfigInfo(formData) {
@ -295,16 +291,14 @@ export default {
updateStationConfigs(params).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新工站配置成功。',
type: 'success',
})
successBox('工站配置信息更新成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新工站配置失败。')
console.log(err)
errorBox('更新工站配置失败。')
})
},
getCurrentRow(row) {
@ -338,7 +332,7 @@ export default {
}
}).catch(err => {
console.log(err)
ElMessage.error('发生异常')
errorBox('发生异常')
})
this.uploadDialogVisible = true
},

View File

@ -25,24 +25,30 @@
<el-radio :label="scope.row.stockId" v-model="stockId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column prop="stockId" label="库存编号" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsId" label="物料号" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" label="物料名称" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="remainNum" label="剩余数量" min-width="120px" />
<el-table-column prop="totalNum" label="入库数量" min-width="120px" />
<el-table-column prop="vehicleId" label="载具号" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" label="物料名称" min-width="120px" show-overflow-tooltip />
<el-table-column prop="locationId" label="库位" :formatter="locationFormat" min-width="120px"
show-overflow-tooltip />
<el-table-column prop="isInventory" label="是否盘点" min-width="120px" />
<el-table-column prop="createTime" label="上架时间" :formatter="timeFormat" min-width="120px"
show-overflow-tooltip />
<el-table-column prop="totalNum" label="入库数量" min-width="120px" />
<el-table-column prop="remainNum" label="剩余数量" min-width="120px" />
<el-table-column prop="goodsStatus" label="物料状态" :formatter="goodsStatusFormat" min-width="120px" />
<el-table-column prop="stockStatus" label="库存状态" :formatter="stockStatusFormat" fixed="right"
min-width="120px" />
<!-- <el-table-column fixed="right" label="操作" width="120px" v-if="selStock == null">
<el-table-column prop="isInventory" label="是否盘点" :formatter="yesOrNoFormat" min-width="120px" />
<el-table-column prop="inventoryTaskId" label="盘点任务号" min-width="120px" />
<el-table-column prop="noUseDays" label="未使用天数" min-width="120px" />
<el-table-column prop="createTime" label="上架时间" :formatter="timeFormat" min-width="120px"
show-overflow-tooltip />
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" min-width="120px"
show-overflow-tooltip />
<el-table-column prop="lastUpdateUser" label="最近更新用户" min-width="120px" />
<el-table-column fixed="right" label="操作" width="120px" v-if="selStock == null">
<template v-slot="scope">
<el-button plain type="primary" @click="editCurrentRowStock(scope.row)">编辑</el-button>
</template>
</el-table-column> -->
</el-table-column>
</el-table>
<br />
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
@ -53,39 +59,39 @@
style="max-width: 100%" :rules="rules" status-icon>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="型号" prop="goodsType">
<el-input v-model="stockFormEntity.goodsType" clearable />
<el-form-item label="库存编号" prop="stockId">
<el-input v-model="stockFormEntity.stockId" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="规格" prop="specification">
<el-input v-model="stockFormEntity.specification" clearable />
<el-form-item label="箱号" prop="vehicleId">
<el-input v-model="stockFormEntity.vehicleId" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="条码号" prop="barcode">
<el-input v-model="stockFormEntity.barcode" clearable />
<el-form-item label="料号" prop="goodsId">
<el-input v-model="stockFormEntity.goodsId" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="批次号" prop="batchNo">
<el-input v-model="stockFormEntity.batchNo" clearable />
<el-form-item label="料名" prop="goodsName">
<el-input v-model="stockFormEntity.goodsName" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="入库数量" prop="originNum">
<el-input-number v-model.number="stockFormEntity.originNum" clearable
controls-position="right" :min="0" />
<el-form-item label="入库数量" prop="totalNum">
<el-input-number v-model.number="stockFormEntity.totalNum"
controls-position="right" :min="0" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际数量为0时删除库存" prop="realNum">
<el-input-number v-model.number="stockFormEntity.realNum" controls-position="right"
:min="0" clearable />
<el-form-item label="剩余数量为0时删除库存" prop="remainNum">
<el-input-number v-model.number="stockFormEntity.remainNum" controls-position="right"
:min="0" :max="stockFormEntity.totalNum" clearable />
</el-form-item>
</el-col>
</el-row>
@ -96,8 +102,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="订单号" prop="orderId">
<el-input v-model="stockFormEntity.orderId" clearable />
<el-form-item label="未使用天数" prop="noUseDays">
<el-input-number v-model.number="stockFormEntity.noUseDays" controls-position="right"
:min="0" disabled />
</el-form-item>
</el-col>
</el-row>
@ -115,6 +122,37 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="盘点任务号" prop="inventoryTaskId">
<el-input v-model="stockFormEntity.inventoryTaskId" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否盘点" prop="isInventory">
<el-input v-model="stockFormEntity.isInventory" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="stockFormEntity.createTime" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="最近更新时间" prop="lastUpdateTime">
<el-input v-model="stockFormEntity.lastUpdateTime" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="最近更新用户" prop="lastUpdateUser">
<el-input v-model="stockFormEntity.lastUpdateUser" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<span class="dialog-footer">
@ -133,11 +171,11 @@
import store from '@/store'
import { getAllStocks, updateStockInfo } from '@/api/stock.js'
import { downloadStockExcel } from '@/api/excel.js'
import { dateFormatter, locationFormatter, timeFormatter } from '@/utils/formatter.js'
import { dateFormatter, locationFormatter, timeFormatter, yesOrNoFormatter } from '@/utils/formatter.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { Search } from '@element-plus/icons-vue'
import { ref, reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
// import FileSaver from 'file-saver';
// import * as XLSX from 'xlsx';
</script>
@ -262,6 +300,9 @@ export default {
return '异常'
}
},
yesOrNoFormat: (row, column, cellValue, index) => {
return yesOrNoFormatter(cellValue)
},
rowStyle: ({ row, rowIndex }) => {
if (row.goodsStatus == 3) {
return { "color": "red" }
@ -286,11 +327,11 @@ export default {
this.displayStocks = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('查询库存错误')
errorBox('查询库存错误')
})
this.loading = false
},
@ -328,18 +369,12 @@ export default {
document.body.removeChild(link)
url.revokeObjectURL(link.href)//url
} catch (e) {
ElMessage({
message: '下载文件失败:: ' + e,
type: 'error',
showClose: true
})
console.log(e)
errorBox('下载文件失败')
}
}).catch(err => {
ElMessage({
message: '导出失败:: ' + err,
type: 'error',
showClose: true
})
console.log(err)
errorBox('导出失败')
})
},
editCurrentRowStock(row) {
@ -354,35 +389,36 @@ export default {
isInventory: row.isInventory,
inventoryTaskId: row.inventoryTaskId,
noUseDays: row.noUseDays,
goodsRelated: {
goodsId: row.goodsId,
goodsName: row.goodsName,
goodsStatus: row.goodsStatus,
remainNum: row.remainNum,
totalNum: row.totalNum
}
goodsId: row.goodsId,
goodsName: row.goodsName,
goodsStatus: row.goodsStatus,
remainNum: row.remainNum,
totalNum: row.totalNum
}
this.stockFormEntity = row
this.dialogVisible = true
},
submitStockInfo(stockFormEntity) {
updateStockInfo(stockFormEntity).then(res => {
submitStockInfo() {
const request = {
stockId: this.stockFormEntity.stockId,
locationId: this.stockFormEntity.locationId,
vehicleId: this.stockFormEntity.vehicleId,
stockStatus: this.stockFormEntity.stockStatus,
goodsId: this.stockFormEntity.goodsId,
goodsStatus: this.stockFormEntity.goodsStatus,
remainNum: this.stockFormEntity.remainNum,
userName: store.getters.getUserName
}
updateStockInfo(request).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新库存成功',
type: 'success'
})
successBox('更新库存成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage({
message: '更新库存失败: ' + err,
type: 'error',
showClose: true
})
console.log(err)
errorBox('更新库存失败')
})
}
},

View File

@ -2,8 +2,12 @@
<div style="margin-bottom: 10px">
<el-config-provider :locale="zhCn">
<el-row>
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号" />
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号" />
<el-input v-model="goodsIdQuery" style="width: 196px; margin-right: 10px;" placeholder="料号" />
<el-input v-model="vehicleIdQuery" style="width: 196px; margin-right: 10px;" placeholder="箱号" />
<el-select-v2 v-model="taskTypeQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务类型"
:options="taskTypeOptions" @change="search()"></el-select-v2>
<el-select-v2 v-model="taskStatusQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务状态"
:options="taskStatusOptions" @change="search()"></el-select-v2>
<el-button type="primary" @click="search()">搜索</el-button>
<el-button type="warning" @click="reset()">重置</el-button>
</el-row>
@ -16,10 +20,11 @@
<el-radio :label="scope.row.taskId" v-model="taskId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column prop="taskId" label="任务号" fixed="left" show-overflow-tooltip min-width="120px" />
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" />
<el-table-column prop="vehicleId" label="载具号" min-width="120px" />
<el-table-column prop="goodsRelated.goodsId" label="号" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsRelated.goodsName" label="料名" min-width="120px" show-overflow-tooltip />
<el-table-column prop="vehicleId" label="号" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsRelated.goodsId" label="料号" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsRelated.goodsName" label="料名" min-width="120px" show-overflow-tooltip />
<el-table-column prop="taskGroup" label="任务组" min-width="120px" show-overflow-tooltip />
<el-table-column prop="origin" label="起点" min-width="120px" />
<el-table-column prop="destination" label="终点" min-width="120px" />
@ -27,16 +32,16 @@
<el-table-column prop="originNum" label="库存数量" min-width="120px" />
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" />
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px" />
<!-- <el-table-column prop="userName" label="操作人员姓名" min-width="120px" /> -->
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px" show-overflow-tooltip />
<el-table-column prop="userName" label="操作人员姓名" min-width="120px" />
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
min-width="120px" />
<!-- <el-table-column fixed="right" label="操作" width="120px">
<el-table-column fixed="right" label="操作" width="120px">
<template v-slot="scope">
<el-button plain type="primary" @click="editCurrentRowTask(scope.row)">编辑</el-button>
</template>
</el-table-column> -->
</el-table-column>
</el-table>
<br />
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
@ -48,12 +53,25 @@
style="max-width: 100%" :rules="rules" status-icon>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="料箱号" prop="vehicleNo">
<el-input v-model="taskFormEntity.vehicleNo" disabled />
<el-form-item label="任务号" prop="taskId">
<el-input v-model="taskFormEntity.taskId" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="零件号" prop="goodsId">
<el-form-item label="任务优先级" prop="taskPriority">
<el-input-number v-model.number="taskFormEntity.taskPriority" controls-position="right"
:min="1" :max="9" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="料箱号" prop="vehicleId">
<el-input v-model="taskFormEntity.vehicleId" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="料号" prop="goodsId">
<el-input v-model="taskFormEntity.goodsId" disabled />
</el-form-item>
</el-col>
@ -64,7 +82,7 @@
<el-input v-model="taskFormEntity.origin" disabled />
</el-form-item>
</el-col>
<el-col :span="12" v-if="taskFormEntity.taskType == 1">
<!-- <el-col :span="12" v-if="taskFormEntity.taskType == 1">
<el-form-item label="终点" prop="destination">
<el-select-v2 v-model="taskFormEntity.destination"
:options="availableLocationOptions"></el-select-v2>
@ -74,6 +92,11 @@
<el-form-item label="终点" prop="destination">
<el-input v-model="taskFormEntity.destination" disabled />
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="终点" prop="destination">
<el-input v-model="taskFormEntity.destination" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
@ -105,10 +128,10 @@
</template>
<script setup>
import { getTasksByPage, changeTaskStatus } from '@/api/task.js'
import { dateFormatter, locationFormatter, taskStatusFormatter, timeFormatter, dueFormatter } from '@/utils/formatter.js'
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 { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import store from '@/store'
import { ref, reactive } from 'vue'
</script>
@ -123,6 +146,8 @@ export default {
total: 0,
goodsIdQuery: '',
vehicleIdQuery: '',
taskTypeQuery: -99,
taskStatusQuery: -99,
loading: true,
dialogVisible: false,
taskFormEntity: reactive({}),
@ -131,6 +156,10 @@ export default {
rules: reactive({}),
taskId: '',
taskTypeOptions: [
{
value: -99,
label: '所有类型'
},
{
value: 1,
label: '入库'
@ -149,16 +178,48 @@ export default {
},
],
taskStatusOptions: [
{
value: -99,
label: '所有状态'
},
{
value: -2,
label: '重复入库'
},
{
value: -1,
label: '暂存'
},
{
value: 0,
label: '任务重置'
label: '新建待下发'
},
{
value: 1,
label: '任务取消'
label: '已下发'
},
{
value: 2,
label: '开始执行'
},
{
value: 8,
label: '拣选中'
},
{
value: 9,
label: '盘点中'
},
{
value: 100,
label: '任务完成'
},
{
value: 998,
label: '任务取消'
},
{
value: 999,
label: '任务完成'
}
],
@ -195,6 +256,8 @@ export default {
const tableRequest = {
pageNo: this.currentPage,
pageSize: this.pageSize,
taskType: this.taskTypeQuery == -99 ? null : this.taskTypeQuery,
taskStatus: this.taskStatusQuery == -99 ? null : this.taskStatusQuery,
goodsId: this.goodsIdQuery.trim(),
vehicleId: this.vehicleIdQuery.trim(),
userName: store.getters.getUserName
@ -204,12 +267,13 @@ export default {
if (tableResponse.code == 0) {
this.tasks = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
console.log(this.tasks)
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('查询任务错误')
errorBox('查询任务错误')
})
this.loading = false
},
@ -218,6 +282,7 @@ export default {
this.vehicleIdQuery = ''
},
editCurrentRowTask(row) {
console.log(row)
// if (row.taskType == 1) {
// this.availableLocationOptions = []
// var currentOption = {
@ -239,44 +304,42 @@ export default {
// }
// }
// }).catch(err => {
// ElMessage.error(':' + err)
// errorBox(':' + err)
// })
// }
this.taskFormEntity.taskId = row.taskId
this.taskFormEntity.vehicleNo = row.vehicleNo
this.taskFormEntity.goodsId = row.goodsId
this.taskFormEntity.origin = row.origin
this.taskFormEntity.destination = row.destination
this.taskFormEntity.taskType = row.taskType
this.taskFormEntity.taskStatus = null
this.taskFormEntity = {
taskId: row.taskId,
taskPriority: row.taskPriority,
vehicleId: row.vehicleId,
goodsId: row.goodsRelated == null ? '' : row.goodsRelated.goodsId,
origin: row.origin,
destination: row.destination,
taskType: row.taskType,
taskStatus: row.taskStatus,
}
this.dialogVisible = true
},
submitTaskInfo(formData) {
if (formData.taskStatus == null || formData.taskStatus == undefined) {
ElMessage.error('请选择任务状态')
submitTaskInfo() {
if (this.taskFormEntity.taskStatus == null || this.taskFormEntity.taskStatus == undefined) {
errorBox('请选择任务状态')
return
}
formData.userName = store.getters.getUserName
changeTaskStatus(formData).then(res => {
const request = {
taskId: this.taskFormEntity.taskId,
taskStatus: this.taskFormEntity.taskStatus,
userName: store.getters.getUserName
}
updateTaskInfo(request).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新任务状态成功',
type: 'success',
})
this.taskFormEntity.taskId = ''
this.taskFormEntity.vehicleNo = ''
this.taskFormEntity.goodsId = ''
this.taskFormEntity.origin = ''
this.taskFormEntity.destination = ''
this.taskFormEntity.taskType = null
this.taskFormEntity.taskStatus = null
successBox('修改任务成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新任务状态失败:' + err)
console.log(err)
errorBox('修改任务失败')
})
},
getCurrentRow(row) {

View File

@ -1,332 +0,0 @@
<template>
<el-config-provider :locale="zhCn">
<el-container class="content">
<div class="work-area">
<fieldset class="title-area">
<legend>
DBS
</legend>
<div class="title-div">
<span class="title-text">DBS日生产计划管理
</span>
</div>
</fieldset>
<fieldset class="main-area">
<legend>
上传
</legend>
<el-form ref="workFormRef" :model="workFormEntity" :label-position="labelPosition"
label-width="150px" style="max-width: 100%" :rules="rules" status-icon>
<div style="display: flex; justify-content: center;">
<div style="display: block; margin: 5px;">
<!-- <div
style="display: inline-flex; justify-content: center; height: 60px; width: 655px; margin: 5px; padding: 5px;">
<UploadExcelPart></UploadExcelPart>
</div> -->
<div style="height: 50px; margin-top: 20px; margin-bottom: 20px;"><UploadExcelDbs></UploadExcelDbs></div>
<div style="display: flex; margin-top: 15px">
<div
style="display: inline-flex; justify-content: center; width: 160px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
<span style="align-self: center; font-weight: bold;font-size: 25px;">备注</span>
</div>
<div
style="display: inline-flex; justify-content: center; width: 700px; margin: 5px; padding: 5px; background-color: #00AAE8;">
<span style="align-self: center; font-weight: bold;font-size: 25px;">
{{ workFormEntity.remark }}
</span>
</div>
</div>
</div>
</div>
</el-form>
</fieldset>
</div>
</el-container>
</el-config-provider>
</template>
<script setup>
import store from '@/store'
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import UploadExcelDbs from '@/excel/UploadExcelDbs.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
<script>
export default {
name: 'uploadDbs',
data() {
return {
standId: store.getters.getStandId,
timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
goodsId: '',
planPickNum: 0,
remainNumOrigin: null,
remainNumReal: null,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
}),
rules: reactive({
goodsId: [
{ required: true, message: '请输入料号' }
]
}),
}
},
mounted() {
this.timer = setInterval(() => {
this.queryFinish()
}, 2000)
},
beforeUnmount() {
clearInterval(this.timer)
},
methods: {
//
getCurrentWorkInfo() {
const request = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId
}
getWorkByStandAndGoods(request).then(res => {
const response = res.data
if (response.code == 0) {
this.workFormEntity.goodsId = response.returnData.goodsId
this.workFormEntity.planPickNum = response.returnData.planPickNum
this.workFormEntity.remainNumOrigin = response.returnData.remainNumOrigin
this.workFormEntity.remainNumReal = response.returnData.remainNumReal
this.workFormEntity.remark = response.returnData.remark
this.workFormEntity.finishedRows = response.returnData.finishedRows
this.workFormEntity.totalRows = response.returnData.totalRows
this.workFormEntity.finishedCounts = response.returnData.finishedCounts
this.workFormEntity.totalCounts = response.returnData.totalCounts
this.workFormEntity.tip = response.returnData.tip
} else {
this.resetForms()
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
})
},
//
queryFinish() {
if (this.workFormEntity.goodsId == '') {
return
}
const request = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId
}
queryFinishByStandAndGoods(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.returnData != null) {
this.workFormEntity.tip = response.returnData.tip
}
this.resetForms()
ElMessage.success(response.message)
}
}).catch(err => {
console.log(err)
})
},
//
resetForms() {
this.workFormEntity = reactive({
goodsId: '',
planPickNum: 0,
remainNumOrigin: null,
remainNumReal: null,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
})
this.$refs.goodsId.focus()
},
}
}
</script>
<style scoped>
.content {
display: flex;
width: 100%;
}
.work-area {
width: 100%;
/* padding: 5px; */
}
.main-area {
margin: auto;
min-height: fit-content;
max-height: 90%;
margin-bottom: 10px;
min-width: inherit;
border: solid 1px;
border-radius: 10px;
box-shadow: 0px 15px 10px -15px #000;
overflow: auto;
}
.title-area {
display: flex;
/* min-height: 10%; */
max-height: max-content;
margin-bottom: 10px;
min-width: inherit;
border: solid 1px;
border-radius: 10px;
box-shadow: 0px 15px 10px -15px #000;
overflow: auto;
}
.arrow {
background: linear-gradient(-105deg,
transparent 50%,
#309330 50%,
#309330 100%) top right,
linear-gradient(-75deg,
transparent 50%,
#309330 50%,
#309330 100%) bottom right;
background-size: 100% 50%;
height: 400px;
width: 250px;
background-repeat: no-repeat;
display: inline-flex;
cursor: pointer;
}
:deep(.el-input) {
width: 195px;
height: 130px;
font-size: 25px;
}
:deep(.el-input-number) {
width: 125px;
height: 130px;
font-size: 25px;
}
/* :deep(.el-input .el-input__inner) {
font-size: 60px;
height: 130px;
}
:deep(.el-input-number .el-input__inner) {
font-size: 60px;
height: 130px;
} */
.title-div {
display: inline-flex;
width: -webkit-fill-available;
margin-right: 5px;
padding: 5px;
background-color: #CCCCCC;
}
.title-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.station-div {
display: inline-flex;
justify-content: center;
width: 150px;
margin-left: 5px;
margin-right: 5px;
padding: 5px;
background-color: #FFFAAA;
}
.station-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.station-no-div {
display: inline-flex;
justify-content: center;
width: 200px;
padding: 5px;
border: 5px double #000000;
}
.station-no-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.display-title-div {
display: inline-flex;
justify-content: center;
width: 205px;
height: 80px;
margin: 5px;
padding: 5px;
background-color: #FFFAAA;
}
.display-title-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.display-form-div {
display: inline-flex;
justify-content: center;
width: 195px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
margin-top: 25px;
}
.display-form-div-left {
display: inline-flex;
justify-content: center;
width: 125px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
}
.display-form-div-right {
display: inline-flex;
justify-content: center;
width: 50px;
margin: 5px;
padding: 5px;
background-color: #CCCCCC;
}
.display-form-text-right {
align-self: center;
font-weight: bold;
font-size: 25px;
}
</style>

View File

@ -1,334 +0,0 @@
<template>
<el-config-provider :locale="zhCn">
<el-container class="content">
<div class="work-area">
<fieldset class="title-area">
<legend>
工单
</legend>
<div class="title-div">
<span class="title-text">生产工单管理
</span>
</div>
</fieldset>
<fieldset class="main-area">
<legend>
上传
</legend>
<el-form ref="workFormRef" :model="workFormEntity" :label-position="labelPosition"
label-width="150px" style="max-width: 100%" :rules="rules" status-icon>
<div style="display: flex; justify-content: center;">
<div style="display: block; margin: 5px;">
<!-- <div
style="display: inline-flex; justify-content: center; height: 60px; width: 655px; margin: 5px; padding: 5px;">
<UploadExcelPart></UploadExcelPart>
</div> -->
<div style="height: 50px; margin-top: 20px; margin-bottom: 20px;"><UploadExcelOrders></UploadExcelOrders></div>
<div style="display: flex; margin-top: 15px">
<div
style="display: inline-flex; justify-content: center; width: 160px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
<span style="align-self: center; font-weight: bold;font-size: 25px;">备注</span>
</div>
<div
style="display: inline-flex; justify-content: center; width: 700px; margin: 5px; padding: 5px; background-color: #00AAE8;">
<span style="align-self: center; font-weight: bold;font-size: 25px;">
{{ workFormEntity.remark }}
</span>
</div>
</div>
</div>
</div>
</el-form>
</fieldset>
</div>
</el-container>
</el-config-provider>
</template>
<script setup>
import store from '@/store'
import { getWorkByStandAndGoods, queryFinishByStandAndGoods } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
<script>
export default {
name: 'uploadOrders',
data() {
return {
standId: store.getters.getStandId,
timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
goodsId: '',
planPickNum: 0,
remainNumOrigin: null,
remainNumReal: null,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
}),
rules: reactive({
goodsId: [
{ required: true, message: '请输入料号' }
]
}),
}
},
mounted() {
this.timer = setInterval(() => {
this.queryFinish()
}, 2000)
},
beforeUnmount() {
clearInterval(this.timer)
},
methods: {
//
getCurrentWorkInfo() {
const request = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId,
userName: store.getters.getUserName
}
getWorkByStandAndGoods(request).then(res => {
const response = res.data
if (response.code == 0) {
this.workFormEntity.goodsId = response.returnData.goodsId
this.workFormEntity.planPickNum = response.returnData.planPickNum
this.workFormEntity.remainNumOrigin = response.returnData.remainNumOrigin
this.workFormEntity.remainNumReal = response.returnData.remainNumReal
this.workFormEntity.remark = response.returnData.remark
this.workFormEntity.finishedRows = response.returnData.finishedRows
this.workFormEntity.totalRows = response.returnData.totalRows
this.workFormEntity.finishedCounts = response.returnData.finishedCounts
this.workFormEntity.totalCounts = response.returnData.totalCounts
this.workFormEntity.tip = response.returnData.tip
} else {
this.resetForms()
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
})
},
//
queryFinish() {
if (this.workFormEntity.goodsId == '') {
return
}
const request = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId,
userName: store.getters.getUserName
}
queryFinishByStandAndGoods(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.returnData != null) {
this.workFormEntity.tip = response.returnData.tip
}
this.resetForms()
ElMessage.success(response.message)
}
}).catch(err => {
console.log(err)
})
},
//
resetForms() {
this.workFormEntity = reactive({
goodsId: '',
planPickNum: 0,
remainNumOrigin: null,
remainNumReal: null,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
})
this.$refs.goodsId.focus()
},
}
}
</script>
<style scoped>
.content {
display: flex;
width: 100%;
}
.work-area {
width: 100%;
/* padding: 5px; */
}
.main-area {
margin: auto;
min-height: fit-content;
max-height: 90%;
margin-bottom: 10px;
min-width: inherit;
border: solid 1px;
border-radius: 10px;
box-shadow: 0px 15px 10px -15px #000;
overflow: auto;
}
.title-area {
display: flex;
/* min-height: 10%; */
max-height: max-content;
margin-bottom: 10px;
min-width: inherit;
border: solid 1px;
border-radius: 10px;
box-shadow: 0px 15px 10px -15px #000;
overflow: auto;
}
.arrow {
background: linear-gradient(-105deg,
transparent 50%,
#309330 50%,
#309330 100%) top right,
linear-gradient(-75deg,
transparent 50%,
#309330 50%,
#309330 100%) bottom right;
background-size: 100% 50%;
height: 400px;
width: 250px;
background-repeat: no-repeat;
display: inline-flex;
cursor: pointer;
}
:deep(.el-input) {
width: 195px;
height: 130px;
font-size: 25px;
}
:deep(.el-input-number) {
width: 125px;
height: 130px;
font-size: 25px;
}
/* :deep(.el-input .el-input__inner) {
font-size: 60px;
height: 130px;
}
:deep(.el-input-number .el-input__inner) {
font-size: 60px;
height: 130px;
} */
.title-div {
display: inline-flex;
width: -webkit-fill-available;
margin-right: 5px;
padding: 5px;
background-color: #CCCCCC;
}
.title-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.station-div {
display: inline-flex;
justify-content: center;
width: 150px;
margin-left: 5px;
margin-right: 5px;
padding: 5px;
background-color: #FFFAAA;
}
.station-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.station-no-div {
display: inline-flex;
justify-content: center;
width: 200px;
padding: 5px;
border: 5px double #000000;
}
.station-no-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.display-title-div {
display: inline-flex;
justify-content: center;
width: 205px;
height: 80px;
margin: 5px;
padding: 5px;
background-color: #FFFAAA;
}
.display-title-text {
align-self: center;
font-weight: bold;
font-size: 25px;
}
.display-form-div {
display: inline-flex;
justify-content: center;
width: 195px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
margin-top: 25px;
}
.display-form-div-left {
display: inline-flex;
justify-content: center;
width: 125px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
}
.display-form-div-right {
display: inline-flex;
justify-content: center;
width: 50px;
margin: 5px;
padding: 5px;
background-color: #CCCCCC;
}
.display-form-text-right {
align-self: center;
font-weight: bold;
font-size: 25px;
}
</style>

View File

@ -81,7 +81,7 @@
<script setup>
import { getAllVehicles, updateVehicleInfo } from '@/api/vehicle'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { Search } from '@element-plus/icons-vue'
import { ref, reactive } from 'vue'
import { vehicleStatusFormatter, locationFormatter, dateFormatter, timeFormatter } from '@/utils/formatter.js'
@ -161,10 +161,11 @@ export default {
this.vehicles = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询料箱信息错误' + err.message)
console.log(err)
errorBox('查询料箱信息错误')
})
this.loading = false
},
@ -211,16 +212,14 @@ export default {
updateVehicleInfo(request).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新料箱信息成功',
type: 'success',
})
successBox('更新料箱信息成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新料箱信息失败:' + err)
console.log(err)
errorBox('更新料箱信息失败')
})
},
getCurrentRow(row) {
@ -253,18 +252,12 @@ export default {
document.body.removeChild(link)
url.revokeObjectURL(link.href)//url
} catch (e) {
ElMessage({
message: '下载文件失败:: ' + e,
type: 'error',
showClose: true
})
console.log(e)
errorBox('下载文件失败')
}
}).catch(err => {
ElMessage({
message: '导出失败:: ' + err,
type: 'error',
showClose: true
})
console.log(err)
errorBox('导出失败')
})
},
}

View File

@ -91,7 +91,7 @@ import { configTypeFormatter } from '@/utils/formatter.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { Search } from '@element-plus/icons-vue'
import { ref, reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import store from '@/store'
</script>
<script>
@ -176,11 +176,11 @@ export default {
})
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('查询配置错误')
errorBox('查询配置错误')
})
this.loading = false
},
@ -213,20 +213,14 @@ export default {
updateConfig(request).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新系统配置成功',
type: 'success'
})
successBox('更新系统配置成功')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage({
message: '更新系统配置失败: ' + err,
type: 'error',
showClose: true
})
console.log(err)
errorBox('更新系统配置失败')
})
}
},

View File

@ -106,7 +106,7 @@
import store from '@/store'
import { queryLogs } from '@/api/wmsLog.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus'
import { errorBox } from '@/utils/myMessageBox.js'
import { timeFormatter, jsonFormatter } from '@/utils/formatter.js'
import { ref, reactive } from 'vue'
</script>
@ -148,11 +148,12 @@ export default {
this.wmsLogs = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询日志错误' + err.message)
console.log(err)
errorBox('查询日志错误')
})
this.loading = false
},

View File

@ -157,7 +157,7 @@
<script setup>
import store from '@/store'
import { getWorkFlows, updateWorkFlows } from '@/api/kateWork.js'
import { ElMessage } from 'element-plus'
import { errorBox, successBox } from '@/utils/myMessageBox.js'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { Search } from '@element-plus/icons-vue'
@ -234,10 +234,11 @@ export default {
this.workFlowList = tableResponse.returnData.lists
this.total = tableResponse.returnData.total
} else {
ElMessage.error(tableResponse.message)
errorBox(tableResponse.message)
}
}).catch(err => {
ElMessage.error('查询工作流错误' + err.message)
console.log(err)
errorBox('查询工作流错误')
})
this.loading = false
},
@ -308,16 +309,14 @@ export default {
updateWorkFlows(params).then(res => {
if (res.data.code == 0) {
this.dialogVisible = false
ElMessage({
message: '更新工作流信息成功。',
type: 'success',
})
successBox('更新工作流信息成功。')
this.search()
} else {
ElMessage.error(res.data.message)
errorBox(res.data.message)
}
}).catch(err => {
ElMessage.error('更新工作流信息失败。')
console.log(err)
errorBox('更新工作流信息失败。')
})
},
getCurrentRow(row) {

View File

@ -86,6 +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 { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { Search } from '@element-plus/icons-vue'

View File

@ -24,23 +24,19 @@ function dueFormatter(date) {
function taskStatusFormatter(value) {
switch (value) {
case -2:
return '重复入库'
case -1:
return '暂存任务'
case 0:
return '任务新建,待下发'
case 1:
return '任务已下发'
case 2:
return '任务开始执行'
case 3:
return '出库完成'
case 4:
return '输送线转运中'
case 5:
return '到达拣选站台'
case 6:
return '正在拣货'
case 7:
return '正在回库'
case 8:
return '拣选中'
case 9:
return '盘点中'
case 100:
return '任务完成'
@ -49,7 +45,7 @@ function taskStatusFormatter(value) {
case 999:
return '任务异常'
default:
return '未完成'
return '其他状态'
}
}
@ -181,6 +177,14 @@ function replaceEnglishAndNumberIGAI(value) {
return value.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '')
}
function yesOrNoFormatter(value) {
return value == 1 ? '是' : '否'
}
function converseYesOrNoFormatter(value) {
return value == 0 ? '是' : '否'
}
export {
timeFormatter,
dateFormatter,
@ -194,5 +198,7 @@ export {
locationStatusFormatter,
sizeFormatter,
jsonFormatter,
replaceEnglishAndNumberIGAI
replaceEnglishAndNumberIGAI,
yesOrNoFormatter,
converseYesOrNoFormatter
}

64
src/utils/myMessageBox.js Normal file
View File

@ -0,0 +1,64 @@
import { ElMessageBox } from 'element-plus'
function errorBox(msg, myCallBack) {
ElMessageBox.alert(msg, '错误', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'error',
closeOnPressEscape: true,
showClose: false,
callback: (action) => {
myCallBack()
}
})
}
function successBox(msg, myCallBack) {
ElMessageBox.alert(msg, '成功', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'success',
closeOnPressEscape: true,
showClose: false,
callback: (action) => {
myCallBack()
}
})
}
function infoBox(msg, myCallBack) {
ElMessageBox.alert(msg, '提示', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'info',
closeOnPressEscape: true,
showClose: false,
callback: (action) => {
myCallBack()
}
})
}
function warningBox(msg, myCallBack) {
ElMessageBox.alert(msg, '警告', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'warning',
closeOnPressEscape: true,
showClose: false,
callback: (action) => {
myCallBack()
}
})
}
export {
errorBox,
successBox,
infoBox,
warningBox
}