代码更新---报表界面完善
1.增加库位监控界面 2.增加配置界面
This commit is contained in:
parent
0c5f55649b
commit
b69085124a
|
|
@ -2,7 +2,7 @@ import request from "@/http/request";
|
||||||
|
|
||||||
const getLocations = (params) => {
|
const getLocations = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/location/getLocations',
|
url: '/location/getLocationsByPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
|
|
@ -16,16 +16,7 @@ const updateLocation = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getAvailableLocations = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/location/getAvailableLocations',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getLocations,
|
getLocations,
|
||||||
updateLocation,
|
updateLocation,
|
||||||
getAvailableLocations
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,154 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<el-container class="content">
|
|
||||||
<fieldset class="input-area">
|
|
||||||
<legend>系统配置</legend>
|
|
||||||
<div v-for="config in configs">
|
|
||||||
<el-form :model="config" :label-position="'top'" label-width="100px" style="max-width: 544px"
|
|
||||||
:rules="rules" status-icon>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="1" v-if="config.configKey == 'MAIL_ADDRESS'">
|
|
||||||
<el-form-item label="邮箱账户(账户之间用;隔开)">
|
|
||||||
<div>
|
|
||||||
<el-input v-model="config.configValue" @change="updateCurrentConfig(config)" />
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" :offset="1"
|
|
||||||
v-if="config.configType == '1' && config.configKey != 'MAIL_ADDRESS'">
|
|
||||||
<el-form-item :label="config.configName">
|
|
||||||
<div>
|
|
||||||
<el-input v-model="config.configValue" @change="updateCurrentConfig(config)" />
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" :offset="1"
|
|
||||||
v-if="config.configType == '2' && config.configKey != 'MAIL_ADDRESS'">
|
|
||||||
<el-form-item :label="config.configName">
|
|
||||||
<div v-if="config.configType == '2'">
|
|
||||||
<el-select v-model="config.configValue" multiple collapse-tags collapse-tags-tooltip
|
|
||||||
:placeholder="'请选择' + config.configName" @change="updateCurrentConfig(config)">
|
|
||||||
<el-option v-for="(value, index) in mails" :key="index" :label="value"
|
|
||||||
:value="value" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<!-- 开关 -->
|
|
||||||
<el-col :span="12" :offset="1" v-if="config.configType == '3'">
|
|
||||||
<el-form-item :label="config.configName">
|
|
||||||
<div>
|
|
||||||
<el-switch v-model="config.configValue" class="ml-2" active-value="1"
|
|
||||||
inactive-value="0" :before-change="updateCurrentConfig(config)" />
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</el-container>
|
|
||||||
</el-config-provider>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
||||||
import { getConfigs, updateConfig } from '@/api/config.js'
|
|
||||||
import { ElMessage, ElLoading } from 'element-plus'
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'config',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
configs: [],
|
|
||||||
mails: [],
|
|
||||||
rules: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getAllConfigs()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getAllConfigs() {// 查询所有的系统配置
|
|
||||||
const loading = ElLoading.service({
|
|
||||||
lock: true,
|
|
||||||
text: 'Loading',
|
|
||||||
background: 'rgba(0, 0, 0, 0.7)',
|
|
||||||
})
|
|
||||||
getConfigs().then(res => {
|
|
||||||
loading.close()
|
|
||||||
this.configs = res.data
|
|
||||||
this.configs.forEach((config) => {
|
|
||||||
if (config.configType == '2') {
|
|
||||||
const tempArray = config.configValue.split(';')
|
|
||||||
config.configValue = tempArray
|
|
||||||
}
|
|
||||||
if (config.configKey == 'MAIL_ADDRESS') {
|
|
||||||
const tempArray = config.configValue.split(';')
|
|
||||||
this.mails = tempArray
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
loading.close()
|
|
||||||
ElMessage.error('查询系统配置失败!')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
updateCurrentConfig(config) {// 更新系统配置
|
|
||||||
// 复制一下config
|
|
||||||
const param = Object.assign({}, config)
|
|
||||||
const loading = ElLoading.service({
|
|
||||||
lock: true,
|
|
||||||
text: 'Loading',
|
|
||||||
background: 'rgba(0, 0, 0, 0.7)',
|
|
||||||
})
|
|
||||||
if (param.configType == '2') {
|
|
||||||
param.configValue = param.configValue.join(';')
|
|
||||||
}
|
|
||||||
updateConfig(param).then(res => {
|
|
||||||
loading.close()
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
ElMessage({
|
|
||||||
message: '更新系统配置成功!',
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.data.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
loading.close()
|
|
||||||
ElMessage.error('更新系统配置失败!')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-area {
|
|
||||||
margin: 10px;
|
|
||||||
width: 100%;
|
|
||||||
height: 85%;
|
|
||||||
border: solid 1px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0px 15px 10px -15px #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-select {
|
|
||||||
width: 512px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-input {
|
|
||||||
width: 512px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-button {
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -50,7 +50,6 @@ export default {
|
||||||
name: 'inTaskRecord',
|
name: 'inTaskRecord',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: {},
|
|
||||||
tasks: [],
|
tasks: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -92,13 +91,13 @@ export default {
|
||||||
vehicleId: this.vehicleIdQuery.trim()
|
vehicleId: this.vehicleIdQuery.trim()
|
||||||
}
|
}
|
||||||
getTaskRecords(tableRequest).then(res => {
|
getTaskRecords(tableRequest).then(res => {
|
||||||
console.log(res.data)
|
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.tasks = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.tasks = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询任务记录错误')
|
ElMessage.error('查询任务记录错误')
|
||||||
|
|
|
||||||
|
|
@ -113,11 +113,13 @@ export default {
|
||||||
}
|
}
|
||||||
getTaskRecords(tableRequest).then(res => {
|
getTaskRecords(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.tasks = tableResponse.rows
|
||||||
|
this.total = tableResponse.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.tasks = tableResponse.rows
|
|
||||||
this.total = tableResponse.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询盘点记录错误')
|
ElMessage.error('查询盘点记录错误')
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,37 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="margin-bottom: 10px">
|
<div style="margin-bottom: 10px">
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-row style="align-items: flex-start;">
|
<el-row>
|
||||||
<el-input v-model="queryKey" style="width: 196px; margin-left: auto; margin-right: 10px;" placeholder="载具号" />
|
<el-input v-model="locationIdQuery" style="width: 256px; margin-right: 10px;" placeholder="库位"
|
||||||
|
:suffix-icon="Search" />
|
||||||
<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="exportExcel()">导出信息</el-button>
|
<!-- <el-button type="success" @click="exportExcel()">导出信息</el-button> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<br />
|
<br />
|
||||||
<el-table :data="vehicles" stripe border v-loading="loading" class="table-class" max-height="650px"
|
<el-table :data="locations" stripe border v-loading="loading" class="table-class" max-height="550px"
|
||||||
highlight-current-row @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
highlight-current-row @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
<el-table-column width="65px" fixed="left">
|
<el-table-column width="65px" fixed="left">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-radio :label="scope.row.vehicleId" v-model="vehicleId"> </el-radio>
|
<el-radio :label="scope.row.locationId" v-model="locationId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="vehicleId" label="托盘号" fixed="left" min-width="120px" />
|
<el-table-column prop="locationId" label="库位" fixed="left" :formatter="locationFormat" min-width="180px"
|
||||||
<el-table-column prop="currentLocation" label="所在位置" fixed="left" :formatter="locationFormat" min-width="120px" show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="vehicleStatus" label="状态" :formatter="vehicleStatusFormat" min-width="120px" />
|
<el-table-column prop="areaId" label="库区" min-width="120px" />
|
||||||
<el-table-column prop="isEmpty" label="空托" :formatter="isEmptyFormat" min-width="120px" />
|
<el-table-column prop="equipmentId" label="设备号" min-width="120px" />
|
||||||
|
<el-table-column prop="locationType" label="库位类型" min-width="120px" />
|
||||||
|
<el-table-column prop="wRow" label="排" min-width="120px" />
|
||||||
|
<el-table-column prop="wCol" label="列" min-width="120px" />
|
||||||
|
<el-table-column prop="wLayer" label="层" min-width="120px" />
|
||||||
|
<el-table-column prop="wDepth" label="深度" min-width="120px" />
|
||||||
|
<el-table-column prop="isLock" label="锁定" :formatter="isLockFormat" min-width="120px" />
|
||||||
|
<el-table-column prop="locationStatus" label="状态" :formatter="locationStatusFormat" min-width="120px" />
|
||||||
|
<el-table-column prop="vehicleId" label="料箱" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null">
|
<el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRowVehicle(scope.row)">编辑</el-button>
|
<el-button plain type="primary" @click="editCurrentRowLocation(scope.row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -31,32 +40,76 @@
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
@current-change="search" />
|
@current-change="search" />
|
||||||
<el-dialog v-model="dialogVisible" title="托盘信息" width="40%" draggable :show-close="false">
|
<el-dialog v-model="dialogVisible" title="库位信息" width="40%" draggable :show-close="false">
|
||||||
<el-form ref="vehicleFormRef" :model="vehicleFormEntity" :label-position="labelPosition" label-width="100px"
|
<el-form ref="locationFormRef" :model="locationFormEntity" :label-position="labelPosition"
|
||||||
style="max-width: 100%" :rules="rules" status-icon>
|
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="载具号" prop="vehicleId">
|
<el-form-item label="库位" prop="locationId">
|
||||||
<el-input v-model="vehicleFormEntity.vehicleId" disabled />
|
<el-input v-model="locationFormEntity.locationId" :formatter="locationFormat"
|
||||||
|
disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="库位" prop="locationId">
|
<el-form-item label="类型" prop="locationType">
|
||||||
<el-input v-model="vehicleFormEntity.currentLocation" placeholder="请输入库位号" />
|
<el-input v-model="locationFormEntity.locationType" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="空托" prop="isEmpty">
|
<el-form-item label="库区" prop="areaId">
|
||||||
<el-select-v2 v-model="vehicleFormEntity.isEmpty" placeholder="请选择是否空托"
|
<el-input v-model="locationFormEntity.areaId" disabled />
|
||||||
:options="isEmptyOptions"></el-select-v2>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="托盘状态" prop="vehicleStatus">
|
<el-form-item label="设备号" prop="equipmentId">
|
||||||
<el-select-v2 v-model="vehicleFormEntity.vehicleStatus" placeholder="请选择托盘状态"
|
<el-input v-model="locationFormEntity.equipmentId" disabled />
|
||||||
:options="vehicleStatusOptions"></el-select-v2>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="排" prop="wRow">
|
||||||
|
<el-input v-model="locationFormEntity.wRow" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="列" prop="wCol">
|
||||||
|
<el-input v-model="locationFormEntity.wCol" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="层" prop="wLayer">
|
||||||
|
<el-input v-model="locationFormEntity.wLayer" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="深度" prop="wDepth">
|
||||||
|
<el-input v-model="locationFormEntity.wDepth" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="锁定" prop="isLock">
|
||||||
|
<el-select-v2 v-model="locationFormEntity.isLock" placeholder="请选择是否锁定"
|
||||||
|
:options="isLockOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="状态" prop="locationStatus">
|
||||||
|
<el-select-v2 v-model="locationFormEntity.locationStatus" placeholder="请选择库位状态"
|
||||||
|
:options="locationStatusOptions"></el-select-v2>
|
||||||
|
</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="locationFormEntity.vehicleId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -64,7 +117,7 @@
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submitVehicleInfo(vehicleFormEntity)">
|
<el-button type="primary" @click="submitLocationInfo(locationFormEntity)">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -75,63 +128,57 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getAllVehicles, updateVehicleInfo } from '@/api/vehicle'
|
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 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 { vehicleStatusFormatter, locationFormatter, dateFormatter } from '@/utils/formatter.js'
|
import { locationStatusFormatter, locationFormatter } from '@/utils/formatter.js'
|
||||||
import { downloadLocationsExcel } from '@/api/excel.js'
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'locationsTable',
|
name: 'locationsTable',
|
||||||
|
// props: ['selVehicle'],
|
||||||
|
// emits: ['update:selVehicle'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: {},
|
locations: [],
|
||||||
vehicles: [],
|
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
queryKey: '',
|
locationIdQuery: '',
|
||||||
loading: true,
|
loading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
vehicleId: '',
|
locationId: '',
|
||||||
vehicleFormEntity: reactive({}),
|
locationFormEntity: reactive({}),
|
||||||
labelPosition: 'top',
|
labelPosition: 'top',
|
||||||
vehicleFormRef: ref(),
|
locationFormRef: ref(),
|
||||||
rules: reactive({
|
rules: reactive({
|
||||||
vehicleId: [
|
locationId: [
|
||||||
{ required: true, message: '请输入托盘号' }
|
{ required: true, message: '请输入库位号' }
|
||||||
],
|
],
|
||||||
currentLocation: [
|
|
||||||
{ required: true, message: '请输入库位' }
|
|
||||||
]
|
|
||||||
}),
|
}),
|
||||||
// 物料高度
|
// 锁定
|
||||||
isEmptyOptions: [
|
isLockOptions: [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
label: '带料'
|
label: '正常'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '空托'
|
label: '锁定'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 托盘状态
|
// 状态
|
||||||
vehicleStatusOptions: [
|
locationStatusOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '空闲'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '在库中'
|
label: '占用'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: '在站台'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 3,
|
|
||||||
label: '移动中'
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -144,54 +191,74 @@ export default {
|
||||||
const tableRequest = {
|
const tableRequest = {
|
||||||
pageNo: this.currentPage,
|
pageNo: this.currentPage,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
vehicleId: this.queryKey.trim()
|
locationId: this.locationIdQuery.trim()
|
||||||
}
|
}
|
||||||
getAllVehicles(tableRequest).then(res => {
|
getLocations(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.locations = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.vehicles = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('查询载具信息错误' + err.message)
|
ElMessage.error('查询库位信息错误' + err.message)
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
vehicleStatusFormat: (row, column, cellValue, index) => {
|
locationStatusFormat: (row, column, cellValue, index) => {
|
||||||
return vehicleStatusFormatter(cellValue)
|
return locationStatusFormatter(cellValue)
|
||||||
},
|
},
|
||||||
locationFormat: (row, column, cellValue, index) => {
|
locationFormat: (row, column, cellValue, index) => {
|
||||||
return locationFormatter(cellValue)
|
return locationFormatter(cellValue)
|
||||||
},
|
},
|
||||||
isEmptyFormat: (row, column, cellValue, index) => {
|
isLockFormat: (row, column, cellValue, index) => {
|
||||||
if (cellValue == 0) {
|
if (cellValue == 0) {
|
||||||
return '带料'
|
return '正常'
|
||||||
}
|
}
|
||||||
if (cellValue == 1) {
|
if (cellValue == 1) {
|
||||||
return '空载具'
|
return '锁定'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.queryKey = ''
|
this.locationIdQuery = ''
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
editCurrentRowVehicle(row) {
|
editCurrentRowLocation(row) {
|
||||||
this.vehicleFormEntity = row
|
this.locationFormEntity = {
|
||||||
|
locationId: row.locationId,
|
||||||
|
areaId: row.areaId,
|
||||||
|
equipmentId: row.equipmentId,
|
||||||
|
locationType: row.locationType,
|
||||||
|
wRow: row.wRow,
|
||||||
|
wCol: row.wCol,
|
||||||
|
wLayer: row.wLayer,
|
||||||
|
wDepth: row.wDepth,
|
||||||
|
isLock: row.isLock,
|
||||||
|
locationStatus: row.locationStatus,
|
||||||
|
vehicleId: row.vehicleId
|
||||||
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
submitVehicleInfo(formData) {
|
submitLocationInfo(formData) {
|
||||||
const request = {
|
const request = {
|
||||||
vehicleId: formData.vehicleId,
|
locationId: formData.locationId,
|
||||||
currentLocation: formData.currentLocation,
|
areaId: formData.areaId,
|
||||||
isEmpty: formData.isEmpty,
|
equipmentId: formData.equipmentId,
|
||||||
vehicleStatus: formData.vehicleStatus
|
locationType: formData.locationType,
|
||||||
|
wRow: formData.wRow,
|
||||||
|
wCol: formData.wCol,
|
||||||
|
wLayer: formData.wLayer,
|
||||||
|
wDepth: formData.wDepth,
|
||||||
|
isLock: formData.isLock,
|
||||||
|
locationStatus: formData.locationStatus,
|
||||||
|
vehicleId: formData.vehicleId
|
||||||
}
|
}
|
||||||
updateVehicleInfo(request).then(res => {
|
updateLocation(request).then(res => {
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '更新载具信息成功',
|
message: '更新库位信息成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
this.search()
|
this.search()
|
||||||
|
|
@ -199,52 +266,52 @@ export default {
|
||||||
ElMessage.error(res.data.message)
|
ElMessage.error(res.data.message)
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('更新载具信息失败:' + err)
|
ElMessage.error('更新库位信息失败:' + err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCurrentRow(row) {
|
getCurrentRow(row) {
|
||||||
this.vehicleId = row.vehicleId
|
this.locationId = row.locationId
|
||||||
this.$emit('update:selVehicle', row)
|
// this.$emit('update:selVehicle', row)
|
||||||
},
|
},
|
||||||
exportExcel() {
|
// exportExcel() {
|
||||||
const request = {
|
// const request = {
|
||||||
vehicleId: formData.vehicleId,
|
// vehicleId: formData.vehicleId,
|
||||||
currentLocation: formData.currentLocation,
|
// currentLocation: formData.currentLocation,
|
||||||
isEmpty: formData.isEmpty,
|
// isEmpty: formData.isEmpty,
|
||||||
vehicleStatus: formData.vehicleStatus
|
// vehicleStatus: formData.vehicleStatus
|
||||||
}
|
// }
|
||||||
downloadLocationsExcel(request).then(res => {
|
// downloadVehicleExcel(request).then(res => {
|
||||||
const link = document.createElement('a');//创建a标签
|
// const link = document.createElement('a');//创建a标签
|
||||||
try {
|
// try {
|
||||||
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
// // let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
||||||
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
// let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
||||||
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
// // let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
||||||
let _fileName = "导出载具信息" + dateFormatter(new Date) + ".xlsx"
|
// let _fileName = "导出料箱信息" + dateFormatter(new Date) + ".xlsx"
|
||||||
link.style.display = 'none'//隐藏
|
// link.style.display = 'none'//隐藏
|
||||||
|
|
||||||
// 兼容不同浏览器的URL对象
|
// // 兼容不同浏览器的URL对象
|
||||||
const url = window.URL || window.webkitURL || window.moxURL
|
// const url = window.URL || window.webkitURL || window.moxURL
|
||||||
link.href = url.createObjectURL(blob)
|
// link.href = url.createObjectURL(blob)
|
||||||
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
// link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||||
document.body.appendChild(link)
|
// document.body.appendChild(link)
|
||||||
link.click()
|
// link.click()
|
||||||
document.body.removeChild(link)
|
// document.body.removeChild(link)
|
||||||
url.revokeObjectURL(link.href)//移除url对象
|
// url.revokeObjectURL(link.href)//移除url对象
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
ElMessage({
|
// ElMessage({
|
||||||
message: '下载文件失败:: ' + e,
|
// message: '下载文件失败:: ' + e,
|
||||||
type: 'error',
|
// type: 'error',
|
||||||
showClose: true
|
// showClose: true
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}).catch(err => {
|
// }).catch(err => {
|
||||||
ElMessage({
|
// ElMessage({
|
||||||
message: '导出失败:: ' + err,
|
// message: '导出失败:: ' + err,
|
||||||
type: 'error',
|
// type: 'error',
|
||||||
showClose: true
|
// showClose: true
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ export default {
|
||||||
name: 'outTaskRecord',
|
name: 'outTaskRecord',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: {},
|
|
||||||
tasks: [],
|
tasks: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -93,11 +92,12 @@ export default {
|
||||||
}
|
}
|
||||||
getTaskRecords(tableRequest).then(res => {
|
getTaskRecords(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.tasks = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.tasks = tableResponse.rows
|
|
||||||
this.total = tableResponse.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询任务记录错误')
|
ElMessage.error('查询任务记录错误')
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@ export default {
|
||||||
emits: ['update:selStock'],
|
emits: ['update:selStock'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: {},
|
|
||||||
displayStocks: [],
|
displayStocks: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -289,11 +288,12 @@ export default {
|
||||||
}
|
}
|
||||||
getAllStocks(request).then(res => {
|
getAllStocks(request).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.displayStocks = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.displayStocks = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询库存错误')
|
ElMessage.error('查询库存错误')
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="margin-bottom: 15px">
|
<div style="margin-bottom: 10px">
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料号" />
|
<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="vehicleIdQuery" 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-row>
|
</el-row>
|
||||||
|
|
@ -118,7 +118,6 @@ export default {
|
||||||
name: 'taskMonitor',
|
name: 'taskMonitor',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: {},
|
|
||||||
tasks: [],
|
tasks: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -202,11 +201,12 @@ export default {
|
||||||
}
|
}
|
||||||
getTasksByPage(tableRequest).then(res => {
|
getTasksByPage(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.tasks = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.tasks = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询任务错误')
|
ElMessage.error('查询任务错误')
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="margin-bottom: 10px">
|
<div style="margin-bottom: 10px">
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-row style="align-items: flex-start;">
|
<el-row>
|
||||||
|
<el-input v-model="queryKey" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
||||||
|
:suffix-icon="Search" />
|
||||||
<!-- <div v-if="selVehicle == null"><uploadVehicles></uploadVehicles></div> -->
|
<!-- <div v-if="selVehicle == null"><uploadVehicles></uploadVehicles></div> -->
|
||||||
<el-input v-model="queryKey" style="width: 196px; margin-left: auto; margin-right: 10px;" placeholder="载具号" />
|
<!-- <el-input v-model="queryKey" style="width: 196px; margin-left: auto; 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="exportExcel()" v-if="selVehicle == null">导出信息</el-button>
|
<el-button type="success" @click="exportExcel()" v-if="selVehicle == null">导出信息</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<br />
|
<br />
|
||||||
<el-table :data="vehicles" stripe border v-loading="loading" class="table-class" max-height="650px"
|
<el-table :data="vehicles" stripe border v-loading="loading" class="table-class" max-height="550px"
|
||||||
highlight-current-row @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
highlight-current-row @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
<el-table-column width="65px" fixed="left">
|
<el-table-column width="65px" fixed="left">
|
||||||
|
|
@ -18,10 +20,10 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="vehicleId" label="托盘号" fixed="left" min-width="120px" />
|
<el-table-column prop="vehicleId" label="托盘号" fixed="left" min-width="120px" />
|
||||||
<el-table-column prop="currentLocation" label="所在位置" fixed="left" :formatter="locationFormat" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="currentLocation" label="库位" fixed="left" :formatter="locationFormat" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="vehicleStatus" label="状态" :formatter="vehicleStatusFormat" min-width="120px" />
|
<el-table-column prop="vehicleStatus" label="状态" :formatter="vehicleStatusFormat" min-width="120px" />
|
||||||
<el-table-column prop="isEmpty" label="空托" :formatter="isEmptyFormat" min-width="120px" />
|
<el-table-column prop="isEmpty" label="空托" :formatter="isEmptyFormat" min-width="120px" />
|
||||||
<el-table-column prop="lastInTime" label="空托" :formatter="timeFormat" min-width="120px" />
|
<el-table-column prop="lastInTime" label="最近入库时间" :formatter="timeFormat" min-width="120px" />
|
||||||
<el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null">
|
<el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRowVehicle(scope.row)">编辑</el-button>
|
<el-button plain type="primary" @click="editCurrentRowVehicle(scope.row)">编辑</el-button>
|
||||||
|
|
@ -33,12 +35,12 @@
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
@current-change="search" />
|
@current-change="search" />
|
||||||
<el-dialog v-model="dialogVisible" title="托盘信息" width="40%" draggable :show-close="false">
|
<el-dialog v-model="dialogVisible" title="料箱信息" width="40%" draggable :show-close="false">
|
||||||
<el-form ref="vehicleFormRef" :model="vehicleFormEntity" :label-position="labelPosition" label-width="100px"
|
<el-form ref="vehicleFormRef" :model="vehicleFormEntity" :label-position="labelPosition" label-width="100px"
|
||||||
style="max-width: 100%" :rules="rules" status-icon>
|
style="max-width: 100%" :rules="rules" status-icon>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="载具号" prop="vehicleId">
|
<el-form-item label="箱号" prop="vehicleId">
|
||||||
<el-input v-model="vehicleFormEntity.vehicleId" disabled />
|
<el-input v-model="vehicleFormEntity.vehicleId" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -50,13 +52,13 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="空托" prop="isEmpty">
|
<el-form-item label="空箱" prop="isEmpty">
|
||||||
<el-select-v2 v-model="vehicleFormEntity.isEmpty" placeholder="请选择是否空托"
|
<el-select-v2 v-model="vehicleFormEntity.isEmpty" placeholder="请选择是否空托"
|
||||||
:options="isEmptyOptions"></el-select-v2>
|
:options="isEmptyOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="托盘状态" prop="vehicleStatus">
|
<el-form-item label="状态" prop="vehicleStatus">
|
||||||
<el-select-v2 v-model="vehicleFormEntity.vehicleStatus" placeholder="请选择托盘状态"
|
<el-select-v2 v-model="vehicleFormEntity.vehicleStatus" placeholder="请选择托盘状态"
|
||||||
:options="vehicleStatusOptions"></el-select-v2>
|
:options="vehicleStatusOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -80,6 +82,7 @@
|
||||||
import { getAllVehicles, updateVehicleInfo } from '@/api/vehicle'
|
import { getAllVehicles, updateVehicleInfo } from '@/api/vehicle'
|
||||||
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 { Search } from '@element-plus/icons-vue'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { vehicleStatusFormatter, locationFormatter, dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
import { vehicleStatusFormatter, locationFormatter, dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
// import uploadVehicles from '@/excel/uploadVehicles.vue'
|
// import uploadVehicles from '@/excel/uploadVehicles.vue'
|
||||||
|
|
@ -92,7 +95,6 @@ export default {
|
||||||
emits: ['update:selVehicle'],
|
emits: ['update:selVehicle'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: {},
|
|
||||||
vehicles: [],
|
vehicles: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -106,7 +108,7 @@ export default {
|
||||||
vehicleFormRef: ref(),
|
vehicleFormRef: ref(),
|
||||||
rules: reactive({
|
rules: reactive({
|
||||||
vehicleId: [
|
vehicleId: [
|
||||||
{ required: true, message: '请输入托盘号' }
|
{ required: true, message: '请输入箱号' }
|
||||||
],
|
],
|
||||||
currentLocation: [
|
currentLocation: [
|
||||||
{ required: true, message: '请输入库位' }
|
{ required: true, message: '请输入库位' }
|
||||||
|
|
@ -153,13 +155,14 @@ export default {
|
||||||
}
|
}
|
||||||
getAllVehicles(tableRequest).then(res => {
|
getAllVehicles(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.vehicles = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.vehicles = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('查询载具信息错误' + err.message)
|
ElMessage.error('查询料箱信息错误' + err.message)
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
|
@ -177,7 +180,7 @@ export default {
|
||||||
return '带料'
|
return '带料'
|
||||||
}
|
}
|
||||||
if (cellValue == 1) {
|
if (cellValue == 1) {
|
||||||
return '空载具'
|
return '空箱'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
|
|
@ -185,7 +188,13 @@ export default {
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
editCurrentRowVehicle(row) {
|
editCurrentRowVehicle(row) {
|
||||||
this.vehicleFormEntity = row
|
this.vehicleFormEntity = {
|
||||||
|
vehicleId: row.vehicleId,
|
||||||
|
currentLocation: row.currentLocation,
|
||||||
|
isEmpty: row.isEmpty,
|
||||||
|
vehicleStatus: row.vehicleStatus,
|
||||||
|
lastInTime: row.lastInTime
|
||||||
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
submitVehicleInfo(formData) {
|
submitVehicleInfo(formData) {
|
||||||
|
|
@ -193,13 +202,14 @@ export default {
|
||||||
vehicleId: formData.vehicleId,
|
vehicleId: formData.vehicleId,
|
||||||
currentLocation: formData.currentLocation,
|
currentLocation: formData.currentLocation,
|
||||||
isEmpty: formData.isEmpty,
|
isEmpty: formData.isEmpty,
|
||||||
vehicleStatus: formData.vehicleStatus
|
vehicleStatus: formData.vehicleStatus,
|
||||||
|
lastInTime: row.lastInTime
|
||||||
}
|
}
|
||||||
updateVehicleInfo(request).then(res => {
|
updateVehicleInfo(request).then(res => {
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '更新载具信息成功',
|
message: '更新料箱信息成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
this.search()
|
this.search()
|
||||||
|
|
@ -207,7 +217,7 @@ export default {
|
||||||
ElMessage.error(res.data.message)
|
ElMessage.error(res.data.message)
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('更新载具信息失败:' + err)
|
ElMessage.error('更新料箱信息失败:' + err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCurrentRow(row) {
|
getCurrentRow(row) {
|
||||||
|
|
@ -227,7 +237,7 @@ export default {
|
||||||
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
||||||
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
||||||
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
||||||
let _fileName = "导出载具信息" + dateFormatter(new Date) + ".xlsx"
|
let _fileName = "导出料箱信息" + dateFormatter(new Date) + ".xlsx"
|
||||||
link.style.display = 'none'//隐藏
|
link.style.display = 'none'//隐藏
|
||||||
|
|
||||||
// 兼容不同浏览器的URL对象
|
// 兼容不同浏览器的URL对象
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
<el-table-column fixed="right" label="操作" width="120px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRowStock(scope.row)">编辑</el-button>
|
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -67,8 +67,7 @@
|
||||||
:value="value" />
|
:value="value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-switch v-if="configFormEntity.configType == '3'" style="margin-left: 5px;"
|
<el-switch v-if="configFormEntity.configType == '3'" style="margin-left: 5px;"
|
||||||
v-model="configFormEntity.configValue" active-value="1"
|
v-model="configFormEntity.configValue" active-value="1" inactive-value="0" />
|
||||||
inactive-value="0" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -96,7 +95,7 @@ import { ElMessage } from 'element-plus'
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'stock',
|
name: 'wmsConfig',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: {},
|
pageInfo: {},
|
||||||
|
|
@ -164,15 +163,15 @@ export default {
|
||||||
if (tableResponse.code == 0) {
|
if (tableResponse.code == 0) {
|
||||||
this.configList = tableResponse.returnData.lists
|
this.configList = tableResponse.returnData.lists
|
||||||
this.configList.forEach((config) => {
|
this.configList.forEach((config) => {
|
||||||
if (config.configType == '2') {
|
if (config.configType == '2') {
|
||||||
const tempArray = config.configValue.split(';')
|
const tempArray = config.configValue.split(';')
|
||||||
config.configValue = tempArray
|
config.configValue = tempArray
|
||||||
}
|
}
|
||||||
if (config.configKey == 'MAIL_ADDRESS') {
|
if (config.configKey == 'MAIL_ADDRESS') {
|
||||||
const tempArray = config.configValue.split(';')
|
const tempArray = config.configValue.split(';')
|
||||||
this.mails = tempArray
|
this.mails = tempArray
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.total = tableResponse.returnData.total
|
this.total = tableResponse.returnData.total
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
|
|
@ -190,7 +189,7 @@ export default {
|
||||||
getCurrentRow(row) {
|
getCurrentRow(row) {
|
||||||
this.configId = row.configId
|
this.configId = row.configId
|
||||||
},
|
},
|
||||||
editCurrentRowStock(row) {
|
editCurrentRow(row) {
|
||||||
this.configFormEntity = reactive({
|
this.configFormEntity = reactive({
|
||||||
configId: row.configId,
|
configId: row.configId,
|
||||||
configName: row.configName,
|
configName: row.configName,
|
||||||
|
|
@ -142,11 +142,13 @@ export default {
|
||||||
}
|
}
|
||||||
queryLogs(tableRequest).then(res => {
|
queryLogs(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code == 0) {
|
||||||
|
this.wmsLogs = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.wmsLogs = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('查询日志错误' + err.message)
|
ElMessage.error('查询日志错误' + err.message)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ const routes = [
|
||||||
{ path: '/goodsOut', component: () => import('@/layout/goodsOut.vue') },// 出库
|
{ path: '/goodsOut', component: () => import('@/layout/goodsOut.vue') },// 出库
|
||||||
{ path: '/inTaskRecord', component: () => import('@/layout/inTaskRecord.vue') },// 入库记录
|
{ path: '/inTaskRecord', component: () => import('@/layout/inTaskRecord.vue') },// 入库记录
|
||||||
{ path: '/outTaskRecord', component: () => import('@/layout/outTaskRecord.vue') },// 出库记录
|
{ path: '/outTaskRecord', component: () => import('@/layout/outTaskRecord.vue') },// 出库记录
|
||||||
{ path: '/location', component: () => import('@/layout/location.vue') },// 库位
|
{ path: '/location', component: () => import('@/layout/locationsTable.vue') },// 库位
|
||||||
{ path: '/goods', component: () => import('@/layout/goods.vue') },// 物料
|
{ path: '/goods', component: () => import('@/layout/goods.vue') },// 物料
|
||||||
{ path: '/standSettings', component: () => import('@/layout/standSettings.vue') },// 站台(库口)设置
|
{ path: '/standSettings', component: () => import('@/layout/standSettings.vue') },// 站台(库口)设置
|
||||||
{ path: '/config', component: () => import('@/layout/newConfig.vue') },// 系统配置
|
{ path: '/config', component: () => import('@/layout/wmsConfig.vue') },// 系统配置
|
||||||
{ path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue') },// 任务监控
|
{ path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue') },// 任务监控
|
||||||
{ path: '/vehicles', component: () => import('@/layout/vehicle.vue') },// 任务监控
|
{ path: '/vehicles', component: () => import('@/layout/vehicle.vue') },// 料箱监控
|
||||||
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
||||||
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点
|
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点记录
|
||||||
{ 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') },// 备料完成
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,17 @@ function vehicleStatusFormatter(value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function locationStatusFormatter(value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0:
|
||||||
|
return '空闲'
|
||||||
|
case 1:
|
||||||
|
return '占用'
|
||||||
|
default:
|
||||||
|
return '异常状态'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function configTypeFormatter(value) {
|
function configTypeFormatter(value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case '1':
|
case '1':
|
||||||
|
|
@ -127,5 +138,6 @@ export {
|
||||||
pickingStatusFormatter,
|
pickingStatusFormatter,
|
||||||
vehicleStatusFormatter,
|
vehicleStatusFormatter,
|
||||||
configTypeFormatter,
|
configTypeFormatter,
|
||||||
dueFormatter
|
dueFormatter,
|
||||||
|
locationStatusFormatter
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user