This commit is contained in:
van
2026-04-22 11:23:36 +08:00
parent d87127f675
commit d8cae128fa

View File

@@ -91,6 +91,17 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="退款状态" prop="refundStatus" width="128" align="center">
<template slot-scope="scope">
<el-tag
:type="refundStatusTagType(scope.row.refundStatus)"
size="small"
disable-transitions
>
{{ refundStatusLabel(scope.row.refundStatus) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="实付" prop="payAmount" width="118" align="right"> <el-table-column label="实付" prop="payAmount" width="118" align="right">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatPayDisplay(scope.row) }} {{ formatPayDisplay(scope.row) }}
@@ -235,7 +246,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="快递公司 express_name">{{ displayExpressName(jsonRow) }}</el-descriptions-item> <el-descriptions-item label="快递公司 express_name">{{ displayExpressName(jsonRow) }}</el-descriptions-item>
<el-descriptions-item label="实付 pay_amount分→元">{{ formatPayDisplay(jsonRow) }}</el-descriptions-item> <el-descriptions-item label="实付 pay_amount分→元">{{ formatPayDisplay(jsonRow) }}</el-descriptions-item>
<el-descriptions-item label="订单状态"> <el-descriptions-item label="订单状态 order_status">
<el-tag <el-tag
:type="orderStatusTagType(jsonRow.orderStatus)" :type="orderStatusTagType(jsonRow.orderStatus)"
:effect="orderStatusTagEffect(jsonRow.orderStatus)" :effect="orderStatusTagEffect(jsonRow.orderStatus)"
@@ -245,6 +256,15 @@
{{ orderStatusLabel(jsonRow.orderStatus) }} {{ orderStatusLabel(jsonRow.orderStatus) }}
</el-tag> </el-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="退款状态 refund_status">
<el-tag
:type="refundStatusTagType(jsonRow.refundStatus)"
size="small"
disable-transitions
>
{{ refundStatusLabel(jsonRow.refundStatus) }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="买家昵称 buyer_nick">{{ displayBuyerNick(jsonRow) }}</el-descriptions-item> <el-descriptions-item label="买家昵称 buyer_nick">{{ displayBuyerNick(jsonRow) }}</el-descriptions-item>
<el-descriptions-item label="会员名(卖家)">{{ privacyHidden }}</el-descriptions-item> <el-descriptions-item label="会员名(卖家)">{{ privacyHidden }}</el-descriptions-item>
<el-descriptions-item label="收货人 receiver_name">{{ displayReceiverName(jsonRow) }}</el-descriptions-item> <el-descriptions-item label="收货人 receiver_name">{{ displayReceiverName(jsonRow) }}</el-descriptions-item>
@@ -284,6 +304,27 @@
import { listGoofishOrder, listGoofishOrderEventLogs, pullAllGoofishOrders, pullAllGoofishOrdersFull, pullGoofishOrdersFull, refreshGoofishDetail, retryGoofishShip, getGoofishOrder } from '@/api/jarvis/goofish' import { listGoofishOrder, listGoofishOrderEventLogs, pullAllGoofishOrders, pullAllGoofishOrdersFull, pullGoofishOrdersFull, refreshGoofishDetail, retryGoofishShip, getGoofishOrder } from '@/api/jarvis/goofish'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
/** 与闲管家开放平台 order_status 一致 */
const GOOFISH_ORDER_STATUS = Object.freeze({
11: '待付款',
12: '待发货',
21: '已发货',
22: '已完成',
23: '已退款',
24: '已关闭'
})
/** 与闲管家开放平台 refund_status 一致 */
const GOOFISH_REFUND_STATUS = Object.freeze({
0: '未申请退款',
1: '待商家处理',
2: '待买家退货',
3: '待商家收货',
4: '退款关闭',
5: '退款成功',
6: '已拒绝退款',
8: '待确认退货地址'
})
export default { export default {
name: 'ErpGoofishOrder', name: 'ErpGoofishOrder',
data() { data() {
@@ -342,6 +383,7 @@ export default {
{ label: '快递名称', before: cell(b, 'detailExpressName'), after: cell(a, 'detailExpressName') }, { label: '快递名称', before: cell(b, 'detailExpressName'), after: cell(a, 'detailExpressName') },
{ label: '本地运单', before: cell(b, 'localWaybillNo'), after: cell(a, 'localWaybillNo') }, { label: '本地运单', before: cell(b, 'localWaybillNo'), after: cell(a, 'localWaybillNo') },
{ label: '订单状态', before: cell(b, null, r => this.orderStatusLabel(r && r.orderStatus)), after: cell(a, null, r => this.orderStatusLabel(r && r.orderStatus)) }, { label: '订单状态', before: cell(b, null, r => this.orderStatusLabel(r && r.orderStatus)), after: cell(a, null, r => this.orderStatusLabel(r && r.orderStatus)) },
{ label: '退款状态', before: cell(b, null, r => this.refundStatusLabel(r && r.refundStatus)), after: cell(a, null, r => this.refundStatusLabel(r && r.refundStatus)) },
{ label: '发货展示', before: cell(b, null, r => this.shipDisplayLabel(r)), after: cell(a, null, r => this.shipDisplayLabel(r)) } { label: '发货展示', before: cell(b, null, r => this.shipDisplayLabel(r)), after: cell(a, null, r => this.shipDisplayLabel(r)) }
] ]
return rows return rows
@@ -361,8 +403,26 @@ export default {
this.refreshLogisticsOrderNo = '' this.refreshLogisticsOrderNo = ''
}, },
orderStatusLabel(s) { orderStatusLabel(s) {
const o = this.orderStatusOptions.find(x => x.v === s) if (s == null || s === '') {
return o ? o.l : (s == null ? '-' : String(s)) return '—'
}
const t = GOOFISH_ORDER_STATUS[s]
return t != null ? t : `未识别(${s})`
},
refundStatusLabel(s) {
if (s == null || s === '') {
return '—'
}
const t = GOOFISH_REFUND_STATUS[s]
return t != null ? t : `未识别(${s})`
},
/** 退款中/处理中用 warning成功/关闭用 success/info拒绝 danger */
refundStatusTagType(s) {
if (s == null || s === '') {
return 'info'
}
const m = { 0: 'info', 1: 'warning', 2: 'warning', 3: 'warning', 4: 'info', 5: 'success', 6: 'danger', 8: 'warning' }
return m[s] !== undefined ? m[s] : 'info'
}, },
/** Element 标签类型(仅 success/info/warning/danger与闲管家 order_status 对齐 */ /** Element 标签类型(仅 success/info/warning/danger与闲管家 order_status 对齐 */
orderStatusTagType(s) { orderStatusTagType(s) {