Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-06-09 18:24:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1a8d744512ac326b67a76b49f48fb016caf0c0ac
1a8d7445
1 parent
41652ef2
feat(订单页面): 添加审批状态标签显示
在订单页面中添加审批状态标签,使用不同颜色区分不同状态
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
src/components.d.ts
src/views/profile/OrdersPage.vue
src/components.d.ts
View file @
1a8d744
...
...
@@ -59,6 +59,7 @@ declare module 'vue' {
VanSwipeItem
:
typeof
import
(
'vant/es'
)[
'SwipeItem'
]
VanTab
:
typeof
import
(
'vant/es'
)[
'Tab'
]
VanTabs
:
typeof
import
(
'vant/es'
)[
'Tabs'
]
VanTag
:
typeof
import
(
'vant/es'
)[
'Tag'
]
VanUploader
:
typeof
import
(
'vant/es'
)[
'Uploader'
]
VideoPlayer
:
typeof
import
(
'./components/ui/VideoPlayer.vue'
)[
'default'
]
WechatPayment
:
typeof
import
(
'./components/payment/WechatPayment.vue'
)[
'default'
]
...
...
src/views/profile/OrdersPage.vue
View file @
1a8d744
...
...
@@ -59,6 +59,7 @@
<p class="text-sm text-gray-500 mb-1">{{ order.note }}</p>
<p class="text-sm text-gray-500">{{ order.pay_date && formatDate(order.pay_date) }}</p>
<p class="text-sm text-gray-500">¥{{ detail.price }} x {{ detail.number }} 份</p>
<van-tag :color="approvalStatusMap[order.approval_status]['color']">{{ approvalStatusMap[order.approval_status]['text'] }}</van-tag>
</div>
</div>
...
...
@@ -224,6 +225,14 @@ const statusMap = {
REFUND: { text: '已退款', color: 'text-red-500' },
REFUND_ERROR: { text: '退款失败', color: 'text-red-500' },
}
// 订单审批状态映射
const approvalStatusMap = {
APPLY: { text: '待审批', color: '#1989f1' },
ENABLE: { text: '审批通过', color: '#07c160' },
DISABLE: { text: '审批不通过', color: '#ff976a' },
null: { text: '未审批', color: '#909399' },
}
// 模拟订单数据
// const orders = ref([
// {
...
...
Please
register
or
login
to post a comment