代码更新:
1. 增加拣选任务界面 2. 增加工作流界面 3. 修改库存界面
This commit is contained in:
parent
9bd8b9f12c
commit
ca2c30eb85
|
|
@ -80,6 +80,23 @@ const getClcKanbanRequirement = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getWorkFlows = (params) => {
|
||||
return request({
|
||||
url: '/kateWork/getWorkFlows',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
const updateWorkFlows = (params) => {
|
||||
return request({
|
||||
url: '/kateWork/updateWorkFlows',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
getDbs,
|
||||
deleteDbs,
|
||||
|
|
@ -90,5 +107,7 @@ export {
|
|||
getStationConfigs,
|
||||
deleteStationConfigs,
|
||||
updateStationConfigs,
|
||||
getClcKanbanRequirement
|
||||
getClcKanbanRequirement,
|
||||
getWorkFlows,
|
||||
updateWorkFlows
|
||||
}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
import request from "@/http/request";
|
||||
|
||||
const getPickTasksByPage = (params) => {
|
||||
return request({
|
||||
url: '/taskMonitor/getPickTasksByPage',
|
||||
|
|
@ -6,6 +8,15 @@ const getPickTasksByPage = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
export {
|
||||
getPickTasksByPage
|
||||
const updatePickTaskInfo = (params) => {
|
||||
return request({
|
||||
url: '/taskMonitor/updatePickTaskInfo',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
getPickTasksByPage,
|
||||
updatePickTaskInfo
|
||||
}
|
||||
|
|
@ -3,50 +3,32 @@
|
|||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="workOrderQuery" style="width: 256px; margin-right: 10px;" placeholder="工单"
|
||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
|
||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="background-color: #00CED1; color: #000;"
|
||||
@click="openUploadDialog()">导入</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="ordersList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.orderId" v-model="orderId"> </el-radio>
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="item" label="Item" min-width="120px" />
|
||||
<el-table-column prop="description" label="描述" min-width="120px" />
|
||||
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
|
||||
<el-table-column prop="type" label="Type" min-width="120px" />
|
||||
<el-table-column prop="originStatus" label="Status" min-width="120px" />
|
||||
<el-table-column prop="sortString" label="SortStrng" min-width="120px" />
|
||||
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" />
|
||||
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
|
||||
<el-table-column prop="orderStatus" label="状态" min-width="120px" />
|
||||
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" />
|
||||
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" />
|
||||
<el-table-column prop="userName" label="操作人员" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="240px">
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
|
||||
<el-button plain type="danger" @click="deleteCurrentRowOrders(scope.row)">删除</el-button>
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -55,60 +37,33 @@
|
|||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="DBS信息" width="40%" draggable :show-close="false">
|
||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="ordersFormRef" :model="ordersFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="orderId">
|
||||
<el-input v-model="ordersFormEntity.orderId" disabled />
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单" prop="workOrder">
|
||||
<el-input v-model="ordersFormEntity.workOrder" disabled />
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小工位" prop="supplyArea">
|
||||
<el-input v-model="ordersFormEntity.supplyArea" disabled />
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="ordersFormEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求数量" prop="requirementQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.requirementQuantity"
|
||||
controls-position="right" :min="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="orderStatus">
|
||||
<el-input-number v-model.number="ordersFormEntity.orderStatus"
|
||||
controls-position="right" :min="0" :max="4" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="缺少数量" prop="lackQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.lackQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已拣数量" prop="pickedQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.pickedQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -117,79 +72,61 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitOrdersInfo(ordersFormEntity)">
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadDialogVisible" title="工单" width="40%" draggable :show-close="true">
|
||||
<fieldset class="title-area">
|
||||
<legend>上次更新</legend>
|
||||
<div style="padding: 5px;">
|
||||
<div style="display: flex; margin-bottom: 10px;">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 30%; align-content: center;">时间:</div>
|
||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
||||
</div>
|
||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
||||
<div style="width: 30%; align-content: center;">人员:</div>
|
||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="title-area">
|
||||
<legend>再次更新</legend>
|
||||
<UploadExcelOrders></UploadExcelOrders>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
|
||||
import { queryUploadRecord } from '@/api/excel.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'kateOrders',
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
ordersList: [],
|
||||
pickTaskList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
workOrderQuery: '',
|
||||
goodsIdQuery: '',
|
||||
smallBoxQuery: '',
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
orderId: '',
|
||||
ordersFormEntity: reactive({}),
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
ordersFormRef: ref(),
|
||||
rules: reactive({})
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -201,21 +138,20 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workOrder: this.workOrderQuery.trim(),
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
supplyArea: this.smallBoxQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getOrders(request).then(res => {
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.ordersList = tableResponse.returnData.lists
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询工单错误' + err.message)
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
|
|
@ -225,79 +161,47 @@ export default {
|
|||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.workOrderQuery = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
this.ordersFormEntity = {
|
||||
orderId: row.orderId,
|
||||
workOrder: row.workOrder,
|
||||
goodsId: row.goodsId,
|
||||
supplyArea: row.supplyArea,
|
||||
requirementQuantity: row.requirementQuantity,
|
||||
orderStatus: row.orderStatus,
|
||||
lackQuantity: row.lackQuantity,
|
||||
pickedQuantity: row.pickedQuantity
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
deleteCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
ElMessageBox.confirm(
|
||||
'该操作会删除选择的工单数据。\n是否继续',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
orderId: this.orderId,
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
deleteOrders(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '删除工单信息成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('删除工单信息成功')
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '操作取消',
|
||||
})
|
||||
})
|
||||
},
|
||||
submitOrdersInfo(formData) {
|
||||
const params = {
|
||||
orderId: formData.orderId,
|
||||
workOrder: formData.workOrder,
|
||||
goodsId: formData.goodsId,
|
||||
supplyArea: formData.supplyArea,
|
||||
requirementQuantity: formData.requirementQuantity,
|
||||
orderStatus: formData.orderStatus,
|
||||
lackQuantity: formData.lackQuantity,
|
||||
pickedQuantity: formData.pickedQuantity,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateOrders(params).then(res => {
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新工单成功。',
|
||||
message: '更新拣选任务成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -305,43 +209,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新工单失败。')
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.dbsId = row.dbsId
|
||||
},
|
||||
openUploadDialog() {
|
||||
// 请求上传记录
|
||||
const param = {
|
||||
userName: store.getters.getUserName,
|
||||
fileDescription: 'ORDERS',
|
||||
isAsc: false,
|
||||
sortBy: 'upload_time'
|
||||
}
|
||||
queryUploadRecord(param).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.returnData.total > 0) {
|
||||
this.uploadRecord = res.data.returnData.lists[0]
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('发生异常')
|
||||
})
|
||||
this.uploadDialogVisible = true
|
||||
this.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,50 +3,32 @@
|
|||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="workOrderQuery" style="width: 256px; margin-right: 10px;" placeholder="工单"
|
||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
|
||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="background-color: #00CED1; color: #000;"
|
||||
@click="openUploadDialog()">导入</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="ordersList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.orderId" v-model="orderId"> </el-radio>
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="item" label="Item" min-width="120px" />
|
||||
<el-table-column prop="description" label="描述" min-width="120px" />
|
||||
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
|
||||
<el-table-column prop="type" label="Type" min-width="120px" />
|
||||
<el-table-column prop="originStatus" label="Status" min-width="120px" />
|
||||
<el-table-column prop="sortString" label="SortStrng" min-width="120px" />
|
||||
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" />
|
||||
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
|
||||
<el-table-column prop="orderStatus" label="状态" min-width="120px" />
|
||||
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" />
|
||||
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" />
|
||||
<el-table-column prop="userName" label="操作人员" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="240px">
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
|
||||
<el-button plain type="danger" @click="deleteCurrentRowOrders(scope.row)">删除</el-button>
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -55,60 +37,33 @@
|
|||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="DBS信息" width="40%" draggable :show-close="false">
|
||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="ordersFormRef" :model="ordersFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="orderId">
|
||||
<el-input v-model="ordersFormEntity.orderId" disabled />
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单" prop="workOrder">
|
||||
<el-input v-model="ordersFormEntity.workOrder" disabled />
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小工位" prop="supplyArea">
|
||||
<el-input v-model="ordersFormEntity.supplyArea" disabled />
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="ordersFormEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求数量" prop="requirementQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.requirementQuantity"
|
||||
controls-position="right" :min="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="orderStatus">
|
||||
<el-input-number v-model.number="ordersFormEntity.orderStatus"
|
||||
controls-position="right" :min="0" :max="4" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="缺少数量" prop="lackQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.lackQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已拣数量" prop="pickedQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.pickedQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -117,79 +72,61 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitOrdersInfo(ordersFormEntity)">
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadDialogVisible" title="工单" width="40%" draggable :show-close="true">
|
||||
<fieldset class="title-area">
|
||||
<legend>上次更新</legend>
|
||||
<div style="padding: 5px;">
|
||||
<div style="display: flex; margin-bottom: 10px;">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 30%; align-content: center;">时间:</div>
|
||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
||||
</div>
|
||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
||||
<div style="width: 30%; align-content: center;">人员:</div>
|
||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="title-area">
|
||||
<legend>再次更新</legend>
|
||||
<UploadExcelOrders></UploadExcelOrders>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
|
||||
import { queryUploadRecord } from '@/api/excel.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'kateOrders',
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
ordersList: [],
|
||||
pickTaskList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
workOrderQuery: '',
|
||||
goodsIdQuery: '',
|
||||
smallBoxQuery: '',
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
orderId: '',
|
||||
ordersFormEntity: reactive({}),
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
ordersFormRef: ref(),
|
||||
rules: reactive({})
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -201,21 +138,20 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workOrder: this.workOrderQuery.trim(),
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
supplyArea: this.smallBoxQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getOrders(request).then(res => {
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.ordersList = tableResponse.returnData.lists
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询工单错误' + err.message)
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
|
|
@ -225,79 +161,47 @@ export default {
|
|||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.workOrderQuery = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
this.ordersFormEntity = {
|
||||
orderId: row.orderId,
|
||||
workOrder: row.workOrder,
|
||||
goodsId: row.goodsId,
|
||||
supplyArea: row.supplyArea,
|
||||
requirementQuantity: row.requirementQuantity,
|
||||
orderStatus: row.orderStatus,
|
||||
lackQuantity: row.lackQuantity,
|
||||
pickedQuantity: row.pickedQuantity
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
deleteCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
ElMessageBox.confirm(
|
||||
'该操作会删除选择的工单数据。\n是否继续',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
orderId: this.orderId,
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
deleteOrders(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '删除工单信息成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('删除工单信息成功')
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '操作取消',
|
||||
})
|
||||
})
|
||||
},
|
||||
submitOrdersInfo(formData) {
|
||||
const params = {
|
||||
orderId: formData.orderId,
|
||||
workOrder: formData.workOrder,
|
||||
goodsId: formData.goodsId,
|
||||
supplyArea: formData.supplyArea,
|
||||
requirementQuantity: formData.requirementQuantity,
|
||||
orderStatus: formData.orderStatus,
|
||||
lackQuantity: formData.lackQuantity,
|
||||
pickedQuantity: formData.pickedQuantity,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateOrders(params).then(res => {
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新工单成功。',
|
||||
message: '更新拣选任务成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -305,43 +209,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新工单失败。')
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.dbsId = row.dbsId
|
||||
},
|
||||
openUploadDialog() {
|
||||
// 请求上传记录
|
||||
const param = {
|
||||
userName: store.getters.getUserName,
|
||||
fileDescription: 'ORDERS',
|
||||
isAsc: false,
|
||||
sortBy: 'upload_time'
|
||||
}
|
||||
queryUploadRecord(param).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.returnData.total > 0) {
|
||||
this.uploadRecord = res.data.returnData.lists[0]
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('发生异常')
|
||||
})
|
||||
this.uploadDialogVisible = true
|
||||
this.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -381,7 +253,7 @@ export default {
|
|||
|
||||
.title-area {
|
||||
display: flex;
|
||||
min-height: 10%;
|
||||
/* min-height: 10%; */
|
||||
max-height: max-content;
|
||||
margin-bottom: 10px;
|
||||
min-width: inherit;
|
||||
|
|
|
|||
|
|
@ -3,50 +3,32 @@
|
|||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="workOrderQuery" style="width: 256px; margin-right: 10px;" placeholder="工单"
|
||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
|
||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="background-color: #00CED1; color: #000;"
|
||||
@click="openUploadDialog()">导入</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="ordersList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.orderId" v-model="orderId"> </el-radio>
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="item" label="Item" min-width="120px" />
|
||||
<el-table-column prop="description" label="描述" min-width="120px" />
|
||||
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
|
||||
<el-table-column prop="type" label="Type" min-width="120px" />
|
||||
<el-table-column prop="originStatus" label="Status" min-width="120px" />
|
||||
<el-table-column prop="sortString" label="SortStrng" min-width="120px" />
|
||||
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" />
|
||||
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
|
||||
<el-table-column prop="orderStatus" label="状态" min-width="120px" />
|
||||
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" />
|
||||
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" />
|
||||
<el-table-column prop="userName" label="操作人员" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="240px">
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
|
||||
<el-button plain type="danger" @click="deleteCurrentRowOrders(scope.row)">删除</el-button>
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -55,60 +37,33 @@
|
|||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="DBS信息" width="40%" draggable :show-close="false">
|
||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="ordersFormRef" :model="ordersFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="orderId">
|
||||
<el-input v-model="ordersFormEntity.orderId" disabled />
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单" prop="workOrder">
|
||||
<el-input v-model="ordersFormEntity.workOrder" disabled />
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小工位" prop="supplyArea">
|
||||
<el-input v-model="ordersFormEntity.supplyArea" disabled />
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="ordersFormEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求数量" prop="requirementQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.requirementQuantity"
|
||||
controls-position="right" :min="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="orderStatus">
|
||||
<el-input-number v-model.number="ordersFormEntity.orderStatus"
|
||||
controls-position="right" :min="0" :max="4" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="缺少数量" prop="lackQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.lackQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已拣数量" prop="pickedQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.pickedQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -117,79 +72,61 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitOrdersInfo(ordersFormEntity)">
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadDialogVisible" title="工单" width="40%" draggable :show-close="true">
|
||||
<fieldset class="title-area">
|
||||
<legend>上次更新</legend>
|
||||
<div style="padding: 5px;">
|
||||
<div style="display: flex; margin-bottom: 10px;">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 30%; align-content: center;">时间:</div>
|
||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
||||
</div>
|
||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
||||
<div style="width: 30%; align-content: center;">人员:</div>
|
||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="title-area">
|
||||
<legend>再次更新</legend>
|
||||
<UploadExcelOrders></UploadExcelOrders>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
|
||||
import { queryUploadRecord } from '@/api/excel.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'kateOrders',
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
ordersList: [],
|
||||
pickTaskList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
workOrderQuery: '',
|
||||
goodsIdQuery: '',
|
||||
smallBoxQuery: '',
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
orderId: '',
|
||||
ordersFormEntity: reactive({}),
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
ordersFormRef: ref(),
|
||||
rules: reactive({})
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -201,21 +138,20 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workOrder: this.workOrderQuery.trim(),
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
supplyArea: this.smallBoxQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getOrders(request).then(res => {
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.ordersList = tableResponse.returnData.lists
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询工单错误' + err.message)
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
|
|
@ -225,79 +161,47 @@ export default {
|
|||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.workOrderQuery = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
this.ordersFormEntity = {
|
||||
orderId: row.orderId,
|
||||
workOrder: row.workOrder,
|
||||
goodsId: row.goodsId,
|
||||
supplyArea: row.supplyArea,
|
||||
requirementQuantity: row.requirementQuantity,
|
||||
orderStatus: row.orderStatus,
|
||||
lackQuantity: row.lackQuantity,
|
||||
pickedQuantity: row.pickedQuantity
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
deleteCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
ElMessageBox.confirm(
|
||||
'该操作会删除选择的工单数据。\n是否继续',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
orderId: this.orderId,
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
deleteOrders(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '删除工单信息成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('删除工单信息成功')
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '操作取消',
|
||||
})
|
||||
})
|
||||
},
|
||||
submitOrdersInfo(formData) {
|
||||
const params = {
|
||||
orderId: formData.orderId,
|
||||
workOrder: formData.workOrder,
|
||||
goodsId: formData.goodsId,
|
||||
supplyArea: formData.supplyArea,
|
||||
requirementQuantity: formData.requirementQuantity,
|
||||
orderStatus: formData.orderStatus,
|
||||
lackQuantity: formData.lackQuantity,
|
||||
pickedQuantity: formData.pickedQuantity,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateOrders(params).then(res => {
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新工单成功。',
|
||||
message: '更新拣选任务成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -305,43 +209,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新工单失败。')
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.dbsId = row.dbsId
|
||||
},
|
||||
openUploadDialog() {
|
||||
// 请求上传记录
|
||||
const param = {
|
||||
userName: store.getters.getUserName,
|
||||
fileDescription: 'ORDERS',
|
||||
isAsc: false,
|
||||
sortBy: 'upload_time'
|
||||
}
|
||||
queryUploadRecord(param).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.returnData.total > 0) {
|
||||
this.uploadRecord = res.data.returnData.lists[0]
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('发生异常')
|
||||
})
|
||||
this.uploadDialogVisible = true
|
||||
this.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
267
src/layout/outsideVehiclesMonitor.vue
Normal file
267
src/layout/outsideVehiclesMonitor.vue
Normal file
|
|
@ -0,0 +1,267 @@
|
|||
<template>
|
||||
<div style="margin-bottom: 10px; height: 100%; padding-left: 1%; padding-right: 1%;">
|
||||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br />
|
||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
pickTaskList: [],
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.search()
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.loading = true
|
||||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
dateFormat: (row, column, cellValue, index) => {
|
||||
return dateFormatter(cellValue)
|
||||
},
|
||||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新拣选任务成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-pagination {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.el-row .el-button {
|
||||
width: 72px;
|
||||
margin-left: 0px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-row .el-form-item {
|
||||
width: 10% inherit;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-row .el-form-item .el-select-v2 {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.el-row .el-form-item .el-input-number {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.el-row .el-form-item .el-button {
|
||||
margin: 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;
|
||||
flex-direction: column;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -12,23 +12,23 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="stationConfigList" stripe border v-loading="loading" class="table-class"
|
||||
highlight-current-row max-height="650px" @row-click="getCurrentRow"
|
||||
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
|
||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="工站" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="小盒子" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="开工时间调整" min-width="120px" />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowConfig(scope.row)">编辑</el-button>
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -37,64 +37,33 @@
|
|||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="工站配置信息" width="40%" draggable :show-close="false">
|
||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="configFormRef" :model="configFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="configId">
|
||||
<el-input v-model="configFormEntity.configId" disabled />
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工站" prop="workStation">
|
||||
<el-input v-model="configFormEntity.workStation" clearable />
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小盒子" prop="smallBox">
|
||||
<el-input v-model="configFormEntity.smallBox" disabled />
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="机型" prop="model">
|
||||
<el-input v-model="configFormEntity.model" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="工位" prop="workCenter">
|
||||
<el-input v-model="configFormEntity.workCenter" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工位大盒子" prop="bigBox">
|
||||
<el-input v-model="configFormEntity.bigBox" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="车辆" prop="vehicle">
|
||||
<el-input v-model="configFormEntity.vehicle" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="线边架/车位置" prop="vehicleLocation">
|
||||
<el-input v-model="configFormEntity.vehicleLocation" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="开工时间调整" prop="startDateAdjust">
|
||||
<el-input-number v-model.number="configFormEntity.startDateAdjust"
|
||||
controls-position="right" clearable />
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -103,47 +72,20 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitConfigInfo(configFormEntity)">
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadDialogVisible" title="工单" width="40%" draggable :show-close="true">
|
||||
<fieldset class="title-area">
|
||||
<legend>上次更新</legend>
|
||||
<div style="padding: 5px;">
|
||||
<div style="display: flex; margin-bottom: 10px;">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 30%; align-content: center;">时间:</div>
|
||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
||||
</div>
|
||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
||||
<div style="width: 30%; align-content: center;">人员:</div>
|
||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="title-area">
|
||||
<legend>再次更新</legend>
|
||||
<UploadExcelStationConfig></UploadExcelStationConfig>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getPickTasksByPage } from '@/api/taskMonitor.js'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
|
|
@ -154,25 +96,37 @@ export default {
|
|||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
stationConfigList: [],
|
||||
pickTaskList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
pickTaskId: '',
|
||||
configFormEntity: reactive({}),
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
configFormRef: ref(),
|
||||
rules: reactive({})
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -184,20 +138,20 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workStation: this.workStationQuery.trim(),
|
||||
smallBox: this.smallBoxQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getStationConfigs(request).then(res => {
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.stationConfigList = tableResponse.returnData.lists
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询工站配置错误' + err.message)
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
|
|
@ -207,48 +161,47 @@ export default {
|
|||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.workStationQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowConfig(row) {
|
||||
this.configId = row.configId
|
||||
this.configFormEntity = {
|
||||
configId: row.configId,
|
||||
workStation: row.workStation,
|
||||
smallBox: row.smallBox,
|
||||
model: row.model,
|
||||
workCenter: row.workCenter,
|
||||
bigBox: row.bigBox,
|
||||
vehicle: row.vehicle,
|
||||
vehicleLocation: row.vehicleLocation,
|
||||
startDateAdjust: row.startDateAdjust,
|
||||
lastUpdateTime: row.lastUpdateTime,
|
||||
lastUpdateUser: row.lastUpdateUser
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submitConfigInfo(formData) {
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
configId: formData.configId,
|
||||
workStation: formData.workStation,
|
||||
smallBox: formData.smallBox,
|
||||
model: formData.model,
|
||||
workCenter: formData.workCenter,
|
||||
bigBox: formData.bigBox,
|
||||
vehicle: formData.vehicle,
|
||||
vehicleLocation: formData.vehicleLocation,
|
||||
startDateAdjust: formData.startDateAdjust,
|
||||
lastUpdateTime: formData.lastUpdateTime,
|
||||
lastUpdateUser: formData.lastUpdateUser,
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateStationConfigs(params).then(res => {
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新工站配置成功。',
|
||||
message: '更新拣选任务成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -256,11 +209,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新工站配置失败。')
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.configId = row.configId
|
||||
this.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,50 +3,32 @@
|
|||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="workOrderQuery" style="width: 256px; margin-right: 10px;" placeholder="工单"
|
||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
|
||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="background-color: #00CED1; color: #000;"
|
||||
@click="openUploadDialog()">导入</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="ordersList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.orderId" v-model="orderId"> </el-radio>
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="item" label="Item" min-width="120px" />
|
||||
<el-table-column prop="description" label="描述" min-width="120px" />
|
||||
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
|
||||
<el-table-column prop="type" label="Type" min-width="120px" />
|
||||
<el-table-column prop="originStatus" label="Status" min-width="120px" />
|
||||
<el-table-column prop="sortString" label="SortStrng" min-width="120px" />
|
||||
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" />
|
||||
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
|
||||
<el-table-column prop="orderStatus" label="状态" min-width="120px" />
|
||||
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" />
|
||||
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" />
|
||||
<el-table-column prop="userName" label="操作人员" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="240px">
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
|
||||
<el-button plain type="danger" @click="deleteCurrentRowOrders(scope.row)">删除</el-button>
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -55,60 +37,33 @@
|
|||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="DBS信息" width="40%" draggable :show-close="false">
|
||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="ordersFormRef" :model="ordersFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="orderId">
|
||||
<el-input v-model="ordersFormEntity.orderId" disabled />
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单" prop="workOrder">
|
||||
<el-input v-model="ordersFormEntity.workOrder" disabled />
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小工位" prop="supplyArea">
|
||||
<el-input v-model="ordersFormEntity.supplyArea" disabled />
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="ordersFormEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求数量" prop="requirementQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.requirementQuantity"
|
||||
controls-position="right" :min="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="orderStatus">
|
||||
<el-input-number v-model.number="ordersFormEntity.orderStatus"
|
||||
controls-position="right" :min="0" :max="4" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="缺少数量" prop="lackQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.lackQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已拣数量" prop="pickedQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.pickedQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -117,79 +72,61 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitOrdersInfo(ordersFormEntity)">
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadDialogVisible" title="工单" width="40%" draggable :show-close="true">
|
||||
<fieldset class="title-area">
|
||||
<legend>上次更新</legend>
|
||||
<div style="padding: 5px;">
|
||||
<div style="display: flex; margin-bottom: 10px;">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 30%; align-content: center;">时间:</div>
|
||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
||||
</div>
|
||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
||||
<div style="width: 30%; align-content: center;">人员:</div>
|
||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="title-area">
|
||||
<legend>再次更新</legend>
|
||||
<UploadExcelOrders></UploadExcelOrders>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
|
||||
import { queryUploadRecord } from '@/api/excel.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'kateOrders',
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
ordersList: [],
|
||||
pickTaskList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
workOrderQuery: '',
|
||||
goodsIdQuery: '',
|
||||
smallBoxQuery: '',
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
orderId: '',
|
||||
ordersFormEntity: reactive({}),
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
ordersFormRef: ref(),
|
||||
rules: reactive({})
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -201,21 +138,20 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workOrder: this.workOrderQuery.trim(),
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
supplyArea: this.smallBoxQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getOrders(request).then(res => {
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.ordersList = tableResponse.returnData.lists
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询工单错误' + err.message)
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
|
|
@ -225,79 +161,47 @@ export default {
|
|||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.workOrderQuery = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
this.ordersFormEntity = {
|
||||
orderId: row.orderId,
|
||||
workOrder: row.workOrder,
|
||||
goodsId: row.goodsId,
|
||||
supplyArea: row.supplyArea,
|
||||
requirementQuantity: row.requirementQuantity,
|
||||
orderStatus: row.orderStatus,
|
||||
lackQuantity: row.lackQuantity,
|
||||
pickedQuantity: row.pickedQuantity
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
deleteCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
ElMessageBox.confirm(
|
||||
'该操作会删除选择的工单数据。\n是否继续',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
orderId: this.orderId,
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
deleteOrders(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '删除工单信息成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('删除工单信息成功')
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '操作取消',
|
||||
})
|
||||
})
|
||||
},
|
||||
submitOrdersInfo(formData) {
|
||||
const params = {
|
||||
orderId: formData.orderId,
|
||||
workOrder: formData.workOrder,
|
||||
goodsId: formData.goodsId,
|
||||
supplyArea: formData.supplyArea,
|
||||
requirementQuantity: formData.requirementQuantity,
|
||||
orderStatus: formData.orderStatus,
|
||||
lackQuantity: formData.lackQuantity,
|
||||
pickedQuantity: formData.pickedQuantity,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateOrders(params).then(res => {
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新工单成功。',
|
||||
message: '更新拣选任务成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -305,43 +209,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新工单失败。')
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.dbsId = row.dbsId
|
||||
},
|
||||
openUploadDialog() {
|
||||
// 请求上传记录
|
||||
const param = {
|
||||
userName: store.getters.getUserName,
|
||||
fileDescription: 'ORDERS',
|
||||
isAsc: false,
|
||||
sortBy: 'upload_time'
|
||||
}
|
||||
queryUploadRecord(param).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.returnData.total > 0) {
|
||||
this.uploadRecord = res.data.returnData.lists[0]
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('发生异常')
|
||||
})
|
||||
this.uploadDialogVisible = true
|
||||
this.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
<template>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料编号"
|
||||
<el-input v-model="goodsIdQuery" style="width: 196px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="vehicleIdQuery" style="width: 196px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="locationIdQuery" style="width: 196px; margin-right: 10px;" placeholder="库位"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
<el-button type="success" @click="exportExcel()">导出表格</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="success" @click="exportExcel()">导出</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table id="stock-table" :data="displayStocks" stripe border v-loading="loading" class="table-class"
|
||||
max-height="650px" highlight-current-row @row-click="getCurrentRow" :row-style="rowStyle"
|
||||
|
|
@ -144,8 +152,9 @@ export default {
|
|||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
queryKey: '',
|
||||
goodsIdQuery: '',
|
||||
vehicleIdQuery: '',
|
||||
locationIdQuery: '',
|
||||
loading: true,
|
||||
stockId: '',
|
||||
stockFormRef: ref(),
|
||||
|
|
@ -192,6 +201,14 @@ export default {
|
|||
value: 3,
|
||||
label: '移库中'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '拣选中'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '回库中'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '库存锁定'
|
||||
|
|
@ -259,6 +276,8 @@ export default {
|
|||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
locationId: this.locationIdQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getAllStocks(request).then(res => {
|
||||
|
|
@ -276,7 +295,9 @@ export default {
|
|||
this.loading = false
|
||||
},
|
||||
reset() {
|
||||
this.queryKey = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.vehicleIdQuery = ''
|
||||
this.locationIdQuery = ''
|
||||
this.search()
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
|
|
@ -285,7 +306,9 @@ export default {
|
|||
},
|
||||
exportExcel() {
|
||||
const params = {
|
||||
goodsId: this.goodsIdQuery.trim
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
locationId: this.locationIdQuery.trim(),
|
||||
}
|
||||
downloadStockExcel(params).then(res => {
|
||||
const link = document.createElement('a');//创建a标签
|
||||
|
|
@ -356,7 +379,7 @@ export default {
|
|||
}
|
||||
}).catch(err => {
|
||||
ElMessage({
|
||||
message: '更新料箱信息失败: ' + err,
|
||||
message: '更新库存失败: ' + err,
|
||||
type: 'error',
|
||||
showClose: true
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,50 +3,46 @@
|
|||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="workOrderQuery" style="width: 256px; margin-right: 10px;" placeholder="工单"
|
||||
<el-input v-model="workOrderQuery" style="width: 196px; margin-right: 10px;" placeholder="工单号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号"
|
||||
<el-input v-model="workCenterQuery" style="width: 196px; margin-right: 10px;" placeholder="工位/小盒子"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
|
||||
<el-input v-model="goodsIdQuery" style="width: 196px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="standIdQuery" style="width: 196px; margin-right: 10px;" placeholder="站台号"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="background-color: #00CED1; color: #000;"
|
||||
@click="openUploadDialog()">导入</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="ordersList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
<el-table :data="workFlowList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.orderId" v-model="orderId"> </el-radio>
|
||||
<el-radio :label="scope.row.workFlowId" v-model="workFlowId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="item" label="Item" min-width="120px" />
|
||||
<el-table-column prop="description" label="描述" min-width="120px" />
|
||||
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
|
||||
<el-table-column prop="type" label="Type" min-width="120px" />
|
||||
<el-table-column prop="originStatus" label="Status" min-width="120px" />
|
||||
<el-table-column prop="sortString" label="SortStrng" min-width="120px" />
|
||||
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" />
|
||||
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
|
||||
<el-table-column prop="orderStatus" label="状态" min-width="120px" />
|
||||
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" />
|
||||
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" />
|
||||
<el-table-column prop="userName" label="操作人员" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="240px">
|
||||
<el-table-column prop="workFlowId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="orderId" label="订单号" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workStation" label="站台号" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单号" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workCenter" label="工位/小盒子" show-overflow-tooltip min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="needNum" label="需求数量" min-width="120px" />
|
||||
<el-table-column prop="pickedNum" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="lightStatus" label="亮灯状态" :formatter="lightStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="workStatus" label="工作状态" :formatter="workStatusFormat"
|
||||
min-width="120px" />
|
||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="opUser" label="操作用户" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
|
||||
<el-button plain type="danger" @click="deleteCurrentRowOrders(scope.row)">删除</el-button>
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -55,60 +51,91 @@
|
|||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="DBS信息" width="40%" draggable :show-close="false">
|
||||
<el-dialog v-model="dialogVisible" title="工作流详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="ordersFormRef" :model="ordersFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="workFlowFormRef" :model="workFlowFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="orderId">
|
||||
<el-input v-model="ordersFormEntity.orderId" disabled />
|
||||
<el-form-item label="id" prop="workFlowId">
|
||||
<el-input v-model="workFlowFormEntity.workFlowId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input v-model="workFlowFormEntity.orderId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="站台号" prop="workStation">
|
||||
<el-input v-model="workFlowFormEntity.workStation" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单" prop="workOrder">
|
||||
<el-input v-model="ordersFormEntity.workOrder" disabled />
|
||||
<el-input v-model="workFlowFormEntity.workOrder" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小工位" prop="supplyArea">
|
||||
<el-input v-model="ordersFormEntity.supplyArea" disabled />
|
||||
<el-form-item label="工位/小盒子" prop="workCenter">
|
||||
<el-input v-model="workFlowFormEntity.workCenter" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="ordersFormEntity.goodsId" disabled />
|
||||
<el-input v-model="workFlowFormEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求数量" prop="requirementQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.requirementQuantity"
|
||||
controls-position="right" :min="0" clearable />
|
||||
<el-form-item label="需求数量" prop="needNum">
|
||||
<el-input-number v-model.number="workFlowFormEntity.needNum"
|
||||
controls-position="right" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="orderStatus">
|
||||
<el-input-number v-model.number="ordersFormEntity.orderStatus"
|
||||
controls-position="right" :min="0" :max="4" clearable />
|
||||
<el-form-item label="已拣数量" prop="pickedNum">
|
||||
<el-input-number v-model.number="workFlowFormEntity.pickedNum"
|
||||
controls-position="right" :min="0" :max="workFlowFormEntity.needNum" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="缺少数量" prop="lackQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.lackQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
<el-form-item label="任务状态" prop="lightStatus">
|
||||
<el-select-v2 v-model="workFlowFormEntity.lightStatus" placeholder="请选择亮灯状态"
|
||||
:options="lightStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已拣数量" prop="pickedQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.pickedQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
<el-form-item label="任务状态" prop="workStatus">
|
||||
<el-select-v2 v-model="workFlowFormEntity.workStatus" placeholder="请选择任务状态"
|
||||
:options="workStatusOptions"></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="createTime">
|
||||
<el-input v-model="workFlowFormEntity.createTime" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="完成时间" prop="finishTime">
|
||||
<el-input v-model="workFlowFormEntity.finishTime" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="操作用户" prop="opUser">
|
||||
<el-input v-model="workFlowFormEntity.opUser" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -117,79 +144,73 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitOrdersInfo(ordersFormEntity)">
|
||||
<el-button type="primary" @click="submitInfo(workFlowFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadDialogVisible" title="工单" width="40%" draggable :show-close="true">
|
||||
<fieldset class="title-area">
|
||||
<legend>上次更新</legend>
|
||||
<div style="padding: 5px;">
|
||||
<div style="display: flex; margin-bottom: 10px;">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 30%; align-content: center;">时间:</div>
|
||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
||||
</div>
|
||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
||||
<div style="width: 30%; align-content: center;">人员:</div>
|
||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="title-area">
|
||||
<legend>再次更新</legend>
|
||||
<UploadExcelOrders></UploadExcelOrders>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getWorkFlows, updateWorkFlows } from '@/api/kateWork.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
|
||||
import { queryUploadRecord } from '@/api/excel.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'kateOrders',
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
ordersList: [],
|
||||
workFlowList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
workOrderQuery: '',
|
||||
workCenterQuery: '',
|
||||
goodsIdQuery: '',
|
||||
smallBoxQuery: '',
|
||||
standIdQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
orderId: '',
|
||||
ordersFormEntity: reactive({}),
|
||||
workFlowId: '',
|
||||
workFlowFormEntity: reactive({}),
|
||||
workFlowFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
ordersFormRef: ref(),
|
||||
rules: reactive({})
|
||||
rules: reactive({}),
|
||||
lightStatusOptions: [
|
||||
{
|
||||
value: 0,
|
||||
label: '未亮灯'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已亮灯'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已拍灯'
|
||||
}
|
||||
],
|
||||
workStatusOptions: [
|
||||
{
|
||||
value: 0,
|
||||
label: '未开始'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '正在做'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已完成'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -201,21 +222,22 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workStation: this.standIdQuery.trim(),
|
||||
workOrder: this.workOrderQuery.trim(),
|
||||
workCenter: this.workCenterQuery.trim(),
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
supplyArea: this.smallBoxQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getOrders(request).then(res => {
|
||||
getWorkFlows(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.ordersList = tableResponse.returnData.lists
|
||||
this.workFlowList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询工单错误' + err.message)
|
||||
ElMessage.error('查询工作流错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
|
|
@ -225,79 +247,69 @@ export default {
|
|||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
lightStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case 0:
|
||||
return '未亮灯'
|
||||
case 1:
|
||||
return '已亮灯'
|
||||
case 2:
|
||||
return '已拍灯'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
workStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case 0:
|
||||
return '未开始'
|
||||
case 1:
|
||||
return '正在做'
|
||||
case 2:
|
||||
return '已完成'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.workOrderQuery = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.standIdQuery = '',
|
||||
this.workOrderQuery = '',
|
||||
this.workCenterQuery = '',
|
||||
this.goodsIdQuery = '',
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
this.ordersFormEntity = {
|
||||
editCurrentRow(row) {
|
||||
this.workFlowId = row.workFlowId
|
||||
this.workFlowFormEntity = {
|
||||
workFlowId: row.workFlowId,
|
||||
orderId: row.orderId,
|
||||
workStation: row.workStation,
|
||||
workOrder: row.workOrder,
|
||||
workCenter: row.workCenter,
|
||||
goodsId: row.goodsId,
|
||||
supplyArea: row.supplyArea,
|
||||
requirementQuantity: row.requirementQuantity,
|
||||
orderStatus: row.orderStatus,
|
||||
lackQuantity: row.lackQuantity,
|
||||
pickedQuantity: row.pickedQuantity
|
||||
pickedNum: row.pickedNum,
|
||||
needNum: row.needNum,
|
||||
lightStatus: row.lightStatus,
|
||||
workStatus: row.workStatus,
|
||||
createTime: row.createTime,
|
||||
finishTime: row.finishTime,
|
||||
opUser: row.opUser
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
deleteCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
ElMessageBox.confirm(
|
||||
'该操作会删除选择的工单数据。\n是否继续',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
orderId: this.orderId,
|
||||
workFlowId: formData.workFlowId,
|
||||
pickedNum: formData.pickedNum,
|
||||
lightStatus: formData.lightStatus,
|
||||
workStatus: formData.workStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
deleteOrders(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '删除工单信息成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('删除工单信息成功')
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '操作取消',
|
||||
})
|
||||
})
|
||||
},
|
||||
submitOrdersInfo(formData) {
|
||||
const params = {
|
||||
orderId: formData.orderId,
|
||||
workOrder: formData.workOrder,
|
||||
goodsId: formData.goodsId,
|
||||
supplyArea: formData.supplyArea,
|
||||
requirementQuantity: formData.requirementQuantity,
|
||||
orderStatus: formData.orderStatus,
|
||||
lackQuantity: formData.lackQuantity,
|
||||
pickedQuantity: formData.pickedQuantity,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateOrders(params).then(res => {
|
||||
updateWorkFlows(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新工单成功。',
|
||||
message: '更新工作流信息成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -305,43 +317,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新工单失败。')
|
||||
ElMessage.error('更新工作流信息失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.dbsId = row.dbsId
|
||||
},
|
||||
openUploadDialog() {
|
||||
// 请求上传记录
|
||||
const param = {
|
||||
userName: store.getters.getUserName,
|
||||
fileDescription: 'ORDERS',
|
||||
isAsc: false,
|
||||
sortBy: 'upload_time'
|
||||
}
|
||||
queryUploadRecord(param).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.returnData.total > 0) {
|
||||
this.uploadRecord = res.data.returnData.lists[0]
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('发生异常')
|
||||
})
|
||||
this.uploadDialogVisible = true
|
||||
this.workFlowId = row.workFlowId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,50 +3,32 @@
|
|||
<el-config-provider :locale="zhCn">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="workOrderQuery" style="width: 256px; margin-right: 10px;" placeholder="工单"
|
||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
|
||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="background-color: #00CED1; color: #000;"
|
||||
@click="openUploadDialog()">导入</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="ordersList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.orderId" v-model="orderId"> </el-radio>
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="item" label="Item" min-width="120px" />
|
||||
<el-table-column prop="description" label="描述" min-width="120px" />
|
||||
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
|
||||
<el-table-column prop="type" label="Type" min-width="120px" />
|
||||
<el-table-column prop="originStatus" label="Status" min-width="120px" />
|
||||
<el-table-column prop="sortString" label="SortStrng" min-width="120px" />
|
||||
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" />
|
||||
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
|
||||
<el-table-column prop="orderStatus" label="状态" min-width="120px" />
|
||||
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" />
|
||||
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" />
|
||||
<el-table-column prop="userName" label="操作人员" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="240px">
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
|
||||
<el-button plain type="danger" @click="deleteCurrentRowOrders(scope.row)">删除</el-button>
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -55,60 +37,33 @@
|
|||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||
@current-change="search" />
|
||||
<el-dialog v-model="dialogVisible" title="DBS信息" width="40%" draggable :show-close="false">
|
||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
||||
<div
|
||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="ordersFormRef" :model="ordersFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="orderId">
|
||||
<el-input v-model="ordersFormEntity.orderId" disabled />
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单" prop="workOrder">
|
||||
<el-input v-model="ordersFormEntity.workOrder" disabled />
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小工位" prop="supplyArea">
|
||||
<el-input v-model="ordersFormEntity.supplyArea" disabled />
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="ordersFormEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求数量" prop="requirementQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.requirementQuantity"
|
||||
controls-position="right" :min="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="orderStatus">
|
||||
<el-input-number v-model.number="ordersFormEntity.orderStatus"
|
||||
controls-position="right" :min="0" :max="4" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="缺少数量" prop="lackQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.lackQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已拣数量" prop="pickedQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.pickedQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -117,79 +72,61 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitOrdersInfo(ordersFormEntity)">
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadDialogVisible" title="工单" width="40%" draggable :show-close="true">
|
||||
<fieldset class="title-area">
|
||||
<legend>上次更新</legend>
|
||||
<div style="padding: 5px;">
|
||||
<div style="display: flex; margin-bottom: 10px;">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 30%; align-content: center;">时间:</div>
|
||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
||||
</div>
|
||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
||||
<div style="width: 30%; align-content: center;">人员:</div>
|
||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="title-area">
|
||||
<legend>再次更新</legend>
|
||||
<UploadExcelOrders></UploadExcelOrders>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import UploadExcelOrders from '@/excel/UploadExcelOrders.vue'
|
||||
import { queryUploadRecord } from '@/api/excel.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'kateOrders',
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
ordersList: [],
|
||||
pickTaskList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
workOrderQuery: '',
|
||||
goodsIdQuery: '',
|
||||
smallBoxQuery: '',
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
orderId: '',
|
||||
ordersFormEntity: reactive({}),
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
ordersFormRef: ref(),
|
||||
rules: reactive({})
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -201,21 +138,20 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workOrder: this.workOrderQuery.trim(),
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
supplyArea: this.smallBoxQuery.trim(),
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getOrders(request).then(res => {
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.ordersList = tableResponse.returnData.lists
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
ElMessage.error(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询工单错误' + err.message)
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
|
|
@ -225,79 +161,47 @@ export default {
|
|||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.workOrderQuery = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
this.ordersFormEntity = {
|
||||
orderId: row.orderId,
|
||||
workOrder: row.workOrder,
|
||||
goodsId: row.goodsId,
|
||||
supplyArea: row.supplyArea,
|
||||
requirementQuantity: row.requirementQuantity,
|
||||
orderStatus: row.orderStatus,
|
||||
lackQuantity: row.lackQuantity,
|
||||
pickedQuantity: row.pickedQuantity
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
deleteCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
ElMessageBox.confirm(
|
||||
'该操作会删除选择的工单数据。\n是否继续',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
orderId: this.orderId,
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
deleteOrders(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '删除工单信息成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('删除工单信息成功')
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '操作取消',
|
||||
})
|
||||
})
|
||||
},
|
||||
submitOrdersInfo(formData) {
|
||||
const params = {
|
||||
orderId: formData.orderId,
|
||||
workOrder: formData.workOrder,
|
||||
goodsId: formData.goodsId,
|
||||
supplyArea: formData.supplyArea,
|
||||
requirementQuantity: formData.requirementQuantity,
|
||||
orderStatus: formData.orderStatus,
|
||||
lackQuantity: formData.lackQuantity,
|
||||
pickedQuantity: formData.pickedQuantity,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateOrders(params).then(res => {
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新工单成功。',
|
||||
message: '更新拣选任务成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -305,43 +209,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新工单失败。')
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.dbsId = row.dbsId
|
||||
},
|
||||
openUploadDialog() {
|
||||
// 请求上传记录
|
||||
const param = {
|
||||
userName: store.getters.getUserName,
|
||||
fileDescription: 'ORDERS',
|
||||
isAsc: false,
|
||||
sortBy: 'upload_time'
|
||||
}
|
||||
queryUploadRecord(param).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.returnData.total > 0) {
|
||||
this.uploadRecord = res.data.returnData.lists[0]
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.uploadRecord = reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('发生异常')
|
||||
})
|
||||
this.uploadDialogVisible = true
|
||||
this.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user