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
cade2375
Commit
cade2375
authored
Aug 14, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Plain Diff
814
parents
9eb0f525
5bb62fd3
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
2356 additions
and
2228 deletions
+2356
-2228
index.html
index.html
+4
-4
index.vue
src/components/config/index.vue
+1
-4
marketEnrollmentConversionList.vue
...ponents/conversionList/marketEnrollmentConversionList.vue
+31
-7
periodsConversionList.vue
src/components/conversionList/periodsConversionList.vue
+29
-8
sourceConversionList.vue
src/components/conversionList/sourceConversionList.vue
+1
-8
Address.vue
src/components/framework/address-picker/Address.vue
+131
-152
index.vue
src/components/logistics/index.vue
+102
-74
index.vue
src/components/marketStatistics/index.vue
+20
-1
index.vue
src/components/monthOrder/index.vue
+347
-332
newDialog.vue
src/components/monthOrder/newDialog.vue
+83
-106
index.vue
src/components/notBuyClass/index.vue
+174
-146
index.vue
src/components/order/index.vue
+537
-517
tag.vue
src/components/system/tag.vue
+36
-48
index.vue
src/components/teacher/index.vue
+1
-1
index.vue
src/components/teacherDetail/index.vue
+410
-406
task.vue
src/components/teacherDetail/task.vue
+25
-1
index.vue
src/components/userDetail/index.vue
+389
-410
index.vue
src/components/yunji/index.vue
+29
-1
api.js
src/service/api.js
+6
-2
No files found.
index.html
View file @
cade2375
...
...
@@ -4,15 +4,15 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<meta
name=
"referrer"
content=
"never"
>
<link
rel=
"stylesheet"
href=
"https://
//
at.alicdn.com/t/font_746649_x1rivf5f5.css"
>
<link
rel=
"stylesheet"
href=
"https://at.alicdn.com/t/font_746649_x1rivf5f5.css"
>
<link
rel=
"stylesheet"
href=
"https://lib.baomitu.com/element-ui/2.11.1/theme-chalk/index.css"
>
<title>
唱唱启蒙-后台
</title>
</head>
<body>
<!-- 先引入 Vue -->
<
script
src=
"https://cdn.bootcss.com/vue/2.5.17/vue.js"
></script
>
<
!-- <script src="https://cdn.bootcss.com/vue/2.5.17/vue.min.js"></script> --
>
<script
src=
"https://
unpkg.com/vuex@3.0.1
"
></script>
<
!--<script src="https://lib.baomitu.com/vue/2.5.17/vue.min.js"></script>--
>
<
script
src=
"https://lib.baomitu.com/vue/2.5.17/vue.js"
></script
>
<script
src=
"https://
lib.baomitu.com/vuex/3.0.1/vuex.min.js
"
></script>
<!-- 引入组件库 -->
<script
src=
"https://cdn.bootcss.com/axios/0.18.0/axios.min.js"
></script>
<script
src=
"https://lib.baomitu.com/element-ui/2.11.1/index.js"
></script>
...
...
src/components/config/index.vue
View file @
cade2375
...
...
@@ -200,10 +200,7 @@
<el-table-column
prop=
"title"
label=
"标题"
></el-table-column>
<el-table-column
label=
"操作"
width=
"120px"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"delStarListFn(scope.row)"
type=
"warning"
plain
size=
"mini"
>
删除
</el-button>
<el-button
@
click=
"delStarListFn(scope.row)"
type=
"warning"
plain
size=
"mini"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
src/components/conversionList/marketEnrollmentConversionList.vue
View file @
cade2375
...
...
@@ -11,8 +11,7 @@
end-placeholder=
"结束日期"
:picker-options=
"
{shortcuts:[today,yesterday,last7Day,last30Day]}"
:default-time="['00:00:00','23:59:59']"
@change="getList"
>
</el-date-picker>
@change="getList">
</el-date-picker>
</el-form-item>
<el-form-item
label=
"商品课时数"
>
<el-select
...
...
@@ -21,14 +20,12 @@
placeholder=
"请选择"
style=
"width: 150px"
clearable
@
change=
"selectChange"
>
@
change=
"selectChange"
>
<el-option
v-for=
"(data,index) in watchList"
:key=
"index"
:label=
"data.title"
:value=
"data.id"
></el-option>
:value=
"data.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"渠道code"
>
...
...
@@ -63,7 +60,13 @@
:row-class-name="tableRowClassName"
:span-method="arraySpanMethod">
<!--height="calc(100vh - 210px)"-->
<el-table-column
prop=
"periods_title"
align=
"center"
min-width=
"80"
fixed
label=
"期数名称"
></el-table-column>
<!--
<el-table-column
prop=
"periods_title"
align=
"center"
min-width=
"80"
fixed
label=
"期数名称"
></el-table-column>
-->
<el-table-column
align=
"center"
fixed
label=
"期数名称"
width=
"120px"
>
<template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"is_other"
min-width=
"160"
align=
"left"
fixed
label=
"渠道信息"
>
<
template
slot-scope=
"scope"
>
来源:
{{
scope
.
row
.
is_other
==
0
?
"内部"
:
"外部"
}}
<br>
...
...
@@ -178,6 +181,27 @@ export default {
};
},
methods
:
{
periodName
(
val
)
{
let
str
=
''
;
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`
${
val
.
periods_title
}
`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时<br>`
}
else
{
str
+=
`<br>`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
return
str
},
selectChange
(
value
)
{
this
.
searchFrom
.
watch_num
=
this
.
watchList
[
value
].
title
;
this
.
getList
();
...
...
src/components/conversionList/periodsConversionList.vue
View file @
cade2375
...
...
@@ -87,7 +87,13 @@
@
sort-change=
"sortMethod"
:style=
"
{width: width+'px'}"
fixed>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
<!--
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
-->
<el-table-column
label=
"期数名称"
width=
"170px"
>
<template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"duration_over_at"
label=
"开课看课时间"
...
...
@@ -134,12 +140,7 @@
</div>
</template>
<
script
>
import
{
getPeriodsConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
import
{
getPeriodsConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
...
...
@@ -242,7 +243,6 @@ export default {
];
}
},
propertyList
:
[],
spanArr
:
[],
contentSpanArr
:
[],
searchFrom
:
{
...
...
@@ -269,6 +269,27 @@ export default {
},
components
:
{
page
},
methods
:
{
periodName
(
val
)
{
let
str
=
''
;
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`
${
val
.
periods_title
}
<br>`
}
else
{
str
+=
`<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
return
str
},
rendertip
(
h
,
{
column
})
{
// console.log(h)
return
h
(
"span"
,
[
...
...
src/components/conversionList/sourceConversionList.vue
View file @
cade2375
...
...
@@ -170,13 +170,7 @@
</div>
</template>
<
script
>
import
{
getPeriodsConversionListApi
,
getSourceConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
import
{
getPeriodsConversionListApi
,
getSourceConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
,
ORDERSTATUS
}
from
"../../util/wordbook"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
...
...
@@ -295,7 +289,6 @@ export default {
teacher_id
:
""
,
periods_title
:
""
},
propertyList
:
[],
watchList
:
[
{
id
:
0
,
title
:
5
},
{
id
:
1
,
title
:
6
},
...
...
src/components/framework/address-picker/Address.vue
View file @
cade2375
...
...
@@ -2,58 +2,34 @@
<div
class=
"address"
>
<section
style=
"width:100%; height: 100%;"
>
<el-form
:model=
'form'
class=
'demo-ruleForm'
ref=
'form'
label-width=
"100px"
:rules=
'rules'
>
<el-row
:gutter=
'20'
>
<el-col
:span=
'20'
>
<el-form-item
prop=
'name'
label=
"收货人"
>
<el-input
v-model=
"form.name"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
'20'
>
<el-col
:span=
'20'
>
<el-form-item
prop=
'mobile'
label=
"手机号"
>
<el-input
v-model=
"form.mobile"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
'20'
class=
'address'
>
<el-col
:span=
'20'
>
<el-form-item
prop=
'province'
label=
"省"
>
<el-select
v-model=
'form.province'
placeholder=
'请选择省'
@
change=
'proChange'
>
<el-option
v-for=
'item in provinces'
:key=
'item.value'
:value=
'item.value'
:label=
"item.label"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
'20'
class=
'address'
>
<el-col
:span=
'20'
>
<el-form-item
prop=
'city'
label=
"市"
>
<el-select
v-model=
'form.city'
placeholder=
'请选择市'
@
change=
'cityChange'
>
<el-option
v-for=
'item in cities'
:key=
'item.value'
:value=
'item.value'
:label=
"item.label"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
'20'
class=
'address'
>
<el-col
:span=
'20'
>
<el-form-item
prop=
'district'
label=
"县/区"
>
<el-select
v-model=
'form.district'
placeholder=
'请选择区/县'
@
change=
'districtChange'
>
<el-option
v-for=
'item in districts'
:key=
'item.value'
:value=
'item.value'
:label=
"item.label"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
'20'
class=
'address'
>
<el-col
:span=
'20'
>
<el-form-item
prop=
'detail'
label=
"详细地址"
>
<el-input
placeholder=
'请填写详细地址'
:number=
'true'
v-model=
'form.detail'
>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</section>
</div>
...
...
@@ -61,13 +37,15 @@
<
script
>
import
Address
from
'./addr.js'
let
type
=
1
// let provinceValue = 2
// let cityValue = 52
// let provinceValue = 2
// let cityValue = 52
//根据apid查找对象
function
findcity
(
item
)
{
return
item
.
type
==
type
;
}
function
findChildren
(
list
,
value
)
{
let
filtered
=
list
.
filter
((
item
)
=>
{
return
item
.
value
===
value
...
...
@@ -77,6 +55,7 @@
// console.log(filtered)
return
filtered
[
0
].
children
}
//筛选出各省级对象
let
pObj
=
Address
.
filter
(
findcity
)
...
...
@@ -92,14 +71,14 @@
},
computed
:
{
cities
:
function
()
{
if
(
this
.
form
.
province
)
{
if
(
this
.
form
.
province
)
{
return
findChildren
(
pObj
,
this
.
form
.
province
)
}
else
{
return
[]
}
},
districts
:
function
()
{
if
(
this
.
form
.
city
)
{
if
(
this
.
form
.
city
)
{
return
findChildren
(
this
.
cities
,
this
.
form
.
city
)
}
else
{
return
[]
...
...
@@ -109,12 +88,12 @@
data
()
{
return
{
rules
:
{
province
:
[{
required
:
true
,
message
:
'请选择省份'
,
trigger
:
'change'
}],
city
:
[{
required
:
true
,
message
:
'请选择城市'
,
trigger
:
'change'
}],
district
:
[{
required
:
true
,
message
:
'请选择区/县'
,
trigger
:
'change'
}],
detail
:
[{
required
:
true
,
message
:
'请填写详细地址'
,
trigger
:
'change'
}],
name
:
[{
required
:
true
,
message
:
'请填写收货人'
,
trigger
:
'change'
}],
mobile
:
[{
required
:
true
,
message
:
'请填写手机号'
,
trigger
:
'change'
}]
province
:
[{
required
:
true
,
message
:
'请选择省份'
,
trigger
:
'change'
}],
city
:
[{
required
:
true
,
message
:
'请选择城市'
,
trigger
:
'change'
}],
district
:
[{
required
:
true
,
message
:
'请选择区/县'
,
trigger
:
'change'
}],
detail
:
[{
required
:
true
,
message
:
'请填写详细地址'
,
trigger
:
'change'
}],
name
:
[{
required
:
true
,
message
:
'请填写收货人'
,
trigger
:
'change'
}],
mobile
:
[{
required
:
true
,
message
:
'请填写手机号'
,
trigger
:
'change'
}]
},
form
:
{
province
:
this
.
province
,
...
...
@@ -159,7 +138,7 @@
// this.form.mobile = this.mobile
// }
// console.log(this.form)
this
.
form
=
{
this
.
form
=
{
province
:
this
.
province
,
city
:
this
.
city
,
district
:
this
.
district
,
...
...
src/components/logistics/index.vue
View file @
cade2375
<
template
>
<div
class=
"sms"
>
<div
class=
"admin-refresh sms"
>
<div
class=
"section-search"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
size=
"small"
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
style=
"width: 80px"
></el-input>
...
...
@@ -16,13 +17,14 @@
</el-form-item>
-->
<el-form-item
label=
"期数"
>
<el-cascader
:popper-class=
"'refresh-cascader-multi width-480'"
style=
"width: 480px"
:options=
"goodsList"
:props=
"
{value:'id',label:'name'}"
@active-item-change="handleItemChange"
@change="changePeriods"
filterable
v-model="selectedGoods"
>
</el-cascader>
v-model="selectedGoods">
</el-cascader>
</el-form-item>
<el-form-item
label=
"主题"
>
<el-select
filterable
v-model=
"searchFrom.theme_id"
placeholder=
"请选择"
clearable
>
...
...
@@ -44,55 +46,63 @@
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出当前待发货
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportReceiveInfoTable"
>
按期数导出收货信息
</el-button>
</el-form-item>
<el-form-item
v-if=
"$store.state.im
port"
>
<el-form-item
v-if=
"$store.state.ex
port"
>
<el-upload
:show-file-list=
"false"
:onSuccess=
"fileSuccess"
:headers=
"uploadHeader"
:data=
"
{param_token:param_token}"
action="/api/admin/order/deliver/list/import"
>
action="/api/admin/order/deliver/list/import">
<el-button
type=
"success"
plain
>
导入发货信息
</el-button>
</el-upload>
</el-form-item>
</el-form>
<el-tabs
v-model=
"searchFrom.type"
type=
"card"
@
tab-click=
"handleClick"
>
</div>
<el-tabs
v-model=
"searchFrom.type"
type=
"card"
@
tab-click=
"handleClick"
style=
"padding-top: 10px;background-color: #fff"
>
<el-tab-pane
label=
"当前待发货"
name=
"0"
></el-tab-pane>
<el-tab-pane
label=
"所有待发货"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"所有已发货"
name=
"2"
></el-tab-pane>
</el-tabs>
<el-table
:data=
"deliverList"
size=
"mini"
style=
"width: 100%"
>
<el-table-column
width=
"2
2
0"
class=
"f-c"
label=
"用户"
>
<el-table-column
width=
"2
0
0"
class=
"f-c"
label=
"用户"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
<img
style=
"vertical-align: top"
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
<span
style=
"display: inline-block;"
>
{{
scope
.
row
.
user_nickname
}}
<br
/>
(ID:
{{
scope
.
row
.
user_id
}}
)
<br
/>
手机:
{{
scope
.
row
.
user_mobile
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
receive_name
}}
<br
/>
<br/>
{{
scope
.
row
.
receive_mobile
}}
<br
/>
<br/>
{{
scope
.
row
.
province_name
}}{{
scope
.
row
.
city_name
}}{{
scope
.
row
.
area_name
}}{{
scope
.
row
.
address
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column
prop=
"periods_title"
label=
"期数名称"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"theme_name"
label=
"主题"
></el-table-column>
<el-table-column
prop=
"deliver_start_at"
label=
"预计发货开始时间"
></el-table-column>
<el-table-column
prop=
"deliver_end_at"
label=
"预计发货结束时间"
></el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
></el-table-column>
<el-table-column
prop=
"deliver_start_at"
label=
"预计发货开始时间"
width=
"100px"
></el-table-column>
<el-table-column
prop=
"deliver_end_at"
label=
"预计发货结束时间"
width=
"100px"
></el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
width=
"100px"
></el-table-column>
<el-table-column
prop=
"status"
label=
"物流状态"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br
/>
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br/>
<span
v-if=
"searchFrom.type==2"
>
名称:
{{
scope
.
row
.
express_name
}}
<br
/>
名称:
{{
scope
.
row
.
express_name
}}
<br/>
单号:
{{
scope
.
row
.
express_no
}}
</span>
</
template
>
...
...
@@ -182,6 +192,27 @@ export default {
this
.
init
();
},
methods
:
{
periodName
(
val
)
{
let
str
=
''
;
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`
${
val
.
periods_title
}
<br>`
}
else
{
str
+=
`<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
return
str
},
cancelEvent
()
{
this
.
showFlag
=
false
;
},
...
...
@@ -402,9 +433,6 @@ export default {
</
script
>
<
style
scoped
>
.sms
{
padding
:
20px
0
;
}
.el-button
+
.el-button
{
margin-left
:
0
;
/* margin-top: 10px; */
...
...
src/components/marketStatistics/index.vue
View file @
cade2375
...
...
@@ -10,7 +10,7 @@
:span-method="arraySpanMethod">
<el-table-column
min-width=
"180"
prop=
"wait_join_num"
align=
"left"
fixed=
"left"
label=
"期数总状况"
>
<template
slot-scope=
"scope"
>
期数名称:
{{
scope
.
row
.
title
}}
期数名称:
{{
scope
.
row
.
title
==
'合计'
?
'合计'
:
periodName
(
scope
.
row
)
}}
<br
/>
开始时间:
{{
scope
.
row
.
start_at
}}
<br
/>
...
...
@@ -77,6 +77,25 @@ export default {
};
},
methods
:
{
periodName
(
val
)
{
let
str
=
''
;
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
title
)
{
str
+=
`
${
val
.
title
}
`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
return
str
},
initPage
()
{
getPeriodsClassCurDataApi
().
then
(
res
=>
{
this
.
list
=
res
;
...
...
src/components/monthOrder/index.vue
View file @
cade2375
...
...
@@ -90,7 +90,7 @@
@
change=
"getOrderList"
>
</el-date-picker>
</el-form-item>
<el-form-item
>
<el-form-item
>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出
</el-button>
</el-form-item>
...
...
@@ -98,37 +98,25 @@
<el-button
type=
"success"
plain
@
click=
"add"
v-if=
"!$store.state.readonly"
>
新增订单
</el-button>
</el-form-item>
</el-form>
<el-table
size=
"small"
:data=
"tableData"
@
expand-change=
"changeRow"
style=
"width: 100%"
fixed
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<el-table
size=
"small"
:data=
"tableData"
@
expand-change=
"changeRow"
fixed
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
></el-table-column>
<el-table-column
label=
"购买人"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
<img
style=
"vertical-align: top"
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
<span
style=
"display: inline-block;"
>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数标题"
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
<!--<el-table-column prop="periods_title" label="期数标题"></el-table-column>-->
<el-table-column
label=
"期数名称"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
width=
"150px"
></el-table-column>
<el-table-column
width=
"190"
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"
/>
...
...
@@ -202,28 +190,12 @@
</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"
fixed=
"right"
>
<el-table-column
prop=
"pay_at"
label=
"购买时间"
sortable
width=
"95px"
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"下单时间"
sortable
width=
"95px"
></el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
<el-table-column
width=
"50"
label=
"操作"
v-if=
"!$store.state.readonly"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"400"
>
<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
...
...
@@ -258,7 +230,7 @@
</el-button>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</
template
>
...
...
@@ -306,7 +278,16 @@
</template>
<
script
>
import
{
getOrderListApi
,
editOrderDescApi
,
getGoodsListApi
,
getRefundListApi
,
exportExcelApi
,
getTeacherListApi
,
updateOrderTeacherApi
,
setOrderApi
}
from
"../../service/api"
;
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'
...
...
@@ -316,68 +297,78 @@
import
detailDialog
from
'./detail'
import
refundDetail
from
'./refundDetail'
import
AddressArray
from
'../framework/address-picker/addr'
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
BUYTYPEOPTION
,
ORDERSTATUSOPTION
,
INVITETYPEOPTION
,
GOODSTYPE
,
BUYWay
,
BUYTYPEWAY
}
from
"../../util/wordbook"
;
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
BUYTYPEOPTION
,
ORDERSTATUSOPTION
,
INVITETYPEOPTION
,
GOODSTYPE
,
BUYWay
,
BUYTYPEWAY
}
from
"../../util/wordbook"
;
import
CommonJs
from
'../../util/common'
;
export
default
{
name
:
'index'
,
data
(){
data
()
{
return
{
nowPage
:
1
,
total
:
0
,
sourceDialog
:
{
show
:
false
,
out_trade_no
:
''
sourceDialog
:
{
show
:
false
,
out_trade_no
:
''
},
today
:
{
text
:
'今天'
,
onClick
:()
=>
{
this
.
searchFrom
.
payTime
=
[
this
.
formatTime
(
new
Date
())
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
today
:
{
text
:
'今天'
,
onClick
:
()
=>
{
this
.
searchFrom
.
payTime
=
[
this
.
formatTime
(
new
Date
())
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
}
},
yesterday
:
{
text
:
'昨天'
,
onClick
:()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
preDate
+
' 23:59:59'
];
yesterday
:
{
text
:
'昨天'
,
onClick
:
()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
preDate
+
' 23:59:59'
];
}
},
last30Day
:
{
text
:
'过去30天'
,
onClick
:()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
30
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
last30Day
:
{
text
:
'过去30天'
,
onClick
:
()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
30
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
}
},
last7Day
:
{
text
:
'过去7天'
,
onClick
:()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
7
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
last7Day
:
{
text
:
'过去7天'
,
onClick
:
()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
7
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
}
},
couponDetail
:
{
show
:
false
,
order_coupon_id
:
''
couponDetail
:
{
show
:
false
,
order_coupon_id
:
''
},
refundDetail
:
{
show
:
false
,
out_trade_no
:
''
refundDetail
:
{
show
:
false
,
out_trade_no
:
''
},
limit
:
10
,
searchFrom
:
{
nickname
:
''
,
wait_into_course
:
''
,
wait_into_course
:
''
,
user_id
:
''
,
invite_type
:
''
,
invite_id
:
''
,
buy_type
:
''
,
order_type
:
''
,
status
:
[
1
,
4
,
5
],
status
:
[
1
,
4
,
5
],
goods_id
:
''
,
out_trade_no
:
''
,
payTime
:
[],
order_group_id
:
""
,
order_group_id
:
""
,
},
tableData
:
[],
dialogObj
:
{
...
...
@@ -399,11 +390,11 @@
inviteTypeOption
:
INVITETYPEOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
buyTypeOption
:
BUYTYPEOPTION
,
buyWay
:
BUYWay
,
buyWay
:
BUYWay
,
inviteSearchPlaceholder
:
''
,
rules
:
{
value
:
[
{
required
:
true
,
message
:
'请输入备注'
,
trigger
:
'change'
}
rules
:
{
value
:
[
{
required
:
true
,
message
:
'请输入备注'
,
trigger
:
'change'
}
]
},
promoterDialog
:
{
...
...
@@ -418,36 +409,59 @@
}
},
methods
:
{
formatTime
(
date
){
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
periods_title
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`
${
val
.
periods_title
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
}
return
str
},
formatTime
(
date
)
{
let
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
Month
=
`0
${
Month
}
`
}
let
Day
=
date
.
getDate
();
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
return
`
${
year
}
-
${
Month
}
-
${
Day
}
`
;
},
showRef
(
data
){
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
},
showCoupon
(
data
){
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
},
showSource
(
data
){
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
=>
{
changeRow
(
data
,
b
)
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
data
.
refundList
=
res
.
list
})
}
},
exportTable
(){
exportTable
()
{
let
json
=
{};
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
...
...
@@ -482,7 +496,7 @@
if
(
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
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
}
...
...
@@ -490,20 +504,20 @@
if
(
this
.
searchFrom
.
wait_into_course
)
{
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
}
json
.
course_type
=
0
//月课
exportExcelApi
(
'/api/admin/order/export'
,
json
,
'月课订单列表'
)
json
.
course_type
=
0
//月课
exportExcelApi
(
'/api/admin/order/export'
,
json
,
'月课订单列表'
)
},
getGoodsOption
(){
getGoodsOption
()
{
let
json
=
{
page
:
1
,
limit
:
100
,
course_type
:
0
,
course_type
:
0
,
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
})
},
onInviteTypeChange
(
val
){
onInviteTypeChange
(
val
)
{
if
(
val
===
0
)
{
this
.
inviteSearchPlaceholder
=
'用户ID'
}
else
if
(
val
===
1
)
{
...
...
@@ -513,7 +527,7 @@
}
this
.
getOrderList
();
},
detail
(
row
){
detail
(
row
)
{
let
_detail
=
row
;
this
.
dialogDetailObj
=
{
show
:
true
,
...
...
@@ -524,15 +538,15 @@
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputType
:
'textarea'
,
inputValue
:
desc
||
''
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,{
desc
:
value
}).
then
(
res
=>
{
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,
{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
...
...
@@ -542,16 +556,16 @@
});
})
},
onPageChange
(
val
){
onPageChange
(
val
)
{
this
.
nowPage
=
val
this
.
getOrderList
()
},
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getOrderList
()
},
getOrderList
(){
getOrderList
()
{
let
json
=
{
limit
:
this
.
limit
,
page
:
this
.
nowPage
...
...
@@ -589,43 +603,43 @@
if
(
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
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
}
if
(
this
.
searchFrom
.
wait_into_course
)
{
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
}
json
.
course_type
=
0
//月课
getOrderListApi
(
json
).
then
((
res
)
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
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
changeDetailShow
(
data
)
{
this
.
dialogDetailObj
.
show
=
data
},
changeShow
(
data
){
this
.
refundDialogObj
.
show
=
data
changeShow
(
data
)
{
this
.
refundDialogObj
.
show
=
data
},
onRefund
(
id
,
money
){
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
money
=
money
;
onRefund
(
id
,
money
)
{
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
money
=
money
;
this
.
refundDialogObj
.
show
=
true
;
},
onAfterRefund
(){
onAfterRefund
()
{
this
.
refundDialogObj
.
show
=
false
;
this
.
getOrderList
()
},
onUpdateAddress
(){
onUpdateAddress
()
{
this
.
dialogObj
.
show
=
false
;
this
.
getOrderList
();
},
editAddress
(
row
){
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
editAddress
(
row
)
{
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
this
.
dialogObj
.
province
=
''
this
.
dialogObj
.
city
=
''
this
.
dialogObj
.
district
=
''
...
...
@@ -633,18 +647,18 @@
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
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
if
(
!
row
.
address_info
.
city
)
{
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
)
{
if
(
!
row
.
address_info
.
area
)
{
this
.
dialogObj
.
district
=
''
}
else
{
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
return
district
.
label
===
row
.
address_info
.
area
});
...
...
@@ -664,26 +678,26 @@
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
;
this
.
dialogObj
.
show
=
true
;
},
getTeacherList
(
name
){
getTeacherList
(
name
)
{
this
.
loading
=
true
let
json
=
{
limit
:
this
.
promoterDialog
.
limit
,
page
:
this
.
promoterDialog
.
nowPage
};
if
(
name
)
{
if
(
name
)
{
json
.
name
=
name
}
getTeacherListApi
(
json
).
then
(
res
=>
{
getTeacherListApi
(
json
).
then
(
res
=>
{
this
.
teacherList
=
res
.
list
this
.
loading
=
false
});
},
handleCurrentTeacherChange
(
val
){
handleCurrentTeacherChange
(
val
)
{
console
.
log
(
'handleCurrentTeacherChange'
,
val
)
},
updateTeacher
(
val
){
updateTeacher
(
val
)
{
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
...
...
@@ -696,15 +710,15 @@
this
.
getTeacherList
();
}
},
saveTeacher
(){
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
=
''
;
updateOrderTeacherApi
(
this
.
promoterDialog
.
id
,
this
.
promoterDialog
.
teacher_id
).
then
(
res
=>
{
this
.
promoterDialog
.
id
=
''
;
this
.
promoterDialog
.
teacher_id
=
''
;
this
.
promoterDialog
.
show
=
false
;
this
.
$message
({
...
...
@@ -715,8 +729,8 @@
});
});
},
add
()
{
this
.
newdialogObj
.
show
=
true
;
add
()
{
this
.
newdialogObj
.
show
=
true
;
},
},
components
:
{
...
...
@@ -729,44 +743,44 @@
couponDialog
,
page
},
mounted
(){
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
)
{
watch
:
{
"newdialogObj.show"
:
function
(
val
)
{
if
(
!
val
)
{
this
.
getOrderList
();
}
}
},
filters
:{
payMentFilter
(
val
){
return
val
==
'1'
?
'已付款'
:
'未付款'
filters
:
{
payMentFilter
(
val
)
{
return
val
==
'1'
?
'已付款'
:
'未付款'
},
courseTypeFilter
(
val
){
return
val
.
type
==
'1'
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
courseTypeFilter
(
val
)
{
return
val
.
type
==
'1'
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
},
inviteType
(
value
){
inviteType
(
value
)
{
return
INVITETYPE
[
value
]
},
status
(
value
){
status
(
value
)
{
return
ORDERSTATUS
[
value
]
},
buyType
(
value
){
buyType
(
value
)
{
return
BUYTYPE
[
value
]
},
moneytFilter
(
val
){
moneytFilter
(
val
)
{
return
val
=
val
/
100
+
'元'
},
filterGoods
(
val
){
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
filterGoods
(
val
)
{
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
},
buyTypeWay
(
value
)
{
buyTypeWay
(
value
)
{
return
BUYTYPEWAY
[
value
]
},
}
...
...
@@ -774,16 +788,17 @@
</
script
>
<
style
scoped
>
.avatar
{
.avatar
{
width
:
50px
;
min-width
:
50px
;
height
:
50px
;
margin-right
:
5px
;
border-radius
:
50%
;
}
.order
{
}
.order
{
padding
:
20px
0
;
}
}
</
style
>
<
style
>
.f-c
>
.cell
{
...
...
src/components/monthOrder/newDialog.vue
View file @
cade2375
...
...
@@ -6,8 +6,7 @@
:visible
.
sync=
"newdialogObj.show"
width=
"70%"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"120px"
:rules=
"rules"
>
<el-row>
<el-col
:span=
"10"
>
<el-form-item
label=
"商品名称"
prop=
"goods_id"
>
<el-select
v-model=
"form.goods_id"
placeholder=
"请选择"
@
change=
"onOptionChange"
>
<el-option
...
...
@@ -18,7 +17,6 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"10"
>
<el-form-item
label=
"期数名称"
prop=
"periods_id"
>
<el-select
v-model=
"form.periods_id"
placeholder=
"请选择"
>
...
...
@@ -31,16 +29,13 @@
</el-select>
</el-form-item>
</el-col>
-->
</el-row>
<el-row>
<el-col
:span=
"10"
>
<el-form-item
label=
"用户ID"
prop=
"user_id"
>
<el-form-item
label=
"用户ID"
prop=
"user_id"
>
<el-input
width=
'100'
v-model=
"form.user_id"
></el-input>
<el-button
type=
"success"
@
click=
"onAddUser"
>
+添加用户
</el-button>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"添加推广人"
>
<el-form-item
label=
"添加推广人"
>
<!--
<el-input
v-model=
"form.invite_id"
></el-input>
-->
<el-select
v-model=
"form.invite_id"
...
...
@@ -57,10 +52,8 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"10"
>
<el-form-item
label=
"支付类型"
prop=
"order_type"
>
<el-select
v-model=
"form.order_type"
placeholder=
"请选择"
>
<el-option
...
...
@@ -72,16 +65,10 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"实付金额(元)"
prop=
"money"
>
<el-form-item
label=
"实付金额(元)"
prop=
"money"
>
<el-input-number
v-model=
"form.money"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"10"
>
<el-form-item
label=
"支付时间"
prop=
"pay_at"
>
<el-form-item
label=
"支付时间"
prop=
"pay_at"
>
<el-date-picker
v-model=
"form.pay_at"
type=
"datetime"
...
...
@@ -90,31 +77,21 @@
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"备注"
>
<el-input
type=
"textarea"
v-model=
"form.desc"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"10"
v-if=
"form.order_type!=2"
>
<el-form-item
label=
"订单号"
>
<el-input
v-model=
"form.out_trade_no"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<vue-address
:province=
"form.province"
:city=
"form.city"
:district=
"form.district"
:detail=
"form.address"
:mobile=
"form.receive_mobile"
:name=
"form.receive_name"
@
change=
"handlerAddressChange"
>
</vue-address>
</el-col>
</el-row>
</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
:modal=
"false"
:visible
.
sync=
"addShow"
>
<el-dialog
:modal=
"false"
:visible
.
sync=
"addShow"
>
<el-form
label-width=
"90px"
>
<!--
<el-form-item
label=
"用户id"
>
-->
<!--
<el-input
v-model=
"addId"
></el-input>
-->
...
...
src/components/notBuyClass/index.vue
View file @
cade2375
...
...
@@ -35,12 +35,14 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"class_name"
label=
"班级名称"
>
</el-table-column>
<el-table-column
label=
"期数标题"
prop=
"periods_name"
>
</el-table-column>
<el-table-column
label=
"商品名称"
prop=
"goods_name"
>
<el-table-column
prop=
"class_name"
label=
"班级名称"
></el-table-column>
<el-table-column
label=
"期数名称"
prop=
"periods_name"
width=
"170px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
label=
"商品名称"
prop=
"goods_name"
></el-table-column>
<el-table-column
label=
"手机号"
prop=
"mobile"
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
sortable
>
...
...
@@ -54,19 +56,19 @@
</
template
>
</el-table-column>
</el-table>
<page
:nowPage=
"nowPage"
:total=
"total"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:nowPage=
"nowPage"
:total=
"total"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<entrance
:entranceObj=
"entranceObj"
/>
</div>
</template>
<
script
>
import
entrance
from
"./entrance"
;
import
{
getClassConfigApi
,
getGoodsListApi
,
updateDescApi
,
exportExcelApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
entrance
from
"./entrance"
;
import
{
getClassConfigApi
,
getGoodsListApi
,
updateDescApi
,
exportExcelApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
}
from
"../../util/wordbook"
;
export
default
{
export
default
{
name
:
"notBuyClass"
,
data
()
{
return
{
...
...
@@ -78,21 +80,21 @@ export default {
title
:
"无需登录入口"
,
show
:
false
},
searchFrom
:
{
user_id
:
""
,
goods_id
:
""
,
mobile
:
""
,
searchFrom
:
{
user_id
:
""
,
goods_id
:
""
,
mobile
:
""
,
},
goodList
:
[],
goodList
:
[],
};
},
components
:
{
entrance
,
page
},
filters
:
{
filterGoods
(
val
)
{
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
filters
:
{
filterGoods
(
val
)
{
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
}
},
mounted
()
{
...
...
@@ -101,6 +103,29 @@ export default {
},
methods
:
{
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
periods_name
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_name
)
{
str
+=
`
${
val
.
periods_name
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
}
return
str
},
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
getList
();
...
...
@@ -116,29 +141,29 @@ export default {
page
:
this
.
nowPage
};
// 搜索筛选
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
}
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
}
getClassConfigApi
(
json
).
then
(
res
=>
{
this
.
total
=
res
.
total
;
this
.
configList
=
res
.
list
;
this
.
configList
=
res
.
list
;
});
},
getGoodsOption
(){
getGoodsOption
()
{
let
json
=
{
page
:
1
,
limit
:
100
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
})
},
...
...
@@ -146,15 +171,15 @@ export default {
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputType
:
'textarea'
,
inputValue
:
desc
||
''
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
updateDescApi
({
desc
:
value
},
id
).
then
(
res
=>
{
}).
then
(()
=>
{
updateDescApi
({
desc
:
value
},
id
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
...
...
@@ -164,48 +189,51 @@ export default {
});
})
},
exportTable
()
{
exportTable
()
{
let
json
=
{};
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
}
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
}
exportExcelApi
(
'/api/admin/user/receive/course/log/export'
,
json
,
'扫码入课列表'
)
},
}
};
};
</
script
>
<
style
scoped
lang=
"less"
>
.not_buy {
.not_buy {
.head {
margin-bottom: 10px;
}
width: 100%;
padding: 20px 0;
.page-div {
text-align: center;
padding-top: 20px;
}
}
}
.avatar {
width: 50px;
min-width:
50px !important;
min-width:
50px !important;
height: 50px;
border-radius: 50%;
line-height:
1;
line-height:
1;
}
</
style
>
<
style
>
.userInfo
>
div
{
.userInfo
>
div
{
display
:
flex
;
flex-flow
:
row
nowrap
;
justify-content
:
flex-start
;
...
...
src/components/order/index.vue
View file @
cade2375
...
...
@@ -83,26 +83,29 @@
</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
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数标题"
>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column><!––>-->
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
width=
"160"
>
</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
}}
(
{{
scope
.
row
.
invite_name
}}
)
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
<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
}}
(
{{
scope
.
row
.
invite_name
}}
)
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
<br>
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
...
...
@@ -187,7 +190,7 @@
</el-table>
<address-dialog
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-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"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
...
...
@@ -205,12 +208,12 @@
<el-button
type=
"primary"
@
click=
"saveTeacher"
>
确 定
</el-button>
</span>
</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>
</template>
<
script
>
import
{
import
{
getOrderListApi
,
editOrderDescApi
,
getGoodsListApi
,
...
...
@@ -219,16 +222,16 @@ import {
getTeacherListApi
,
updateOrderTeacherApi
,
setOrderApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
addressDialog
from
"./dialog"
;
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
{
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
addressDialog
from
"./dialog"
;
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
,
...
...
@@ -238,40 +241,40 @@ import {
GOODSTYPE
,
ISLEADER
,
ISLEADEROPTION
}
from
"../../util/wordbook"
;
import
CommonJs
from
"../../util/common"
;
}
from
"../../util/wordbook"
;
import
CommonJs
from
"../../util/common"
;
export
default
{
export
default
{
name
:
"index"
,
data
()
{
return
{
nowPage
:
1
,
total
:
0
,
today
:
{
text
:
'今天'
,
onClick
:()
=>
{
this
.
searchFrom
.
payTime
=
[
this
.
formatTime
(
new
Date
())
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
today
:
{
text
:
'今天'
,
onClick
:
()
=>
{
this
.
searchFrom
.
payTime
=
[
this
.
formatTime
(
new
Date
())
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
}
},
yesterday
:
{
text
:
'昨天'
,
onClick
:()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
preDate
+
' 23:59:59'
];
yesterday
:
{
text
:
'昨天'
,
onClick
:
()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
preDate
+
' 23:59:59'
];
}
},
last30Day
:
{
text
:
'过去30天'
,
onClick
:()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
30
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
last30Day
:
{
text
:
'过去30天'
,
onClick
:
()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
30
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
}
},
last7Day
:
{
text
:
'过去7天'
,
onClick
:()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
7
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
last7Day
:
{
text
:
'过去7天'
,
onClick
:
()
=>
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
7
*
24
*
60
*
60
*
1000
));
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
}
},
sourceDialog
:
{
...
...
@@ -289,7 +292,7 @@ export default {
limit
:
10
,
searchFrom
:
{
nickname
:
""
,
wait_into_course
:
''
,
wait_into_course
:
''
,
user_id
:
""
,
invite_type
:
""
,
invite_id
:
""
,
...
...
@@ -299,7 +302,7 @@ export default {
out_trade_no
:
""
,
payTime
:
[],
order_group_id
:
""
,
is_captain
:
""
,
is_captain
:
""
,
},
tableData
:
[],
dialogObj
:
{
...
...
@@ -320,7 +323,7 @@ export default {
buyTypeOption
:
BUYTYPEOPTION
,
inviteSearchPlaceholder
:
""
,
rules
:
{
value
:
[{
required
:
true
,
message
:
"请输入备注"
,
trigger
:
"change"
}]
value
:
[{
required
:
true
,
message
:
"请输入备注"
,
trigger
:
"change"
}]
},
promoterDialog
:
{
show
:
false
,
...
...
@@ -331,18 +334,41 @@ export default {
},
teacherList
:
[],
loading
:
false
,
isLeaderOption
:
ISLEADEROPTION
,
isLeaderOption
:
ISLEADEROPTION
,
};
},
methods
:
{
formatTime
(
date
){
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
periods_title
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`
${
val
.
periods_title
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
}
return
str
},
formatTime
(
date
)
{
let
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
Month
=
`0
${
Month
}
`
}
let
Day
=
date
.
getDate
();
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
return
`
${
year
}
-
${
Month
}
-
${
Day
}
`
;
},
showRef
(
data
)
{
...
...
@@ -359,16 +385,13 @@ export default {
},
changeRow
(
data
,
b
)
{
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
;
});
}
},
exportTable
()
{
let
json
=
{
limit
:
this
.
limit
,
page
:
this
.
nowPage
};
let
json
=
{};
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
;
}
...
...
@@ -387,18 +410,15 @@ export default {
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
.
is_captain
||
this
.
searchFrom
.
is_captain
==
0
)
{
json
.
is_captain
=
this
.
searchFrom
.
is_captain
;
}
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
;
}
if
(
this
.
searchFrom
.
is_captain
||
this
.
searchFrom
.
is_captain
==
0
)
{
json
.
is_captain
=
this
.
searchFrom
.
is_captain
;
}
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
;
}
...
...
@@ -410,14 +430,14 @@ export default {
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
}
json
.
course_type
=
1
;
//日课
exportExcelApi
(
"/api/admin/order/export"
,
json
,
'日课订单列表'
);
exportExcelApi
(
"/api/admin/order/export"
,
json
,
'日课订单列表'
);
},
getGoodsOption
()
{
let
json
=
{
page
:
1
,
limit
:
100
,
course_type
:
1
,
status
:
"1,2"
course_type
:
1
,
status
:
"1,2"
};
getGoodsListApi
(
json
).
then
(
res
=>
{
...
...
@@ -448,13 +468,13 @@ export default {
cancelButtonText
:
"取消"
,
inputType
:
"textarea"
,
inputValue
:
desc
||
""
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
"确定保存?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
editOrderDescApi
(
id
,
"order"
,
{
desc
:
value
}).
then
(
res
=>
{
editOrderDescApi
(
id
,
"order"
,
{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"编辑备注成功"
...
...
@@ -673,10 +693,9 @@ export default {
this
.
getOrderList
();
this
.
getGoodsOption
();
},
watch
:
{
},
watch
:
{},
filters
:
{
isLeader
(
value
)
{
isLeader
(
value
)
{
return
ISLEADER
[
value
]
},
payMentFilter
(
val
)
{
...
...
@@ -714,26 +733,27 @@ export default {
);
}
}
};
};
</
script
>
<
style
scoped
>
.avatar
{
.avatar
{
width
:
50px
;
min-width
:
50px
;
height
:
50px
;
margin-right
:
5px
;
border-radius
:
50%
;
}
.order
{
}
.order
{
padding
:
20px
0
;
}
}
</
style
>
<
style
>
.f-c
>
.cell
{
.f-c
>
.cell
{
display
:
flex
!important
;
flex-flow
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
}
}
</
style
>
src/components/system/tag.vue
View file @
cade2375
<
template
>
<div
class=
"admin-refresh"
v-loading=
"loading"
>
<div
class=
"section-search search-single"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
inline
>
<el-form
label-width=
"80px"
inline
>
<el-form-item>
<!--
<el-cascader
style=
"width: 280px"
placeholder=
"选择标签"
:props=
"searchProps"
clearable
></el-cascader>
-->
<el-input
placeholder=
"输入标签名搜索"
v-model=
"filterText"
></el-input>
</el-form-item>
<el-form-item>
<div
class=
"search-btn-wrapper"
>
<!--
<el-button
@
click=
"onSearch"
type=
"primary"
plain
>
搜索
</el-button>
-->
<el-button
@
click=
"dialog
Toggle
"
type=
"warning"
plain
>
高级搜索
</el-button>
<el-button
@
click=
"dialog
User.show = !dialogUser.show;
"
type=
"warning"
plain
>
高级搜索
</el-button>
<!--
<el-button
v-if=
"!$store.state.readonly"
@
click=
"onAdd"
type=
"success"
plain
>
新增标签
</el-button>
-->
</div>
</el-form-item>
...
...
@@ -23,7 +19,7 @@
<el-tree
:data=
"treeData"
node-key=
"id"
ref=
"tagTree"
:props=
"
tagProps
"
:props=
"
{children: 'children', label: 'name'}
"
:indent="40"
@node-expand="tagExpand"
@node-collapse="tagCollapse"
...
...
@@ -50,37 +46,46 @@
</el-tree>
</div>
<el-dialog
:title=
"dialog.title"
:visible
.
sync=
"dialog.show"
width=
"800px"
title=
"高级搜索"
>
<el-dialog
:title=
"dialog.title"
:visible
.
sync=
"dialog.show"
width=
"500px"
>
<el-form
ref=
"dialogForm"
:rules=
"dialog.form.rules"
:model=
"dialog.form"
label-width=
"100px"
>
<el-form-item
label=
"ID:"
prop=
"id"
style=
"display: none;"
>
<el-input
v-model=
"dialog.form.id"
maxlength=
"10"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"PID:"
prop=
"pid"
style=
"display: none;"
>
<el-input
v-model=
"dialog.form.pid"
maxlength=
"10"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"标签名称:"
prop=
"name"
>
<el-input
v-model=
"dialog.form.name"
maxlength=
"10"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"标签备注:"
prop=
"cover"
>
<el-input
v-model=
"dialog.form.cover"
maxlength=
"50"
type=
"textarea"
:rows=
"3"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogToggle"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogSave"
>
确定
</el-button>
</span>
</el-dialog>
<el-dialog
:visible
.
sync=
"dialogUser.show"
width=
"800px"
title=
"高级搜索"
>
<div
style=
"display: flex;margin-bottom: 20px;"
>
<el-button
style=
"margin-right: 20px; width: 70px;"
type=
"primary"
v-if=
"!$store.state.readonly && $store.state.export"
plain
:disabled=
"!tableData.length"
@
click=
"exportExcel"
>
导出
</el-button>
<el-cascader
style=
"width: calc(100% - 90px)"
placeholder=
"选择标签"
clearable
@
change=
"conditionsChange"
:options=
"treeDataOrigin"
:props=
"
{ value: 'id', label: 'name', multiple: true, checkStrictly: true }">
</el-cascader>
</div>
<el-table
:data=
"tableData"
border
>
<el-table-column
className=
"f-c"
label=
"用户"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"baby_name"
label=
"宝宝名称"
></el-table-column>
<el-table-column
prop=
"birthday"
label=
"宝宝生日"
></el-table-column>
<el-table-column
prop=
"sex"
label=
"宝宝性别"
:formatter=
"sexFormatter"
></el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号码"
></el-table-column>
<!--<el-table-column label="操作" v-if="!$store.state.readonly" width="100">
<template slot-scope="scope">
<el-button size="mini" plain type="primary" @click="onEdit(scope.row)">编辑</el-button>
</template>
</el-table-column>-->
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<!--<span slot="footer" class="dialog-footer">
<el-button @click="dialogToggle">取消</el-button>
<el-button type="primary" @click="dialogSave">确定</el-button>
</span>-->
</el-dialog>
</div>
</template>
...
...
@@ -96,28 +101,15 @@
conditions
:
[],
filterText
:
''
,
tagProps
:
{
children
:
'children'
,
label
:
'name'
},
tagExpanded
:
[
0
],
tagExpandedWait
:
''
,
searchFrom
:
{
id
:
''
,
name
:
''
,
mobile
:
''
,
id_card
:
''
,
type
:
''
,
status
:
''
,
start_in
:
''
,
over_in
:
''
},
startTime
:
[],
tableData
:
[],
treeData
:
[],
treeDataOrigin
:
[],
dialogUser
:
{
show
:
false
},
dialog
:
{
title
:
''
,
show
:
false
,
...
...
@@ -170,19 +162,18 @@
this
.
getUserData
()
},
getUserData
(){
getUserData
(){
// 搜索用户
let
json
=
{
conditions
:
JSON
.
stringify
(
this
.
conditions
),
limit
:
this
.
limit
,
page
:
this
.
nowPage
}
getTagUserApi
(
json
).
then
(
res
=>
{
this
.
tableData
=
res
.
list
})
},
filterNode
(
value
,
data
)
{
filterNode
(
value
,
data
)
{
// 搜索标签
if
(
!
value
)
return
true
;
return
data
.
name
.
indexOf
(
value
)
!==
-
1
;
},
...
...
@@ -236,21 +227,20 @@
});
},
tagExpand
(
data
,
node
,
el
)
{
tagExpand
(
data
,
node
,
el
)
{
// 标签展开(记录树的状态)
//console.log(node)
if
(
node
.
expanded
)
{
this
.
tagExpanded
.
push
(
node
.
data
.
id
)
}
},
tagCollapse
(
data
,
node
,
el
)
{
tagCollapse
(
data
,
node
,
el
)
{
// 标签收起(记录树的状态)
//console.log(node)
if
(
node
.
expanded
)
{
this
.
tagExpanded
.
splice
(
this
.
tagExpanded
.
findIndex
(
item
=>
item
==
node
.
data
.
id
),
1
)
}
},
getData
()
{
getData
()
{
// 获取标签
getTagApi
().
then
(
res
=>
{
this
.
treeDataOrigin
=
res
;
this
.
treeData
=
[{
...
...
@@ -263,7 +253,6 @@
weight
:
0
,
}]
});
},
onAdd
(
node
)
{
...
...
@@ -278,10 +267,9 @@
});
},
onEdit
(
node
,
data
)
{
console
.
log
(
el
)
console
.
log
(
node
)
console
.
log
(
data
)
onEdit
(
node
,
data
)
{
//console.log(node)
//console.log(data)
let
item
=
node
.
data
;
this
.
dialogToggle
();
this
.
dialogReset
();
...
...
@@ -299,7 +287,7 @@
},
conditionsChange
(
val
){
console
.
log
(
val
);
//
console.log(val);
let
arr
=
[];
if
(
val
.
length
)
{
val
.
forEach
(
v
=>
{
...
...
src/components/teacher/index.vue
View file @
cade2375
...
...
@@ -550,7 +550,7 @@
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.user{
height: 100%;
/*height: 100%;*/
overflow: auto;
padding: 20px 0;
.btn-content{
...
...
src/components/teacherDetail/index.vue
View file @
cade2375
...
...
@@ -3,9 +3,7 @@
<div
class=
"header"
>
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
>
<div
slot=
"header"
>
<span>
<label>
{{
detail
.
type
|
teacherType
}}
:
</label>
{{
detail
.
name
}}
(T
{{
detail
.
squad
}}
)
</span>
<span><label>
{{
detail
.
type
|
teacherType
}}
:
</label>
{{
detail
.
name
}}
(T
{{
detail
.
squad
}}
)
</span>
<el-button
style=
"float: right;margin-top: -6px;"
size=
"small"
type=
"success"
v-if=
"!$store.state.readonly"
plain
@
click=
"onAddUser(true)"
>
老师绑定用户
</el-button>
</div>
<div
class=
"card-content"
>
...
...
@@ -36,9 +34,7 @@
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
v-if=
"detail.user_info"
>
<div
slot=
"header"
>
<span>
绑定用户
</span>
<el-button
@
click=
"createInviteLink(detail.user_info)"
style=
"float: right;"
size=
"mini"
plain
type=
"primary"
>
复制专属链接
</el-button>
<el-button
@
click=
"createInviteLink(detail.user_info)"
style=
"float: right;"
size=
"mini"
plain
type=
"primary"
>
复制专属链接
</el-button>
</div>
<div
class=
"card-content"
>
<div
class=
"text item"
>
...
...
@@ -78,60 +74,47 @@
<el-tab-pane
label=
"今日任务"
name=
"task"
>
<task
:parentDetail=
"parentDetail"
></task>
</el-tab-pane>
<el-tab-pane
label=
"期数列表"
name=
"periods"
>
<el-table
@
expand-change=
"changeRow"
:data=
"list"
style=
"width: 100%"
>
<el-tab-pane
label=
"期数列表"
name=
"periods"
>
<el-table
@
expand-change=
"changeRow"
:data=
"list"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"scope"
>
<el-table
:data=
"[scope.row]"
style=
"width: 100%"
>
<el-table-column
label=
"到课率"
>
<el-table
:data=
"[scope.row]"
>
<el-table-column
label=
"到课率"
>
<template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
arrive_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"看课率"
>
<el-table-column
label=
"看课率"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
watch_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"完课率"
>
<el-table-column
label=
"完课率"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"作业率"
>
<el-table-column
label=
"作业率"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
work_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"全勤作业率"
>
<el-table-column
label=
"全勤作业率"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_work_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"打卡率"
>
<el-table-column
label=
"打卡率"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
clock_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"全勤打卡率"
>
<el-table-column
label=
"全勤打卡率"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_clock_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"转化率"
>
<el-table-column
label=
"转化率"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
transform_rate
|
percent
}}
</span>
</
template
>
...
...
@@ -139,7 +122,13 @@
</el-table>
</template>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column
prop=
"periods_title"
label=
"期数名称"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"class_name"
label=
"班级名称"
></el-table-column>
<el-table-column
prop=
"join_num"
label=
"已进班人数"
width=
"90px"
></el-table-column>
<el-table-column
prop=
"need_add_teacher_num"
label=
"需加好友数"
width=
"90px"
></el-table-column>
...
...
@@ -158,7 +147,7 @@
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</el-tab-pane>
<el-tab-pane
label=
"系统订单列表"
name=
"order"
>
<el-tab-pane
label=
"系统订单列表"
name=
"order"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
inline
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"form.user_id"
></el-input>
...
...
@@ -195,39 +184,26 @@
<el-form-item
label=
"交易订单号"
>
<el-input
v-model=
"form.out_trade_no"
></el-input>
</el-form-item>
<el-form-item
>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"tableData"
style=
"width: 100%"
class=
"order_list"
fixed
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<el-table
:data=
"tableData"
class=
"order_list"
fixed
>
<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
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数标题"
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
<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"
/>
...
...
@@ -253,39 +229,29 @@
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
</div>
<div
v-if=
"scope.row.invite_id === 0"
>
无
</div>
<div
v-if=
"scope.row.invite_id === 0"
>
无
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"优惠活动"
>
<el-table-column
label=
"优惠活动"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
无
</span>
<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"
>
<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"
>
<el-table-column
label=
"实付金额"
width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
money
|
moneytFilter
}}
</
template
>
</el-table-column>
<el-table-column
label=
"收货地址"
>
<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>
...
...
@@ -294,46 +260,23 @@
</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"
fixed=
"right"
>
<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"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"200"
>
<el-popover
placement=
"top"
width=
"200"
>
<div
style=
"text-align: center"
>
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
</el-button>
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
</el-button>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<page
:total=
"orderListObj.total"
:limit=
"orderListObj.limit"
@
pageChange=
"onPageChange2"
@
sizeChange=
"onSizeChange2"
/>
</el-tab-pane>
<el-tab-pane
label=
"外部订单列表"
name=
"yunji"
>
<el-tab-pane
label=
"外部订单列表"
name=
"yunji"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
inline
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"form.user_id"
></el-input>
...
...
@@ -370,30 +313,29 @@
<el-form-item
label=
"交易订单号"
>
<el-input
v-model=
"form.out_trade_no"
></el-input>
</el-form-item>
<el-form-item
>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getyunjiList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"yunjiList"
style=
"width: 100%"
class=
"order_list"
fixed
>
<el-table-column
prop=
"order_id"
width=
"80"
label=
"订单号"
>
</el-table-column>
<el-table
:data=
"yunjiList"
class=
"order_list"
fixed
>
<el-table-column
prop=
"order_id"
width=
"80"
label=
"订单号"
></el-table-column>
<el-table-column
prop=
"nickname"
label=
"购买人"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
'scope.row.user_id !== 0'
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<div
v-if=
'scope.row.user_id !== 0'
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<div>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</div>
</div>
<div
v-if=
'scope.row.user_id === 0'
>
暂未绑定用户
</div>
<div
v-if=
'scope.row.user_id === 0'
>
暂未绑定用户
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数"
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
<el-table-column
prop=
"invite_type"
label=
"来源"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
...
...
@@ -424,18 +366,14 @@
{{
scope
.
row
.
active_at
===
'0000-00-00 00:00:00'
?
'未激活'
:
scope
.
row
.
active_at
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
>
</el-table-column>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
>
</el-table-column>
<el-table-column
prop=
"user_status"
:formatter=
"userStatusFormatter"
label=
"沟通状态"
width=
"90"
>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"user_status"
:formatter=
"userStatusFormatter"
label=
"沟通状态"
width=
"90"
></el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
</el-table>
<page
:total=
"yunjiListObj.total"
:limit=
"yunjiListObj.limit"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
</el-tab-pane>
<el-tab-pane
label=
"话术列表"
name=
"huashu"
>
<el-tab-pane
label=
"话术列表"
name=
"huashu"
>
<div
class=
"cssbox"
>
<el-tabs
v-model=
"questionListParams.type"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"话术"
name=
"1"
></el-tab-pane>
...
...
@@ -447,14 +385,17 @@
<
template
slot=
"title"
>
{{
item
.
title
}}
</
template
>
<div
class=
"search"
><el-input
placeholder=
"请输入关键字"
v-model=
"questionListParams.keywords"
></el-input>
<el-button
type=
"primary"
plain
@
click=
"handleChange"
>
搜索
</el-button>
</div>
<div
class=
"search"
>
<el-input
placeholder=
"请输入关键字"
v-model=
"questionListParams.keywords"
></el-input>
<el-button
type=
"primary"
plain
@
click=
"handleChange"
>
搜索
</el-button>
</div>
<el-table
:data=
"modularContent"
style=
"width: 100%"
>
<el-table-column
prop=
"title"
label=
"标题"
></el-table-column>
<el-table-column
prop=
"keywords"
label=
"关键字"
></el-table-column>
<el-table-column
label=
"创建时间"
prop=
"created_at"
></el-table-column>
<el-table-column
width=
"250"
v-if=
"!$store.state.readonly"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"warning"
@
click=
"showContent(scope.row)"
>
查看内容
</el-button>
<el-button
size=
"mini"
plain
type=
"warning"
@
click=
"showContent(scope.row)"
>
查看内容
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -469,8 +410,7 @@
append-to-body
ref=
"ruleForm"
:visible
.
sync=
"postModularContentDialog"
width=
"800px"
>
width=
"800px"
>
<div
class=
"quesion"
>
<p
style=
"font-weight:bold"
>
标题:
</p><span>
{{postModularParams.title}}
</span>
</div>
...
...
@@ -562,9 +502,30 @@
</template>
<
script
>
import
{
getTeacherDetailApi
,
getClassStatisticsApi
,
task4Api
,
getUserListApi
,
getQuestionModularListApi
,
getQuestionModularDetailApi
,
teacherBindUserApi
,
getOrderListApi
,
getGoodsListApi
,
editOrderDescApi
,
updateOrderTeacherApi
,
getyunjiApi
,
getClassListApi
,
getSourceStudentApi
}
from
"../../service/api"
;
import
{
TEACHERTYPE
,
ORDERSTATUSOPTION
,
GOODSTYPE
,
ORDERSTATUS
,
CLASSSOURCE
,
USERSTATUSFORMATER
}
from
"../../util/wordbook"
;
import
{
getTeacherDetailApi
,
getClassStatisticsApi
,
task4Api
,
getUserListApi
,
getQuestionModularListApi
,
getQuestionModularDetailApi
,
teacherBindUserApi
,
getOrderListApi
,
getGoodsListApi
,
editOrderDescApi
,
updateOrderTeacherApi
,
getyunjiApi
,
getClassListApi
,
getSourceStudentApi
}
from
"../../service/api"
;
import
{
TEACHERTYPE
,
ORDERSTATUSOPTION
,
GOODSTYPE
,
ORDERSTATUS
,
CLASSSOURCE
,
USERSTATUSFORMATER
}
from
"../../util/wordbook"
;
import
AddressArray
from
'../framework/address-picker/addr'
import
task
from
'./task'
import
page
from
'../framework/page'
...
...
@@ -573,13 +534,14 @@
import
refundDetail
from
'./refundDetail'
import
UserList
from
'../class/userList'
import
chooseGoodDialog
from
'./chooseGoodDialog'
let
studentSource
=
{}
export
default
{
name
:
"index"
,
props
:[
props
:
[
'parentDetail'
],
components
:{
components
:
{
page
,
task
,
UserList
,
...
...
@@ -588,100 +550,123 @@
refundDetail
,
sourceDialog
},
data
(){
data
()
{
let
nowDate
=
new
Date
();
let
month
=
(
nowDate
.
getMonth
()
+
1
);
if
(
month
<
10
)
month
=
'0'
+
month
.
toString
();
let
month
=
(
nowDate
.
getMonth
()
+
1
);
if
(
month
<
10
)
month
=
'0'
+
month
.
toString
();
nowDate
=
nowDate
.
getFullYear
()
+
'-'
+
month
;
return
{
modularContentTitle
:
""
,
modularContentTitle
:
""
,
modularTotal
:
0
,
modularNowPage
:
1
,
modularLimit
:
10
,
contentTotal
:
0
,
contentNowPage
:
1
,
contentLimit
:
10
,
postModularContentDialog
:
false
,
postModularContentDialog
:
false
,
modularId
:
""
,
questionListParams
:
{
type
:
"1"
,
pid
:
""
,
keywords
:
''
keywords
:
''
},
postModularParams
:
{},
postModularParams
:
{},
modularList
:
[],
modularContent
:
[],
tabs
:
'task'
,
nowDate
:
nowDate
,
yunjiList
:[],
tabs
:
'task'
,
nowDate
:
nowDate
,
yunjiList
:
[],
searchFrom
:
{
user_id
:
''
,
user_id
:
''
,
is_add_teacher
:
''
,
is_view_course
:
''
,
start_at
:
''
,
end_at
:
''
start_at
:
''
,
end_at
:
''
},
form
:
{
nickname
:
''
,
user_id
:
''
,
status
:
[
1
,
3
,
4
,
5
],
status
:
[
1
,
3
,
4
,
5
],
goods_id
:
''
,
out_trade_no
:
''
,
receive_mobile
:
""
,
mobile
:
""
,
receive_mobile
:
""
,
mobile
:
""
,
},
task4Data
:
null
,
goodList
:[],
orderStatusOption
:
ORDERSTATUSOPTION
,
tableData
:[],
userList
:[],
list
:[],
task4Data
:
null
,
goodList
:
[],
orderStatusOption
:
ORDERSTATUSOPTION
,
tableData
:
[],
userList
:
[],
list
:
[],
id
:
''
,
isBindUser
:
true
,
addShow
:
false
,
isBindUser
:
true
,
addShow
:
false
,
detail
:
{},
total
:
0
,
limit
:
10
,
nowPage
:
1
,
userObj
:{
classId
:
''
,
title
:
''
,
show
:
false
,
userObj
:
{
classId
:
''
,
title
:
''
,
show
:
false
,
total
:
0
,
limit
:
10
,
nowPage
:
1
,
},
addId
:
''
,
multipleSelection
:[],
addId
:
''
,
multipleSelection
:
[],
chooseGoodDialogObj
:
{
show
:
false
,
code
:
''
},
orderListObj
:{
orderListObj
:
{
total
:
0
,
limit
:
10
,
nowPage
:
1
,
},
yunjiListObj
:{
yunjiListObj
:
{
total
:
0
,
limit
:
10
,
nowPage
:
1
,
},
sourceDialog
:{
show
:
false
,
out_trade_no
:
''
sourceDialog
:
{
show
:
false
,
out_trade_no
:
''
},
couponDetail
:
{
show
:
false
,
order_coupon_id
:
''
},
couponDetail
:
{
show
:
false
,
o
rder_coupon_id
:
''
refundDetail
:
{
show
:
false
,
o
ut_trade_no
:
''
},
refundDetail
:{
show
:
false
,
out_trade_no
:
''
}
},
methods
:
{
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
periods_title
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`
${
val
.
periods_title
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
}
return
str
},
methods
:{
onPageChangeModular
(
val
)
{
this
.
modularNowPage
=
val
;
this
.
getList
();
...
...
@@ -700,9 +685,7 @@
this
.
contentLimit
=
val
;
this
.
handleChange
();
},
onPageChangeModular
(){
},
showContent
(
data
){
showContent
(
data
)
{
this
.
modularContentTitle
=
data
.
title
getQuestionModularDetailApi
(
data
.
id
).
then
(
res
=>
{
this
.
postModularParams
=
Object
.
assign
({},
res
);
...
...
@@ -715,13 +698,13 @@
// console.log(val);
let
json
=
{
type
:
this
.
questionListParams
.
type
,
page
:
this
.
contentNowPage
,
limit
:
this
.
contentLimit
page
:
this
.
contentNowPage
,
limit
:
this
.
contentLimit
};
if
(
this
.
modularId
)
{
json
.
pid
=
this
.
modularId
;
}
if
(
this
.
questionListParams
.
keywords
)
{
if
(
this
.
questionListParams
.
keywords
)
{
json
.
keywords
=
this
.
questionListParams
.
keywords
;
}
// this.postModularParams.pid = this.modularId;
...
...
@@ -741,10 +724,10 @@
getList
()
{
let
json
=
{
type
:
this
.
questionListParams
.
type
,
modularPage
:
this
.
modularNowPage
,
modularLimit
:
this
.
modularLimit
modularPage
:
this
.
modularNowPage
,
modularLimit
:
this
.
modularLimit
};
if
(
this
.
questionListParams
.
pid
)
{
if
(
this
.
questionListParams
.
pid
)
{
json
.
pid
=
this
.
questionListParams
.
pid
;
}
getQuestionModularListApi
(
json
.
type
,
json
).
then
(
res
=>
{
...
...
@@ -754,28 +737,28 @@
this
.
modularTotal
=
res
.
total
;
});
},
userStatusFormatter
(
val
){
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
userStatusFormatter
(
val
)
{
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
},
getTask4
(){
task4Api
(
this
.
id
).
then
(
res
=>
{
getTask4
()
{
task4Api
(
this
.
id
).
then
(
res
=>
{
this
.
task4Data
=
res
})
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
onAdd
(){
onAdd
()
{
let
json
=
{
is_buy
:
0
}
if
(
this
.
multipleSelection
.
length
===
0
)
{
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择用户!'
});
return
}
else
if
(
this
.
multipleSelection
.
length
!==
1
){
}
else
if
(
this
.
multipleSelection
.
length
!==
1
)
{
this
.
$message
({
type
:
'error'
,
message
:
'只能选择一个用户!'
...
...
@@ -789,7 +772,7 @@
if
(
!
this
.
isBindUser
)
{
}
else
{
teacherBindUserApi
(
this
.
id
,
{
user_id
:
this
.
addId
}).
then
(
res
=>
{
teacherBindUserApi
(
this
.
id
,
{
user_id
:
this
.
addId
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'绑定成功!'
...
...
@@ -801,12 +784,12 @@
})
}
},
onAddUser
(
flag
){
onAddUser
(
flag
)
{
this
.
isBindUser
=
flag
;
this
.
addShow
=
true
;
this
.
getUser
();
},
getUser
(){
getUser
()
{
let
json
=
{
page
:
this
.
userObj
.
nowPage
,
limit
:
this
.
userObj
.
limit
,
...
...
@@ -820,14 +803,14 @@
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
}
getUserListApi
(
json
).
then
(
res
=>
{
getUserListApi
(
json
).
then
(
res
=>
{
this
.
userList
=
res
.
list
;
this
.
userObj
.
total
=
res
.
total
;
})
},
changeRow
(
data
,
b
)
{
if
(
b
.
indexOf
(
data
)
>-
1
)
{
getClassStatisticsApi
(
data
.
periods_id
,
data
.
id
).
then
(
res
=>
{
changeRow
(
data
,
b
)
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getClassStatisticsApi
(
data
.
periods_id
,
data
.
id
).
then
(
res
=>
{
data
.
arrive_course_rate
=
res
.
arrive_course_rate
;
data
.
watch_course_rate
=
res
.
watch_course_rate
;
data
.
over_course_rate
=
res
.
over_course_rate
;
...
...
@@ -839,63 +822,63 @@
})
}
},
showUser
(
data
){
showUser
(
data
)
{
console
.
log
(
data
)
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
this
.
userObj
=
{
classId
:
data
.
id
,
show
:
true
,
title
:
`
${
this
.
detail
.
name
}
班级用户列表
${
classType
}
`
,
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
this
.
userObj
=
{
classId
:
data
.
id
,
show
:
true
,
title
:
`
${
this
.
detail
.
name
}
班级用户列表
${
classType
}
`
,
teacherId
:
data
.
teacher_id
,
periods_id
:
data
.
periods_id
,
goods_id
:
data
.
goods_id
,
type
:
data
.
type
goods_id
:
data
.
goods_id
,
type
:
data
.
type
}
},
onPageChange3
(
val
)
{
/*onPageChange3(val)
{
this.userObj.nowPage = val;
this.getUser()
},
onSizeChange3
(
val
)
{
},
*/
/*onSizeChange3(val)
{
this.userObj.limit = val;
this.userObj.nowPage = 1;
this.getUser();
},
onPageChange
(
val
){
},
*/
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
getTeacherDetail
();
},
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getTeacherDetail
();
},
onPageChange2
(
val
){
onPageChange2
(
val
)
{
this
.
orderListObj
.
nowPage
=
val
;
this
.
getOrderList
()
},
onSizeChange2
(
val
){
onSizeChange2
(
val
)
{
this
.
orderListObj
.
limit
=
val
;
this
.
orderListObj
.
nowPage
=
1
;
this
.
getOrderList
()
},
onPageChange3
(
val
)
{
onPageChange3
(
val
)
{
this
.
yunjiListObj
.
nowPage
=
val
;
this
.
getyunjiList
()
},
onSizeChange3
(
val
){
onSizeChange3
(
val
)
{
this
.
yunjiListObj
.
limit
=
val
;
this
.
yunjiListObj
.
nowPage
=
1
;
this
.
getyunjiList
()
},
getTeacherDetail
(){
getTeacherDetail
()
{
this
.
searchFrom
=
{
user_id
:
''
,
user_id
:
''
,
is_add_teacher
:
''
,
is_view_course
:
''
,
start_at
:
''
,
end_at
:
''
start_at
:
''
,
end_at
:
''
};
let
id
=
this
.
id
;
let
json
=
{
...
...
@@ -908,11 +891,11 @@
// })
console
.
log
(
this
.
id
)
// debugger
getTeacherDetailApi
(
id
,
json
).
then
((
res
)
=>
{
getTeacherDetailApi
(
id
,
json
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
detail
=
res
;
if
(
this
.
detail
.
class_list
)
{
this
.
detail
.
class_list
.
list
.
forEach
(
data
=>
{
this
.
detail
.
class_list
.
list
.
forEach
(
data
=>
{
data
.
arrive_course_rate
=
0
;
data
.
watch_course_rate
=
0
;
data
.
over_course_rate
=
0
;
...
...
@@ -929,24 +912,24 @@
// this.getOrderList();
})
},
createInviteLink
(
val
){
createInviteLink
(
val
)
{
this
.
chooseGoodDialogObj
.
show
=
true
;
//类型选择项
if
(
this
.
detail
.
type
==
0
)
{
if
(
this
.
detail
.
type
==
0
)
{
this
.
chooseGoodDialogObj
.
code
=
`CC-TEACHER-
${
val
.
user_id
}
`
;
}
else
if
(
this
.
detail
.
type
==
1
)
{
}
else
if
(
this
.
detail
.
type
==
1
)
{
this
.
chooseGoodDialogObj
.
code
=
`CC-XXMM-
${
val
.
user_id
}
`
;
}
else
{
}
else
{
this
.
chooseGoodDialogObj
.
code
=
`CC-TEACHER-
${
val
.
user_id
}
`
;
}
},
changeShow
(){
changeShow
()
{
this
.
chooseGoodDialogObj
.
show
=
false
;
this
.
chooseGoodDialogObj
.
code
=
''
;
},
getOrderList
(){
getOrderList
()
{
let
json
=
{
limit
:
this
.
orderListObj
.
limit
,
page
:
this
.
orderListObj
.
nowPage
...
...
@@ -978,11 +961,11 @@
// }
// json.teacher_id=this.id;
// json.invite_id=this.id;
if
(
this
.
detail
.
user_id
!==
0
)
{
json
.
invite_id
=
this
.
detail
.
user_id
;
getOrderListApi
(
json
).
then
((
res
)
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
if
(
this
.
detail
.
user_id
!==
0
)
{
json
.
invite_id
=
this
.
detail
.
user_id
;
getOrderListApi
(
json
).
then
((
res
)
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
});
this
.
tableData
=
res
.
list
;
this
.
orderListObj
.
total
=
res
.
total
...
...
@@ -990,13 +973,13 @@
}
},
getGoodsOption
(){
getGoodsOption
()
{
let
json
=
{
page
:
1
,
limit
:
100
,
course_type
:
0
,
course_type
:
0
,
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
})
},
...
...
@@ -1004,15 +987,15 @@
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputType
:
'textarea'
,
inputValue
:
desc
||
''
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,{
desc
:
value
}).
then
(
res
=>
{
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,
{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
...
...
@@ -1022,19 +1005,19 @@
});
})
},
showRef
(
data
){
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
},
showCoupon
(
data
){
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
},
showSource
(
data
){
showSource
(
data
)
{
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
},
getyunjiList
(){
getyunjiList
()
{
let
json
=
{
limit
:
this
.
yunjiListObj
.
limit
,
page
:
this
.
yunjiListObj
.
nowPage
...
...
@@ -1060,8 +1043,8 @@
if
(
this
.
form
.
mobile
)
{
json
.
mobile
=
this
.
form
.
mobile
}
if
(
this
.
id
)
{
json
.
teacher_id
=
this
.
id
;
if
(
this
.
id
)
{
json
.
teacher_id
=
this
.
id
;
}
getyunjiApi
(
json
).
then
(
res
=>
{
this
.
yunjiListObj
.
total
=
res
.
total
;
...
...
@@ -1069,35 +1052,35 @@
});
}
},
filters
:{
teacherType
(
value
){
filters
:
{
teacherType
(
value
)
{
return
TEACHERTYPE
[
value
]
},
percent
(
val
){
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
percent
(
val
)
{
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
},
status
(
value
){
status
(
value
)
{
return
ORDERSTATUS
[
value
]
},
moneytFilter
(
val
){
moneytFilter
(
val
)
{
return
val
=
val
/
100
+
'元'
},
filterGoods
(
val
){
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
filterGoods
(
val
)
{
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
},
classSource
(
val
){
classSource
(
val
)
{
// return CLASSSOURCE[val]
return
studentSource
[
val
]
}
},
mounted
(){
this
.
id
=
this
.
parentDetail
?
this
.
parentDetail
.
id
:
this
.
$route
.
params
.
id
;
mounted
()
{
this
.
id
=
this
.
parentDetail
?
this
.
parentDetail
.
id
:
this
.
$route
.
params
.
id
;
this
.
getTask4
();
getSourceStudentApi
().
then
(
res
=>
{
getSourceStudentApi
().
then
(
res
=>
{
let
obj
=
{}
res
.
forEach
((
item
,
index
)
=>
{
obj
[
item
.
type
]
=
item
.
name
res
.
forEach
((
item
,
index
)
=>
{
obj
[
item
.
type
]
=
item
.
name
})
studentSource
=
obj
// console.log(obj)
...
...
@@ -1105,15 +1088,15 @@
this
.
getTeacherDetail
();
this
.
getGoodsOption
();
},
watch
:{
'tabs'
(
value
){
if
(
value
===
'order'
)
{
watch
:
{
'tabs'
(
value
)
{
if
(
value
===
'order'
)
{
this
.
getOrderList
();
}
if
(
value
===
'yunji'
)
{
if
(
value
===
'yunji'
)
{
this
.
getyunjiList
();
}
if
(
value
===
'huashu'
)
{
if
(
value
===
'huashu'
)
{
this
.
getList
();
}
}
...
...
@@ -1126,13 +1109,16 @@
padding: 20px;
color: #666;
}
.teacher {
padding: 20px 0;
}
.header {
padding: 0 20px;
margin-bottom: 20px;
}
.el-row {
display: flex;
justify-content: flex-start;
...
...
@@ -1140,49 +1126,59 @@
color: #666;
font-size: 16px;
}
.text.item{
.text.item {
line-height: 40px;
label{
label {
width: 120px;
}
&.style-fix {
/*display: flex;
flex-direction: column;
justify-content: space-between;*/
line-height: 25px;
span {
display: block;
}
}
}
.el-card{
.el-card {
/*height: 50px;*/
display: flex;
justify-content: flex-start;
align-items: center;
.avatar {
width: 120px;
margin-right: 10px;
height: 120px;
border-radius: 1000px;
}
img{
img {
width: 120px;
float: left;
margin-right: 10px;
}
label{
label {
color: #5982e6;
width: 120px;
}
}
.card-content:after{
.card-content:after {
content: '';
display: block;
clear: both;
}
.order_list{
.avatar{
.order_list {
.avatar {
width: 50px;
min-width: 50px;
height: 50px;
...
...
@@ -1190,24 +1186,32 @@
border-radius: 50%;
}
}
.search{
.search {
padding: 10px 30px;
.el-input{display: inline-block;width: 300px;}
.el-input {
display: inline-block;
width: 300px;
}
}
</
style
>
<
style
>
.demo-table-expand
{
font-size
:
0
;
}
.demo-table-expand
label
{
width
:
90px
;
color
:
#99a9bf
;
}
.demo-table-expand
.el-form-item
{
margin-right
:
0
;
margin-bottom
:
0
;
width
:
50%
;
}
.f-c
>
.cell
{
display
:
flex
!important
;
flex-flow
:
row
;
...
...
src/components/teacherDetail/task.vue
View file @
cade2375
...
...
@@ -25,7 +25,8 @@
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"header bg-h"
>
期数
</div>
<div>
{{
data
.
title
}}
<!--
{{
data
.
title
}}
-->
<div
v-html=
"periodName(data)"
></div>
</div>
</div>
<div
class=
"over_work"
style=
"background-color: #fffbe4"
>
...
...
@@ -563,6 +564,29 @@
}
}
,
methods
:{
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
title
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【${val.goods_id
}
】`
}
if
(
val
.
title
)
{
str
+=
`${val.title
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`${val.watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(${val.start_at.slice(5).replace('-', '')
}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d${val.has_watch_num
}
`
}
}
return
str
}
,
formatTime
(
date
){
let
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
...
...
src/components/userDetail/index.vue
View file @
cade2375
...
...
@@ -49,15 +49,10 @@
</div>
<el-tabs
type=
"border-card"
v-model=
"tabs"
>
<el-tab-pane
label=
"期数列表"
name=
"periods"
>
<el-table
@
expand-change=
"changeRow"
:data=
"periodList"
style=
"width: 100%"
>
<el-table
@
expand-change=
"changeRow"
:data=
"periodList"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"scope"
>
<el-table
:data=
"list"
style=
"width: 100%"
>
<el-table
:data=
"list"
>
<el-table-column
label=
"到课率"
>
<template
slot-scope=
"scope2"
>
...
...
@@ -97,10 +92,11 @@
</el-table>
</template>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"
{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.periods_id}}" >
{{
scope
.
row
.
periods_title
}}
<router-link
:to=
"
{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.periods_id}}">
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</router-link>
</
template
>
</el-table-column>
...
...
@@ -111,7 +107,7 @@
</el-table-column>
<el-table-column
className=
"f-c"
label=
"老师"
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"`/teacher/$
{scope.row.teacher_id}`"
>
<router-link
:to=
"`/teacher/$
{scope.row.teacher_id}`">
<div
class=
"f-c"
>
<div>
<img
class=
"avatar"
:src=
"scope.row.teacher_qr"
>
{{
scope
.
row
.
teacher_name
}}
...
...
@@ -127,43 +123,29 @@
<el-table-column
label=
"操作"
width=
"340px"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"showUser(scope.row)"
size=
"mini"
type=
"primary"
>
班级成员
</el-button>
<el-button
size=
"mini"
type=
"warning"
v-if=
"!$store.state.readonly"
@
click=
"editPrivilege(scope.row)"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"onGetUserDescList(scope.row)"
>
备注
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"showSourceByDate(scope.row)"
>
看课情况
</el-button>
<el-button
size=
"mini"
type=
"warning"
v-if=
"!$store.state.readonly"
@
click=
"editPrivilege(scope.row)"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"onGetUserDescList(scope.row)"
>
备注
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"showSourceByDate(scope.row)"
>
看课情况
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"系统订单列表"
name=
"order"
>
<el-table
:data=
"userList"
style=
"width: 100%"
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<el-table
:data=
"userList"
>
<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=
"periods_title"
label=
"期数标题"
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人属性"
>
<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=
"display: flex;color: #409eff;cursor: pointer"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
...
...
@@ -242,33 +224,31 @@
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</el-tab-pane>
<el-tab-pane
label=
"外部订单列表"
name=
"yunji"
>
<el-table
:data=
"yunjiList"
style=
"width: 100%"
>
<el-table
:data=
"yunjiList"
>
<el-table-column
prop=
"order_id"
width=
"80"
label=
"订单号"
>
</el-table-column>
<el-table-column
prop=
"nickname"
label=
"购买人"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
'scope.row.user_id !== 0'
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<div
v-if=
'scope.row.user_id !== 0'
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<div>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</div>
</div>
<div
v-if=
'scope.row.user_id === 0'
>
暂未绑定用户
</div>
<div
v-if=
'scope.row.user_id === 0'
>
暂未绑定用户
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数"
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
<el-table-column
prop=
"invite_type"
label=
"来源"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"teacher_name"
label=
"班级老师"
>
</el-table-column>
<el-table-column
prop=
"teacher_name"
label=
"班级老师"
></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>
...
...
@@ -294,45 +274,21 @@
{{
scope
.
row
.
active_at
===
'0000-00-00 00:00:00'
?
'未激活'
:
scope
.
row
.
active_at
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
>
</el-table-column>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
>
</el-table-column>
<el-table-column
prop=
"user_status"
:formatter=
"userStatusFormatter"
label=
"沟通状态"
width=
"90"
>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"user_status"
:formatter=
"userStatusFormatter"
label=
"沟通状态"
width=
"90"
></el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"地址列表"
name=
"address"
>
<el-button
size=
"mini"
type=
""
v-if=
"!addressList.length"
@
click=
"addAddress()"
>
新增
</el-button>
<el-table
:data=
"addressList"
style=
"width: 100%"
>
<el-table-column
prop=
"receive_name"
label=
"收件人名称"
>
</el-table-column>
<el-table-column
prop=
"receive_mobile"
label=
"收件人手机号"
>
</el-table-column>
<el-table-column
prop=
"province_name"
label=
"省"
>
</el-table-column>
<el-table-column
prop=
"city"
label=
"市"
>
</el-table-column>
<el-table-column
prop=
"area"
label=
"地区名称"
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"详细地址"
>
</el-table-column>
<el-button
size=
"mini"
type=
""
v-if=
"!addressList.length"
@
click=
"addAddress()"
>
新增
</el-button>
<el-table
:data=
"addressList"
>
<el-table-column
prop=
"receive_name"
label=
"收件人名称"
></el-table-column>
<el-table-column
prop=
"receive_mobile"
label=
"收件人手机号"
></el-table-column>
<el-table-column
prop=
"province_name"
label=
"省"
></el-table-column>
<el-table-column
prop=
"city"
label=
"市"
></el-table-column>
<el-table-column
prop=
"area"
label=
"地区名称"
></el-table-column>
<el-table-column
prop=
"address"
label=
"详细地址"
></el-table-column>
<!-- <el-table-column
prop="is_del"
label="是否删除">
...
...
@@ -340,52 +296,26 @@
{{scope.row.is_del == 0?'否':'是'}}
</template>
</el-table-column> -->
<el-table-column
prop=
"created_at"
label=
"创建时间"
>
</el-table-column>
<el-table-column
prop=
"updated_at"
label=
"更新时间"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100px"
>
<el-table-column
prop=
"created_at"
label=
"创建时间"
></el-table-column>
<el-table-column
prop=
"updated_at"
label=
"更新时间"
></el-table-column>
<el-table-column
label=
"操作"
width=
"100px"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"warning"
v-if=
"!$store.state.readonly&&scope.row.is_del == 0"
@
click=
"editAddress(scope.row)"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"warning"
v-if=
"!$store.state.readonly&&scope.row.is_del == 0"
@
click=
"editAddress(scope.row)"
>
编辑
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"绑定记录"
name=
"subList"
>
<el-table
:data=
"subListData"
style=
"width: 100%"
>
<el-table-column
prop=
"cur_date"
label=
"绑定时间"
>
</el-table-column>
<el-table-column
prop=
"unbind_at"
label=
"解绑时间"
>
</el-table-column>
<el-table-column
prop=
"user_nickname"
label=
"主账号"
>
</el-table-column>
<el-table-column
prop=
"sub_user_nickname"
label=
"子账号"
>
</el-table-column>
<el-table
:data=
"subListData"
>
<el-table-column
prop=
"cur_date"
label=
"绑定时间"
></el-table-column>
<el-table-column
prop=
"unbind_at"
label=
"解绑时间"
></el-table-column>
<el-table-column
prop=
"user_nickname"
label=
"主账号"
></el-table-column>
<el-table-column
prop=
"sub_user_nickname"
label=
"子账号"
></el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"发货记录"
name=
"deliverRecord"
>
<el-table
:data=
"deliverRecordList"
style=
"width: 100%"
>
<el-table-column
width=
"220"
className=
"f-c"
label=
"用户"
>
<el-table
:data=
"deliverRecordList"
>
<el-table-column
width=
"220"
className=
"f-c"
label=
"用户"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
</
template
>
...
...
@@ -397,20 +327,15 @@
{{
scope
.
row
.
province_name
}}{{
scope
.
row
.
city_name
}}{{
scope
.
row
.
area_name
}}{{
scope
.
row
.
address
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
>
</el-table-column>
<el-table-column
prop=
"theme_name"
label=
"主题"
>
</el-table-column>
<el-table-column
prop=
"deliver_start_at"
label=
"预计发货开始时间"
>
</el-table-column>
<el-table-column
prop=
"deliver_end_at"
label=
"预计发货结束时间"
>
</el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
<el-table-column
prop=
"theme_name"
label=
"主题"
></el-table-column>
<el-table-column
prop=
"deliver_start_at"
label=
"预计发货开始时间"
></el-table-column>
<el-table-column
prop=
"deliver_end_at"
label=
"预计发货结束时间"
></el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
></el-table-column>
<el-table-column
prop=
"status"
label=
"物流状态"
>
<
template
slot-scope=
"scope"
>
<!--
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br>
-->
<span
>
名称:
{{
scope
.
row
.
express_name
}}
<br>
单号:
{{
scope
.
row
.
express_no
}}
</span>
<span
>
名称:
{{
scope
.
row
.
express_name
}}
<br>
单号:
{{
scope
.
row
.
express_no
}}
</span>
</
template
>
</el-table-column>
<!-- <el-table-column width="150" label="操作" v-if="!$store.state.readonly" fixed="right">
...
...
@@ -561,68 +486,79 @@
<
/el-table
>
<
page
:
nowPage
=
"lookDetail.nowPage"
:
total
=
"lookDetail.total"
:
limit
=
"lookDetail.limit"
@
pageChange
=
"onLookDetailPageChange"
@
sizeChange
=
"onLookDetailSizeChange"
/>
<
/el-dialog
>
<
sourceByDateDialog
:
dialogObj
=
sourceByDateDialogJson
ref
=
"sourceByDateDialogDom"
><
/sourceByDateDialog
>
<
sourceByDateDialog
:
dialogObj
=
sourceByDateDialogJson
ref
=
"sourceByDateDialogDom"
><
/sourceByDateDialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
,
userLookApi
,
getUserDescListApi
,
addPeriodsClassUserDescApi
,
getDeliverRecordApi
,
updateUserPrivilegeApi
,
getyunjiApi
,
fetchAddressListApi
,
getSubAccountInfoApi
,
getUserSubAccountListApi
}
from
"../../service/api"
;
import
{
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
,
userLookApi
,
getUserDescListApi
,
addPeriodsClassUserDescApi
,
getDeliverRecordApi
,
updateUserPrivilegeApi
,
getyunjiApi
,
fetchAddressListApi
,
getSubAccountInfoApi
,
getUserSubAccountListApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
sourceDialog
from
'../order/sourceDialog'
import
refundDetail
from
'../order/refundDetail'
import
couponDialog
from
'../order/couponDialog'
import
addressDialogC
from
"./addressdialog"
;
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
USERSTATUSFORMATER
}
from
"../../util/wordbook"
;
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
USERSTATUSFORMATER
}
from
"../../util/wordbook"
;
import
teacherDialog
from
'./dialog'
import
UserList
from
'../class/userList'
import
sourceByDateDialog
from
'../teacherDetail/sourceByDateDialog'
import
AddressArray
from
"../framework/address-picker/addr"
;
export
default
{
name
:
"index"
,
data
(){
data
()
{
return
{
userList
:[],
yunjiList
:[],
addressList
:[],
total
:
0
,
addressDialog
:{
show
:
false
}
,
addressParams
:{
userList
:
[],
yunjiList
:
[],
addressList
:
[],
total
:
0
,
addressDialog
:
{
show
:
false
}
,
sourceDialog
:{
show
:
false
,
out_trade_no
:
''
addressParams
:
{
}
,
sourceDialog
:
{
show
:
false
,
out_trade_no
:
''
}
,
tabs
:
'periods'
,
couponDetail
:{
show
:
false
,
order_coupon_id
:
''
tabs
:
'periods'
,
couponDetail
:
{
show
:
false
,
order_coupon_id
:
''
}
,
refundDetail
:{
show
:
false
,
out_trade_no
:
''
refundDetail
:
{
show
:
false
,
out_trade_no
:
''
}
,
nowPage
:
1
,
nowPage
:
1
,
limit
:
5
,
id
:
''
,
detail
:
{
}
,
subDetail
:{
}
,
subListData
:[],
subDetail
:
{
}
,
subListData
:
[],
periodList
:
[],
dialogObj
:{
show
:
false
,
title
:
'绑定老师'
,
id
:
0
,
dialogObj
:
{
show
:
false
,
title
:
'绑定老师'
,
id
:
0
,
teacher_id
:
0
}
,
list
:
[],
userObj
:{
classId
:
''
,
title
:
''
,
show
:
false
,
userObj
:
{
classId
:
''
,
title
:
''
,
show
:
false
,
}
,
privilegeDialog
:
{
show
:
false
,
...
...
@@ -636,16 +572,16 @@
descList
:
[],
nowPage
:
1
,
limit
:
10
,
total
:
0
,
total
:
0
,
userInfo
:
null
}
,
lookDetail
:{
show
:
false
,
loading
:
false
,
list
:[],
lookDetail
:
{
show
:
false
,
loading
:
false
,
list
:
[],
nowPage
:
1
,
limit
:
10
,
total
:
0
total
:
0
}
,
isAddTeacherList
:
[
{
...
...
@@ -673,11 +609,11 @@
value
:
5
}
],
sourceByDateDialogJson
:{
}
,
deliverRecordList
:[]
sourceByDateDialogJson
:
{
}
,
deliverRecordList
:
[]
}
}
,
components
:{
components
:
{
page
,
teacherDialog
,
UserList
,
...
...
@@ -687,41 +623,64 @@
sourceByDateDialog
,
addressDialogC
}
,
props
:[
props
:
[
'parentDetail'
],
mounted
(){
mounted
()
{
this
.
id
=
this
.
parentDetail
?
this
.
parentDetail
.
id
:
this
.
$route
.
params
.
id
;
this
.
getDetail
();
}
,
watch
:{
'tabs'
(
value
){
if
(
value
===
'order'
)
{
watch
:
{
'tabs'
(
value
)
{
if
(
value
===
'order'
)
{
this
.
getUser
()
}
if
(
value
===
'yunji'
)
{
if
(
value
===
'yunji'
)
{
this
.
getyunjiOrder
()
}
if
(
value
===
'address'
)
{
if
(
value
===
'address'
)
{
this
.
getAddressList
()
}
if
(
value
===
'subList'
)
{
if
(
value
===
'subList'
)
{
this
.
getUserSubAccountList
()
}
if
(
value
===
'deliverRecord'
)
{
if
(
value
===
'deliverRecord'
)
{
this
.
getDeliverRecordList
()
}
}
}
,
methods
:{
methods
:
{
// editAddress(row)
{
// this.addressParams = row
// this.addressParams.show=true
// console.log(row)
//
}
,
getDeliverRecordList
(){
getDeliverRecordApi
({
user_id
:
this
.
id
,
page
:
1
,
limit
:
20
}
).
then
(
res
=>
{
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
periods_title
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【${val.goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`${val.periods_title
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`${val.watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(${val.start_at.slice(5).replace('-', '')
}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d${val.has_watch_num
}
`
}
}
return
str
}
,
getDeliverRecordList
()
{
getDeliverRecordApi
({
user_id
:
this
.
id
,
page
:
1
,
limit
:
20
}
).
then
(
res
=>
{
this
.
deliverRecordList
=
res
.
list
console
.
log
(
this
.
deliverRecordList
)
}
)
...
...
@@ -730,7 +689,7 @@
this
.
dialogObj
.
show
=
false
;
this
.
getAddressList
();
}
,
addAddress
(
row
)
{
addAddress
(
row
)
{
this
.
addressDialog
.
userid
=
this
.
id
;
this
.
addressDialog
.
show
=
true
;
}
,
...
...
@@ -794,28 +753,28 @@
console
.
log
(
this
.
addressDialog
)
// debugger
}
,
getAddressList
(){
fetchAddressListApi
(
this
.
id
).
then
(
res
=>
{
this
.
addressList
=
res
getAddressList
()
{
fetchAddressListApi
(
this
.
id
).
then
(
res
=>
{
this
.
addressList
=
res
// console.log(this.addressList)
}
)
}
,
userStatusFormatter
(
val
){
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
userStatusFormatter
(
val
)
{
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
}
,
showSourceByDate
(
row
){
showSourceByDate
(
row
)
{
this
.
sourceByDateDialogJson
=
{
"periods_id"
:
row
.
periods_id
,
"user_id"
:
row
.
user_id
,
json
:{
"periods_id"
:
row
.
periods_id
,
"user_id"
:
row
.
user_id
,
json
:
{
limit
:
10
,
page
:
0
page
:
0
}
}
this
.
$refs
.
sourceByDateDialogDom
.
dialogShow
=
true
}
,
getUserLook
(){
if
(
!
this
.
lookDetail
.
data
)
return
;
getUserLook
()
{
if
(
!
this
.
lookDetail
.
data
)
return
;
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
...
...
@@ -823,46 +782,46 @@
page
:
this
.
lookDetail
.
nowPage
}
let
data
=
this
.
lookDetail
.
data
;
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
this
.
lookDetail
.
list
=
res
.
list
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
total
=
res
.
total
;
}
)
}
,
onLookDetailPageChange
(
val
){
onLookDetailPageChange
(
val
)
{
this
.
lookDetail
.
nowPage
=
val
this
.
getUserLook
();
}
,
onLookDetailSizeChange
(
val
){
onLookDetailSizeChange
(
val
)
{
this
.
lookDetail
.
limit
=
val
this
.
lookDetail
.
nowPage
=
1
;
this
.
getUserLook
();
}
,
onDescDialogPageChange
(
val
){
onDescDialogPageChange
(
val
)
{
this
.
descDialog
.
nowPage
=
val
this
.
getUserDescList
()
}
,
onDescDialogSizeChange
(
val
){
onDescDialogSizeChange
(
val
)
{
this
.
descDialog
.
limit
=
val
this
.
descDialog
.
nowPage
=
1
;
this
.
getUserDescList
()
}
,
showRef
(
data
){
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
}
,
showCoupon
(
data
){
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
}
,
showSource
(
data
){
showSource
(
data
)
{
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
}
,
changeRow
(
data
,
b
)
{
changeRow
(
data
,
b
)
{
this
.
list
=
[];
if
(
b
.
indexOf
(
data
)
>-
1
)
{
getPeriodsStatisticsApi
(
data
.
periods_id
).
then
(
res
=>
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getPeriodsStatisticsApi
(
data
.
periods_id
).
then
(
res
=>
{
data
.
arrive_course_rate
=
res
.
arrive_course_rate
;
data
.
watch_course_rate
=
res
.
watch_course_rate
;
data
.
over_course_rate
=
res
.
over_course_rate
;
...
...
@@ -875,75 +834,75 @@
}
)
}
}
,
onPageChange
(
val
){
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
getUser
();
}
,
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
nowPage
=
1
;
this
.
limit
=
val
;
this
.
getUser
();
}
,
getUser
(){
getUser
()
{
let
json
=
{
user_id
:
this
.
id
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
,
status
:
'1,3,4,5'
}
;
getOrderListApi
(
json
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
getOrderListApi
(
json
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
}
);
this
.
userList
=
res
.
list
;
this
.
total
=
res
.
total
}
)
}
,
getDetail
(){
if
(
!
this
.
id
)
return
;
getUserDetailApi
(
this
.
id
).
then
(
res
=>
{
getDetail
()
{
if
(
!
this
.
id
)
return
;
getUserDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
detail
=
res
;
if
(
res
.
periods_list
)
{
this
.
periodList
=
res
.
periods_list
}
console
.
log
(
res
)
}
)
getSubAccountInfoApi
(
this
.
id
).
then
(
res
=>
{
if
(
res
.
family_user
==
1
)
{
getSubAccountInfoApi
(
this
.
id
).
then
(
res
=>
{
if
(
res
.
family_user
==
1
)
{
this
.
subDetail
=
res
.
sub_user_info
}
}
)
}
,
getUserSubAccountList
(){
getUserSubAccountListApi
(
this
.
id
).
then
(
res
=>
{
getUserSubAccountList
()
{
getUserSubAccountListApi
(
this
.
id
).
then
(
res
=>
{
this
.
subListData
=
res
}
)
}
,
bindTeacher
(){
bindTeacher
()
{
let
data
=
this
.
detail
this
.
dialogObj
=
{
show
:
true
,
title
:
'绑定老师'
,
id
:
data
.
user_id
,
show
:
true
,
title
:
'绑定老师'
,
id
:
data
.
user_id
,
teacher_id
:
data
.
teacher_id
}
}
,
showUser
(
data
){
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
showUser
(
data
)
{
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
console
.
log
(
data
)
this
.
userObj
=
{
classId
:
data
.
class_id
,
show
:
true
,
title
:
`${data.teacher_name
}
班级用户列表${classType
}
`
,
this
.
userObj
=
{
classId
:
data
.
class_id
,
show
:
true
,
title
:
`${data.teacher_name
}
班级用户列表${classType
}
`
,
teacherId
:
data
.
teacher_id
,
periods_id
:
data
.
periods_id
,
goods_id
:
data
.
goods_id
,
classPage
:
true
,
type
:
data
.
type
goods_id
:
data
.
goods_id
,
classPage
:
true
,
type
:
data
.
type
}
}
,
//编辑备注 看课情况
editPrivilege
(
val
){
editPrivilege
(
val
)
{
this
.
privilegeDialog
=
{
id
:
val
.
id
,
isAllowView
:
val
.
is_view_course
===
1
,
...
...
@@ -952,7 +911,7 @@
show
:
true
}
}
,
onGetUserDescList
(
val
){
onGetUserDescList
(
val
)
{
this
.
descDialog
.
show
=
true
;
this
.
descDialog
.
userInfo
=
{
user_id
:
val
.
user_id
,
...
...
@@ -962,17 +921,17 @@
this
.
descDialog
.
id
=
val
.
id
;
this
.
getUserDescList
();
}
,
getUserDescList
(){
getUserDescList
()
{
let
json
=
{
page
:
this
.
descDialog
.
nowPage
,
limit
:
this
.
descDialog
.
limit
}
;
getUserDescListApi
(
this
.
descDialog
.
id
,
json
).
then
(
res
=>
{
getUserDescListApi
(
this
.
descDialog
.
id
,
json
).
then
(
res
=>
{
this
.
descDialog
.
descList
=
res
.
list
;
this
.
descDialog
.
total
=
res
.
total
;
}
)
}
,
userLook
(
data
){
userLook
(
data
)
{
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
...
...
@@ -980,10 +939,10 @@
page
:
this
.
lookDetail
.
nowPage
}
this
.
lookDetail
.
data
=
{
periods_id
:
data
.
periods_id
,
periods_id
:
data
.
periods_id
,
user_id
:
data
.
user_id
}
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
this
.
lookDetail
.
list
=
res
.
list
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
total
=
res
.
total
;
...
...
@@ -994,8 +953,8 @@
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputValue
:
''
}
).
then
(({
value
}
)
=>
{
addPeriodsClassUserDescApi
(
id
,
{
desc
:
value
}
).
then
(
res
=>
{
}
).
then
(({
value
}
)
=>
{
addPeriodsClassUserDescApi
(
id
,
{
desc
:
value
}
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
...
...
@@ -1004,7 +963,7 @@
}
);
}
)
}
,
changePrivilegeSub
(){
changePrivilegeSub
()
{
this
.
$confirm
(
'此操作将修改用户权限?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -1015,7 +974,7 @@
is_add_teacher
:
this
.
privilegeDialog
.
is_add_teacher
,
weight
:
this
.
privilegeDialog
.
weight
}
updateUserPrivilegeApi
(
this
.
privilegeDialog
.
id
,
_json
).
then
(
res
=>
{
updateUserPrivilegeApi
(
this
.
privilegeDialog
.
id
,
_json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
...
...
@@ -1026,7 +985,7 @@
}
);
}
);
}
,
getyunjiOrder
(){
getyunjiOrder
()
{
let
json
=
{
limit
:
this
.
limit
,
page
:
this
.
nowPage
...
...
@@ -1038,30 +997,30 @@
}
);
}
}
,
filters
:{
payMentFilter
(
val
){
return
val
==
'1'
?
'已付款'
:
'未付款'
filters
:
{
payMentFilter
(
val
)
{
return
val
==
'1'
?
'已付款'
:
'未付款'
}
,
courseTypeFilter
(
val
){
return
val
.
type
==
'1'
?
`正式课(${val.duration
}
个月)`
:
`试听课(${val.duration
}
天)`
courseTypeFilter
(
val
)
{
return
val
.
type
==
'1'
?
`正式课(${val.duration
}
个月)`
:
`试听课(${val.duration
}
天)`
}
,
inviteType
(
value
){
inviteType
(
value
)
{
return
INVITETYPE
[
value
]
}
,
status
(
value
){
status
(
value
)
{
return
ORDERSTATUS
[
value
]
}
,
buyType
(
value
){
buyType
(
value
)
{
return
BUYTYPE
[
value
]
}
,
moneytFilter
(
val
){
moneytFilter
(
val
)
{
return
val
=
val
/
100
+
'元'
}
,
percent
(
val
){
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
percent
(
val
)
{
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
}
,
isdel
(
val
){
return
val
==
0
?
'未删除'
:
'已删除'
isdel
(
val
)
{
return
val
==
0
?
'未删除'
:
'已删除'
}
}
}
...
...
@@ -1069,62 +1028,79 @@
<
style
scoped
lang
=
"less"
>
@
import
"../../util/public"
;
.
box
{
display
:
flex
;
}
.
user
-
card
{
margin
:
10
px
;
width
:
600
px
;
.
box
{
display
:
flex
;
}
.
user
-
card
{
margin
:
10
px
;
width
:
600
px
;
padding
:
20
px
;
// display: flex;
.
text
.
item
{
.
text
.
item
{
line
-
height
:
30
px
;
}
.
card
-
content
{
img
{
.
card
-
content
{
img
{
float
:
left
;
}
}
label
{
label
{
color
:
#
5982
e6
;
width
:
100
px
;
display
:
inline
-
block
;
text
-
align
:
right
;
}
.
el
-
col
{
.
el
-
col
{
height
:
30
px
;
line
-
height
:
30
px
;
}
.
title
{
.
title
{
height
:
50
px
;
line
-
height
:
60
px
;
margin
-
bottom
:
20
px
;
a
{
a
{
display
:
block
;
img
{
img
{
width
:
80
px
;
border
-
radius
:
100
px
;
}
}
}
}
.
width400
{
.
width400
{
width
:
400
px
;
}
}
.
avatar
{
width
:
50
px
;
height
:
50
px
;
border
-
radius
:
50
%
;
}
.
user
{
.
user
{
height
:
100
%
;
overflow
:
auto
;
/*padding: 20px 0;*/
.
btn
-
content
{
.
btn
-
content
{
text
-
align
:
center
;
}
}
.
header
{
padding
:
0
20
px
;
margin
-
bottom
:
20
px
;
}
.
header
{
.
el
-
row
{
display
:
flex
;
...
...
@@ -1133,14 +1109,17 @@
color
:
#
666
;
font
-
size
:
16
px
;
margin
:
25
px
0
;
label
{
label
{
margin
-
right
:
10
px
;
}
}
.
avatar
{
margin
-
right
:
10
px
;
}
}
.
b
-
title
{
padding
:
20
px
;
color
:
#
666
;
...
...
src/components/yunji/index.vue
View file @
cade2375
...
...
@@ -147,7 +147,12 @@
<div
v-if=
'scope.row.user_id === 0'
>
用户未绑定
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数"
>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
</el-table-column>
...
...
@@ -516,6 +521,29 @@ export default {
});
},
methods
:
{
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
periods_title
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【
${
val
.
goods_id
}
】`
}
if
(
val
.
periods_title
)
{
str
+=
`
${
val
.
periods_title
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`
${
val
.
watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d
${
val
.
has_watch_num
}
`
}
}
return
str
},
initClearOtherOrder
(
id
){
this
.
$confirm
(
'确认清除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
src/service/api.js
View file @
cade2375
...
...
@@ -1305,7 +1305,7 @@ export const getStaffRecordApi = function (json) {
// 系统配置设备
export
const
getTeacherTypeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/teacher/type/list`
,
json
)
};
};
export
const
postTeacherTypeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/teacher/type/add`
,
json
)
};
...
...
@@ -1316,3 +1316,7 @@ export const postMediaConvertApi = function (json) {
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/public/media/convert`
,
json
)
};
///api/public/media/convert
// 最近更新时间
export
const
getUpdateTimeApi
=
function
()
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/get/report/time`
)
};
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