1
This commit is contained in:
@@ -44,6 +44,11 @@ export function listGoofishOrderEventLogs(orderId) {
|
||||
return request({ url: '/jarvis/erpGoofishOrder/' + orderId + '/eventLogs', method: 'get' })
|
||||
}
|
||||
|
||||
/** 变更日志全表分页(排查:与 [goofish-order-event] 落库同源) */
|
||||
export function listGoofishOrderEventLogPage(query) {
|
||||
return request({ url: '/jarvis/erpGoofishOrder/eventLog/list', method: 'get', params: query })
|
||||
}
|
||||
|
||||
export function pullGoofishOrders(appKey, hours) {
|
||||
return request({
|
||||
url: '/jarvis/erpGoofishOrder/pull/' + encodeURIComponent(appKey),
|
||||
|
||||
175
src/views/system/goofish/erpGoofishEventLog/index.vue
Normal file
175
src/views/system/goofish/erpGoofishEventLog/index.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<p class="tip-line">
|
||||
与后台 <code>[goofish-order-event]</code> INFO、表 <code>erp_goofish_order_event_log</code> 一致;可按订单号/来源/说明关键词跨单排查。
|
||||
来源 <code>JD_LOGISTICS_PUSH</code>:京东物流扫描服务(写 Redis、企微货主推送)触发闲鱼同步前的轨迹;可与 <code>REDIS_WAYBILL</code>(写入本地运单)、<code>AUTO_SHIP</code> 连起来看。
|
||||
</p>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="96px">
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input v-model="queryParams.orderNo" placeholder="模糊" clearable style="width: 168px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="orderId" prop="orderId">
|
||||
<el-input v-model="queryParams.orderId" placeholder="erp_goofish_order.id" clearable style="width: 130px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="AppKey" prop="appKey">
|
||||
<el-input v-model="queryParams.appKey" placeholder="精确" clearable style="width: 140px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="事件类型" prop="eventType">
|
||||
<el-select v-model="queryParams.eventType" placeholder="全部" clearable style="width: 140px">
|
||||
<el-option label="ORDER_SYNC" value="ORDER_SYNC" />
|
||||
<el-option label="LOGISTICS_SYNC" value="LOGISTICS_SYNC" />
|
||||
<el-option label="SHIP" value="SHIP" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-input v-model="queryParams.source" placeholder="JD_LOGISTICS_PUSH、REDIS…" clearable style="width: 148px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="说明关键字" prop="messageKeyword">
|
||||
<el-input v-model="queryParams.messageKeyword" placeholder="模糊匹配 message" clearable style="width: 180px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始"
|
||||
end-placeholder="结束"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" border size="small">
|
||||
<el-table-column label="ID" prop="id" width="72" />
|
||||
<el-table-column label="时间" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="eventType" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="eventLogTagType(scope.row.eventType)" size="mini">{{ scope.row.eventType }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="orderId" prop="orderId" width="88" />
|
||||
<el-table-column label="订单号" prop="orderNo" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="AppKey" prop="appKey" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="来源" prop="source" width="120" show-overflow-tooltip />
|
||||
<el-table-column label="说明" prop="message" min-width="260" show-overflow-tooltip />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listGoofishOrderEventLogPage } from '@/api/jarvis/goofish'
|
||||
|
||||
export default {
|
||||
name: 'ErpGoofishEventLog',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
list: [],
|
||||
dateRange: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
orderId: undefined,
|
||||
orderNo: undefined,
|
||||
appKey: undefined,
|
||||
eventType: undefined,
|
||||
source: undefined,
|
||||
messageKeyword: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const q = this.$route.query || {}
|
||||
if (q.orderNo) {
|
||||
this.queryParams.orderNo = q.orderNo
|
||||
}
|
||||
if (q.orderId) {
|
||||
this.queryParams.orderId = q.orderId
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
eventLogTagType(t) {
|
||||
if (t === 'ORDER_SYNC') return ''
|
||||
if (t === 'LOGISTICS_SYNC') return 'warning'
|
||||
if (t === 'SHIP') return 'success'
|
||||
return 'info'
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
const q = { ...this.queryParams, params: {} }
|
||||
if (this.queryParams.orderId !== undefined && this.queryParams.orderId !== null && this.queryParams.orderId !== '') {
|
||||
const n = parseInt(String(this.queryParams.orderId).trim(), 10)
|
||||
q.orderId = Number.isFinite(n) ? n : undefined
|
||||
} else {
|
||||
q.orderId = undefined
|
||||
}
|
||||
if (this.dateRange && this.dateRange.length === 2) {
|
||||
q.params = { beginTime: this.dateRange[0], endTime: this.dateRange[1] }
|
||||
}
|
||||
listGoofishOrderEventLogPage(q).then(res => {
|
||||
this.list = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.dateRange = []
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
orderId: undefined,
|
||||
orderNo: undefined,
|
||||
appKey: undefined,
|
||||
eventType: undefined,
|
||||
source: undefined,
|
||||
messageKeyword: undefined
|
||||
}
|
||||
this.resetForm('queryForm')
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tip-line {
|
||||
margin: 0 0 12px 0;
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.tip-line code {
|
||||
background: #f4f4f5;
|
||||
padding: 1px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
@@ -27,6 +27,14 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-document"
|
||||
size="mini"
|
||||
@click="openEventLogTroubleshoot"
|
||||
v-hasPermi="['jarvis:erpGoofishOrder:list']"
|
||||
>变更日志排查</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -216,6 +224,7 @@
|
||||
<pre class="json-pre">{{ pretty(jsonRow.lastNotifyJson) }}</pre>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="变更日志" name="events">
|
||||
<p class="event-log-hint">含状态/平台物流摘要、<b>JD_LOGISTICS_PUSH</b>(京东物流扫描→Redis/企微→触达闲鱼)、<b>REDIS_WAYBILL</b>、<b>AUTO_SHIP</b> 等。</p>
|
||||
<el-table v-loading="eventLogsLoading" :data="eventLogs" size="small" max-height="440" empty-text="暂无记录">
|
||||
<el-table-column label="时间" prop="createTime" width="168" />
|
||||
<el-table-column label="类型" prop="eventType" width="118" align="center">
|
||||
@@ -552,6 +561,18 @@ export default {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
/** 打开「变更日志」排查页:与当前菜单同级路径 erpGoofishEventLog(需在菜单管理配置) */
|
||||
openEventLogTroubleshoot() {
|
||||
const p = this.$route.path || ''
|
||||
const i = p.lastIndexOf('/')
|
||||
const prefix = i > 0 ? p.substring(0, i) : p
|
||||
const target = prefix + '/erpGoofishEventLog'
|
||||
const q = {}
|
||||
if (this.queryParams.orderNo) {
|
||||
q.orderNo = this.queryParams.orderNo
|
||||
}
|
||||
this.$tab.openPage('闲鱼订单变更日志', target, q)
|
||||
},
|
||||
openJson(row) {
|
||||
this.jsonRow = { ...row }
|
||||
this.jsonTab = 'sum'
|
||||
@@ -563,6 +584,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.event-log-hint {
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.json-pre {
|
||||
max-height: 480px;
|
||||
overflow: auto;
|
||||
|
||||
Reference in New Issue
Block a user