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
10eaca84
Commit
10eaca84
authored
Dec 26, 2018
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单拆分日课订单月课订单
parent
106119fc
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2350 additions
and
570 deletions
+2350
-570
couponDialog.vue
src/components/monthOrder/couponDialog.vue
+105
-0
detail.vue
src/components/monthOrder/detail.vue
+125
-0
dialog.vue
src/components/monthOrder/dialog.vue
+95
-0
index.vue
src/components/monthOrder/index.vue
+703
-0
newDialog.vue
src/components/monthOrder/newDialog.vue
+344
-0
refundDetail.vue
src/components/monthOrder/refundDetail.vue
+119
-0
refundDialog.vue
src/components/monthOrder/refundDialog.vue
+132
-0
sourceDialog.vue
src/components/monthOrder/sourceDialog.vue
+141
-0
index.vue
src/components/order/index.vue
+546
-565
index.vue
src/components/putForward/index.vue
+1
-1
index.vue
src/components/refund/index.vue
+1
-1
index.vue
src/components/shop/index.vue
+20
-1
menuList.js
src/util/menuList.js
+14
-2
wordbook.js
src/util/wordbook.js
+4
-0
No files found.
src/components/monthOrder/couponDialog.vue
0 → 100644
View file @
10eaca84
<
template
>
<el-dialog
title=
"优惠券详情"
center
append-to-body
:visible
.
sync=
"dialogObj.show"
width=
"90%"
>
<el-table
:data=
"detail"
style=
"width: 100%"
>
<el-table-column
prop=
"coupon_no"
label=
"优惠券码"
>
</el-table-column>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"用户信息"
min-width=
"140"
className=
"userInfo"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
>
{{
scope
.
row
.
user_nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
label=
"优惠券金额"
>
<
template
slot-scope=
"scope"
>
{{
parseFloat
(
scope
.
row
.
money
/
100
)
}}
元
</
template
>
</el-table-column>
<el-table-column
label=
"使用状态"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
filterStatus
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"use_at"
label=
"使用时间"
>
</el-table-column>
</el-table>
</el-dialog>
</template>
<
script
>
import
{
getCouponListApi
}
from
"../../service/api"
;
export
default
{
name
:
"sourceDialog"
,
props
:[
'dialogObj'
],
data
(){
return
{
detail
:[]
}
},
mounted
(){
this
.
initPage
()
},
filters
:{
filterStatus
:
function
(
value
)
{
let
msg
=
''
;
if
(
value
===
0
){
msg
=
'未使用'
}
else
if
(
value
===
1
){
msg
=
'已使用'
}
else
if
(
value
===
2
){
msg
=
'禁用'
}
return
msg
;
}
},
methods
:{
initPage
(){
let
json
=
{
order_coupon_id
:
this
.
dialogObj
.
order_coupon_id
,
limit
:
10000
};
getCouponListApi
(
json
).
then
(
res
=>
{
this
.
detail
=
res
.
list
})
}
},
watch
:{
'dialogObj.show'
(
value
){
if
(
value
===
true
){
this
.
initPage
()
}
}
}
}
</
script
>
<
style
scoped
>
.avatar
{
width
:
50px
;
height
:
50px
;
border-radius
:
50%
;
}
</
style
>
src/components/monthOrder/detail.vue
0 → 100644
View file @
10eaca84
<
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
|
inviteType
}}
</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.address_info"
>
收货人:
{{
detail
.
address_info
.
receive_name
}}
<br>
手机号:
{{
detail
.
address_info
.
receive_mobile
}}
<br>
收货地址:
{{
detail
.
address_info
.
province_name
}}{{
detail
.
address_info
.
city
}}{{
detail
.
address_info
.
area
}}{{
detail
.
address_info
.
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
;
console
.
log
(
'this.dialogObj.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/monthOrder/dialog.vue
0 → 100644
View file @
10eaca84
<
template
>
<el-dialog
title=
"编辑收货地址"
center
append-to-body
:visible
.
sync=
"dialogObj.show"
width=
"800px"
>
<vue-address
:province=
"dialogObj.province"
:city=
"dialogObj.city"
:district=
"dialogObj.district"
:detail=
"dialogObj.detail"
:mobile=
"dialogObj.receive_mobile"
:name=
"dialogObj.receive_name"
@
change=
"handlerAddressChange"
>
</vue-address>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"saveAddress"
>
保 存
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
editAddressApi
}
from
"../../service/api"
;
import
vueAddress
from
'../framework/address-picker/Address'
import
AddressArray
from
'../framework/address-picker/addr'
export
default
{
name
:
"dialogObj"
,
props
:[
'dialogObj'
],
data
(){
return
{
}
},
methods
:{
handlerAddressChange
(
val
)
{
if
(
!
val
.
province
||
!
val
.
city
||
!
val
.
district
){
return
}
this
.
dialogObj
.
detail
=
val
.
detail
;
this
.
dialogObj
.
province
=
val
.
province
;
this
.
dialogObj
.
city
=
val
.
city
;
this
.
dialogObj
.
receive_mobile
=
val
.
mobile
;
this
.
dialogObj
.
receive_name
=
val
.
name
;
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
return
item
.
value
===
val
.
province
})
let
cityObj
=
provinceObj
[
0
].
children
.
filter
((
city
)
=>
{
return
city
.
value
===
val
.
city
})
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
return
district
.
value
===
val
.
district
})
this
.
dialogObj
.
province_name
=
provinceObj
[
0
].
label
;
this
.
dialogObj
.
city_name
=
cityObj
[
0
].
label
;
this
.
dialogObj
.
district_name
=
districtObj
.
length
>
0
?
districtObj
[
0
].
label
:
cityObj
[
0
].
children
[
0
].
label
;
this
.
dialogObj
.
district
=
districtObj
.
length
>
0
?
districtObj
[
0
].
value
:
cityObj
[
0
].
children
[
0
].
value
;
},
saveAddress
()
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
json
=
{
province_id
:
this
.
dialogObj
.
province
,
province_name
:
this
.
dialogObj
.
province_name
,
city_id
:
this
.
dialogObj
.
city
,
city
:
this
.
dialogObj
.
city_name
,
area
:
this
.
dialogObj
.
district_name
,
area_id
:
this
.
dialogObj
.
district
,
address
:
this
.
dialogObj
.
detail
,
receive_name
:
this
.
dialogObj
.
receive_name
,
receive_mobile
:
this
.
dialogObj
.
receive_mobile
};
editAddressApi
(
this
.
dialogObj
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功'
});
this
.
dialogObj
.
show
=
false
;
this
.
$emit
(
"reflash"
);
});
})
},
},
components
:{
vueAddress
},
mounted
(){
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.dialog-footer{
display: block;
text-align: center;
}
</
style
>
src/components/monthOrder/index.vue
0 → 100644
View file @
10eaca84
<
template
>
<div
class=
"order"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
></el-input>
</el-form-item>
<el-form-item
label=
"用户昵称"
>
<el-input
v-model=
"searchFrom.nickname"
></el-input>
</el-form-item>
<el-form-item
label=
"收件人手机号"
>
<el-input
v-model=
"searchFrom.receive_mobile"
></el-input>
</el-form-item>
<el-form-item
label=
"商品名称"
>
<el-select
v-model=
"searchFrom.goods_id"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
v-for=
"(data,index) in goodList"
:key=
"index"
:label=
"data | filterGoods"
:value=
"data.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"来源"
class=
"test"
>
<el-input
v-model=
"searchFrom.invite_type "
:placeholder=
"inviteSearchPlaceholder"
>
<template
slot=
"prepend"
>
CC -
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"推广人ID"
>
<el-input
v-model=
"searchFrom.invite_id"
:placeholder=
"inviteSearchPlaceholder"
></el-input>
</el-form-item>
<!-- <el-form-item label="团ID">
<el-input v-model="searchFrom.order_group_id" ></el-input>
</el-form-item> -->
<el-form-item
label=
"购买方式"
>
<el-select
v-model=
"searchFrom.buy_type"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
v-for=
"item in buyTypeOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-select
multiple
v-model=
"searchFrom.status"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
v-for=
"item in orderStatusOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"交易订单号"
>
<el-input
v-model=
"searchFrom.out_trade_no"
></el-input>
</el-form-item>
<el-form-item
label=
"购买时间"
>
<el-date-picker
v-model=
"searchFrom.payTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00','23:59:59']"
@
change=
"getOrderList"
>
</el-date-picker>
</el-form-item>
<el-form-item
>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
>
导出
</el-button>
</el-form-item>
<el-form-item
style=
"float:right"
>
<!-- <el-button type="success" plain @click="add">新增订单</el-button> -->
</el-form-item>
</el-form>
<el-table
:data=
"tableData"
@
expand-change=
"changeRow"
style=
"width: 100%"
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
</el-table-column>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人属性"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
scope
.
row
.
invite_type
}}
<br>
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
</div>
<div
v-if=
"scope.row.invite_earnings === 0 && scope.row.invite_id !== 0"
style=
"display: flex;"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
scope
.
row
.
invite_type
}}
<br>
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
</div>
<div
v-if=
"scope.row.invite_id === 0"
>
无
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"优惠活动"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
无
</span>
<el-button
type=
"text"
v-if=
"scope.row.order_coupon_id !== 0"
@
click=
"showCoupon(scope.row)"
>
优惠券
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"付款状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"实付金额"
width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
money
|
moneytFilter
}}
</
template
>
</el-table-column>
<el-table-column
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.user_address_id && scope.row.address_info"
>
{{
scope
.
row
.
address_info
.
receive_name
}}
<br>
{{
scope
.
row
.
address_info
.
receive_mobile
}}
<br>
{{
scope
.
row
.
address_info
.
province_name
}}{{
scope
.
row
.
address_info
.
city
}}{{
scope
.
row
.
address_info
.
area
}}{{
scope
.
row
.
address_info
.
address
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"pay_at"
label=
"购买时间"
sortable
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"下单时间"
sortable
>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
</el-table-column>
<el-table-column
width=
"50"
label=
"操作"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"400"
>
<div
style=
"text-align: center"
>
<!--v-if="(scope.row.status == 1 || scope.row.status == 4|| scope.row.status == 5) && $store.state.orderRefund"-->
<el-button
@
click=
"onRefund(scope.row.id, scope.row.money)"
type=
"warning"
plain
size=
"mini"
>
退款
</el-button>
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
</el-button>
<el-button
v-if=
"scope.row.user_address_id"
@
click=
"editAddress(scope.row)"
plain
type=
"info"
size=
"mini"
>
编辑收货地址
</el-button>
<el-button
@
click=
"updateTeacher(scope.row)"
type=
"warning"
plain
size=
"mini"
>
编辑推广人
</el-button>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<address-dialog
v-if=
"dialogObj.show"
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<order-dialog
v-if=
"newdialogObj.show"
:newdialogObj=
"newdialogObj"
></order-dialog>
<refund-dialog
:dialogObj=
"refundDialogObj"
@
reflash=
"onAfterRefund"
@
changeShow=
"changeShow"
></refund-dialog>
<detail-dialog
:dialogObj=
"dialogDetailObj"
@
changeShow=
"changeDetailShow"
/>
<source-dialog
:dialogObj=
"sourceDialog"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
<el-dialog
title=
"修改推广人"
center
append-to-body
:visible
.
sync=
"promoterDialog.show"
width=
"600"
>
<el-form
ref=
"form"
label-width=
"120px"
>
<el-form-item
label=
"老师"
>
<el-select
v-model=
"promoterDialog.teacher_id"
filterable
remote
clearable
placeholder=
"请输入名称"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
v-for=
"item in teacherList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.user_id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"promoterDialog.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"saveTeacher"
>
确 定
</el-button>
</span>
</el-dialog>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
</template>
<
script
>
import
{
getOrderListApi
,
editOrderDescApi
,
getGoodsListApi
,
getRefundListApi
,
exportExcelApi
,
getTeacherListApi
,
updateOrderTeacherApi
,
setOrderApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
addressDialog
from
'./dialog'
import
orderDialog
from
'./newDialog'
import
sourceDialog
from
'./sourceDialog'
import
refundDialog
from
'./refundDialog'
import
couponDialog
from
'./couponDialog'
import
detailDialog
from
'./detail'
import
refundDetail
from
'./refundDetail'
import
AddressArray
from
'../framework/address-picker/addr'
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
BUYTYPEOPTION
,
ORDERSTATUSOPTION
,
INVITETYPEOPTION
,
GOODSTYPE
}
from
"../../util/wordbook"
;
import
CommonJs
from
'../../util/common'
;
export
default
{
name
:
'index'
,
data
(){
return
{
nowPage
:
1
,
total
:
0
,
sourceDialog
:{
show
:
false
,
out_trade_no
:
''
},
couponDetail
:{
show
:
false
,
order_coupon_id
:
''
},
refundDetail
:{
show
:
false
,
out_trade_no
:
''
},
limit
:
10
,
searchFrom
:
{
nickname
:
''
,
user_id
:
''
,
invite_type
:
''
,
invite_id
:
''
,
buy_type
:
''
,
status
:
[
1
,
4
,
5
],
goods_id
:
''
,
out_trade_no
:
''
,
payTime
:
[],
order_group_id
:
""
,
},
tableData
:
[],
dialogObj
:
{
show
:
false
},
newdialogObj
:
{
show
:
false
},
refundDialogObj
:
{
show
:
false
,
id
:
''
,
money
:
0
},
dialogDetailObj
:
{
show
:
false
,
detail
:
{}
},
goodList
:
[],
inviteTypeOption
:
INVITETYPEOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
buyTypeOption
:
BUYTYPEOPTION
,
inviteSearchPlaceholder
:
''
,
rules
:{
value
:[
{
required
:
true
,
message
:
'请输入备注'
,
trigger
:
'change'
}
]
},
promoterDialog
:
{
show
:
false
,
nowPage
:
1
,
total
:
0
,
limit
:
100
,
teacher_id
:
''
},
teacherList
:
[],
loading
:
false
}
},
methods
:
{
showRef
(
data
){
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
},
showCoupon
(
data
){
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
},
showSource
(
data
){
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
},
changeRow
(
data
,
b
){
if
(
b
.
indexOf
(
data
)
>-
1
){
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
data
.
refundList
=
res
.
list
})
}
},
exportTable
(){
let
json
=
{};
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
}
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
if
(
this
.
searchFrom
.
invite_type
)
{
json
.
invite_type
=
this
.
searchFrom
.
invite_type
}
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
}
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
}
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
}
if
(
this
.
searchFrom
.
status
)
{
json
.
status
=
this
.
searchFrom
.
status
.
toString
()
}
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
}
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
){
json
.
pay_start_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
0
],
"yyyy-MM-dd hh:mm:ss"
);
json
.
pay_end_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
)
}
json
.
course_type
=
0
//月课
exportExcelApi
(
'/api/public/order/export'
,
json
)
},
getGoodsOption
(){
let
json
=
{
page
:
1
,
limit
:
100
};
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
})
},
onInviteTypeChange
(
val
){
if
(
val
===
0
)
{
this
.
inviteSearchPlaceholder
=
'用户ID'
}
else
if
(
val
===
1
)
{
this
.
inviteSearchPlaceholder
=
'老师ID'
}
else
if
(
val
===
2
)
{
this
.
inviteSearchPlaceholder
=
'推广人ID'
}
this
.
getOrderList
();
},
detail
(
row
){
let
_detail
=
row
;
this
.
dialogDetailObj
=
{
show
:
true
,
detail
:
_detail
}
},
editComment
(
id
,
desc
)
{
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputValue
:
desc
||
''
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
});
this
.
getOrderList
();
});
});
})
},
onPageChange
(
val
){
this
.
nowPage
=
val
this
.
getOrderList
()
},
onSizeChange
(
val
){
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getOrderList
()
},
getOrderList
(){
let
json
=
{
limit
:
this
.
limit
,
page
:
this
.
nowPage
};
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
}
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
if
(
this
.
searchFrom
.
invite_type
)
{
json
.
invite_type
=
this
.
searchFrom
.
invite_type
}
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
}
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
}
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
}
if
(
this
.
searchFrom
.
status
)
{
json
.
status
=
this
.
searchFrom
.
status
.
toString
()
}
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
}
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
){
json
.
pay_start_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
0
],
"yyyy-MM-dd hh:mm:ss"
);
json
.
pay_end_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
)
}
json
.
course_type
=
0
//月课
getOrderListApi
(
json
).
then
((
res
)
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
});
this
.
tableData
=
res
.
list
;
this
.
total
=
res
.
total
})
},
changeDetailShow
(
data
){
this
.
dialogDetailObj
.
show
=
data
},
changeShow
(
data
){
this
.
refundDialogObj
.
show
=
data
},
onRefund
(
id
,
money
){
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
money
=
money
;
this
.
refundDialogObj
.
show
=
true
;
},
onAfterRefund
(){
this
.
refundDialogObj
.
show
=
false
;
this
.
getOrderList
()
},
onUpdateAddress
(){
this
.
dialogObj
.
show
=
false
;
this
.
getOrderList
();
},
editAddress
(
row
){
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
){
this
.
dialogObj
.
province
=
''
this
.
dialogObj
.
city
=
''
this
.
dialogObj
.
district
=
''
}
else
{
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
return
item
.
label
===
row
.
address_info
.
province_name
})
if
(
provinceObj
&&
provinceObj
.
length
>
0
){
this
.
dialogObj
.
province
=
row
.
address_info
.
province_id
?
row
.
address_info
.
province_id
:
provinceObj
[
0
].
value
if
(
!
row
.
address_info
.
city
){
this
.
dialogObj
.
city
=
''
}
else
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
((
city
)
=>
{
return
city
.
label
===
row
.
address_info
.
city
})
this
.
dialogObj
.
city
=
row
.
address_info
.
city_id
?
row
.
address_info
.
city_id
:
cityObj
[
0
].
value
if
(
!
row
.
address_info
.
area
){
this
.
dialogObj
.
district
=
''
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
return
district
.
label
===
row
.
address_info
.
area
});
this
.
dialogObj
.
district
=
row
.
address_info
.
area_id
?
row
.
address_info
.
area_id
:
districtObj
[
0
].
value
}
}
}
else
{
this
.
dialogObj
.
province
=
''
;
this
.
dialogObj
.
district
=
''
;
this
.
dialogObj
.
city
=
''
}
}
this
.
dialogObj
.
detail
=
row
.
address_info
?
row
.
address_info
.
address
:
''
;
this
.
dialogObj
.
receive_mobile
=
row
.
address_info
?
row
.
address_info
.
receive_mobile
:
''
;
this
.
dialogObj
.
receive_name
=
row
.
address_info
?
row
.
address_info
.
receive_name
:
''
;
this
.
dialogObj
.
province_name
=
row
.
address_info
?
row
.
address_info
.
province_name
:
''
;
this
.
dialogObj
.
city_name
=
row
.
address_info
?
row
.
address_info
.
city
:
''
;
this
.
dialogObj
.
district_name
=
row
.
address_info
?
row
.
address_info
.
area
:
''
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
show
=
true
;
},
getTeacherList
(
name
){
this
.
loading
=
true
let
json
=
{
limit
:
this
.
promoterDialog
.
limit
,
page
:
this
.
promoterDialog
.
nowPage
};
if
(
name
)
{
json
.
name
=
name
}
getTeacherListApi
(
json
).
then
(
res
=>
{
console
.
log
(
res
.
list
)
this
.
teacherList
=
res
.
list
this
.
loading
=
false
});
},
handleCurrentTeacherChange
(
val
){
console
.
log
(
'handleCurrentTeacherChange'
,
val
)
},
updateTeacher
(
val
){
console
.
log
(
val
)
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
this
.
getTeacherList
()
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
getTeacherList
(
query
);
}
else
{
this
.
getTeacherList
();
}
},
saveTeacher
(){
this
.
$confirm
(
'此操作将修改推广人?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
console
.
log
(
'this.promoterDialog.teacher_id'
,
this
.
promoterDialog
)
updateOrderTeacherApi
(
this
.
promoterDialog
.
id
,
this
.
promoterDialog
.
teacher_id
).
then
(
res
=>
{
this
.
promoterDialog
.
id
=
''
;
this
.
promoterDialog
.
teacher_id
=
''
;
this
.
promoterDialog
.
show
=
false
;
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
getOrderList
();
});
});
},
add
(){
this
.
newdialogObj
.
show
=
true
;
},
},
components
:
{
addressDialog
,
orderDialog
,
refundDialog
,
detailDialog
,
refundDetail
,
sourceDialog
,
couponDialog
,
page
},
mounted
(){
if
(
this
.
$route
.
query
.
code
)
{
this
.
searchFrom
.
invite_type
=
this
.
$route
.
query
.
code
}
this
.
getOrderList
();
this
.
getGoodsOption
();
},
watch
:{
"newdialogObj.show"
:
function
(
val
){
if
(
!
val
){
this
.
getOrderList
();
}
}
},
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
+
'元'
},
filterGoods
(
val
){
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
}
}
}
</
script
>
<
style
scoped
>
.avatar
{
width
:
50px
;
height
:
50px
;
margin-right
:
5px
;
border-radius
:
50%
;
}
.order
{
padding
:
20px
0
;
}
</
style
>
<
style
>
.f-c
>
.cell
{
display
:
flex
!important
;
flex-flow
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
}
</
style
>
src/components/monthOrder/newDialog.vue
0 → 100644
View file @
10eaca84
<
template
>
<el-dialog
title=
"新增订单"
center
append-to-body
:visible
.
sync=
"newdialogObj.show"
width=
"900px"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"120px"
:rules=
"rules"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"期数名称"
>
<el-cascader
:options=
"periodsList"
:props=
"
{value:'id',label:'name'}"
@active-item-change="handleItemChange"
@change="changePeriods"
v-model="selectedGoods"
>
</el-cascader>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品名称"
prop=
"goods_id"
>
<el-select
v-model=
"form.goods_id"
placeholder=
"请选择"
>
<el-option
v-for=
"(data,index) in goodsList"
:key=
"index"
:label=
"data | filterGoods"
:value=
"data.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"用户ID"
prop=
"user_id"
>
<el-input
v-model=
"form.user_id"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"实付金额(元)"
prop=
"money"
>
<el-input
v-model=
"form.money"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"购买方式"
prop=
"buy_type"
>
<el-select
v-model=
"form.buy_type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in buyTypeOptions"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"添加推广人"
>
<!--
<el-input
v-model=
"form.invite_id"
></el-input>
-->
<el-select
v-model=
"form.invite_id"
filterable
clearable
placeholder=
"请输入名称"
:remote-method=
"remoteMethod"
>
<el-option
v-for=
"item in teacherList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"备注"
>
<el-input
type=
"textarea"
v-model=
"form.desc"
></el-input>
</el-form-item>
</el-col>
</el-row>
<vue-address
:province=
"form.province_name"
:city=
"form.city"
:district=
"form.area"
:detail=
"form.address"
:mobile=
"form.receive_mobile"
:name=
"form.receive_name"
@
change=
"handlerAddressChange"
>
</vue-address>
<el-form-item
label=
"支付类型"
prop=
"order_type"
>
<el-select
v-model=
"form.order_type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in buyWayOptioms"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"支付时间"
prop=
"pay_at"
>
<el-date-picker
v-model=
"form.pay_at"
type=
"datetime"
:picker-options=
"pickerOptions1"
default-time=
"12:00:00"
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"newdialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"saveAddOrder(form)"
>
确定
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
getGoodsListApi
,
setOrderApi
,
getPeriodsApi
,
getTeacherListApi
}
from
"../../service/api"
import
vueAddress
from
'../framework/address-picker/Address'
import
AddressArray
from
'../framework/address-picker/addr'
import
{
ORDERSTATUS
,
BUYTYPEOPTION
,
BUYWay
,
GOODSTYPE
}
from
"../../util/wordbook"
import
CommonJs
from
'../../util/common'
;
export
default
{
name
:
"newdialogObj"
,
props
:[
'newdialogObj'
],
data
(){
return
{
rules
:{
periods_id
:
[
{
required
:
true
,
message
:
'请输入期数名称'
,
trigger
:
'change'
}
],
goods_id
:
[
{
required
:
true
,
message
:
'请输入商品名称'
,
trigger
:
'change'
}
],
money
:
[
{
required
:
true
,
message
:
'请输入金额'
,
trigger
:
'blur'
}
],
user_id
:
[
{
required
:
true
,
message
:
'请输入用户ID'
,
trigger
:
'blur'
}
],
pay_at
:
[
{
required
:
true
,
message
:
'请选择日期'
,
trigger
:
'change'
}
],
buy_type
:[
{
required
:
true
,
message
:
'请选择购买方式'
,
trigger
:
'change'
}
],
order_type
:[
{
required
:
true
,
message
:
'请选择支付类型'
,
trigger
:
'change'
}
]
},
form
:{
periods_id
:
""
,
goods_id
:
""
,
user_id
:
""
,
money
:
""
,
buy_type
:
""
,
invite_id
:
""
,
desc
:
""
,
province_name
:
""
,
city
:
""
,
area
:
""
,
city_name
:
""
,
district_name
:
""
,
district
:
""
,
province
:
""
,
address
:
""
,
receive_mobile
:
""
,
receive_name
:
""
,
order_type
:
""
,
pay_at
:
""
,
},
goodsList
:[],
periodsList
:[],
selectedGoods
:[],
buyTypeOptions
:
BUYTYPEOPTION
,
pickerOptions1
:
''
,
buyWayOptioms
:
BUYWay
,
teacherList
:
[],
}
},
components
:{
vueAddress
},
filters
:{
filterGoods
(
val
){
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
}
},
methods
:{
saveAddOrder
(
data
){
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
json
=
{
periods_id
:
data
.
periods_id
,
goods_id
:
data
.
goods_id
,
user_id
:
data
.
user_id
,
money
:
data
.
money
,
buy_type
:
data
.
buy_type
,
province_name
:
data
.
province_name
,
city_id
:
data
.
city
,
city
:
data
.
city_name
,
area
:
data
.
district_name
,
area_id
:
data
.
district
,
province_id
:
data
.
province
,
address
:
data
.
address
,
receive_mobile
:
data
.
receive_mobile
,
receive_name
:
data
.
receive_name
,
order_type
:
data
.
order_type
,
}
// 元转分
json
.
money
=
json
.
money
*
100.0
;
if
(
data
.
pay_at
){
json
.
pay_at
=
CommonJs
.
dateFmt
(
data
.
pay_at
,
"yyyy-MM-dd hh:mm:ss"
);
}
if
(
this
.
form
.
invite_id
){
json
.
invite_id
=
this
.
form
.
invite_id
}
if
(
this
.
form
.
desc
){
json
.
desc
=
this
.
form
.
desc
}
json
.
invite_type
=
"TEACHER"
;
json
.
status
=
2
;
json
.
invite_earnings
=
0
;
json
.
is_captain
=
""
;
json
.
out_trade_no
=
"1"
console
.
log
(
json
)
if
(
json
.
province_name
&&
json
.
address
&&
json
.
receive_mobile
&&
json
.
receive_name
){
setOrderApi
(
json
).
then
(
res
=>
{
this
.
newdialogObj
.
show
=
false
this
.
$message
({
message
:
'添加成功'
,
type
:
'success'
});
})
}
else
{
this
.
$message
({
message
:
"缺少必填项"
,
type
:
"warning"
});
}
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
handlerAddressChange
(
val
){
if
(
!
val
.
province
||
!
val
.
city
||
!
val
.
district
){
return
}
this
.
form
.
address
=
val
.
detail
;
this
.
form
.
province
=
val
.
province
;
this
.
form
.
city
=
val
.
city
;
this
.
form
.
receive_mobile
=
val
.
mobile
;
this
.
form
.
receive_name
=
val
.
name
;
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
return
item
.
value
===
val
.
province
})
let
cityObj
=
provinceObj
[
0
].
children
.
filter
((
city
)
=>
{
return
city
.
value
===
val
.
city
})
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
return
district
.
value
===
val
.
district
})
this
.
form
.
province_name
=
provinceObj
[
0
].
label
;
this
.
form
.
city_name
=
cityObj
[
0
].
label
;
this
.
form
.
district_name
=
districtObj
.
length
>
0
?
districtObj
[
0
].
label
:
cityObj
[
0
].
children
[
0
].
label
;
this
.
form
.
district
=
districtObj
.
length
>
0
?
districtObj
[
0
].
value
:
cityObj
[
0
].
children
[
0
].
value
;
},
getGoodsOption
(){
let
json
=
{
page
:
1
,
limit
:
200
};
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodsList
=
res
.
list
;
})
},
getPeriodsList
(){
let
json
=
{
page
:
1
,
limit
:
100
,
goods_type
:
'1,2'
};
getGoodsListApi
(
json
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
name
=
'['
+
GOODSTYPE
[
i
.
goods_type
]
+
']'
+
'['
+
i
.
current_price
/
100
+
'元]'
+
i
.
name
i
.
children
=
[];
});
this
.
periodsList
=
res
.
list
;
});
},
handleItemChange
(
val
){
getPeriodsApi
({
goods_id
:
val
[
0
]}).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
name
=
i
.
title
});
this
.
periodsList
.
find
(
i
=>
{
return
i
.
id
===
val
[
0
]}).
children
=
res
.
list
})
},
changePeriods
(
data
){
if
(
data
.
length
>
1
){
this
.
form
.
periods_id
=
data
[
1
];
}
},
getTeacherList
(
name
){
let
json
=
{
limit
:
100
,
page
:
1
};
if
(
name
)
{
json
.
name
=
name
}
getTeacherListApi
(
json
).
then
(
res
=>
{
this
.
teacherList
=
res
.
list
});
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
getTeacherList
(
query
);
}
else
{
this
.
getTeacherList
();
}
},
},
mounted
(){
this
.
getGoodsOption
();
this
.
getPeriodsList
();
this
.
getTeacherList
();
},
}
</
script
>
<
style
scoped
lang=
"less"
>
.dialog-footer{
display: block;
text-align: center;
}
</
style
>
src/components/monthOrder/refundDetail.vue
0 → 100644
View file @
10eaca84
<
template
>
<el-dialog
title=
"退款详情"
center
append-to-body
:visible
.
sync=
"dialogObj.show"
width=
"90%"
>
<el-table
:data=
"detail"
style=
"width: 100%"
>
<el-table-column
prop=
"refund_no"
label=
"退款编号"
>
</el-table-column>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"用户信息"
min-width=
"140"
className=
"userInfo"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
>
{{
scope
.
row
.
user_nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"order_money"
label=
"订单金额"
>
<
template
slot-scope=
"scope"
>
{{
parseFloat
(
scope
.
row
.
order_money
/
100
)
}}
元
</
template
>
</el-table-column>
<el-table-column
prop=
"refund_money"
label=
"退款金额"
>
<
template
slot-scope=
"scope"
>
{{
parseFloat
(
scope
.
row
.
refund_money
/
100
)
}}
元
</
template
>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
</el-table-column>
<el-table-column
label=
"退款状态"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
filterStatus
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"success_at"
label=
"退款成功时间"
>
</el-table-column>
</el-table>
</el-dialog>
</template>
<
script
>
import
{
getRefundListApi
}
from
"../../service/api"
;
export
default
{
name
:
"refundDetail"
,
props
:[
'dialogObj'
],
data
(){
return
{
detail
:[]
}
},
filters
:{
filterStatus
:
function
(
value
)
{
let
msg
=
''
;
if
(
value
===
0
){
msg
=
'退款中'
}
else
if
(
value
===
1
){
msg
=
'退款成功'
}
else
if
(
value
===
2
){
msg
=
'退款失败'
}
return
msg
;
}
},
mounted
(){
this
.
initPage
()
},
methods
:{
initPage
(){
let
json
=
{
out_trade_no
:
this
.
dialogObj
.
out_trade_no
,
limit
:
10000
};
getRefundListApi
(
json
).
then
(
res
=>
{
this
.
detail
=
res
.
list
})
}
},
watch
:{
'dialogObj.show'
(
value
)
{
if
(
value
===
true
)
{
this
.
initPage
()
}
}
}
}
</
script
>
<
style
scoped
>
.avatar
{
width
:
50px
;
height
:
50px
;
border-radius
:
50%
;
}
</
style
>
src/components/monthOrder/refundDialog.vue
0 → 100644
View file @
10eaca84
<
template
>
<el-dialog
title=
"退款"
center
append-to-body
:visible
.
sync=
"show"
width=
"800px"
>
<div
v-loading=
"loading"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
><label>
退款金额
</label></el-col>
<el-col
:span=
"8"
>
<el-form-item
prop=
"key"
>
<el-input
v-model=
"form.money"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-button
type=
"success"
round
size=
"small"
@
click=
"form.money=100"
>
¥100
</el-button>
<el-button
type=
"success"
round
size=
"mini"
@
click=
"form.money=150"
>
¥150
</el-button>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
><label>
退课
</label></el-col>
<el-col
:span=
"8"
>
<el-form-item>
<el-switch
v-model=
"form.refund_type"
:active-value=
"2"
:inactive-value=
"1"
>
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
><label>
退款原因
</label></el-col>
<el-col
:span=
"12"
>
<el-form-item>
<el-input
v-model=
"form.desc"
type=
"textarea"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"save"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
refundApi
}
from
"../../service/api"
;
export
default
{
name
:
"dialogObj"
,
props
:[
'dialogObj'
],
data
(){
return
{
show
:
false
,
id
:
''
,
loading
:
true
,
form
:{
money
:
0
,
refund_type
:
1
,
desc
:
''
},
rules
:{
money
:[
{
required
:
true
,
message
:
'请输入退款金额'
,
trigger
:
'change'
}
],
desc
:[
{
required
:
true
,
message
:
'请输入退款原因'
,
trigger
:
'change'
}
]
}
}
},
methods
:{
save
(){
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
if
(
this
.
dialogObj
.
id
){
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
let
json
=
{
refund_money
:
parseFloat
(
this
.
form
.
money
)
*
100
,
desc
:
this
.
form
.
desc
};
refundApi
(
this
.
dialogObj
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'退款成功!'
});
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
}
});
}
});
},
initDialog
(){
this
.
show
=
this
.
dialogObj
.
show
;
if
(
this
.
dialogObj
.
id
)
{
this
.
id
=
this
.
dialogObj
.
id
;
}
this
.
form
.
money
=
parseFloat
(
this
.
dialogObj
.
money
/
100
);
this
.
form
.
desc
=
this
.
dialogObj
.
desc
;
this
.
loading
=
false
}
},
watch
:{
dialogObj
:{
handler
:
function
()
{
this
.
initDialog
()
},
deep
:
true
},
show
(
value
){
this
.
$emit
(
"changeShow"
,
value
);
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
src/components/monthOrder/sourceDialog.vue
0 → 100644
View file @
10eaca84
<
template
>
<el-dialog
title=
"提现详情"
center
append-to-body
:visible
.
sync=
"dialogObj.show"
width=
"90%"
>
<el-table
:data=
"detail"
style=
"width: 100%"
>
<el-table-column
prop=
"withdraw_no"
label=
"提现单号"
>
</el-table-column>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"用户"
width=
"200"
className=
"f-c"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"user_mobile"
label=
"手机号"
>
</el-table-column>
<el-table-column
label=
"提现金额"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
money
|
moneyYuan
}}
</
template
>
</el-table-column>
<el-table-column
label=
"提现状态"
>
<
template
slot-scope=
"scope"
>
<span
:class=
"
{status:true,red:scope.row.status === 2,green:scope.row.status === 1}">
{{
scope
.
row
.
status
|
filterStatus
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"提现成功时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
success_at
}}
</
template
>
</el-table-column>
<el-table-column
label=
"提现时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
created_at
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"reason"
label=
"失败原因"
>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
</el-table-column>
</el-table>
</el-dialog>
</template>
<
script
>
import
{
getWithdrawListApi
}
from
"../../service/api"
;
export
default
{
name
:
"sourceDialog"
,
props
:[
'dialogObj'
],
data
(){
return
{
detail
:[]
}
},
filters
:{
moneyYuan
:
function
(
value
)
{
if
(
!
value
){
return
''
;
}
return
value
=
(
value
/
100
).
toFixed
(
2
)
+
'元'
;
},
filterStatus
:
function
(
value
)
{
let
msg
=
''
;
if
(
value
===
0
){
msg
=
'审核中'
}
else
if
(
value
===
1
){
msg
=
'提现成功'
}
else
if
(
value
===
2
){
msg
=
'提现失败'
}
return
msg
;
}
},
mounted
(){
this
.
initPage
()
},
methods
:{
initPage
(){
let
json
=
{
out_trade_no
:
this
.
dialogObj
.
out_trade_no
,
limit
:
10000
};
getWithdrawListApi
(
json
).
then
(
res
=>
{
this
.
detail
=
res
.
list
})
}
},
watch
:{
'dialogObj.show'
(
value
){
if
(
value
===
true
){
this
.
initPage
()
}
}
}
}
</
script
>
<
style
scoped
>
.avatar
{
width
:
50px
;
height
:
50px
;
border-radius
:
50%
;
}
</
style
>
src/components/order/index.vue
View file @
10eaca84
...
@@ -13,11 +13,7 @@
...
@@ -13,11 +13,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品名称"
>
<el-form-item
label=
"商品名称"
>
<el-select
v-model=
"searchFrom.goods_id"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-select
v-model=
"searchFrom.goods_id"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
<el-option
v-for=
"(data,index) in goodList"
:key=
"index"
:label=
"data | filterGoods"
:value=
"data.id"
>
v-for=
"(data,index) in goodList"
:key=
"index"
:label=
"data | filterGoods"
:value=
"data.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -29,23 +25,18 @@
...
@@ -29,23 +25,18 @@
<el-form-item
label=
"推广人ID"
>
<el-form-item
label=
"推广人ID"
>
<el-input
v-model=
"searchFrom.invite_id"
:placeholder=
"inviteSearchPlaceholder"
></el-input>
<el-input
v-model=
"searchFrom.invite_id"
:placeholder=
"inviteSearchPlaceholder"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"团ID"
>
<el-input
v-model=
"searchFrom.order_group_id"
></el-input>
</el-form-item>
<el-form-item
label=
"购买方式"
>
<el-form-item
label=
"购买方式"
>
<el-select
v-model=
"searchFrom.buy_type"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-select
v-model=
"searchFrom.buy_type"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
<el-option
v-for=
"item in buyTypeOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
v-for=
"item in buyTypeOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-form-item
label=
"订单状态"
>
<el-select
multiple
v-model=
"searchFrom.status"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-select
multiple
v-model=
"searchFrom.status"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
<el-option
v-for=
"item in orderStatusOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
v-for=
"item in orderStatusOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -53,17 +44,10 @@
...
@@ -53,17 +44,10 @@
<el-input
v-model=
"searchFrom.out_trade_no"
></el-input>
<el-input
v-model=
"searchFrom.out_trade_no"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"购买时间"
>
<el-form-item
label=
"购买时间"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00','23:59:59']"
@
change=
"getOrderList"
>
v-model=
"searchFrom.payTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00','23:59:59']"
@
change=
"getOrderList"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
>
<el-form-item
>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
>
导出
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
>
导出
</el-button>
</el-form-item>
</el-form-item>
...
@@ -71,64 +55,45 @@
...
@@ -71,64 +55,45 @@
<!-- <el-button type="success" plain @click="add">新增订单</el-button> -->
<!-- <el-button type="success" plain @click="add">新增订单</el-button> -->
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
:data=
"tableData"
@
expand-change=
"changeRow"
style=
"width: 100%"
>
:data=
"tableData"
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
@
expand-change=
"changeRow"
style=
"width: 100%"
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
label=
"购买人"
className=
"f-c"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
prop=
"goods_name"
label=
"商品名称"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人属性"
>
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人属性"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
scope
.
row
.
invite_type
}}
类型:
{{
scope
.
row
.
invite_type
}}
<br>
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
</div>
</div>
<div
v-if=
"scope.row.invite_earnings === 0 && scope.row.invite_id !== 0"
style=
"display: flex;"
>
<div
v-if=
"scope.row.invite_earnings === 0 && scope.row.invite_id !== 0"
style=
"display: flex;"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
scope
.
row
.
invite_type
}}
类型:
{{
scope
.
row
.
invite_type
}}
<br>
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
</div>
</div>
<div
v-if=
"scope.row.invite_id === 0"
>
<div
v-if=
"scope.row.invite_id === 0"
>
无
无
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"order_group_id"
label=
"团ID"
width=
"80"
>
label=
"优惠活动"
>
</el-table-column>
<el-table-column
label=
"是否团长"
width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_captain
|
isLeader
}}
</
template
>
</el-table-column>
<el-table-column
label=
"优惠活动"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
无
无
...
@@ -138,87 +103,52 @@
...
@@ -138,87 +103,52 @@
</el-button>
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"付款状态"
width=
"80"
>
label=
"付款状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"实付金额"
width=
"80"
>
label=
"实付金额"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
money
|
moneytFilter
}}
{{
scope
.
row
.
money
|
moneytFilter
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"收货地址"
>
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.user_address_id && scope.row.address_info"
>
<div
v-if=
"scope.row.user_address_id && scope.row.address_info"
>
{{
scope
.
row
.
address_info
.
receive_name
}}
<br>
{{
scope
.
row
.
address_info
.
receive_name
}}
<br>
{{
scope
.
row
.
address_info
.
receive_mobile
}}
{{
scope
.
row
.
address_info
.
receive_mobile
}}
<br>
<br>
{{
scope
.
row
.
address_info
.
province_name
}}{{
scope
.
row
.
address_info
.
city
}}{{
scope
.
row
.
address_info
.
area
}}{{
scope
.
row
.
address_info
.
address
}}
{{
scope
.
row
.
address_info
.
province_name
}}{{
scope
.
row
.
address_info
.
city
}}{{
scope
.
row
.
address_info
.
area
}}{{
scope
.
row
.
address_info
.
address
}}
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"pay_at"
label=
"购买时间"
sortable
>
prop=
"pay_at"
label=
"购买时间"
sortable
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"created_at"
label=
"下单时间"
sortable
>
prop=
"created_at"
label=
"下单时间"
sortable
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"desc"
label=
"备注"
>
prop=
"desc"
label=
"备注"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
width=
"50"
label=
"操作"
v-if=
"!$store.state.readonly"
>
width=
"50"
label=
"操作"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-popover
<el-popover
placement=
"top"
width=
"400"
>
placement=
"top"
width=
"400"
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<!--v-if="(scope.row.status == 1 || scope.row.status == 4|| scope.row.status == 5) && $store.state.orderRefund"-->
<!--v-if="(scope.row.status == 1 || scope.row.status == 4|| scope.row.status == 5) && $store.state.orderRefund"-->
<el-button
<el-button
@
click=
"onRefund(scope.row.id, scope.row.money)"
type=
"warning"
plain
size=
"mini"
>
@
click=
"onRefund(scope.row.id, scope.row.money)"
type=
"warning"
plain
size=
"mini"
>
退款
退款
</el-button>
</el-button>
<el-button
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
编辑备注
</el-button>
</el-button>
<el-button
<el-button
v-if=
"scope.row.user_address_id"
@
click=
"editAddress(scope.row)"
plain
type=
"info"
size=
"mini"
>
v-if=
"scope.row.user_address_id"
@
click=
"editAddress(scope.row)"
plain
type=
"info"
size=
"mini"
>
编辑收货地址
编辑收货地址
</el-button>
</el-button>
<el-button
<el-button
@
click=
"updateTeacher(scope.row)"
type=
"warning"
plain
size=
"mini"
>
@
click=
"updateTeacher(scope.row)"
type=
"warning"
plain
size=
"mini"
>
编辑推广人
编辑推广人
</el-button>
</el-button>
</div>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</el-popover>
</
template
>
</
template
>
...
@@ -227,31 +157,15 @@
...
@@ -227,31 +157,15 @@
<address-dialog
v-if=
"dialogObj.show"
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<address-dialog
v-if=
"dialogObj.show"
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<order-dialog
v-if=
"newdialogObj.show"
:newdialogObj=
"newdialogObj"
></order-dialog>
<order-dialog
v-if=
"newdialogObj.show"
:newdialogObj=
"newdialogObj"
></order-dialog>
<refund-dialog
:dialogObj=
"refundDialogObj"
@
reflash=
"onAfterRefund"
@
changeShow=
"changeShow"
></refund-dialog>
<refund-dialog
:dialogObj=
"refundDialogObj"
@
reflash=
"onAfterRefund"
@
changeShow=
"changeShow"
></refund-dialog>
<detail-dialog
:dialogObj=
"dialogDetailObj"
@
changeShow=
"changeDetailShow"
/>
<detail-dialog
:dialogObj=
"dialogDetailObj"
@
changeShow=
"changeDetailShow"
/>
<source-dialog
:dialogObj=
"sourceDialog"
/>
<source-dialog
:dialogObj=
"sourceDialog"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
<el-dialog
<el-dialog
title=
"修改推广人"
center
append-to-body
:visible
.
sync=
"promoterDialog.show"
width=
"600"
>
title=
"修改推广人"
center
append-to-body
:visible
.
sync=
"promoterDialog.show"
width=
"600"
>
<el-form
ref=
"form"
label-width=
"120px"
>
<el-form
ref=
"form"
label-width=
"120px"
>
<el-form-item
label=
"老师"
>
<el-form-item
label=
"老师"
>
<el-select
<el-select
v-model=
"promoterDialog.teacher_id"
filterable
remote
clearable
placeholder=
"请输入名称"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
v-model=
"promoterDialog.teacher_id"
<el-option
v-for=
"item in teacherList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.user_id"
>
filterable
remote
clearable
placeholder=
"请输入名称"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
v-for=
"item in teacherList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.user_id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -261,53 +175,72 @@
...
@@ -261,53 +175,72 @@
<el-button
type=
"primary"
@
click=
"saveTeacher"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"saveTeacher"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getOrderListApi
,
editOrderDescApi
,
getGoodsListApi
,
getRefundListApi
,
exportExcelApi
,
getTeacherListApi
,
updateOrderTeacherApi
,
setOrderApi
}
from
"../../service/api"
;
import
{
import
page
from
'../framework/page'
getOrderListApi
,
import
addressDialog
from
'./dialog'
editOrderDescApi
,
import
orderDialog
from
'./newDialog'
getGoodsListApi
,
import
sourceDialog
from
'./sourceDialog'
getRefundListApi
,
import
refundDialog
from
'./refundDialog'
exportExcelApi
,
import
couponDialog
from
'./couponDialog'
getTeacherListApi
,
import
detailDialog
from
'./detail'
updateOrderTeacherApi
,
import
refundDetail
from
'./refundDetail'
setOrderApi
import
AddressArray
from
'../framework/address-picker/addr'
}
from
"../../service/api"
;
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
BUYTYPEOPTION
,
ORDERSTATUSOPTION
,
INVITETYPEOPTION
,
GOODSTYPE
}
from
"../../util/wordbook"
;
import
page
from
"../framework/page"
;
import
CommonJs
from
'../../util/common'
;
import
addressDialog
from
"./dialog"
;
import
orderDialog
from
"./newDialog"
;
import
sourceDialog
from
"./sourceDialog"
;
import
refundDialog
from
"./refundDialog"
;
import
couponDialog
from
"./couponDialog"
;
import
detailDialog
from
"./detail"
;
import
refundDetail
from
"./refundDetail"
;
import
AddressArray
from
"../framework/address-picker/addr"
;
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
BUYTYPEOPTION
,
ORDERSTATUSOPTION
,
INVITETYPEOPTION
,
GOODSTYPE
,
ISLEADER
}
from
"../../util/wordbook"
;
import
CommonJs
from
"../../util/common"
;
export
default
{
export
default
{
name
:
'index'
,
name
:
"index"
,
data
()
{
data
()
{
return
{
return
{
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
sourceDialog
:
{
sourceDialog
:
{
show
:
false
,
show
:
false
,
out_trade_no
:
''
out_trade_no
:
""
},
},
couponDetail
:
{
couponDetail
:
{
show
:
false
,
show
:
false
,
order_coupon_id
:
''
order_coupon_id
:
""
},
},
refundDetail
:
{
refundDetail
:
{
show
:
false
,
show
:
false
,
out_trade_no
:
''
out_trade_no
:
""
},
},
limit
:
10
,
limit
:
10
,
searchFrom
:
{
searchFrom
:
{
nickname
:
''
,
nickname
:
""
,
user_id
:
''
,
user_id
:
""
,
invite_type
:
''
,
invite_type
:
""
,
invite_id
:
''
,
invite_id
:
""
,
buy_type
:
''
,
buy_type
:
""
,
status
:
[
1
,
4
,
5
],
status
:
[
1
,
4
,
5
],
goods_id
:
''
,
goods_id
:
""
,
out_trade_no
:
''
,
out_trade_no
:
""
,
payTime
:
[]
payTime
:
[],
order_group_id
:
""
},
},
tableData
:
[],
tableData
:
[],
dialogObj
:
{
dialogObj
:
{
...
@@ -318,7 +251,7 @@
...
@@ -318,7 +251,7 @@
},
},
refundDialogObj
:
{
refundDialogObj
:
{
show
:
false
,
show
:
false
,
id
:
''
,
id
:
""
,
money
:
0
money
:
0
},
},
dialogDetailObj
:
{
dialogDetailObj
:
{
...
@@ -329,295 +262,331 @@
...
@@ -329,295 +262,331 @@
inviteTypeOption
:
INVITETYPEOPTION
,
inviteTypeOption
:
INVITETYPEOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
buyTypeOption
:
BUYTYPEOPTION
,
buyTypeOption
:
BUYTYPEOPTION
,
inviteSearchPlaceholder
:
''
,
inviteSearchPlaceholder
:
""
,
rules
:{
rules
:
{
value
:[
value
:
[{
required
:
true
,
message
:
"请输入备注"
,
trigger
:
"change"
}]
{
required
:
true
,
message
:
'请输入备注'
,
trigger
:
'change'
}
]
},
},
promoterDialog
:
{
promoterDialog
:
{
show
:
false
,
show
:
false
,
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
limit
:
100
,
limit
:
100
,
teacher_id
:
''
teacher_id
:
""
},
},
teacherList
:
[],
teacherList
:
[],
loading
:
false
loading
:
false
}
};
},
},
methods
:
{
methods
:
{
showRef
(
data
)
{
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
},
},
showCoupon
(
data
)
{
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
},
},
showSource
(
data
)
{
showSource
(
data
)
{
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
},
},
changeRow
(
data
,
b
)
{
changeRow
(
data
,
b
)
{
if
(
b
.
indexOf
(
data
)
>-
1
)
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
data
.
refundList
=
res
.
list
data
.
refundList
=
res
.
list
;
})
});
}
}
},
},
exportTable
()
{
exportTable
()
{
let
json
=
{};
let
json
=
{};
if
(
this
.
searchFrom
.
nickname
)
{
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
json
.
nickname
=
this
.
searchFrom
.
nickname
;
}
}
if
(
this
.
searchFrom
.
user_id
)
{
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
json
.
user_id
=
this
.
searchFrom
.
user_id
;
}
}
if
(
this
.
searchFrom
.
invite_type
)
{
if
(
this
.
searchFrom
.
invite_type
)
{
json
.
invite_type
=
this
.
searchFrom
.
invite_type
json
.
invite_type
=
this
.
searchFrom
.
invite_type
;
}
}
if
(
this
.
searchFrom
.
invite_id
)
{
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
json
.
invite_id
=
this
.
searchFrom
.
invite_id
;
}
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
;
}
}
if
(
this
.
searchFrom
.
buy_type
)
{
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
json
.
buy_type
=
this
.
searchFrom
.
buy_type
;
}
}
if
(
this
.
searchFrom
.
status
)
{
if
(
this
.
searchFrom
.
status
)
{
json
.
status
=
this
.
searchFrom
.
status
.
toString
()
json
.
status
=
this
.
searchFrom
.
status
.
toString
();
}
}
if
(
this
.
searchFrom
.
goods_id
)
{
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
json
.
goods_id
=
this
.
searchFrom
.
goods_id
;
}
}
if
(
this
.
searchFrom
.
out_trade_no
)
{
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
;
}
}
if
(
this
.
searchFrom
.
receive_mobile
)
{
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
;
}
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
){
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
json
.
pay_start_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
0
],
"yyyy-MM-dd hh:mm:ss"
);
json
.
pay_start_at
=
CommonJs
.
dateFmt
(
json
.
pay_end_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
)
this
.
searchFrom
.
payTime
[
0
],
}
"yyyy-MM-dd hh:mm:ss"
exportExcelApi
(
'/api/public/order/export'
,
json
)
);
},
json
.
pay_end_at
=
CommonJs
.
dateFmt
(
getGoodsOption
(){
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
);
}
json
.
course_type
=
1
;
//日课
exportExcelApi
(
"/api/admin/order/export"
,
json
);
},
getGoodsOption
()
{
let
json
=
{
let
json
=
{
page
:
1
,
page
:
1
,
limit
:
100
limit
:
100
};
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
this
.
goodList
=
res
.
list
;
})
});
},
},
onInviteTypeChange
(
val
)
{
onInviteTypeChange
(
val
)
{
if
(
val
===
0
)
{
if
(
val
===
0
)
{
this
.
inviteSearchPlaceholder
=
'用户ID'
this
.
inviteSearchPlaceholder
=
"用户ID"
;
}
else
if
(
val
===
1
)
{
}
else
if
(
val
===
1
)
{
this
.
inviteSearchPlaceholder
=
'老师ID'
this
.
inviteSearchPlaceholder
=
"老师ID"
;
}
else
if
(
val
===
2
)
{
}
else
if
(
val
===
2
)
{
this
.
inviteSearchPlaceholder
=
'推广人ID'
this
.
inviteSearchPlaceholder
=
"推广人ID"
;
}
}
this
.
getOrderList
();
this
.
getOrderList
();
},
},
detail
(
row
)
{
detail
(
row
)
{
let
_detail
=
row
;
let
_detail
=
row
;
this
.
dialogDetailObj
=
{
this
.
dialogDetailObj
=
{
show
:
true
,
show
:
true
,
detail
:
_detail
detail
:
_detail
}
};
},
},
editComment
(
id
,
desc
)
{
editComment
(
id
,
desc
)
{
this
.
$prompt
(
''
,
'编辑备注'
,
{
this
.
$prompt
(
""
,
"编辑备注"
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
"取消"
,
inputType
:
'textarea'
,
inputType
:
"textarea"
,
inputValue
:
desc
||
''
inputValue
:
desc
||
""
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
this
.
$confirm
(
"确定保存?"
,
"提示"
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
"取消"
,
type
:
'warning'
type
:
"warning"
}).
then
(()
=>
{
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,{
desc
:
value
}).
then
(
res
=>
{
editOrderDescApi
(
id
,
"order"
,
{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
"success"
,
message
:
'编辑备注成功'
message
:
"编辑备注成功"
});
});
this
.
getOrderList
();
this
.
getOrderList
();
});
});
});
});
})
});
},
},
onPageChange
(
val
)
{
onPageChange
(
val
)
{
this
.
nowPage
=
val
this
.
nowPage
=
val
;
this
.
getOrderList
()
this
.
getOrderList
();
},
},
onSizeChange
(
val
)
{
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
nowPage
=
1
;
this
.
getOrderList
()
this
.
getOrderList
();
},
},
getOrderList
()
{
getOrderList
()
{
let
json
=
{
let
json
=
{
limit
:
this
.
limit
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
page
:
this
.
nowPage
};
};
if
(
this
.
searchFrom
.
nickname
)
{
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
json
.
nickname
=
this
.
searchFrom
.
nickname
;
}
}
if
(
this
.
searchFrom
.
user_id
)
{
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
json
.
user_id
=
this
.
searchFrom
.
user_id
;
}
}
if
(
this
.
searchFrom
.
invite_type
)
{
if
(
this
.
searchFrom
.
invite_type
)
{
json
.
invite_type
=
this
.
searchFrom
.
invite_type
json
.
invite_type
=
this
.
searchFrom
.
invite_type
;
}
}
if
(
this
.
searchFrom
.
invite_id
)
{
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
json
.
invite_id
=
this
.
searchFrom
.
invite_id
;
}
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
;
}
}
if
(
this
.
searchFrom
.
buy_type
)
{
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
json
.
buy_type
=
this
.
searchFrom
.
buy_type
;
}
}
if
(
this
.
searchFrom
.
status
)
{
if
(
this
.
searchFrom
.
status
)
{
json
.
status
=
this
.
searchFrom
.
status
.
toString
()
json
.
status
=
this
.
searchFrom
.
status
.
toString
();
}
}
if
(
this
.
searchFrom
.
goods_id
)
{
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
json
.
goods_id
=
this
.
searchFrom
.
goods_id
;
}
}
if
(
this
.
searchFrom
.
out_trade_no
)
{
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
;
}
}
if
(
this
.
searchFrom
.
receive_mobile
)
{
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
;
}
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
){
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
json
.
pay_start_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
0
],
"yyyy-MM-dd hh:mm:ss"
);
json
.
pay_start_at
=
CommonJs
.
dateFmt
(
json
.
pay_end_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
)
this
.
searchFrom
.
payTime
[
0
],
}
"yyyy-MM-dd hh:mm:ss"
getOrderListApi
(
json
).
then
((
res
)
=>
{
);
res
.
list
.
forEach
(
i
=>
{
json
.
pay_end_at
=
CommonJs
.
dateFmt
(
i
.
refundList
=
[]
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
);
}
json
.
course_type
=
1
;
//日课
console
.
log
(
json
);
getOrderListApi
(
json
).
then
(
res
=>
{
console
.
log
(
res
.
list
);
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[];
});
});
this
.
tableData
=
res
.
list
;
this
.
tableData
=
res
.
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
;
})
});
},
},
changeDetailShow
(
data
)
{
changeDetailShow
(
data
)
{
this
.
dialogDetailObj
.
show
=
data
this
.
dialogDetailObj
.
show
=
data
;
},
},
changeShow
(
data
)
{
changeShow
(
data
)
{
this
.
refundDialogObj
.
show
=
data
this
.
refundDialogObj
.
show
=
data
;
},
},
onRefund
(
id
,
money
)
{
onRefund
(
id
,
money
)
{
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
money
=
money
;
this
.
refundDialogObj
.
money
=
money
;
this
.
refundDialogObj
.
show
=
true
;
this
.
refundDialogObj
.
show
=
true
;
},
},
onAfterRefund
()
{
onAfterRefund
()
{
this
.
refundDialogObj
.
show
=
false
;
this
.
refundDialogObj
.
show
=
false
;
this
.
getOrderList
()
this
.
getOrderList
();
},
},
onUpdateAddress
()
{
onUpdateAddress
()
{
this
.
dialogObj
.
show
=
false
;
this
.
dialogObj
.
show
=
false
;
this
.
getOrderList
();
this
.
getOrderList
();
},
},
editAddress
(
row
)
{
editAddress
(
row
)
{
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
this
.
dialogObj
.
province
=
''
this
.
dialogObj
.
province
=
""
;
this
.
dialogObj
.
city
=
''
this
.
dialogObj
.
city
=
""
;
this
.
dialogObj
.
district
=
''
this
.
dialogObj
.
district
=
""
;
}
else
{
}
else
{
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
let
provinceObj
=
AddressArray
.
filter
(
item
=>
{
return
item
.
label
===
row
.
address_info
.
province_name
return
item
.
label
===
row
.
address_info
.
province_name
;
})
});
if
(
provinceObj
&&
provinceObj
.
length
>
0
){
if
(
provinceObj
&&
provinceObj
.
length
>
0
)
{
this
.
dialogObj
.
province
=
row
.
address_info
.
province_id
?
row
.
address_info
.
province_id
:
provinceObj
[
0
].
value
this
.
dialogObj
.
province
=
row
.
address_info
.
province_id
if
(
!
row
.
address_info
.
city
){
?
row
.
address_info
.
province_id
this
.
dialogObj
.
city
=
''
:
provinceObj
[
0
].
value
;
if
(
!
row
.
address_info
.
city
)
{
this
.
dialogObj
.
city
=
""
;
}
else
{
}
else
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
((
city
)
=>
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
(
city
=>
{
return
city
.
label
===
row
.
address_info
.
city
return
city
.
label
===
row
.
address_info
.
city
;
})
this
.
dialogObj
.
city
=
row
.
address_info
.
city_id
?
row
.
address_info
.
city_id
:
cityObj
[
0
].
value
if
(
!
row
.
address_info
.
area
){
this
.
dialogObj
.
district
=
''
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
return
district
.
label
===
row
.
address_info
.
area
});
});
this
.
dialogObj
.
district
=
row
.
address_info
.
area_id
?
row
.
address_info
.
area_id
:
districtObj
[
0
].
value
this
.
dialogObj
.
city
=
row
.
address_info
.
city_id
}
?
row
.
address_info
.
city_id
}
:
cityObj
[
0
].
value
;
if
(
!
row
.
address_info
.
area
)
{
this
.
dialogObj
.
district
=
""
;
}
else
{
}
else
{
this
.
dialogObj
.
province
=
''
;
let
districtObj
=
cityObj
[
0
].
children
.
filter
(
district
=>
{
this
.
dialogObj
.
district
=
''
;
return
district
.
label
===
row
.
address_info
.
area
;
this
.
dialogObj
.
city
=
''
});
this
.
dialogObj
.
district
=
row
.
address_info
.
area_id
?
row
.
address_info
.
area_id
:
districtObj
[
0
].
value
;
}
}
}
}
this
.
dialogObj
.
detail
=
row
.
address_info
?
row
.
address_info
.
address
:
''
;
}
else
{
this
.
dialogObj
.
receive_mobile
=
row
.
address_info
?
row
.
address_info
.
receive_mobile
:
''
;
this
.
dialogObj
.
province
=
""
;
this
.
dialogObj
.
receive_name
=
row
.
address_info
?
row
.
address_info
.
receive_name
:
''
;
this
.
dialogObj
.
district
=
""
;
this
.
dialogObj
.
province_name
=
row
.
address_info
?
row
.
address_info
.
province_name
:
''
;
this
.
dialogObj
.
city
=
""
;
this
.
dialogObj
.
city_name
=
row
.
address_info
?
row
.
address_info
.
city
:
''
;
}
this
.
dialogObj
.
district_name
=
row
.
address_info
?
row
.
address_info
.
area
:
''
;
}
this
.
dialogObj
.
detail
=
row
.
address_info
?
row
.
address_info
.
address
:
""
;
this
.
dialogObj
.
receive_mobile
=
row
.
address_info
?
row
.
address_info
.
receive_mobile
:
""
;
this
.
dialogObj
.
receive_name
=
row
.
address_info
?
row
.
address_info
.
receive_name
:
""
;
this
.
dialogObj
.
province_name
=
row
.
address_info
?
row
.
address_info
.
province_name
:
""
;
this
.
dialogObj
.
city_name
=
row
.
address_info
?
row
.
address_info
.
city
:
""
;
this
.
dialogObj
.
district_name
=
row
.
address_info
?
row
.
address_info
.
area
:
""
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
show
=
true
;
this
.
dialogObj
.
show
=
true
;
},
},
getTeacherList
(
name
)
{
getTeacherList
(
name
)
{
this
.
loading
=
true
this
.
loading
=
true
;
let
json
=
{
let
json
=
{
limit
:
this
.
promoterDialog
.
limit
,
limit
:
this
.
promoterDialog
.
limit
,
page
:
this
.
promoterDialog
.
nowPage
page
:
this
.
promoterDialog
.
nowPage
};
};
if
(
name
)
{
if
(
name
)
{
json
.
name
=
name
json
.
name
=
name
;
}
}
getTeacherListApi
(
json
).
then
(
res
=>
{
getTeacherListApi
(
json
).
then
(
res
=>
{
console
.
log
(
res
.
list
)
console
.
log
(
res
.
list
);
this
.
teacherList
=
res
.
list
this
.
teacherList
=
res
.
list
;
this
.
loading
=
false
this
.
loading
=
false
;
});
});
},
},
handleCurrentTeacherChange
(
val
)
{
handleCurrentTeacherChange
(
val
)
{
console
.
log
(
'handleCurrentTeacherChange'
,
val
)
console
.
log
(
"handleCurrentTeacherChange"
,
val
);
},
},
updateTeacher
(
val
)
{
updateTeacher
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
);
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
this
.
getTeacherList
()
this
.
getTeacherList
();
},
},
remoteMethod
(
query
)
{
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
if
(
query
!==
""
)
{
this
.
getTeacherList
(
query
);
this
.
getTeacherList
(
query
);
}
else
{
}
else
{
this
.
getTeacherList
();
this
.
getTeacherList
();
}
}
},
},
saveTeacher
()
{
saveTeacher
()
{
this
.
$confirm
(
'此操作将修改推广人?'
,
'提示'
,
{
this
.
$confirm
(
"此操作将修改推广人?"
,
"提示"
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
"取消"
,
type
:
'warning'
type
:
"warning"
}).
then
(()
=>
{
}).
then
(()
=>
{
console
.
log
(
'this.promoterDialog.teacher_id'
,
this
.
promoterDialog
)
console
.
log
(
"this.promoterDialog.teacher_id"
,
this
.
promoterDialog
);
updateOrderTeacherApi
(
this
.
promoterDialog
.
id
,
this
.
promoterDialog
.
teacher_id
).
then
(
res
=>
{
updateOrderTeacherApi
(
this
.
promoterDialog
.
id
=
''
;
this
.
promoterDialog
.
id
,
this
.
promoterDialog
.
teacher_id
=
''
;
this
.
promoterDialog
.
teacher_id
).
then
(
res
=>
{
this
.
promoterDialog
.
id
=
""
;
this
.
promoterDialog
.
teacher_id
=
""
;
this
.
promoterDialog
.
show
=
false
;
this
.
promoterDialog
.
show
=
false
;
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
"success"
,
message
:
'修改成功!'
message
:
"修改成功!"
});
});
this
.
getOrderList
();
this
.
getOrderList
();
});
});
});
});
},
},
add
()
{
add
()
{
this
.
newdialogObj
.
show
=
true
;
this
.
newdialogObj
.
show
=
true
;
},
}
},
},
components
:
{
components
:
{
addressDialog
,
addressDialog
,
...
@@ -629,49 +598,61 @@
...
@@ -629,49 +598,61 @@
couponDialog
,
couponDialog
,
page
page
},
},
mounted
()
{
mounted
()
{
if
(
this
.
$route
.
query
.
code
)
{
if
(
this
.
$route
.
query
.
code
)
{
this
.
searchFrom
.
invite_type
=
this
.
$route
.
query
.
code
this
.
searchFrom
.
invite_type
=
this
.
$route
.
query
.
code
;
}
}
this
.
getOrderList
();
this
.
getOrderList
();
this
.
getGoodsOption
();
this
.
getGoodsOption
();
},
},
watch
:
{
watch
:
{
"newdialogObj.show"
:
function
(
val
)
{
"newdialogObj.show"
:
function
(
val
)
{
if
(
!
val
)
{
if
(
!
val
)
{
this
.
getOrderList
();
this
.
getOrderList
();
}
}
}
}
},
},
filters
:
{
filters
:
{
payMentFilter
(
val
){
isLeader
(
value
){
return
val
==
'1'
?
'已付款'
:
'未付款'
return
ISLEADER
[
value
]
},
},
courseTypeFilter
(
val
)
{
payMentFilter
(
val
)
{
return
val
.
type
==
'1'
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
return
val
==
"1"
?
"已付款"
:
"未付款"
;
},
},
inviteType
(
value
){
courseTypeFilter
(
val
)
{
return
INVITETYPE
[
value
]
return
val
.
type
==
"1"
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
;
},
},
status
(
value
)
{
inviteType
(
value
)
{
return
ORDERSTATUS
[
value
]
return
INVITETYPE
[
value
];
},
},
buyType
(
value
)
{
status
(
value
)
{
return
BUYTYPE
[
value
]
return
ORDERSTATUS
[
value
];
},
},
moneytFilter
(
val
)
{
buyType
(
value
)
{
return
val
=
val
/
100
+
'元'
return
BUYTYPE
[
value
];
},
},
filterGoods
(
val
){
moneytFilter
(
val
)
{
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
return
(
val
=
val
/
100
+
"元"
);
}
},
filterGoods
(
val
)
{
return
(
"["
+
GOODSTYPE
[
val
.
goods_type
]
+
"]"
+
"["
+
val
.
current_price
/
100
+
"元]"
+
val
.
name
);
}
}
}
}
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.avatar
{
.avatar
{
width
:
50px
;
width
:
50px
;
height
:
50px
;
height
:
50px
;
margin-right
:
5px
;
margin-right
:
5px
;
...
@@ -682,10 +663,10 @@
...
@@ -682,10 +663,10 @@
}
}
</
style
>
</
style
>
<
style
>
<
style
>
.f-c
>
.cell
{
.f-c
>
.cell
{
display
:
flex
!important
;
display
:
flex
!important
;
flex-flow
:
row
;
flex-flow
:
row
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
</
style
>
</
style
>
src/components/putForward/index.vue
View file @
10eaca84
...
@@ -354,7 +354,7 @@
...
@@ -354,7 +354,7 @@
if
(
this
.
search
.
money
){
if
(
this
.
search
.
money
){
json
.
money
=
parseFloat
(
this
.
search
.
money
)
*
100
json
.
money
=
parseFloat
(
this
.
search
.
money
)
*
100
}
}
exportExcelApi
(
'/api/
public
/withdraw/export'
,
json
)
exportExcelApi
(
'/api/
admin
/withdraw/export'
,
json
)
},
},
//获取列表
//获取列表
getList
:
function
()
{
getList
:
function
()
{
...
...
src/components/refund/index.vue
View file @
10eaca84
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
if
(
this
.
searchFrom
.
out_trade_no
){
if
(
this
.
searchFrom
.
out_trade_no
){
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
}
}
exportExcelApi
(
'/api/
public
/refund/export'
,
json
)
exportExcelApi
(
'/api/
admin
/refund/export'
,
json
)
},
},
}
}
}
}
...
...
src/components/shop/index.vue
View file @
10eaca84
...
@@ -39,6 +39,12 @@
...
@@ -39,6 +39,12 @@
:value=
"data.id"
>
:value=
"data.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
<el-form-item
label=
"课程类别"
>
<el-select
v-model=
"searchFrom.course_type"
placeholder=
"请选择"
@
change=
"getUser"
clearable
>
<el-option
v-for=
"item in classType"
:key=
"item.course_type"
:label=
"item.value"
:value=
"item.course_type"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品状态"
>
<el-form-item
label=
"商品状态"
>
<el-select
v-model=
"searchFrom.status"
placeholder=
"请选择"
@
change=
"getUser"
>
<el-select
v-model=
"searchFrom.status"
placeholder=
"请选择"
@
change=
"getUser"
>
...
@@ -224,8 +230,19 @@
...
@@ -224,8 +230,19 @@
name
:
''
,
name
:
''
,
goods_type
:
''
,
goods_type
:
''
,
status
:
''
,
status
:
''
,
course_id
:
''
course_id
:
''
,
course_type
:
""
,
},
},
classType
:[
{
course_type
:
0
,
value
:
"月课"
},
{
course_type
:
1
,
value
:
"日课"
}
],
userList
:[],
userList
:[],
total
:
0
,
total
:
0
,
nowPage
:
1
,
nowPage
:
1
,
...
@@ -359,6 +376,8 @@
...
@@ -359,6 +376,8 @@
if
(
this
.
searchFrom
.
current_price
)
{
if
(
this
.
searchFrom
.
current_price
)
{
json
.
current_price
=
this
.
searchFrom
.
current_price
*
100
json
.
current_price
=
this
.
searchFrom
.
current_price
*
100
}
}
json
.
course_type
=
this
.
searchFrom
.
course_type
console
.
log
(
json
)
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
res
.
list
.
forEach
(
i
=>
{
if
(
i
.
conflict_goods_ids
===
''
){
if
(
i
.
conflict_goods_ids
===
''
){
...
...
src/util/menuList.js
View file @
10eaca84
...
@@ -108,7 +108,7 @@ export default [{
...
@@ -108,7 +108,7 @@ export default [{
value
:
'订单管理'
,
value
:
'订单管理'
,
icon
:
'icon-dingdan'
,
icon
:
'icon-dingdan'
,
list
:
[{
list
:
[{
value
:
'订单列表'
,
value
:
'
日课
订单列表'
,
routerName
:
'order'
,
routerName
:
'order'
,
path
:
'/order'
,
path
:
'/order'
,
cover
:
'5-1'
,
cover
:
'5-1'
,
...
@@ -117,7 +117,19 @@ export default [{
...
@@ -117,7 +117,19 @@ export default [{
name
:
'order'
,
name
:
'order'
,
component
:
e
=>
require
([
'@/components/order'
],
e
),
component
:
e
=>
require
([
'@/components/order'
],
e
),
}
}
},
{
},
,{
value
:
'月课订单列表'
,
routerName
:
'monthOrder'
,
path
:
'/monthOrder'
,
cover
:
'5-10'
,
router
:
{
path
:
'/monthOrder'
,
name
:
'monthOrder'
,
component
:
e
=>
require
([
'@/components/monthOrder'
],
e
),
}
},
{
value
:
'退款列表'
,
value
:
'退款列表'
,
routerName
:
'refund'
,
routerName
:
'refund'
,
path
:
'/refund'
,
path
:
'/refund'
,
...
...
src/util/wordbook.js
View file @
10eaca84
...
@@ -130,3 +130,7 @@ export const QRSTATUS = {
...
@@ -130,3 +130,7 @@ export const QRSTATUS = {
0
:
'正常'
,
0
:
'正常'
,
1
:
'禁用'
1
:
'禁用'
};
};
export
const
ISLEADER
=
{
0
:
'不是'
,
1
:
'是'
}
\ No newline at end of file
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