Browse Source
feat(board): 添加IFS移库失败看板功能
feat(board): 添加IFS移库失败看板功能
- 新增ifsCallErrorLogBoard API接口用于获取看板数据 - 创建ifsTransferErrorBoard.vue组件实现看板展示功能 - 配置路由映射到新的看板页面 - 实现表格数据显示、自动刷新等功能 - 添加重试操作按钮支持手动重试处理 - 设置定时刷新机制每30秒更新一次数据master
3 changed files with 226 additions and 2 deletions
-
3src/api/warehouse/ifsCallErrorLog.js
-
3src/router/index.js
-
220src/views/modules/board/ifsTransferErrorBoard.vue
@ -0,0 +1,220 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<div style="text-align: center"> |
|||
<h1>IFS移库失败看板</h1> |
|||
</div> |
|||
<div class="board2"> |
|||
<!-- @mouseenter.native="mouseEnter"--> |
|||
<!-- @mouseleave.native="mouseLeave"--> |
|||
<el-table |
|||
:height="height" |
|||
:data="tableData" |
|||
ref="wt_table" |
|||
border |
|||
:row-class-name="tableRowClassName" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="item.columnProp === 'processStatus'"> |
|||
<el-tag |
|||
:type="getStatusType(scope.row.processStatus)" |
|||
size="small"> |
|||
{{ getStatusLabel(scope.row.processStatus) }} |
|||
</el-tag> |
|||
</span> |
|||
<span v-else-if="item.columnProp === 'operate'"> |
|||
<el-button |
|||
v-if="scope.row.processStatus === 'PENDING'" |
|||
type="text" |
|||
size="small" |
|||
@click="showDetailDialog(scope.row)"> |
|||
查看详情 |
|||
</el-button> |
|||
<!-- rqrq - 使用全局重试状态控制按钮 --> |
|||
<el-button |
|||
v-if="scope.row.processStatus === 'PENDING'" |
|||
type="text" |
|||
size="small" |
|||
style="color: #E6A23C;" |
|||
:loading="retryingRowId === scope.row.id" |
|||
:disabled="retryingRowId !== null" |
|||
@click="handleRetry(scope.row)"> |
|||
{{ retryingRowId === scope.row.id ? '重试中...' : '重试' }} |
|||
</el-button> |
|||
<span v-else>-</span> |
|||
</span> |
|||
<span v-else>{{ scope.row[item.columnProp] }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
let rollstop = '' |
|||
let rolltimer = ''// 自动滚动的定时任务 |
|||
let refresher = '' //数据刷新定时器 |
|||
import { |
|||
ifsCallErrorLogBoard |
|||
} from '@/api/warehouse/ifsCallErrorLog.js' |
|||
export default { |
|||
name: 'soLiuhuaBoard', |
|||
data () { |
|||
return { |
|||
pageIndex: 1, |
|||
totalPage: 1, |
|||
height: 200, |
|||
tableData: [], |
|||
// 默认的刷新,滚动时间,滚动间距 |
|||
// refreshTime: 5, |
|||
// rollTime: 5, |
|||
// rollPx: 1, |
|||
columnList: [ |
|||
|
|||
{ |
|||
columnProp: "partNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "物料编号", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "lotBatchNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "批次号", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "sourceLocation", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "源库位", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "destLocation", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "目标库位", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "qty", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "数量", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
|
|||
{ |
|||
columnProp: "serialNos", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "标签", |
|||
columnWidth: 260, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "createdAt", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "创建时间", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
|
|||
|
|||
], |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 80 |
|||
}) |
|||
// this.autoRoll() |
|||
}, |
|||
methods: { |
|||
tableRowClassName ({row, rowIndex}) { |
|||
|
|||
return '' |
|||
|
|||
|
|||
}, |
|||
search () { |
|||
let inData= {number:this.pageIndex}; |
|||
ifsCallErrorLogBoard(inData).then(({data}) => { |
|||
this.tableData = data.rows; |
|||
this.totalPage= data.maxPage; |
|||
if(this.pageIndex+1>data.maxPage){ |
|||
this.pageIndex=1 |
|||
}else { |
|||
this.pageIndex=this.pageIndex+1 |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
refreshTable () { |
|||
refresher = setInterval(() => { |
|||
this.search() |
|||
}, 30000) |
|||
} |
|||
}, |
|||
created () { |
|||
this.search() |
|||
this.refreshTable() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style > |
|||
|
|||
|
|||
.board2 .el-table .cell { |
|||
line-height: 13px; |
|||
font-size: 12px; |
|||
height: 13px; |
|||
padding: 0px; |
|||
} |
|||
|
|||
.board2 .el-table .success-row { |
|||
background: #1bb61b; |
|||
} |
|||
.board2 .el-table .false-row { |
|||
/*background: #cbcb14;*/ |
|||
background: #db1212; |
|||
} |
|||
.board2 .el-table .yellow-row{ |
|||
background: #ffff00; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue