1
This commit is contained in:
@@ -38,3 +38,20 @@ export function drainShareLinkPendingQueueOnce() {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 取消扫描:状态改为 CANCELLED,不再对账入队;队列弹出时跳过 */
|
||||||
|
export function cancelWecomShareLinkJob(data) {
|
||||||
|
return request({
|
||||||
|
url: '/jarvis/wecom/shareLinkLogisticsJob/cancel',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除任务行(Redis 中残留同 jobKey 项弹出时会因无库行而跳过) */
|
||||||
|
export function removeWecomShareLinkJob(jobKey) {
|
||||||
|
return request({
|
||||||
|
url: '/jarvis/wecom/shareLinkLogisticsJob/' + encodeURIComponent(jobKey),
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<el-option label="已推送" value="PUSHED" />
|
<el-option label="已推送" value="PUSHED" />
|
||||||
<el-option label="已放弃" value="ABANDONED" />
|
<el-option label="已放弃" value="ABANDONED" />
|
||||||
<el-option label="历史补录" value="IMPORTED" />
|
<el-option label="历史补录" value="IMPORTED" />
|
||||||
|
<el-option label="已取消" value="CANCELLED" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="短链" prop="trackingUrl">
|
<el-form-item label="短链" prop="trackingUrl">
|
||||||
@@ -40,7 +41,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-alert
|
<el-alert
|
||||||
title="用于排查企微 3.cn 分享链物流:WAITING + no_waybill_yet 未出单;push_failed 推送未成功;ABANDONED 为当轮队列重试用尽,定时对账(一月内)会归零次数并重新入队;IMPORTED 为从「企微消息跟踪」补录留痕,不表示实时推送结果。"
|
title="用于排查企微 3.cn 分享链物流:WAITING + no_waybill_yet 未出单;push_failed 推送未成功;ABANDONED 为当轮队列重试用尽,定时对账(一月内)会归零次数并重新入队;IMPORTED 为从「企微消息跟踪」补录留痕;CANCELLED 为已取消扫描(订单取消等),不再对账入队,队列弹出也会跳过。"
|
||||||
type="info"
|
type="info"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
show-icon
|
show-icon
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
<el-tag v-else-if="scope.row.status === 'WAITING'" type="warning" size="small">{{ scope.row.status }}</el-tag>
|
<el-tag v-else-if="scope.row.status === 'WAITING'" type="warning" size="small">{{ scope.row.status }}</el-tag>
|
||||||
<el-tag v-else-if="scope.row.status === 'ABANDONED'" type="danger" size="small">{{ scope.row.status }}</el-tag>
|
<el-tag v-else-if="scope.row.status === 'ABANDONED'" type="danger" size="small">{{ scope.row.status }}</el-tag>
|
||||||
<el-tag v-else-if="scope.row.status === 'IMPORTED'" type="info" size="small">{{ scope.row.status }}</el-tag>
|
<el-tag v-else-if="scope.row.status === 'IMPORTED'" type="info" size="small">{{ scope.row.status }}</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.status === 'CANCELLED'" type="info" size="small">{{ scope.row.status }}</el-tag>
|
||||||
<el-tag v-else type="info" size="small">{{ scope.row.status || '—' }}</el-tag>
|
<el-tag v-else type="info" size="small">{{ scope.row.status || '—' }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -95,10 +97,18 @@
|
|||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="168" align="center" fixed="right">
|
<el-table-column label="操作" width="248" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" icon="el-icon-view" @click="openDetail(scope.row)">详情</el-button>
|
<el-button type="text" size="mini" icon="el-icon-view" @click="openDetail(scope.row)">详情</el-button>
|
||||||
<el-button type="text" size="mini" icon="el-icon-truck" @click="handleFetchShareLink(scope.row)">获取物流</el-button>
|
<el-button type="text" size="mini" icon="el-icon-truck" @click="handleFetchShareLink(scope.row)">获取物流</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.status !== 'PUSHED' && scope.row.status !== 'CANCELLED'"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-circle-close"
|
||||||
|
@click="handleCancelJob(scope.row)"
|
||||||
|
>取消扫描</el-button>
|
||||||
|
<el-button type="text" size="mini" icon="el-icon-delete" @click="handleRemoveJob(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -179,7 +189,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listWecomShareLinkLogisticsJob, getWecomShareLinkLogisticsJob, backfillShareLinkLogisticsFromTrace, fetchShareLinkManually, drainShareLinkPendingQueueOnce } from '@/api/jarvis/wecomShareLinkLogistics'
|
import { listWecomShareLinkLogisticsJob, getWecomShareLinkLogisticsJob, backfillShareLinkLogisticsFromTrace, fetchShareLinkManually, drainShareLinkPendingQueueOnce, cancelWecomShareLinkJob, removeWecomShareLinkJob } from '@/api/jarvis/wecomShareLinkLogistics'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WecomShareLinkLogistics',
|
name: 'WecomShareLinkLogistics',
|
||||||
@@ -322,6 +332,19 @@ export default {
|
|||||||
this.$modal.msgSuccess(parts.join(','))
|
this.$modal.msgSuccess(parts.join(','))
|
||||||
this.getList()
|
this.getList()
|
||||||
}).catch(() => {}).finally(() => { this.backfillLoading = false })
|
}).catch(() => {}).finally(() => { this.backfillLoading = false })
|
||||||
|
},
|
||||||
|
handleCancelJob(row) {
|
||||||
|
const tip = '取消后该 3.cn 任务不再自动扫描/对账入队;若 Redis 队列里还有同一 jobKey,弹出时也会跳过。订单取消可选此操作。是否继续?'
|
||||||
|
this.$modal.confirm(tip).then(() => cancelWecomShareLinkJob({ jobKey: row.jobKey, lastNote: 'order_cancel' })).then(() => {
|
||||||
|
this.$modal.msgSuccess('已取消扫描')
|
||||||
|
this.getList()
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
handleRemoveJob(row) {
|
||||||
|
this.$modal.confirm('将永久删除该任务行(jobKey=' + row.jobKey + ')。是否继续?').then(() => removeWecomShareLinkJob(row.jobKey)).then(() => {
|
||||||
|
this.$modal.msgSuccess('已删除')
|
||||||
|
this.getList()
|
||||||
|
}).catch(() => {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user