Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
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
new-sing
admin-base
Commits
2cbcc9fd
Commit
2cbcc9fd
authored
Sep 13, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单管理
parent
09c2daa5
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
478 additions
and
124 deletions
+478
-124
detail.vue
src/components/order/detail.vue
+124
-0
index.vue
src/components/order/index.vue
+225
-77
index.vue
src/components/putForward/index.vue
+11
-24
index.vue
src/components/refund/index.vue
+33
-15
index.vue
src/components/teacherDetail/index.vue
+5
-0
detail.vue
src/components/user/detail.vue
+17
-7
api.js
src/service/api.js
+1
-1
common.js
src/util/common.js
+20
-0
wordbook.js
src/util/wordbook.js
+42
-0
No files found.
src/components/order/detail.vue
0 → 100644
View file @
2cbcc9fd
<
template
>
<el-dialog
title=
"订单详情"
center
:visible
.
sync=
"dialogObj.show"
width=
"800px"
>
<el-row
align=
"middle"
type=
"flex"
>
<el-col
:span=
"4"
><label>
订单号
</label></el-col>
<el-col
:span=
"8"
>
{{
detail
.
out_trade_no
}}
</el-col>
<el-col
:span=
"4"
><label>
商品名称
</label></el-col>
<el-col
:span=
"8"
>
{{
detail
.
goods_name
}}
</el-col>
</el-row>
<el-row
align=
"middle"
type=
"flex"
>
<el-col
:span=
"4"
><label>
用户昵称
</label></el-col>
<el-col
:span=
"8"
>
{{
detail
.
user_nickname
}}
</el-col>
<el-col
:span=
"4"
><label>
用户手机号
</label></el-col>
<el-col
:span=
"8"
>
{{
detail
.
user_mobile
}}
</el-col>
</el-row>
<el-row
align=
"middle"
type=
"flex"
>
<el-col
:span=
"4"
><label>
推广人类型
</label></el-col>
<el-col
:span=
"8"
>
{{
detail
.
invite_type
}}
</el-col>
<el-col
:span=
"4"
><label>
推广人ID
</label></el-col>
<el-col
:span=
"8"
>
{{
detail
.
invite_id
}}
</el-col>
</el-row>
<el-row
align=
"middle"
type=
"flex"
>
<el-col
:span=
"4"
><label>
推广人收益
</label></el-col>
<el-col
:span=
"8"
>
{{
detail
.
invite_earnings
?
detail
.
invite_earnings
/
100
:
0
}}
元
</el-col>
<template
v-if=
"detail.buy_type === 2"
>
<el-col
:span=
"4"
><label>
团购信息
</label></el-col>
<el-col
:span=
"8"
>
团ID:
{{
detail
.
order_group_id
}}
<br>
时否是团长:
{{
detail
.
is_captain
===
0
?
'否'
:
'是'
}}
</el-col>
</
template
>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
期数ID
</label></el-col>
<el-col
:span=
"8"
>
{{detail.periods_id}}
</el-col>
<el-col
:span=
"4"
><label>
描述
</label></el-col>
<el-col
:span=
"8"
>
{{detail.desc}}
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
收获地址
</label></el-col>
<el-col
:span=
"20"
>
<
template
v-if=
"detail.user_address_id"
>
收货人:
{{
detail
.
receive_name
}}
<br>
手机号:
{{
detail
.
receive_mobile
}}
<br>
收获地址:
{{
detail
.
province_name
}}{{
detail
.
city
}}{{
detail
.
area
}}{{
detail
.
address
}}
</
template
>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
付款时间
</label></el-col>
<el-col
:span=
"8"
>
{{detail.pay_at}}
</el-col>
</el-row>
</el-dialog>
</template>
<
script
>
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
}
from
"../../util/wordbook"
;
export
default
{
name
:
"detail"
,
props
:[
'dialogObj'
],
data
(){
return
{
detail
:{},
show
:
false
}
},
methods
:{
initDialog
(){
this
.
detail
=
this
.
dialogObj
.
detail
;
this
.
show
=
this
.
dialogObj
.
show
;
}
},
filters
:{
payMentFilter
(
val
){
return
val
==
'1'
?
'已付款'
:
'未付款'
},
courseTypeFilter
(
val
){
return
val
.
type
==
'1'
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
},
inviteType
(
value
){
return
INVITETYPE
[
value
]
},
status
(
value
){
return
ORDERSTATUS
[
value
]
},
buyType
(
value
){
return
BUYTYPE
[
value
]
},
moneytFilter
(
val
){
return
val
=
val
/
100
+
'元'
}
},
watch
:{
dialogObj
:{
handler
:
function
()
{
this
.
initDialog
()
},
deep
:
true
},
show
(
value
){
this
.
$emit
(
"changeShow"
,
value
);
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.el-col{
height: 60px;
img{
width: 50px;
border-radius: 100px;
}
label{
color: #5982e6;
}
}
</
style
>
src/components/order/index.vue
View file @
2cbcc9fd
This diff is collapsed.
Click to expand it.
src/components/putForward/index.vue
View file @
2cbcc9fd
<
template
>
<div>
<div
class=
"putForward"
>
<el-form
:inline=
"true"
:model=
"search"
class=
"demo-form-inline"
label-width=
"80px"
>
<el-form-item
label=
"关键字"
>
<el-input
v-model=
"search.key"
placeholder=
"用户名/手机号"
></el-input>
...
...
@@ -139,7 +139,7 @@
import
{
getWithdrawListApi
,
editOrderDescApi
,
withdrawApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
export
default
{
name
:
"
orderMoney
"
,
name
:
"
putForward
"
,
data
(){
return
{
nowPage
:
1
,
...
...
@@ -206,19 +206,11 @@
methods
:{
//获取列表
getList
:
function
()
{
let
data
=
{
key
:
this
.
search
.
key
,
page
:
this
.
page
.
current
,
per_page
:
this
.
page
.
pageSize
,
status
:
this
.
search
.
status
let
json
=
{
};
getWithdrawListApi
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
result
===
'success'
){
this
.
tableData
=
res
.
data
.
data
.
data
;
this
.
total
=
res
.
data
.
data
.
total
;
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
getWithdrawListApi
(
json
).
then
(
res
=>
{
this
.
tableData
=
res
.
list
;
this
.
total
=
res
.
total
;
})
},
// 查询按钮
...
...
@@ -272,11 +264,7 @@
return
false
}
editOrderDescApi
(
this
.
nowObj
.
id
,
'withdraw'
,
data
).
then
(
res
=>
{
if
(
res
.
data
.
result
===
'success'
){
this
.
doCallback
()
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
doCallback
()
});
// 审核
}
else
{
...
...
@@ -291,11 +279,7 @@
data
.
reason
=
''
;
}
withdrawApi
(
this
.
nowObj
.
id
,
data
).
then
(
res
=>
{
if
(
res
.
data
.
result
===
'success'
){
this
.
doCallback
()
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
doCallback
()
})
}
}
...
...
@@ -304,6 +288,9 @@
</
script
>
<
style
scoped
>
.putForward
{
padding
:
20px
;
}
.status
{
color
:
#e9a038
;
}
...
...
src/components/refund/index.vue
View file @
2cbcc9fd
<
template
>
<div
class=
"refund"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"6"
>
<el-form-item
label=
"用户昵称"
>
<el-input
v-model=
"searchFrom.nickname"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
:offset=
"6"
>
<el-form-item
style=
"float: right"
>
<el-button
type=
"primary"
plain
@
click=
"getRefundList"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"list"
style=
"width: 100%"
>
...
...
@@ -84,19 +103,11 @@
return
{
nowPage
:
1
,
total
:
0
,
list
:
[
{
out_trade_no
:
'111'
,
refund_no
:
'111'
,
user_id
:
'1'
,
order_money
:
100
,
refund_money
:
100
,
desc
:
'sdfaf'
,
callback
:
'ewewew'
,
status
:
1
,
success_at
:
'2018-09-01'
}
]
searchFrom
:
{
nickname
:
''
,
user_id
:
''
},
list
:
[]
}
},
filters
:{
...
...
@@ -132,7 +143,14 @@
})
},
getRefundList
(){
getRefundListApi
().
then
((
res
)
=>
{
let
json
=
{}
if
(
this
.
searchFrom
.
nickname
){
json
.
nickname
=
this
.
searchFrom
.
nickname
}
if
(
this
.
searchFrom
.
user_id
){
json
.
user_id
=
this
.
searchFrom
.
user_id
}
getRefundListApi
(
json
).
then
((
res
)
=>
{
this
.
total
=
res
.
total
;
this
.
list
=
res
.
list
})
...
...
@@ -144,6 +162,6 @@
<
style
scoped
>
.refund
{
margin
:
1
0px
;
padding
:
2
0px
;
}
</
style
>
src/components/teacherDetail/index.vue
View file @
2cbcc9fd
...
...
@@ -16,6 +16,11 @@
<img
class=
"avatar"
:src=
"detail.qr"
/>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"6"
>
<label>
老师状态:
</label>
{{
detail
.
status
===
0
?
'正常'
:
'禁用'
}}
</el-col>
</el-row>
</div>
<el-table
:data=
"list"
...
...
src/components/user/detail.vue
View file @
2cbcc9fd
...
...
@@ -15,26 +15,36 @@
<el-row>
<el-col
:span=
"4"
><label>
手机号
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
mobile
}}
</el-col>
<el-col
:span=
"4"
><label>
注册时间
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
created_at
}}
</el-col>
<el-col
:span=
"4"
><label>
用户ID
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
user_id
}}
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
生日
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
birthday
}}
</el-col>
<el-col
:span=
"4"
><label>
ID
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
user_id
}}
</el-col>
<el-col
:span=
"4"
><label>
邀请类型
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
invite_type
}}
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
等级
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
level
}}
</el-col>
<el-col
:span=
"4"
><label>
最后登录
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
last_login_at
}}
</el-col>
<el-col
:span=
"4"
><label>
邀请人ID
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
invite_user_id
}}
</el-col>
</el-row>
<el-row
align=
"middle"
type=
"flex"
>
<el-col
:span=
"4"
><label>
邀请码
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
invite_code
}}
</el-col>
<el-col
:span=
"4"
><label>
老师ID
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
teacher_id
}}
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
注册时间
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
created_at
}}
</el-col>
<el-col
:span=
"4"
><label>
最后登录
</label></el-col>
<el-col
:span=
"8"
>
{{
userDetail
.
last_login_at
}}
</el-col>
</el-row>
</el-dialog>
</
template
>
...
...
@@ -81,7 +91,7 @@
<
style
scoped
lang=
"less"
>
.el-col{
height:
5
0px;
height:
6
0px;
img{
width: 50px;
border-radius: 100px;
...
...
src/service/api.js
View file @
2cbcc9fd
...
...
@@ -445,7 +445,7 @@ export const refundApi = function (id, json) {
// 修改订单收货地址
const
editAddressUrl
=
`
${
_baseUrl
}
api/admin/order/address/`
;
export
const
editAddressApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
editAddressUrl
}
/
${
id
}
`
,
json
)
return
Vue
.
prototype
.
$put
(
`
${
editAddressUrl
}${
id
}
`
,
json
)
};
// 提现审核
const
withdrawUrl
=
`
${
_baseUrl
}
/api/admin/order/withdraw/`
;
...
...
src/util/common.js
0 → 100644
View file @
2cbcc9fd
export
default
{
dateFmt
:
function
(
date
,
format
)
{
var
o
=
{
"M+"
:
date
.
getMonth
()
+
1
,
//month
"d+"
:
date
.
getDate
(),
//day
"h+"
:
date
.
getHours
(),
//hour
"m+"
:
date
.
getMinutes
(),
//minute
"s+"
:
date
.
getSeconds
(),
//second
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//quarter
"S"
:
date
.
getMilliseconds
()
//millisecond
}
if
(
/
(
y+
)
/
.
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]
:
(
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
));
return
format
;
}
}
\ No newline at end of file
src/util/wordbook.js
View file @
2cbcc9fd
...
...
@@ -48,3 +48,45 @@ export const BUYTYPE = {
1
:
'单买'
,
2
:
'团购'
}
export
const
BUYTYPEOPTION
=
[
{
id
:
1
,
value
:
'单买'
},
{
id
:
2
,
value
:
'团购'
}
]
export
const
ORDERSTATUSOPTION
=
[
{
id
:
0
,
value
:
'待付款'
},
{
id
:
1
,
value
:
'付款成功'
},
{
id
:
2
,
value
:
'付款失败'
},
{
id
:
3
,
value
:
'退款成功'
}
]
export
const
INVITETYPEOPTION
=
[
{
id
:
0
,
value
:
'用户'
},
{
id
:
1
,
value
:
'老师'
},
{
id
:
2
,
value
:
'推广渠道'
}
]
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