修复了bug
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
<!-- 订单操作 -->
|
||||
<div class="order-actions">
|
||||
<el-button
|
||||
v-if="order.status === 'pending'"
|
||||
v-if="order.status === 'pre_order'"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="goToPay(order.id)"
|
||||
@@ -323,6 +323,7 @@ const submittingReview = ref(false)
|
||||
const statusTabs = ref([
|
||||
{ label: '全部', value: 'all', count: 0 },
|
||||
{ label: '待支付', value: 'pending', count: 0 },
|
||||
{ label: '待发货', value: 'pre_order', count: 0 },
|
||||
{ label: '已发货', value: 'shipped', count: 0 },
|
||||
{ label: '已完成', value: 'completed', count: 0 },
|
||||
{ label: '已取消', value: 'cancelled', count: 0 }
|
||||
@@ -344,7 +345,8 @@ const selectStatus = (status) => {
|
||||
const getEmptyText = () => {
|
||||
const textMap = {
|
||||
all: '暂无订单',
|
||||
pending: '暂无待支付订单',
|
||||
pending: '暂无待发货订单',
|
||||
pre_order: '暂无待支付订单',
|
||||
shipped: '暂无已发货订单',
|
||||
completed: '暂无已完成订单',
|
||||
cancelled: '暂无已取消订单'
|
||||
@@ -355,6 +357,7 @@ const getEmptyText = () => {
|
||||
const getStatusType = (status) => {
|
||||
const typeMap = {
|
||||
pending: 'warning',
|
||||
pre_order: 'warning',
|
||||
shipped: 'primary',
|
||||
completed: 'success',
|
||||
cancelled: 'danger'
|
||||
@@ -364,7 +367,7 @@ const getStatusType = (status) => {
|
||||
|
||||
const mapOrderStatus = (backendStatus) => {
|
||||
const statusMap = {
|
||||
'pre_order': 'pending',
|
||||
'pre_order': 'pre_order',
|
||||
'pending': 'pending',
|
||||
'shipped': 'shipped',
|
||||
'completed': 'completed',
|
||||
@@ -375,7 +378,8 @@ const mapOrderStatus = (backendStatus) => {
|
||||
|
||||
const getStatusText = (status) => {
|
||||
const textMap = {
|
||||
pending: '待支付',
|
||||
pending: '待发货',
|
||||
pre_order: '待支付',
|
||||
shipped: '已发货',
|
||||
completed: '已完成',
|
||||
cancelled: '已取消'
|
||||
@@ -437,7 +441,7 @@ const confirmReceive = async (orderId) => {
|
||||
type: 'info'
|
||||
})
|
||||
|
||||
await api.put(`/orders/${orderId}/receive`)
|
||||
await api.put(`/orders/${orderId}/confirm`)
|
||||
|
||||
// 更新订单状态
|
||||
const order = orders.value.find(o => o.id === orderId)
|
||||
|
||||
Reference in New Issue
Block a user