wcs项目初始化
This commit is contained in:
295
ruoyi-ui/src/views/agv/queue/index.vue
Normal file
295
ruoyi-ui/src/views/agv/queue/index.vue
Normal file
@@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item :label="$t('agv.queue.taskCode')" prop="taskCode">
|
||||
<el-input
|
||||
v-model="queryParams.taskCode"
|
||||
:placeholder="$t('agv.queue.placeholder.taskCode')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('agv.queue.containerCode')" prop="wmsTraycode">
|
||||
<el-input
|
||||
v-model="queryParams.wmsTraycode"
|
||||
:placeholder="$t('agv.queue.placeholder.containerCode')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('agv.queue.wmsTaskNo')" prop="wmsTaskNo">
|
||||
<el-input
|
||||
v-model="queryParams.wmsTaskNo"
|
||||
:placeholder="$t('agv.queue.placeholder.wmsTaskNo')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('agv.queue.wmsTaskType')" prop="wmsTaskType">
|
||||
<el-select v-model="queryParams.wmsTaskType" :placeholder="$t('agv.queue.placeholder.wmsTaskType')" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_task_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('agv.queue.taskStatus')" prop="status">
|
||||
<el-select v-model="queryParams.status" :placeholder="$t('agv.queue.placeholder.taskStatus')" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.task_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('agv.queue.search') }}</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('agv.queue.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="queueList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="$t('agv.queue.reqCode')" align="center" prop="reqCode" />
|
||||
<el-table-column :label="$t('agv.queue.reqTime')" align="center" prop="reqTime" />
|
||||
<el-table-column :label="$t('agv.queue.startPoint')" align="center" prop="positionCode1" />
|
||||
<el-table-column :label="$t('agv.queue.endPoint')" align="center" prop="positionCode2" />
|
||||
<el-table-column :label="$t('agv.queue.taskType')" align="center" prop="taskType" />
|
||||
<el-table-column :label="$t('agv.queue.containerType')" align="center" prop="ctnrType" />
|
||||
<el-table-column :label="$t('agv.queue.containerNumber')" align="center" prop="ctnrCode" />
|
||||
<el-table-column :label="$t('agv.queue.containerCount')" align="center" prop="ctnrNum" />
|
||||
<el-table-column :label="$t('agv.queue.taskMode')" align="center" prop="taskMode" />
|
||||
<el-table-column :label="$t('agv.queue.priority')" align="center" prop="priority" />
|
||||
<el-table-column :label="$t('agv.queue.deviceType')" align="center" prop="agvType" />
|
||||
<el-table-column :label="$t('agv.queue.continueRequest')" align="center" prop="request" />
|
||||
<el-table-column :label="$t('agv.queue.finishTime')" align="center" prop="finishTime" />
|
||||
<el-table-column :label="$t('agv.queue.wmsTrayCode')" align="center" prop="wmsTraycode" />
|
||||
<el-table-column :label="$t('agv.queue.wmsTaskNo')" align="center" prop="wmsTaskNo" />
|
||||
<el-table-column :label="$t('agv.queue.taskCode')" align="center" prop="taskCode" />
|
||||
<el-table-column :label="$t('agv.queue.status')" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.task_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('agv.queue.wmsTaskType')" align="center" prop="wmsTaskType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_task_type" :value="scope.row.wmsTaskType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['agv:queue:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['agv:queue:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listQueue, getQueue, delQueue, addQueue, updateQueue } from "@/api/agv/queue"
|
||||
import { listQueueFinish } from "@/api/agv/queueFinish"
|
||||
import i18n from '@/lang'
|
||||
|
||||
export default {
|
||||
name: "Queue",
|
||||
dicts: ['wms_task_type','task_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// AGV任务队列表格数据
|
||||
queueList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
reqTime: null,
|
||||
positionCode1: null,
|
||||
positionCode2: null,
|
||||
taskType: null,
|
||||
ctnrType: null,
|
||||
ctnrCode: null,
|
||||
ctnrNum: null,
|
||||
taskMode: null,
|
||||
priority: null,
|
||||
agvType: null,
|
||||
request: null,
|
||||
finishTime: null,
|
||||
wmsTraycode: null,
|
||||
wmsTaskNo: null,
|
||||
taskCode: null,
|
||||
status: null,
|
||||
wmsTaskType: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询AGV任务队列列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
if (this.queryParams.status !=='4'){
|
||||
listQueue(this.queryParams).then(response => {
|
||||
this.queueList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
}else {
|
||||
listQueueFinish(this.queryParams).then(response => {
|
||||
this.queueList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
reqCode: null,
|
||||
reqTime: null,
|
||||
positionCode1: null,
|
||||
positionCode2: null,
|
||||
taskType: null,
|
||||
ctnrType: null,
|
||||
ctnrCode: null,
|
||||
ctnrNum: null,
|
||||
taskMode: null,
|
||||
priority: null,
|
||||
agvType: null,
|
||||
request: null,
|
||||
finishTime: null,
|
||||
wmsTraycode: null,
|
||||
wmsTaskNo: null,
|
||||
taskCode: null,
|
||||
status: null,
|
||||
wmsTaskType: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.reqCode)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "agv.queue.dialog.add"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const reqCode = row.reqCode || this.ids
|
||||
getQueue(reqCode).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "agv.queue.dialog.edit"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.reqCode != null) {
|
||||
updateQueue(this.form).then(response => {
|
||||
this.$modal.msgSuccess(this.$t('common.editSuccess'))
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addQueue(this.form).then(response => {
|
||||
this.$modal.msgSuccess(this.$t('common.addSuccess'))
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const reqCodes = row.reqCode || this.ids
|
||||
this.$modal.confirm(this.$t('common.deleteConfirm', { content: reqCodes })).then(function() {
|
||||
return delQueue(reqCodes)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess(this.$t('common.deleteSuccess'))
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('agv/queue/export', {
|
||||
...this.queryParams
|
||||
}, `queue_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user