1
This commit is contained in:
@@ -338,19 +338,60 @@ export default {
|
|||||||
if (!time) return '-'
|
if (!time) return '-'
|
||||||
return formatTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
|
return formatTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||||
},
|
},
|
||||||
// 获取订单状态类型
|
|
||||||
getOrderStatusType(status) {
|
|
||||||
if (status == null) return 'info'
|
|
||||||
const statusStr = String(status)
|
|
||||||
if (statusStr.includes('完成') || statusStr.includes('成功')) return 'success'
|
|
||||||
if (statusStr.includes('退款') || statusStr.includes('失败')) return 'warning'
|
|
||||||
if (statusStr.includes('取消')) return 'danger'
|
|
||||||
return 'info'
|
|
||||||
},
|
|
||||||
// 获取订单状态文本
|
// 获取订单状态文本
|
||||||
getOrderStatusText(status) {
|
getOrderStatusText(status) {
|
||||||
if (status == null) return '-'
|
if (status == null) return '-'
|
||||||
return String(status)
|
const statusMap = {
|
||||||
|
'-100': '无变化',
|
||||||
|
'-1': '未知',
|
||||||
|
2: '无效-拆单',
|
||||||
|
3: '无效-取消',
|
||||||
|
4: '无效-京东帮帮主订单',
|
||||||
|
5: '无效-账号异常',
|
||||||
|
6: '无效-赠品类目不返佣',
|
||||||
|
7: '无效-校园订单',
|
||||||
|
8: '无效-企业订单',
|
||||||
|
9: '无效-团购订单',
|
||||||
|
11: '无效-乡村推广员下单',
|
||||||
|
13: '违规订单-其他',
|
||||||
|
14: '无效-来源与备案网址不符',
|
||||||
|
15: '待付款',
|
||||||
|
16: '已付款',
|
||||||
|
17: '已完成',
|
||||||
|
19: '无效-佣金比例为0',
|
||||||
|
20: '无效-此复购订单对应的首购订单无效',
|
||||||
|
21: '无效-云店订单',
|
||||||
|
22: '无效-PLUS会员佣金比例为0',
|
||||||
|
23: '无效-支付有礼',
|
||||||
|
24: '已付定金',
|
||||||
|
25: '违规订单-流量劫持',
|
||||||
|
26: '违规订单-流量异常',
|
||||||
|
27: '违规订单-违反京东平台规则',
|
||||||
|
28: '违规订单-多笔交易异常',
|
||||||
|
29: '无效-跨屏跨店',
|
||||||
|
30: '无效-累计件数超出类目上限',
|
||||||
|
31: '无效-黑名单sku',
|
||||||
|
33: '超市卡充值订单',
|
||||||
|
34: '无效-推卡订单无效'
|
||||||
|
}
|
||||||
|
return statusMap[status] || `状态${status}`
|
||||||
|
},
|
||||||
|
// 获取订单状态类型
|
||||||
|
getOrderStatusType(status) {
|
||||||
|
if (status == null) return 'info'
|
||||||
|
// 取消状态(优先级最高)
|
||||||
|
if (status === 3) return 'danger' // 无效-取消(红色,优先级高于违规)
|
||||||
|
// 正常状态
|
||||||
|
if (status === 16) return 'success' // 已付款
|
||||||
|
if (status === 17) return 'success' // 已完成
|
||||||
|
if (status === 15) return 'warning' // 待付款
|
||||||
|
if (status === 24) return 'warning' // 已付定金
|
||||||
|
// 违规状态
|
||||||
|
if ([13, 25, 26, 27, 28].includes(status)) return 'warning' // 违规订单(黄色,优先级低于取消)
|
||||||
|
// 无效状态
|
||||||
|
if ([2, 4, 5, 6, 7, 8, 9, 11, 14, 19, 20, 21, 22, 23, 29, 30, 31, 34].includes(status)) return 'info' // 无效订单(灰色)
|
||||||
|
// 其他状态
|
||||||
|
return 'info'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user