Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
pptist
Commits
686723e1
Commit
686723e1
authored
Jul 10, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业管理订单
parent
b64e2111
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
158 deletions
+12
-158
router.ts
src/router/router.ts
+1
-1
Order.vue
src/views/TeamCenter/Order.vue
+3
-155
Order.vue
src/views/UserCenter/Order.vue
+6
-1
OrderDetail.vue
src/views/UserCenter/OrderDetail.vue
+2
-1
No files found.
src/router/router.ts
View file @
686723e1
...
@@ -315,7 +315,7 @@ const routes: RouteRecordRaw[] = [
...
@@ -315,7 +315,7 @@ const routes: RouteRecordRaw[] = [
}
}
},
},
{
{
path
:
'/u/order/:id'
,
path
:
'/u/order/:id
/:isFirm?
'
,
component
:
()
=>
import
(
'@/views/UserCenter/OrderDetail.vue'
),
component
:
()
=>
import
(
'@/views/UserCenter/OrderDetail.vue'
),
meta
:{
meta
:{
title
:
'订单详情'
title
:
'订单详情'
...
...
src/views/TeamCenter/Order.vue
View file @
686723e1
<
template
>
<
template
>
<div
class=
""
>
<Order
:firm=
"1"
></Order>
<el-tabs
v-model=
"activeName"
@
tab-click=
"tabsHandlerClick"
class=
"no-border dark sticky-header"
>
<el-tab-pane
label=
"全部订单"
name=
"all"
></el-tab-pane>
<el-tab-pane
label=
"待支付"
name=
"pay"
></el-tab-pane>
<el-tab-pane
label=
"已完成"
name=
"finish"
></el-tab-pane>
<el-tab-pane
label=
"待开票"
name=
"invoice"
></el-tab-pane>
<el-tab-pane
label=
"历史发票"
name=
"invoiceHistory"
></el-tab-pane>
<div
class=
"order-bar rounded row"
>
<div
class=
"item"
style=
"width: 280px !important; min-width: 280px; text-align: left;"
>
商品信息
</div>
<div
class=
"item col"
>
时长
</div>
<div
class=
"item col"
>
单价
</div>
<div
class=
"item col"
>
数量
</div>
<div
class=
"item none-width"
>
<div
style=
"background-color: rgba(0,0,0,.08);width:1px"
>
</div>
</div>
<div
class=
"item col"
>
实付款
</div>
<div
class=
"item col"
>
订单状态
</div>
<div
class=
"item"
>
操作
</div>
</div>
</el-tabs>
<template
v-if=
"orders && orders.length>0 && !loading"
>
<div
class=
"order-body q-mt-lg"
v-for=
"x in orders"
:key=
"x.orderid"
>
<div
class=
"order-item rounded"
>
<div
class=
"title"
>
<span>
{{
x
.
create
}}
</span>
<span
class=
"q-ml-md"
>
{{
x
.
ordernum
}}
</span>
</div>
<div
class=
"bg-white rounded row items-center"
>
<div
class=
"item row items-center"
style=
"width: 280px !important; min-width: 280px; text-align: left;padding:24px;"
>
<img
:src=
"x.cover"
style=
"width:72px;"
class=
"rounded"
>
<div
class=
"q-ml-lg"
>
{{
x
.
pricetypename
}}
_
{{
x
.
vipname
}}
</div>
</div>
<div
class=
"item col"
>
{{
x
.
productname
}}
</div>
<div
class=
"item col"
>
¥
{{
x
.
price
.
toFixed
(
2
)
}}
</div>
<div
class=
"item col"
>
{{
x
.
use
}}
席位
</div>
<div
class=
"item none-width"
>
<div
style=
"background-color: rgba(0,0,0,.08);width:1px;height:72px;"
>
</div>
</div>
<div
class=
"item col"
>
<div
class=
"text-weight-bold q-mb-sm"
style=
"font-size: 16px"
>
¥
{{
x
.
price
.
toFixed
(
2
)
}}
</div>
<!--
<div
class=
"row items-center flex-end"
>
<span
class=
"text-grey-8 q-mr-md"
>
已优惠 ¥10.00
</span>
<IconHelp
:size=
"16"
class=
"cursor-pointer"
></IconHelp>
</div>
-->
</div>
<div
class=
"item col"
>
<div
class=
"q-mb-sm"
:class=
"
{'text-waring':x.status==1,'text-grey-8':x.status==3}">
{{
x
.
statusname
}}
</div>
<el-button
link
@
click=
"forwardOrderDetail(x.orderid)"
>
订单详情
</el-button>
</div>
<div
class=
"item column"
>
<el-button
type=
"primary"
v-if=
"x.status==2"
>
发票
</el-button>
<br
/>
<el-button
type=
"default"
v-if=
"x.status==2"
>
售后
</el-button>
<el-button
type=
"warning"
v-if=
"x.status==1"
>
支付
</el-button>
<br
/>
<el-button
type=
"default"
v-if=
"x.status==1"
>
取消
</el-button>
</div>
</div>
</div>
</div>
</
template
>
<div
v-if=
"loading"
style=
"height: 200px;margin-top: 100px;"
v-loading=
"loading"
></div>
<div
v-if=
"(!orders || orders.length==0) && !loading"
>
<el-empty
class=
"q-ma-xl"
description=
"暂无数据"
/>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ApiResult
}
from
"@/configs/axios"
;
import
{
ref
,
reactive
,
onMounted
}
from
"vue"
;
import
OrderService
from
"@/services/OrderService"
;
import
Order
from
'../UserCenter/Order.vue'
import
{
ref
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
const
activeName
=
ref
<
string
>
(
'all'
)
const
parameters
=
ref
({
pageIndex
:
1
,
pageSize
:
15
,
starttime
:
''
,
endtime
:
''
,
orderstatus
:
0
})
const
orders
=
ref
<
any
[]
>
()
const
count
=
ref
(
0
)
const
loading
=
ref
(
false
)
const
router
=
useRouter
()
const
tabsHandlerClick
=
(
e
:
any
)
=>
{
console
.
log
(
e
)
}
const
getOrders
=
async
()
=>
{
if
(
loading
.
value
)
return
loading
.
value
=
true
const
response
=
await
OrderService
.
GetOrders
(
parameters
.
value
)
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
){
orders
.
value
=
response
.
data
.
data
.
pageData
count
.
value
=
response
.
data
.
data
.
pageCount
}
loading
.
value
=
false
}
const
forwardOrderDetail
=
(
id
:
string
)
=>
{
router
.
push
(
'/u/order/'
+
encodeURIComponent
(
id
))
}
getOrders
()
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.sticky-header
{
position
:
sticky
;
top
:
0
;
left
:
0
;
background
:
#FFF
;
}
.order-bar
{
background
:
#f6f7f9
!important
;
}
.order-bar
.item
,
.order-body
.order-item
.item
{
padding
:
0
24px
;
height
:
42px
;
line-height
:
42px
;
font-size
:
14px
;
color
:
gray
;
text-align
:
right
;
min-width
:
108px
;
}
.order-bar
.item.none-width
,
.order-body
.order-item
.item.none-width
{
min-width
:
unset
;
}
.order-body
{
}
.order-body
.order-item
{
background
:
#f6f7f9
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.08
);
font-size
:
14px
;
}
.order-body
.order-item
.title
{
padding
:
0
24px
;
height
:
45px
;
line-height
:
45px
;
color
:
grey
;
white-space
:
nowrap
;
overflow
:
hidden
;
}
.order-body
.order-item
.item
{
height
:
auto
;
line-height
:
1
;
color
:
#000
;
white-space
:
nowrap
;
overflow
:
hidden
;
}
</
style
>
</
style
>
\ No newline at end of file
src/views/UserCenter/Order.vue
View file @
686723e1
...
@@ -164,6 +164,10 @@ import WePay from '@/components/Pay/WePay.vue'
...
@@ -164,6 +164,10 @@ import WePay from '@/components/Pay/WePay.vue'
import
openInvoice
from
'./components/openInvoice.vue'
import
openInvoice
from
'./components/openInvoice.vue'
import
Invoice
from
'./components/InvoiceDetails.vue'
import
Invoice
from
'./components/InvoiceDetails.vue'
import
{
ElMessageBox
}
from
"element-plus"
;
import
{
ElMessageBox
}
from
"element-plus"
;
const
props
=
defineProps
({
firm
:
0
as
Number
,
})
const
activeName
=
ref
<
string
>
(
'all'
)
const
activeName
=
ref
<
string
>
(
'all'
)
const
parameters
=
ref
({
const
parameters
=
ref
({
pageIndex
:
1
,
pageIndex
:
1
,
...
@@ -404,7 +408,8 @@ const scrollingHandler = () =>{
...
@@ -404,7 +408,8 @@ const scrollingHandler = () =>{
}
}
const
forwardOrderDetail
=
(
id
:
string
)
=>
{
const
forwardOrderDetail
=
(
id
:
string
)
=>
{
router
.
push
(
'/u/order/'
+
encodeURIComponent
(
id
))
if
(
props
.
firm
)
router
.
push
(
'/u/order/'
+
encodeURIComponent
(
id
)
+
'/'
+
props
.
firm
)
else
router
.
push
(
'/u/order/'
+
encodeURIComponent
(
id
))
}
}
getOrders
()
getOrders
()
...
...
src/views/UserCenter/OrderDetail.vue
View file @
686723e1
...
@@ -124,7 +124,8 @@ const CanceltOrders = async ()=>{
...
@@ -124,7 +124,8 @@ const CanceltOrders = async ()=>{
}
}
const
forwardOrder
=
(
id
:
string
)
=>
{
const
forwardOrder
=
(
id
:
string
)
=>
{
router
.
push
(
'/u/order'
)
if
(
router
.
currentRoute
.
value
.
params
.
isFirm
)
router
.
push
(
'/a/order'
)
else
router
.
push
(
'/u/order'
)
}
}
const
getOrder
=
async
()
=>
{
const
getOrder
=
async
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment