代码更新

This commit is contained in:
梁州 2024-08-07 23:12:42 +08:00
parent 33c49bfc15
commit 83f96d3298
21 changed files with 1496 additions and 121 deletions

View File

@ -6,16 +6,16 @@ const downloadExcel = () => {
}) })
} }
const uploadExcel = (formData) => { const uploadExcel = (data) => {
return request({ return request({
url: '/test/testExcelImport', url: '/test/testExcelImport',
method: 'post', method: 'post',
data: formData, data: data,
timeout: 100000 timeout: 100000
}) })
} }
const uploadExcelParts = (data) => { const uploadExcelStock = (data) => {
return request({ return request({
url: '/excel/uploadStocks', url: '/excel/uploadStocks',
method: 'post', method: 'post',
@ -24,23 +24,59 @@ const uploadExcelParts = (data) => {
}) })
} }
const downloadStockExcel = (params) => { const uploadExcelGoods = (data) => {
return request({
url: '/excel/uploadGoods',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelDbs = (data) => {
return request({
url: '/excel/uploadDbs',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelOrders = (data) => {
return request({
url: '/excel/uploadKateOrders',
method: 'post',
data: data,
timeout: 100000
})
}
const uploadExcelInventoryList = (data) => {
return request({
url: '/excel/uploadInventoryList',
method: 'post',
data: data,
timeout: 100000
})
}
const downloadStockExcel = (data) => {
return request({ return request({
url: '/excel/downloadStockExcel', url: '/excel/downloadStockExcel',
method: 'post', method: 'post',
responseType: 'blob', responseType: 'blob',
data: params data: data
}) })
} }
const downloadInRecordExcel = (params) => { const downloadInRecordExcel = (data) => {
return request({ return request({
url: '/excel/downloadInRecordExcel', url: '/excel/downloadInRecordExcel',
method: 'get', method: 'get',
responseType: 'blob', responseType: 'blob',
params: { params: {
vehicleId: params.vehicleId, vehicleId: data.vehicleId,
goodsId: params.goodsId goodsId: data.goodsId
} }
}) })
} }
@ -108,7 +144,11 @@ const downloadLocationsExcel = (params) => {
export { export {
downloadExcel, downloadExcel,
uploadExcel, uploadExcel,
uploadExcelParts, uploadExcelStock,
uploadExcelGoods,
uploadExcelDbs,
uploadExcelOrders,
uploadExcelInventoryList,
downloadStockExcel, downloadStockExcel,
downloadMaterialExcel, downloadMaterialExcel,
downloadVehicleExcel, downloadVehicleExcel,

View File

@ -112,6 +112,22 @@ const queryFinishByStandAndGoods = (params) => {
}) })
} }
const requestPickTest = (params) => {
return request({
url: '/task/requestPickTest',
method: 'post',
data: params
})
}
const requestBackTest = (params) => {
return request({
url: '/task/requestBackTest',
method: 'post',
data: params
})
}
export { export {
sendGoodsInTask, sendGoodsInTask,
sendGoodsOutTask, sendGoodsOutTask,
@ -126,5 +142,7 @@ export {
confirmFinishWork, confirmFinishWork,
getFinishedWorkInfo, getFinishedWorkInfo,
callEmptyVehicle, callEmptyVehicle,
queryFinishByStandAndGoods queryFinishByStandAndGoods,
requestPickTest,
requestBackTest
} }

View File

@ -1,15 +1,16 @@
<template> <template>
<el-upload ref="uploadRef" :on-preview="previewFile" :limit="1" :on-change="changeFile" :auto-upload="false" :data="uploadForm.data"> <el-upload ref="uploadRef" :on-preview="previewFile" :limit="1" :on-change="changeFile" :auto-upload="false"
:data="uploadForm.data">
<template #trigger> <template #trigger>
<el-button type="primary">选取文件</el-button> <el-button type="primary">选取DBS文件</el-button>
</template> </template>
<el-button style="margin-left: 10px;" type="success" @click="uploadParts">确认导入库存数据</el-button> <el-button style="margin-left: 10px;" type="success" @click="uploadDbs">上传DBS数据</el-button>
</el-upload> </el-upload>
</template> </template>
<script setup> <script setup>
import store from '@/store' import store from '@/store'
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import { uploadExcelParts } from '@/api/excel.js' import { uploadExcelDbs } from '@/api/excel.js'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { sizeFormatter } from '@/utils/formatter.js' import { sizeFormatter } from '@/utils/formatter.js'
const file = ref() const file = ref()
@ -18,11 +19,11 @@ const uploadForm = reactive({
fileId: '', fileId: '',
name: '', name: '',
type: '', type: '',
size: null size: null,
userName: store.getters.getUserName
} }
}) })
const changeFile = (uploadFile) => { const changeFile = (uploadFile) => {
console.log('max: ' + sizeFormatter(1048576))
file.value = uploadFile file.value = uploadFile
uploadForm.data = { uploadForm.data = {
fileId: file.value.raw.uid, fileId: file.value.raw.uid,
@ -31,13 +32,11 @@ const changeFile = (uploadFile) => {
size: sizeFormatter(file.value.raw.size), size: sizeFormatter(file.value.raw.size),
userName: store.getters.getUserName userName: store.getters.getUserName
} }
console.log(uploadForm.data)
} }
const uploadRef = ref() const uploadRef = ref()
const uploadParts = () => { const uploadDbs = () => {
if (uploadForm == undefined || file.value == undefined) { if (uploadForm == undefined || file.value == undefined) {
ElMessage.error('请选择文件之后再导入') ElMessage.error('请选择文件之后再上传')
} }
const jsonStr = JSON.stringify(uploadForm.data); const jsonStr = JSON.stringify(uploadForm.data);
const blob = new Blob([jsonStr], { const blob = new Blob([jsonStr], {
@ -47,24 +46,33 @@ const uploadParts = () => {
// file.value.rawfilefile.valueProxy // file.value.rawfilefile.valueProxy
formData.append("obj", blob); formData.append("obj", blob);
formData.append("file", file.value.raw); formData.append("file", file.value.raw);
console.log(formData) uploadExcelDbs(formData).then(res => {
uploadExcelParts(formData).then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
ElMessage({ ElMessage({
message: '导入成功', message: '上传成功',
type: 'success', type: 'success',
}) })
// clearFileInfos()
uploadRef.value.clearFiles()
file.value = undefined
} else { } else {
ElMessage.error(res.data.message) ElMessage.error(res.data.message)
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
ElMessage.error('导入错误') ElMessage.error('上传错误')
}) })
} }
const clearFileInfos = () => {
//
uploadRef.value.clearFiles()
uploadForm.data = {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
file.value = undefined
}
const previewFile = () => { const previewFile = () => {
} }

View File

@ -0,0 +1,80 @@
<template>
<el-upload ref="uploadRef" :on-preview="previewFile" :limit="1" :on-change="changeFile" :auto-upload="false"
:data="uploadForm.data">
<template #trigger>
<el-button type="primary">选取物料文件</el-button>
</template>
<el-button style="margin-left: 10px;" type="success" @click="uploadGoods">上传物料数据</el-button>
</el-upload>
</template>
<script setup>
import store from '@/store'
import { ref, reactive } from 'vue';
import { uploadExcelGoods } from '@/api/excel.js'
import { ElMessage } from 'element-plus'
import { sizeFormatter } from '@/utils/formatter.js'
const file = ref()
const uploadForm = reactive({
data: {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
})
const changeFile = (uploadFile) => {
file.value = uploadFile
uploadForm.data = {
fileId: file.value.raw.uid,
name: file.value.raw.name,
type: file.value.raw.type,
size: sizeFormatter(file.value.raw.size),
userName: store.getters.getUserName
}
}
const uploadRef = ref()
const uploadGoods = () => {
if (uploadForm == undefined || file.value == undefined) {
ElMessage.error('请选择文件之后再上传')
}
const jsonStr = JSON.stringify(uploadForm.data);
const blob = new Blob([jsonStr], {
type: 'application/json'
});
let formData = new FormData();
// file.value.rawfilefile.valueProxy
formData.append("obj", blob);
formData.append("file", file.value.raw);
uploadExcelGoods(formData).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '上传成功',
type: 'success',
})
clearFileInfos()
} else {
ElMessage.error(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('上传错误')
})
}
const clearFileInfos = () => {
//
uploadRef.value.clearFiles()
uploadForm.data = {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
file.value = undefined
}
const previewFile = () => {
}
</script>
<style scoped></style>

View File

@ -0,0 +1,80 @@
<template>
<el-upload ref="uploadRef" :on-preview="previewFile" :limit="1" :on-change="changeFile" :auto-upload="false"
:data="uploadForm.data">
<template #trigger>
<el-button type="primary">选取盘点清单</el-button>
</template>
<el-button style="margin-left: 10px;" type="success" @click="uploadInventory">上传盘点清单</el-button>
</el-upload>
</template>
<script setup>
import store from '@/store'
import { ref, reactive } from 'vue';
import { uploadExcelInventoryList } from '@/api/excel.js'
import { ElMessage } from 'element-plus'
import { sizeFormatter } from '@/utils/formatter.js'
const file = ref()
const uploadForm = reactive({
data: {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
})
const changeFile = (uploadFile) => {
file.value = uploadFile
uploadForm.data = {
fileId: file.value.raw.uid,
name: file.value.raw.name,
type: file.value.raw.type,
size: sizeFormatter(file.value.raw.size),
userName: store.getters.getUserName
}
}
const uploadRef = ref()
const uploadInventory = () => {
if (uploadForm == undefined || file.value == undefined) {
ElMessage.error('请选择文件之后再上传')
}
const jsonStr = JSON.stringify(uploadForm.data);
const blob = new Blob([jsonStr], {
type: 'application/json'
});
let formData = new FormData();
// file.value.rawfilefile.valueProxy
formData.append("obj", blob);
formData.append("file", file.value.raw);
uploadExcelInventoryList(formData).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '上传成功',
type: 'success',
})
clearFileInfos()
} else {
ElMessage.error(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('上传错误')
})
}
const clearFileInfos = () => {
//
uploadRef.value.clearFiles()
uploadForm.data = {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
file.value = undefined
}
const previewFile = () => {
}
</script>
<style scoped></style>

View File

@ -0,0 +1,80 @@
<template>
<el-upload ref="uploadRef" :on-preview="previewFile" :limit="1" :on-change="changeFile" :auto-upload="false"
:data="uploadForm.data">
<template #trigger>
<el-button type="primary">选取工单文件</el-button>
</template>
<el-button style="margin-left: 10px;" type="success" @click="uploadOrders">上传工单数据</el-button>
</el-upload>
</template>
<script setup>
import store from '@/store'
import { ref, reactive } from 'vue';
import { uploadExcelOrders } from '@/api/excel.js'
import { ElMessage } from 'element-plus'
import { sizeFormatter } from '@/utils/formatter.js'
const file = ref()
const uploadForm = reactive({
data: {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
})
const changeFile = (uploadFile) => {
file.value = uploadFile
uploadForm.data = {
fileId: file.value.raw.uid,
name: file.value.raw.name,
type: file.value.raw.type,
size: sizeFormatter(file.value.raw.size),
userName: store.getters.getUserName
}
}
const uploadRef = ref()
const uploadOrders = () => {
if (uploadForm == undefined || file.value == undefined) {
ElMessage.error('请选择文件之后再上传')
}
const jsonStr = JSON.stringify(uploadForm.data);
const blob = new Blob([jsonStr], {
type: 'application/json'
});
let formData = new FormData();
// file.value.rawfilefile.valueProxy
formData.append("obj", blob);
formData.append("file", file.value.raw);
uploadExcelOrders(formData).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '上传成功',
type: 'success',
})
clearFileInfos()
} else {
ElMessage.error(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('上传错误')
})
}
const clearFileInfos = () => {
//
uploadRef.value.clearFiles()
uploadForm.data = {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
file.value = undefined
}
const previewFile = () => {
}
</script>
<style scoped></style>

View File

@ -1,58 +0,0 @@
<template>
<el-upload ref="uploadRef" :on-preview="previewFile" :limit="1" :on-change="changeFile" :auto-upload="false" :data="uploadForm.data">
<template #trigger>
<el-button type="primary">选取文件</el-button>
</template>
<el-button style="margin-left: 10px;" type="success" @click="uploadParts">确认导入库存数据</el-button>
</el-upload>
</template>
<script setup>
import { ref, reactive } from 'vue';
import { uploadExcelParts } from '@/api/excel.js'
import { ElMessage } from 'element-plus'
const file = ref()
const uploadForm = reactive({
data: {
fileId: '',
name: '',
type: ''
}
})
const changeFile = (uploadFile) => {
file.value = uploadFile
}
const uploadRef = ref()
const uploadParts = () => {
if (uploadForm == undefined || file.value == undefined) {
ElMessage.error('请选择文件之后再导入')
}
const jsonStr = JSON.stringify(uploadForm.data);
const blob = new Blob([jsonStr], {
type: 'application/json'
});
let formData = new FormData();
// file.value.rawfilefile.valueProxy
formData.append("file", file.value.raw);
uploadExcelParts(formData).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '导入成功',
type: 'success',
})
//
uploadRef.value.clearFiles()
file.value = undefined
} else {
ElMessage.error(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('导入错误')
})
}
const previewFile = () => {
}
</script>
<style scoped></style>

View File

@ -0,0 +1,80 @@
<template>
<el-upload ref="uploadRef" :on-preview="previewFile" :limit="1" :on-change="changeFile" :auto-upload="false"
:data="uploadForm.data">
<template #trigger>
<el-button type="primary">选取库存文件</el-button>
</template>
<el-button style="margin-left: 10px;" type="success" @click="uploadStock">上传库存数据</el-button>
</el-upload>
</template>
<script setup>
import store from '@/store'
import { ref, reactive } from 'vue';
import { uploadExcelStock } from '@/api/excel.js'
import { ElMessage } from 'element-plus'
import { sizeFormatter } from '@/utils/formatter.js'
const file = ref()
const uploadForm = reactive({
data: {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
})
const changeFile = (uploadFile) => {
file.value = uploadFile
uploadForm.data = {
fileId: file.value.raw.uid,
name: file.value.raw.name,
type: file.value.raw.type,
size: sizeFormatter(file.value.raw.size),
userName: store.getters.getUserName
}
}
const uploadRef = ref()
const uploadStock = () => {
if (uploadForm == undefined || file.value == undefined) {
ElMessage.error('请选择文件之后再上传')
}
const jsonStr = JSON.stringify(uploadForm.data);
const blob = new Blob([jsonStr], {
type: 'application/json'
});
let formData = new FormData();
// file.value.rawfilefile.valueProxy
formData.append("obj", blob);
formData.append("file", file.value.raw);
uploadExcelStock(formData).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '上传成功',
type: 'success',
})
clearFileInfos()
} else {
ElMessage.error(res.data.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('上传错误')
})
}
const clearFileInfos = () => {
//
uploadRef.value.clearFiles()
uploadForm.data = {
fileId: '',
name: '',
type: '',
size: null,
userName: store.getters.getUserName
}
file.value = undefined
}
const previewFile = () => {
}
</script>
<style scoped></style>

View File

@ -5,7 +5,7 @@ const request = axios.create({
timeout: 5000 timeout: 5000
}) })
// axios.defaults.baseURL = 'http://192.168.3.254:12315/wms' // axios.defaults.baseURL = 'http://10.90.36.70:443/wmsServer/wms'
// axios.defaults.baseURL = 'http://localhost:12315/wms' // axios.defaults.baseURL = 'http://localhost:12315/wms'
// axios.defaults.baseURL = 'http://192.168.8.93:12315/wms' // axios.defaults.baseURL = 'http://192.168.8.93:12315/wms'

View File

@ -228,9 +228,18 @@ export default {
if (response.code == 0) { if (response.code == 0) {
if (response.returnData != null) { if (response.returnData != null) {
this.workFormEntity.tip = response.returnData.tip this.workFormEntity.tip = response.returnData.tip
ElMessage({
message: response.returnData.tip,
type: 'warning',
showClose: true
})
} }
this.resetForms() this.resetForms()
ElMessage.success(response.message) ElMessage({
message: response.returnData.tip,
type: 'success',
showClose: true
})
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)

View File

@ -2,13 +2,12 @@
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<el-config-provider :locale="zhCn"> <el-config-provider :locale="zhCn">
<el-row> <el-row>
<UploadExcelPart></UploadExcelPart> <UploadExcelGoods></UploadExcelGoods>
</el-row> </el-row>
<el-row style="margin-top: 10px;"> <el-row style="margin-top: 10px;">
<el-input v-model="queryKey" style="width: 256px; margin-right: 10px;" placeholder="零件号" /> <el-input v-model="queryKey" style="width: 256px; margin-right: 10px;" placeholder="零件号" />
<el-button type="primary" @click="search()">搜索</el-button> <el-button type="primary" @click="search()">搜索</el-button>
<el-button type="warning" @click="reset()">重置</el-button> <el-button type="warning" @click="reset()">重置</el-button>
<el-button type="success" @click="search()">刷新</el-button>
<el-button type="success" @click="exportExcel()">导出信息</el-button> <el-button type="success" @click="exportExcel()">导出信息</el-button>
</el-row> </el-row>
<br /> <br />
@ -182,7 +181,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { dateFormatter } from '@/utils/formatter.js' import { dateFormatter } from '@/utils/formatter.js'
import UploadExcelPart from '@/excel/UploadExcelPart.vue' import UploadExcelGoods from '@/excel/UploadExcelGoods.vue'
import { downloadMaterialExcel } from '@/api/excel.js' import { downloadMaterialExcel } from '@/api/excel.js'
</script> </script>
<script> <script>

View File

@ -28,7 +28,7 @@
style="display: inline-flex; justify-content: center; height: 60px; width: 655px; margin: 5px; padding: 5px;"> style="display: inline-flex; justify-content: center; height: 60px; width: 655px; margin: 5px; padding: 5px;">
<UploadExcelPart></UploadExcelPart> <UploadExcelPart></UploadExcelPart>
</div> --> </div> -->
<div style="height: 50px; margin-bottom: 20px"><UploadInventoryList></UploadInventoryList></div> <div style="height: 50px; margin-bottom: 20px"><UploadExcelInventoryList></UploadExcelInventoryList></div>
<div <div
style="display: inline-flex; justify-content: center; height: 40px; width: 655px; margin: 5px; padding: 5px; background-color: #00AAE8;"> style="display: inline-flex; justify-content: center; height: 40px; width: 655px; margin: 5px; padding: 5px; background-color: #00AAE8;">
<span style="align-self: center; font-weight: bold;font-size: 25px;"> <span style="align-self: center; font-weight: bold;font-size: 25px;">
@ -89,13 +89,13 @@ import store from '@/store'
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task' import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import UploadInventoryList from '@/excel/UploadInventoryList.vue' import UploadExcelInventoryList from '@/excel/UploadExcelInventoryList.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script> </script>
<script> <script>
export default { export default {
name: 'doKitting', name: 'inventory',
data() { data() {
return { return {
standId: store.getters.getStandId, standId: store.getters.getStandId,

356
src/layout/play_boy.vue Normal file
View File

@ -0,0 +1,356 @@
<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>
<div class="station-div">
<span class="station-text">工作站</span>
</div>
<div class="station-no-div">
<span class="station-no-text">{{ standId }}</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;">
<div style="display: block; margin: 5px;">
<!-- <div
style="display: inline-flex; justify-content: center; height: 40px; width: 655px; margin: 5px; padding: 5px; background-color: #00AAE8;">
<span style="align-self: center; font-weight: bold;font-size: 25px;">
{{ workFormEntity.tip }}
</span>
</div> -->
<div style="display: flex;">
<div style="display: flex; flex-direction: column;">
<div class="display-title-div">
<span class="display-title-text">料号</span>
</div>
<div class="display-form-div">
<el-input v-model="workFormEntity.goodsId" size="default" ref="goodsId"
v-on:keyup.enter="focusChange()" clearable></el-input>
</div>
</div>
<div style="display: flex; flex-direction: column;">
<div class="display-title-div">
<span class="display-title-text">箱号</span>
</div>
<div class="display-form-div">
<el-input v-model="workFormEntity.vehicleId" size="default" ref="vehicleId"
v-on:keyup.enter="focusChange()" clearable></el-input>
</div>
</div>
<div style="display: flex; flex-direction: column;">
<div class="display-title-div">
<span class="display-title-text">数量</span>
</div>
<div style="display: flex; margin-top: 20px;">
<div class="display-form-div-left">
<el-input-number v-model.number="workFormEntity.goodsNum" ref="goodsNum"
controls-position="right" :min="0" :max="4" v-on:keyup.enter="focusChange()" />
</div>
<div class="display-form-div-right">
<span class="display-form-text-right">PC</span>
</div>
</div>
</div>
</div>
</div>
<div style="margin: 10px; margin-left: 20px;">
<div class="arrow" @click="requestPick()">
<span
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">请求拣选</span>
</div>
</div>
<div style="margin: 10px;">
<div class="arrow" @click="requestBack()">
<span
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">请求回库</span>
</div>
</div>
</div>
</el-form>
</fieldset>
</div>
</el-container>
</el-config-provider>
</template>
<script setup>
import store from '@/store'
import { requestPickTest, requestBackTest } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
<script>
export default {
name: 'inventory',
data() {
return {
standId: store.getters.getStandId,
// timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
vehicleId: '',
goodsId: '',
goodsNum: null
}),
rules: reactive({}),
}
},
mounted() {
this.$refs.vehicleId.focus()
// this.timer = setInterval(() => {
// this.queryFinish()
// }, 2000)
},
beforeUnmount() {
// clearInterval(this.timer)
},
methods: {
//
resetForms() {
this.workFormEntity = reactive({
vehicleId: '',
goodsId: '',
goodsNum: null,
})
this.$refs.vehicleId.focus()
},
focusChange() {
if (this.workFormEntity.vehicleId == '') {
this.$refs.vehicleId.focus()
} else if (this.workFormEntity.goodsId == '') {
this.$refs.goodsId.focus()
} else if (this.workFormEntity.goodsNum == null || this.workFormEntity.goodsNum <= 0) {
this.$refs.goodsNum.focus()
}
},
//
requestPick() {
const confirmParams = {
userName: store.getters.getUserName,
pickStand: this.standId,
goodsId: this.workFormEntity.goodsId,
vehicleId: this.workFormEntity.remainNumOrigin,
goodsNum: this.workFormEntity.remainNumReal
}
requestPickTest(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
this.resetForms()
ElMessage.success(response.message)
} else {
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
})
},
//
requestBack() {
const confirmParams = {
userName: store.getters.getUserName,
pickStand: this.standId,
goodsId: this.workFormEntity.goodsId,
vehicleId: this.workFormEntity.remainNumOrigin,
goodsNum: this.workFormEntity.remainNumReal
}
requestBackTest(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
this.resetForms()
ElMessage.success(response.message)
} else {
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
})
}
}
}
</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: 270px;
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>

332
src/layout/uploadDbs.vue Normal file
View File

@ -0,0 +1,332 @@
<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>

332
src/layout/uploadOrders.vue Normal file
View File

@ -0,0 +1,332 @@
<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
}
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

@ -18,10 +18,12 @@
<el-table-column prop="logId" label="请求id" fixed="left" min-width="120px" show-overflow-tooltip /> <el-table-column prop="logId" label="请求id" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="logTitle" label="请求名称" fixed="left" min-width="120px" show-overflow-tooltip /> <el-table-column prop="logTitle" label="请求名称" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="logMethod" label="请求接口" fixed="left" min-width="120px" show-overflow-tooltip /> <el-table-column prop="logMethod" label="请求接口" fixed="left" min-width="120px" show-overflow-tooltip />
<el-table-column prop="logRequest" label="请求信息" min-width="180px" show-overflow-tooltip /> <el-table-column prop="logRequest" label="请求信息" :formatter="jsonFormat" min-width="180px"
<el-table-column prop="logResponse" label="响应信息" min-width="180px" show-overflow-tooltip /> show-overflow-tooltip />
<el-table-column prop="logResponse" label="响应信息" :formatter="jsonFormat" min-width="180px" show-overflow-tooltip />
<el-table-column prop="logIp" label="请求ip" min-width="120px" /> <el-table-column prop="logIp" label="请求ip" min-width="120px" />
<el-table-column prop="logTime" label="请求时间" :formatter="timeFormat" show-overflow-tooltip min-width="120px" /> <el-table-column prop="logTime" label="请求时间" :formatter="timeFormat" show-overflow-tooltip
min-width="120px" />
<el-table-column prop="logUser" label="请求用户" min-width="120px" /> <el-table-column prop="logUser" label="请求用户" min-width="120px" />
<el-table-column fixed="right" label="操作" width="120px"> <el-table-column fixed="right" label="操作" width="120px">
<template v-slot="scope"> <template v-slot="scope">
@ -65,16 +67,14 @@
<el-col :span="12" :offset="0"> <el-col :span="12" :offset="0">
<el-form-item label="请求信息" prop="logRequest"> <el-form-item label="请求信息" prop="logRequest">
<el-input type="textarea" :rows="2" v-model="wmsLogEntity.logRequest" placeholder="" <el-input type="textarea" :rows="2" v-model="wmsLogEntity.logRequest" placeholder=""
:maxlength="-1" :show-word-limit="false" :autosize="{ minRows: 2, maxRows: 4 }" :maxlength="-1" :show-word-limit="false" :autosize="{ minRows: 2, maxRows: 4 }" readonly>
:formatter="(value) => jsonFormat(value)" readonly>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="响应信息" prop="logResponse"> <el-form-item label="响应信息" prop="logResponse">
<el-input type="textarea" :rows="2" v-model="wmsLogEntity.logResponse" <el-input type="textarea" :rows="2" v-model="wmsLogEntity.logResponse" :maxlength="-1"
:maxlength="-1" :show-word-limit="false" :autosize="{ minRows: 2, maxRows: 4 }" :show-word-limit="false" :autosize="{ minRows: 2, maxRows: 4 }" readonly>
:formatter="(value) => jsonFormat(value)" readonly>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -106,7 +106,7 @@
import { queryLogs } from '@/api/wmsLog.js' import { queryLogs } from '@/api/wmsLog.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { timeFormatter } from '@/utils/formatter.js' import { timeFormatter, jsonFormatter } from '@/utils/formatter.js'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
</script> </script>
<script> <script>
@ -157,24 +157,29 @@ export default {
timeFormat: (row, column, cellValue, index) => { timeFormat: (row, column, cellValue, index) => {
return timeFormatter(cellValue) return timeFormatter(cellValue)
}, },
jsonFormat: (row, column, cellValue, index) => {
return jsonFormatter(cellValue)
},
reset() { reset() {
this.queryKey = '' this.queryKey = ''
this.search this.search
}, },
detailCurrentRowLog(row) { detailCurrentRowLog(row) {
this.wmsLogEntity = row this.wmsLogEntity = {
logId: row.logId,
logTitle: row.logTitle,
logMethod: row.logMethod,
logRequest: jsonFormatter(row.logRequest),
logResponse: jsonFormatter(row.logResponse),
logTime: row.logTime,
logUser: row.logUser,
logIp: row.logIp,
}
this.dialogVisible = true this.dialogVisible = true
}, },
getCurrentRow(row) { getCurrentRow(row) {
this.logId = row.logId this.logId = row.logId
}, },
jsonFormat(value) {
try {
return JSON.stringify(JSON.parse(value), null, 4)
} catch(e) {
return value
}
}
}, },
} }
</script> </script>

View File

@ -27,8 +27,11 @@ const routes = [
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志 { path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
{ path: '/testDoKitting', component: () => import('@/layout/doKitting.vue') },// 备料执行 { path: '/testDoKitting', component: () => import('@/layout/doKitting.vue') },// 备料执行
{ path: '/testFinishKitting', component: () => import('@/layout/finishKitting.vue') },// 备料完成 { path: '/testFinishKitting', component: () => import('@/layout/finishKitting.vue') },// 备料完成
{ path: '/testCallEmptyVehicle', component: () => import('@/layout/callEmptyVehicle.vue') },// 备料完成 { path: '/testCallEmptyVehicle', component: () => import('@/layout/callEmptyVehicle.vue') },// 呼叫空箱
{ path: '/testSortBoxs', component: () => import('@/layout/sortBoxs.vue') },// 备料完成 { path: '/testSortBoxs', component: () => import('@/layout/sortBoxs.vue') },// 整理盒子
{ path: '/uploadDbs', component: () => import('@/layout/uploadDbs.vue') },// 上传DBS
{ path: '/uploadOrders', component: () => import('@/layout/uploadOrders.vue') },// 上传工单
{ path: '/play_boy', component: () => import('@/layout/play_boy.vue') },// 体验拣选
] ]
}, },
{ {

View File

@ -28,6 +28,9 @@ export default createStore({
}, },
getStandId(state) { getStandId(state) {
return state.standId return state.standId
},
getUser(state) {
return state.user
} }
}, },
mutations: { mutations: {

View File

@ -162,6 +162,18 @@ function sizeFormatter(value) {
} }
} }
function jsonFormatter(value) {
if (typeof value == 'string') {
try {
return JSON.stringify(JSON.parse(value), null, 4)
} catch (e) {
return "error"
}
} else {
return JSON.stringify(value, null, 4)
}
}
export { export {
timeFormatter, timeFormatter,
dateFormatter, dateFormatter,
@ -173,5 +185,6 @@ export {
configTypeFormatter, configTypeFormatter,
dueFormatter, dueFormatter,
locationStatusFormatter, locationStatusFormatter,
sizeFormatter sizeFormatter,
jsonFormatter
} }

View File

@ -33,12 +33,6 @@ const token = store.getters.getToken// 密码
const loginToWms = () => { const loginToWms = () => {
router.replace({ path: '/home' }) router.replace({ path: '/home' })
} }
const loginToPda = () => {
router.replace({ path: '/goodsInPda' })
}
const loginToSideScan = () => {
router.replace({ path: '/sideScan' })
}
// WCS // WCS
const loginToWcs = () => { const loginToWcs = () => {
const wcsUrl = `https://cxlasrs.ecorp.cat.com/wcs/#/login?user=user&pwd=user` const wcsUrl = `https://cxlasrs.ecorp.cat.com/wcs/#/login?user=user&pwd=user`

View File

@ -2,6 +2,7 @@ const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin') const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = defineConfig({ module.exports = defineConfig({
publicPath: '/wms',
transpileDependencies: true, transpileDependencies: true,
configureWebpack: { configureWebpack: {
plugins: [new NodePolyfillPlugin()] plugins: [new NodePolyfillPlugin()]