2 changed files with 649 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// 获取IFS错误日志列表 - rqrq
|
|||
export const getIfsErrorLogList = data => createAPI('api/ifsCallErrorLog/list', 'POST', data) |
|||
|
|||
// 标记为已处理 - rqrq
|
|||
export const markErrorAsProcessed = data => createAPI('api/ifsCallErrorLog/markProcessed', 'POST', data) |
|||
|
|||
// 标记为已忽略 - rqrq
|
|||
export const markErrorAsIgnored = data => createAPI('api/ifsCallErrorLog/markIgnored', 'POST', data) |
|||
|
|||
// 获取用户授权站点列表 - rqrq
|
|||
export const getUserAuthorizedSites = data => createAPI('api/ifsCallErrorLog/getUserAuthorizedSites', 'POST', data) |
|||
@ -0,0 +1,636 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<!-- 查询表单 --> |
|||
<el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|||
|
|||
<el-form-item label="物料编号"> |
|||
<el-input v-model="queryData.partNo" style="width: 120px" placeholder="物料编号" clearable></el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="批次号"> |
|||
<el-input v-model="queryData.lotBatchNo" style="width: 120px" placeholder="批次号" clearable></el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="接口名称"> |
|||
<el-select v-model="queryData.interfaceName" placeholder="请选择" style="width: 150px" clearable> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="MoveInventoryPart" value="MoveInventoryPart"></el-option> |
|||
<el-option label="IssueInventoryPart" value="IssueInventoryPart"></el-option> |
|||
<el-option label="ReturnInventoryPart" value="ReturnInventoryPart"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="方法类型"> |
|||
<el-select v-model="queryData.methodType" placeholder="请选择" style="width: 120px" clearable> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="库存移库(栈板)" value="库存移库(栈板)"></el-option> |
|||
<el-option label="发料" value="发料"></el-option> |
|||
<el-option label="退料" value="退料"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="处理状态"> |
|||
<el-select v-model="queryData.processStatus" placeholder="请选择" style="width: 120px" clearable> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option |
|||
v-for="item in statusOptions" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="创建时间从"> |
|||
<el-date-picker |
|||
v-model="queryData.startDate" |
|||
type="date" |
|||
style="width: 120px" |
|||
placeholder="开始日期" |
|||
value-format="yyyy-MM-dd" |
|||
clearable> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="创建时间至"> |
|||
<el-date-picker |
|||
v-model="queryData.endDate" |
|||
type="date" |
|||
style="width: 120px" |
|||
placeholder="结束日期" |
|||
value-format="yyyy-MM-dd" |
|||
clearable> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label=" "> |
|||
<el-button type="primary" @click="getDataList()">查询</el-button> |
|||
<el-button @click="resetQuery()">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<!-- 数据表格 --> |
|||
<el-table |
|||
:data="dataList" |
|||
:height="height" |
|||
border |
|||
highlight-current-row |
|||
v-loading="dataListLoading" |
|||
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> |
|||
<span v-else>-</span> |
|||
</span> |
|||
<span v-else>{{ scope.row[item.columnProp] }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<!-- 分页 --> |
|||
<el-pagination |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[20, 50, 100, 1000]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
<!-- 详情弹窗 - rqrq --> |
|||
<el-dialog |
|||
title="IFS错误日志详情" |
|||
:visible.sync="detailVisible" |
|||
width="70%" |
|||
:close-on-click-modal="false" |
|||
v-drag> |
|||
|
|||
<el-form label-width="120px" style="padding: 10px;"> |
|||
<!-- 基本信息 - rqrq --> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<el-form-item label="站点:"> |
|||
<span>{{ currentRow.site }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="物料编号:"> |
|||
<span>{{ currentRow.partNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="批次号:"> |
|||
<span>{{ currentRow.lotBatchNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<el-form-item label="源库位:"> |
|||
<span>{{ currentRow.sourceLocation }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="目标库位:"> |
|||
<span>{{ currentRow.destLocation }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="数量:"> |
|||
<span>{{ currentRow.qty }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<el-form-item label="接口名称:"> |
|||
<span>{{ currentRow.interfaceName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="方法类型:"> |
|||
<span>{{ currentRow.methodType }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="创建时间:"> |
|||
<span>{{ currentRow.createdAt }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 错误信息 - rqrq --> |
|||
<el-form-item label="错误信息:"> |
|||
<el-input |
|||
type="textarea" |
|||
:rows="4" |
|||
v-model="currentRow.errorMessage" |
|||
readonly> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<!-- 请求数据 - rqrq --> |
|||
<el-form-item label="请求数据:"> |
|||
<el-input |
|||
type="textarea" |
|||
:rows="6" |
|||
v-model="currentRow.requestData" |
|||
readonly> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<!-- 响应数据 - rqrq --> |
|||
<el-form-item label="响应数据:"> |
|||
<el-input |
|||
type="textarea" |
|||
:rows="6" |
|||
v-model="currentRow.responseData" |
|||
readonly> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<!-- 处理备注 - rqrq --> |
|||
<el-form-item label="处理备注:"> |
|||
<el-input |
|||
type="textarea" |
|||
:rows="3" |
|||
v-model="processRemark" |
|||
placeholder="请输入处理说明(标记为已处理或已忽略时必填)"> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button |
|||
type="success" |
|||
@click="markAsProcessed" |
|||
:loading="markProcessedLoading" |
|||
:disabled="markProcessedLoading || markIgnoredLoading"> |
|||
{{ markProcessedLoading ? '处理中...' : '标记为已处理' }} |
|||
</el-button> |
|||
<el-button |
|||
type="warning" |
|||
@click="markAsIgnored" |
|||
:loading="markIgnoredLoading" |
|||
:disabled="markProcessedLoading || markIgnoredLoading"> |
|||
{{ markIgnoredLoading ? '处理中...' : '标记为已忽略' }} |
|||
</el-button> |
|||
<el-button @click="detailVisible = false" :disabled="markProcessedLoading || markIgnoredLoading"> |
|||
关闭 |
|||
</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getIfsErrorLogList, |
|||
markErrorAsProcessed, |
|||
markErrorAsIgnored, |
|||
getUserAuthorizedSites |
|||
} from '@/api/warehouse/ifsCallErrorLog.js' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
// 查询条件 - rqrq |
|||
queryData: { |
|||
site: '', |
|||
partNo: '', |
|||
lotBatchNo: '', |
|||
interfaceName: '', |
|||
methodType: '', |
|||
processStatus: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
page: 1, |
|||
limit: 20 |
|||
}, |
|||
// 表格高度 - rqrq |
|||
height: 450, |
|||
// 状态选项 - rqrq |
|||
statusOptions: [ |
|||
{ label: '待处理', value: 'PENDING' }, |
|||
{ label: '已处理', value: 'PROCESSED' }, |
|||
{ label: '已忽略', value: 'IGNORED' } |
|||
], |
|||
// 站点选项 - rqrq |
|||
siteOptions: [], |
|||
// 表格列配置 - rqrq |
|||
columnList: [ |
|||
{ |
|||
columnProp: "site", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "站点", |
|||
columnWidth: 60, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
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: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "destLocation", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "目标库位", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "qty", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "数量", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "interfaceName", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "接口名称", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "methodType", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "方法类型", |
|||
columnWidth: 130, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "processStatus", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "处理状态", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "retryCount", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "重试次数", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "errorMessage", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "错误信息", |
|||
columnWidth: 200, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "createdAt", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "创建时间", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "processedAt", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "处理时间", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "processedBy", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "处理人", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "remark", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "备注", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "operate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "操作", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "right" |
|||
} |
|||
], |
|||
// 数据列表 - rqrq |
|||
dataList: [], |
|||
// 分页参数 - rqrq |
|||
pageIndex: 1, |
|||
pageSize: 20, |
|||
totalPage: 0, |
|||
dataListLoading: false, |
|||
// 详情弹窗 - rqrq |
|||
detailVisible: false, |
|||
currentRow: {}, |
|||
processRemark: '', |
|||
markProcessedLoading: false, |
|||
markIgnoredLoading: false |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
// 计算表格高度 - rqrq |
|||
this.height = window.innerHeight - 220; |
|||
}) |
|||
}, |
|||
activated() { |
|||
this.getDataList() |
|||
this.getSiteOptions() |
|||
}, |
|||
methods: { |
|||
// 获取数据列表 - rqrq |
|||
getDataList() { |
|||
this.dataListLoading = true |
|||
this.queryData.page = this.pageIndex |
|||
this.queryData.limit = this.pageSize |
|||
|
|||
getIfsErrorLogList(this.queryData).then(({data}) => { |
|||
this.dataListLoading = false |
|||
if (data && data.code === 0) { |
|||
this.dataList = data.page.list || [] |
|||
this.totalPage = data.page.totalCount || 0 |
|||
} else { |
|||
this.dataList = [] |
|||
this.totalPage = 0 |
|||
this.$message.error(data.msg || '查询失败') |
|||
} |
|||
}).catch(error => { |
|||
this.dataListLoading = false |
|||
console.error('查询IFS错误日志失败:', error) |
|||
this.$message.error('查询失败') |
|||
}) |
|||
}, |
|||
|
|||
// 获取站点选项 - rqrq |
|||
getSiteOptions() { |
|||
const params = { |
|||
userName: this.$store.state.user.name |
|||
} |
|||
getUserAuthorizedSites(params).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.siteOptions = data.data || [] |
|||
} |
|||
}).catch(error => { |
|||
console.error('获取站点列表失败:', error) |
|||
}) |
|||
}, |
|||
|
|||
// 重置查询条件 - rqrq |
|||
resetQuery() { |
|||
this.queryData = { |
|||
site: '', |
|||
partNo: '', |
|||
lotBatchNo: '', |
|||
interfaceName: '', |
|||
methodType: '', |
|||
processStatus: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
page: 1, |
|||
limit: 20 |
|||
} |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 每页数量变化 - rqrq |
|||
sizeChangeHandle(val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 当前页变化 - rqrq |
|||
currentChangeHandle(val) { |
|||
this.pageIndex = val |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 获取状态标签类型 - rqrq |
|||
getStatusType(status) { |
|||
const statusMap = { |
|||
'PENDING': 'warning', |
|||
'PROCESSED': 'success', |
|||
'IGNORED': 'info' |
|||
} |
|||
return statusMap[status] || 'info' |
|||
}, |
|||
|
|||
// 获取状态标签文本 - rqrq |
|||
getStatusLabel(status) { |
|||
const statusMap = { |
|||
'PENDING': '待处理', |
|||
'PROCESSED': '已处理', |
|||
'IGNORED': '已忽略' |
|||
} |
|||
return statusMap[status] || status |
|||
}, |
|||
|
|||
// 显示详情弹窗 - rqrq |
|||
showDetailDialog(row) { |
|||
this.currentRow = { ...row } |
|||
this.processRemark = '' |
|||
this.detailVisible = true |
|||
}, |
|||
|
|||
// 标记为已处理 - rqrq |
|||
markAsProcessed() { |
|||
if (!this.processRemark || this.processRemark.trim() === '') { |
|||
this.$message.warning('请填写处理备注') |
|||
return |
|||
} |
|||
|
|||
this.markProcessedLoading = true |
|||
const params = { |
|||
id: this.currentRow.id, |
|||
remark: this.processRemark |
|||
} |
|||
|
|||
markErrorAsProcessed(params).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success('标记成功') |
|||
this.detailVisible = false |
|||
this.getDataList() |
|||
} else { |
|||
this.$message.error(data.msg || '操作失败') |
|||
} |
|||
}).catch(error => { |
|||
console.error('标记失败:', error) |
|||
this.$message.error('操作失败') |
|||
}).finally(() => { |
|||
this.markProcessedLoading = false |
|||
}) |
|||
}, |
|||
|
|||
// 标记为已忽略 - rqrq |
|||
markAsIgnored() { |
|||
if (!this.processRemark || this.processRemark.trim() === '') { |
|||
this.$message.warning('请填写忽略原因') |
|||
return |
|||
} |
|||
|
|||
this.markIgnoredLoading = true |
|||
const params = { |
|||
id: this.currentRow.id, |
|||
remark: this.processRemark |
|||
} |
|||
|
|||
markErrorAsIgnored(params).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success('标记成功') |
|||
this.detailVisible = false |
|||
this.getDataList() |
|||
} else { |
|||
this.$message.error(data.msg || '操作失败') |
|||
} |
|||
}).catch(error => { |
|||
console.error('标记失败:', error) |
|||
this.$message.error('操作失败') |
|||
}).finally(() => { |
|||
this.markIgnoredLoading = false |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/* 表格样式优化 - rqrq */ |
|||
.mod-config { |
|||
padding: 10px; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue