增加订单主表
This commit is contained in:
@@ -5,65 +5,47 @@
|
||||
<template v-else>
|
||||
<div class="detail-header">
|
||||
<el-tag :type="statusTag(detail.successStatus)" effect="light">{{ statusLabel(detail.successStatus) }}</el-tag>
|
||||
<span class="detail-header-type">{{ billTypeLabel(detail.billType) }}</span>
|
||||
<span class="detail-header-time">计费时间:{{ detail.billTime || '-' }}</span>
|
||||
<span class="detail-header-time">计费时间:{{ detail.bizDate || '-' }}</span>
|
||||
</div>
|
||||
<el-descriptions :column="1" border size="small" class="detail-desc">
|
||||
<el-descriptions-item label="任务ID">{{ detail.taskId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单ID">{{ detail.orderId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="客户代码">{{ detail.customerCode || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单号">{{ detail.orderNo || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="运单号">{{ detail.trackingNo || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="转单号">{{ detail.transferNo || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计费订单ID">{{ detail.billId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品代码">{{ detail.productCode || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="失败码">{{ detail.failCode || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ detail.createTime || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">{{ detail.updateTime || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div v-if="detail.errorMessage" class="err-block">
|
||||
<div class="err-block-head">
|
||||
<span class="err-block-title">失败原因</span>
|
||||
<el-button link type="primary" size="small" icon="CopyDocument" @click="copyError">复制</el-button>
|
||||
</div>
|
||||
<div class="err-block-body">{{ detail.errorMessage }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getBillingTask } from '@/api/monitor/billingTask'
|
||||
import { billTypeLabel, statusLabel, statusTag } from './billingTaskOptions'
|
||||
import { getPrcOrder } from '@/api/monitor/prcOrder'
|
||||
import { statusLabel, statusTag } from './billingTaskOptions'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const open = ref(false)
|
||||
const loading = ref(false)
|
||||
const detail = ref(null)
|
||||
const drawerTitle = ref('计费任务详情')
|
||||
const drawerTitle = ref('订单计费详情')
|
||||
|
||||
function openDrawer(row) {
|
||||
if (!row || !row.taskId) return
|
||||
drawerTitle.value = '计费任务 #' + row.taskId
|
||||
if (!row || !row.orderId) return
|
||||
drawerTitle.value = '订单 ' + (row.transferNo || row.orderId)
|
||||
open.value = true
|
||||
loading.value = true
|
||||
detail.value = null
|
||||
getBillingTask(row.taskId).then(res => {
|
||||
getPrcOrder(row.orderId).then(res => {
|
||||
detail.value = res.data || row
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
function copyError() {
|
||||
const text = detail.value?.errorMessage || ''
|
||||
if (!text) return
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
proxy.$modal.msgSuccess('已复制')
|
||||
}).catch(() => {
|
||||
proxy.$modal.msgError('复制失败')
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open: openDrawer })
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user