Browse Source

更新

master
常熟吴彦祖 1 month ago
parent
commit
ebd391a0f0
  1. 3
      src/api/haianWarehouse/orderTask.js
  2. 107
      src/views/modules/haianWarehouse/automatedWarehouse/orderTaskQuery54.vue

3
src/api/haianWarehouse/orderTask.js

@ -6,6 +6,9 @@ export const haiAnSearchOrderTaskList = data => createAPI('/autoWareHourceHaian/
// 海安订单任务查询:主任务明细页签 - rqrq
export const haiAnSearchOrderTaskDetailList = data => createAPI('/autoWareHourceHaian/haiAnOrderTask/searchOrderTaskDetailList', 'post', data)
// 海安订单任务查询:按site和任务号精确读取栈板对接回调,后端按创建时间正序返回 - rqrq
export const haiAnSearchWcsCallbackTaskList = data => createAPI('/autoWareHourceHaian/haiAnOrderTask/searchWcsCallbackTaskList', 'post', data)
// 海安订单任务查询:关联运输任务页签 - rqrq
export const haiAnSearchTransportTaskList = data => createAPI('/autoWareHourceHaian/haiAnOrderTask/searchTransportTaskList', 'post', data)

107
src/views/modules/haianWarehouse/automatedWarehouse/orderTaskQuery54.vue

@ -148,6 +148,26 @@
</el-table-column>
</el-table>
</el-tab-pane>
<!-- 栈板对接明细与WCS回调查询页使用同一主表,按选中任务号展示时间正序轨迹。- rqrq -->
<el-tab-pane label="栈板对接明细" name="wcsCallback">
<el-table
:data="wcsCallbackList"
:height="height"
border
v-loading="wcsCallbackLoading"
style="width: 100%;">
<el-table-column
v-for="(item, index) in columnList5" :key="index"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:min-width="item.columnWidth"
:label="item.columnLabel">
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<!-- 运输任务明细弹窗 - rqrq -->
@ -189,13 +209,14 @@
import {
haiAnSearchOrderTaskList,
haiAnSearchOrderTaskDetailList,
haiAnSearchWcsCallbackTaskList,
haiAnSearchTransportTaskList,
haiAnSearchTransportTaskDetailList
} from '@/api/haianWarehouse/orderTask.js'
export default {
name: 'orderTaskQuery54',
data() {
data () {
const defaultSite = this.$store.state.user.site
return {
// 主表导出文件名、字段和防重复状态,按页面筛选条件拉取数据 - rqrq
@ -210,6 +231,9 @@ export default {
dataList: [],
dataList2: [],
dataList3: [],
wcsCallbackList: [],
wcsCallbackLoading: false,
wcsCallbackRequestId: 0,
transportDetailList: [],
dataListLoading: false,
detailLoading: false,
@ -285,10 +309,28 @@ export default {
{ columnProp: 'startTime', headerAlign: 'center', align: 'center', columnLabel: '开始时间', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 140, showOverflowTooltip: true },
{ columnProp: 'completeTime', headerAlign: 'center', align: 'center', columnLabel: '完成时间', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 140, showOverflowTooltip: true },
{ columnProp: 'errorMsg', headerAlign: 'center', align: 'left', columnLabel: '错误信息', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 200, showOverflowTooltip: true }
],
// 与WCS回调查询主表保持相同字段;任务页只负责展示当前任务轨迹。- rqrq
columnList5: [
{ columnProp: 'site', headerAlign: 'center', align: 'center', columnLabel: '工厂编码', columnWidth: 80, showOverflowTooltip: false },
{ columnProp: 'palletId', headerAlign: 'center', align: 'center', columnLabel: '栈板ID', columnWidth: 120, showOverflowTooltip: false },
{ columnProp: 'taskNo', headerAlign: 'center', align: 'center', columnLabel: '任务号', columnWidth: 150, showOverflowTooltip: false },
{ columnProp: 'itemNo', headerAlign: 'center', align: 'center', columnLabel: '明细行号', columnWidth: 80, showOverflowTooltip: false },
{ columnProp: 'transTypeDesc', headerAlign: 'center', align: 'center', columnLabel: '事务类型', columnWidth: 140, showOverflowTooltip: false },
{ columnProp: 'toWarehouseId', headerAlign: 'center', align: 'center', columnLabel: '目标仓库', columnWidth: 100, showOverflowTooltip: false },
{ columnProp: 'toLocationId', headerAlign: 'center', align: 'center', columnLabel: '目标库位', columnWidth: 120, showOverflowTooltip: false },
{ columnProp: 'toStation', headerAlign: 'center', align: 'center', columnLabel: '目标站点', columnWidth: 100, showOverflowTooltip: false },
{ columnProp: 'status', headerAlign: 'center', align: 'center', columnLabel: '处理状态', columnWidth: 100, showOverflowTooltip: false },
{ columnProp: 'retryCount', headerAlign: 'center', align: 'center', columnLabel: '重试次数', columnWidth: 80, showOverflowTooltip: false },
{ columnProp: 'createdTime', headerAlign: 'center', align: 'center', columnLabel: '创建时间', columnWidth: 150, showOverflowTooltip: false },
{ columnProp: 'processStartTime', headerAlign: 'center', align: 'center', columnLabel: '处理开始时间', columnWidth: 150, showOverflowTooltip: false },
{ columnProp: 'processEndTime', headerAlign: 'center', align: 'center', columnLabel: '处理完成时间', columnWidth: 150, showOverflowTooltip: false },
{ columnProp: 'errorMsg', headerAlign: 'center', align: 'left', columnLabel: '错误信息', columnWidth: 200, showOverflowTooltip: true },
{ columnProp: 'remark', headerAlign: 'center', align: 'left', columnLabel: '备注', columnWidth: 150, showOverflowTooltip: true }
]
}
},
mounted() {
mounted () {
this.$nextTick(() => {
this.height = (window.innerHeight - 260) / 2
})
@ -330,27 +372,30 @@ export default {
})
return result
},
sizeChangeHandle(val) {
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.searchTable()
},
currentChangeHandle(val) {
currentChangeHandle (val) {
this.pageIndex = val
this.searchTable()
},
tabClick() {
tabClick () {
this.refreshCurrentTabTable()
},
// 主表行选中联动页签刷新 - rqrq
changeData(row) {
changeData (row) {
this.currentRow = JSON.parse(JSON.stringify(row))
// 切换主任务时先清空旧回调,避免异步返回期间展示上一任务的栈板轨迹。- rqrq
this.wcsCallbackRequestId += 1
this.wcsCallbackList = []
this.refreshCurrentTabTable()
},
// 刷新当前选中页签数据 - rqrq
refreshCurrentTabTable() {
refreshCurrentTabTable () {
if (this.currentRow === '' || this.currentRow === null) {
this.currentRow = { site: this.searchData.site, taskNo: '', itemNo: '' }
}
@ -380,11 +425,52 @@ export default {
this.dataListLoading = false
this.dataList3 = []
})
} else if (this.activeName === 'wcsCallback') {
this.loadWcsCallbackTasks()
}
},
// 按选中任务的site和任务号精确读取WCS回调主表,失败清空列表并阻止旧请求覆盖新选择。- rqrq
async loadWcsCallbackTasks () {
const taskNo = this.currentRow && this.currentRow.taskNo
const requestId = ++this.wcsCallbackRequestId
this.wcsCallbackList = []
if (!taskNo) {
this.wcsCallbackLoading = false
return
}
this.wcsCallbackLoading = true
try {
// site显式取当前登录工厂,taskNo取选中的WOT;接口按创建时间和ID正序返回。- rqrq
const { data } = await haiAnSearchWcsCallbackTaskList({
site: this.$store.state.user.site,
taskNo
})
if (requestId !== this.wcsCallbackRequestId) return
if (data && data.code === 0) {
this.wcsCallbackList = data.rows || []
} else {
this.$alert((data && data.msg) || '查询栈板对接明细失败', '错误')
}
} catch (error) {
if (requestId === this.wcsCallbackRequestId) {
this.$message.error('查询栈板对接明细失败,请稍后重试')
}
} finally {
if (requestId === this.wcsCallbackRequestId) {
this.wcsCallbackLoading = false
}
}
},
// 查询主表 - rqrq
searchTable() {
searchTable () {
// 重查主表前作废旧任务的回调请求,避免切页时短暂展示上一任务数据。- rqrq
this.wcsCallbackRequestId += 1
this.wcsCallbackList = []
this.wcsCallbackLoading = false
this.currentRow = null
this.searchData.site = this.$store.state.user.site
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.dataListLoading = true
@ -401,22 +487,25 @@ export default {
} else {
this.dataList2 = []
this.dataList3 = []
this.wcsCallbackList = []
}
} else {
this.dataList = []
this.dataList2 = []
this.dataList3 = []
this.wcsCallbackList = []
}
}).catch(() => {
this.dataListLoading = false
this.dataList = []
this.dataList2 = []
this.dataList3 = []
this.wcsCallbackList = []
})
},
// 查看运输明细 - rqrq
viewTransportDetail(row) {
viewTransportDetail (row) {
this.detailDialogVisible = true
this.detailLoading = true
this.transportDetailList = []

Loading…
Cancel
Save