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
5bb62fd3
Commit
5bb62fd3
authored
Aug 13, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
期数名称
parent
e9d96da5
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2106 additions
and
1915 deletions
+2106
-1915
index.html
index.html
+2
-1
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
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
index.vue
src/components/notBuyClass/index.vue
+175
-147
index.vue
src/components/order/index.vue
+538
-512
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 @
5bb62fd3
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
</head>
</head>
<body>
<body>
<!-- 先引入 Vue -->
<!-- 先引入 Vue -->
<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.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://lib.baomitu.com/vuex/3.0.1/vuex.min.js"
></script>
<!-- 引入组件库 -->
<!-- 引入组件库 -->
<script
src=
"https://lib.baomitu.com/axios/0.18.0/axios.min.js"
></script>
<script
src=
"https://lib.baomitu.com/axios/0.18.0/axios.min.js"
></script>
...
...
src/components/config/index.vue
View file @
5bb62fd3
...
@@ -200,10 +200,7 @@
...
@@ -200,10 +200,7 @@
<el-table-column
prop=
"title"
label=
"标题"
></el-table-column>
<el-table-column
prop=
"title"
label=
"标题"
></el-table-column>
<el-table-column
label=
"操作"
width=
"120px"
v-if=
"!$store.state.readonly"
>
<el-table-column
label=
"操作"
width=
"120px"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
@
click=
"delStarListFn(scope.row)"
type=
"warning"
plain
size=
"mini"
>
删除
</el-button>
@
click=
"delStarListFn(scope.row)"
type=
"warning"
plain
size=
"mini"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/components/conversionList/marketEnrollmentConversionList.vue
View file @
5bb62fd3
...
@@ -11,8 +11,7 @@
...
@@ -11,8 +11,7 @@
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
:picker-options=
"
{shortcuts:[today,yesterday,last7Day,last30Day]}"
:picker-options=
"
{shortcuts:[today,yesterday,last7Day,last30Day]}"
:default-time="['00:00:00','23:59:59']"
:default-time="['00:00:00','23:59:59']"
@change="getList"
@change="getList">
</el-date-picker>
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品课时数"
>
<el-form-item
label=
"商品课时数"
>
<el-select
<el-select
...
@@ -21,14 +20,12 @@
...
@@ -21,14 +20,12 @@
placeholder=
"请选择"
placeholder=
"请选择"
style=
"width: 150px"
style=
"width: 150px"
clearable
clearable
@
change=
"selectChange"
@
change=
"selectChange"
>
>
<el-option
<el-option
v-for=
"(data,index) in watchList"
v-for=
"(data,index) in watchList"
:key=
"index"
:key=
"index"
:label=
"data.title"
:label=
"data.title"
:value=
"data.id"
:value=
"data.id"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"渠道code"
>
<el-form-item
label=
"渠道code"
>
...
@@ -63,7 +60,13 @@
...
@@ -63,7 +60,13 @@
:row-class-name="tableRowClassName"
:row-class-name="tableRowClassName"
:span-method="arraySpanMethod">
:span-method="arraySpanMethod">
<!--height="calc(100vh - 210px)"-->
<!--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=
"渠道信息"
>
<el-table-column
prop=
"is_other"
min-width=
"160"
align=
"left"
fixed
label=
"渠道信息"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
来源:
{{
scope
.
row
.
is_other
==
0
?
"内部"
:
"外部"
}}
<br>
来源:
{{
scope
.
row
.
is_other
==
0
?
"内部"
:
"外部"
}}
<br>
...
@@ -178,6 +181,27 @@ export default {
...
@@ -178,6 +181,27 @@ export default {
};
};
},
},
methods
:
{
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
)
{
selectChange
(
value
)
{
this
.
searchFrom
.
watch_num
=
this
.
watchList
[
value
].
title
;
this
.
searchFrom
.
watch_num
=
this
.
watchList
[
value
].
title
;
this
.
getList
();
this
.
getList
();
...
...
src/components/conversionList/periodsConversionList.vue
View file @
5bb62fd3
...
@@ -87,7 +87,13 @@
...
@@ -87,7 +87,13 @@
@
sort-change=
"sortMethod"
@
sort-change=
"sortMethod"
:style=
"
{width: width+'px'}"
:style=
"
{width: width+'px'}"
fixed>
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
<el-table-column
prop=
"duration_over_at"
prop=
"duration_over_at"
label=
"开课看课时间"
label=
"开课看课时间"
...
@@ -134,12 +140,7 @@
...
@@ -134,12 +140,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getPeriodsConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
getPeriodsConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
...
@@ -242,7 +243,6 @@ export default {
...
@@ -242,7 +243,6 @@ export default {
];
];
}
}
},
},
propertyList
:
[],
spanArr
:
[],
spanArr
:
[],
contentSpanArr
:
[],
contentSpanArr
:
[],
searchFrom
:
{
searchFrom
:
{
...
@@ -269,6 +269,27 @@ export default {
...
@@ -269,6 +269,27 @@ export default {
},
},
components
:
{
page
},
components
:
{
page
},
methods
:
{
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
})
{
rendertip
(
h
,
{
column
})
{
// console.log(h)
// console.log(h)
return
h
(
"span"
,
[
return
h
(
"span"
,
[
...
...
src/components/conversionList/sourceConversionList.vue
View file @
5bb62fd3
...
@@ -170,13 +170,7 @@
...
@@ -170,13 +170,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getPeriodsConversionListApi
,
getSourceConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
getPeriodsConversionListApi
,
getSourceConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
,
ORDERSTATUS
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
,
ORDERSTATUS
}
from
"../../util/wordbook"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
...
@@ -295,7 +289,6 @@ export default {
...
@@ -295,7 +289,6 @@ export default {
teacher_id
:
""
,
teacher_id
:
""
,
periods_title
:
""
periods_title
:
""
},
},
propertyList
:
[],
watchList
:
[
watchList
:
[
{
id
:
0
,
title
:
5
},
{
id
:
0
,
title
:
5
},
{
id
:
1
,
title
:
6
},
{
id
:
1
,
title
:
6
},
...
...
src/components/logistics/index.vue
View file @
5bb62fd3
<
template
>
<
template
>
<div
class=
"sms"
>
<div
class=
"admin-refresh sms"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
size=
"small"
>
<div
class=
"section-search"
>
<el-form-item
label=
"用户ID"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
size=
"small"
>
<el-input
v-model=
"searchFrom.user_id"
style=
"width: 80px"
></el-input>
<el-form-item
label=
"用户ID"
>
</el-form-item>
<el-input
v-model=
"searchFrom.user_id"
style=
"width: 80px"
></el-input>
<!--
<el-form-item
label=
"发货状态"
>
</el-form-item>
<el-select
filterable
v-model=
"searchFrom.type"
placeholder=
"请选择"
clearable
>
<!--
<el-form-item
label=
"发货状态"
>
<el-select
filterable
v-model=
"searchFrom.type"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"(data,index) in logisticsType"
:key=
"index"
:label=
"data.name"
:value=
"data.value"
>
</el-option>
</el-select>
</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>
</el-form-item>
<el-form-item
label=
"主题"
>
<el-select
filterable
v-model=
"searchFrom.theme_id"
placeholder=
"请选择"
clearable
>
<el-option
<el-option
v-for=
"(data,index) in
logisticsType
"
v-for=
"(data,index) in
themeList
"
:key=
"index"
:key=
"index"
:label=
"data.name"
:label=
"data.name"
:value=
"data.
value"
>
:value=
"data.
id"
</el-option>
>
</el-option>
</el-select>
</el-select>
</el-form-item>
-->
</el-form-item>
<el-form-item
label=
"期数"
>
<!--
<el-form-item
label=
"期数id"
>
<el-cascader
<el-input
v-model=
"searchFrom.periods_id"
style=
"width: 120px"
></el-input>
:options=
"goodsList"
</el-form-item>
-->
:props=
"
{value:'id',label:'name'}"
<el-form-item>
@active-item-change="handleItemChange"
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
@change="changePeriods"
<el-button
type=
"success"
plain
@
click=
"reset"
>
重置
</el-button>
filterable
<el-button
v-if=
"!$store.state.readonly"
type=
"primary"
plain
@
click=
"downLoad()"
>
excel模板下载
</el-button>
v-model="selectedGoods"
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出当前待发货
</el-button>
>
</el-cascader>
<el-button
type=
"primary"
plain
@
click=
"exportReceiveInfoTable"
>
按期数导出收货信息
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"主题"
>
<el-form-item
v-if=
"$store.state.export"
>
<el-select
filterable
v-model=
"searchFrom.theme_id"
placeholder=
"请选择"
clearable
>
<el-upload
<el-option
:show-file-list=
"false"
v-for=
"(data,index) in themeList"
:onSuccess=
"fileSuccess"
:key=
"index"
:headers=
"uploadHeader"
:label=
"data.name"
:data=
"
{param_token:param_token}"
:value=
"data.id"
action="/api/admin/order/deliver/list/import">
></el-option>
<el-button
type=
"success"
plain
>
导入发货信息
</el-button>
</el-select>
</el-upload>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"期数id"
>
</el-form>
<el-input
v-model=
"searchFrom.periods_id"
style=
"width: 120px"
></el-input>
</div>
</el-form-item>
-->
<el-form-item>
<el-tabs
v-model=
"searchFrom.type"
type=
"card"
@
tab-click=
"handleClick"
style=
"padding-top: 10px;background-color: #fff"
>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
<el-button
type=
"success"
plain
@
click=
"reset"
>
重置
</el-button>
<el-button
v-if=
"!$store.state.readonly"
type=
"primary"
plain
@
click=
"downLoad()"
>
excel模板下载
</el-button>
<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.export"
>
<el-upload
:show-file-list=
"false"
:onSuccess=
"fileSuccess"
:headers=
"uploadHeader"
:data=
"
{param_token:param_token}"
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"
>
<el-tab-pane
label=
"当前待发货"
name=
"0"
></el-tab-pane>
<el-tab-pane
label=
"当前待发货"
name=
"0"
></el-tab-pane>
<el-tab-pane
label=
"所有待发货"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"所有待发货"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"所有已发货"
name=
"2"
></el-tab-pane>
<el-tab-pane
label=
"所有已发货"
name=
"2"
></el-tab-pane>
</el-tabs>
</el-tabs>
<el-table
:data=
"deliverList"
size=
"mini"
style=
"width: 100%"
>
<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"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
<img
style=
"vertical-align: top"
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<span
style=
"display: inline-block;"
>
<br
/>
{{
scope
.
row
.
user_nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
<br
/>
<br
/>
(ID:
{{
scope
.
row
.
user_id
}}
)
手机:
{{
scope
.
row
.
user_mobile
}}
<br
/>
手机:
{{
scope
.
row
.
user_mobile
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"address"
label=
"收货地址"
>
<el-table-column
prop=
"address"
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
receive_name
}}
{{
scope
.
row
.
receive_name
}}
<br
/>
<br/>
{{
scope
.
row
.
receive_mobile
}}
{{
scope
.
row
.
receive_mobile
}}
<br
/>
<br/>
{{
scope
.
row
.
province_name
}}{{
scope
.
row
.
city_name
}}{{
scope
.
row
.
area_name
}}{{
scope
.
row
.
address
}}
{{
scope
.
row
.
province_name
}}{{
scope
.
row
.
city_name
}}{{
scope
.
row
.
area_name
}}{{
scope
.
row
.
address
}}
</
template
>
</
template
>
</el-table-column>
</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=
"theme_name"
label=
"主题"
></el-table-column>
<el-table-column
prop=
"deliver_start_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=
"预计发货结束时间"
></el-table-column>
<el-table-column
prop=
"deliver_end_at"
label=
"预计发货结束时间"
width=
"100px"
></el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
></el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
width=
"100px"
></el-table-column>
<el-table-column
prop=
"status"
label=
"物流状态"
>
<el-table-column
prop=
"status"
label=
"物流状态"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br/>
<br
/>
<span
v-if=
"searchFrom.type==2"
>
<span
v-if=
"searchFrom.type==2"
>
名称:
{{
scope
.
row
.
express_name
}}
名称:
{{
scope
.
row
.
express_name
}}
<br/>
<br
/>
单号:
{{
scope
.
row
.
express_no
}}
单号:
{{
scope
.
row
.
express_no
}}
</span>
</span>
</
template
>
</
template
>
...
@@ -182,6 +192,27 @@ export default {
...
@@ -182,6 +192,27 @@ export default {
this
.
init
();
this
.
init
();
},
},
methods
:
{
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
()
{
cancelEvent
()
{
this
.
showFlag
=
false
;
this
.
showFlag
=
false
;
},
},
...
@@ -402,9 +433,6 @@ export default {
...
@@ -402,9 +433,6 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.sms
{
padding
:
20px
0
;
}
.el-button
+
.el-button
{
.el-button
+
.el-button
{
margin-left
:
0
;
margin-left
:
0
;
/* margin-top: 10px; */
/* margin-top: 10px; */
...
...
src/components/marketStatistics/index.vue
View file @
5bb62fd3
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
:span-method="arraySpanMethod">
:span-method="arraySpanMethod">
<el-table-column
min-width=
"180"
prop=
"wait_join_num"
align=
"left"
fixed=
"left"
label=
"期数总状况"
>
<el-table-column
min-width=
"180"
prop=
"wait_join_num"
align=
"left"
fixed=
"left"
label=
"期数总状况"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
期数名称:
{{
scope
.
row
.
title
}}
期数名称:
{{
scope
.
row
.
title
==
'合计'
?
'合计'
:
periodName
(
scope
.
row
)
}}
<br
/>
<br
/>
开始时间:
{{
scope
.
row
.
start_at
}}
开始时间:
{{
scope
.
row
.
start_at
}}
<br
/>
<br
/>
...
@@ -77,6 +77,25 @@ export default {
...
@@ -77,6 +77,25 @@ export default {
};
};
},
},
methods
:
{
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
()
{
initPage
()
{
getPeriodsClassCurDataApi
().
then
(
res
=>
{
getPeriodsClassCurDataApi
().
then
(
res
=>
{
this
.
list
=
res
;
this
.
list
=
res
;
...
...
src/components/monthOrder/index.vue
View file @
5bb62fd3
<
template
>
<
template
>
<div
class=
"order"
>
<div
class=
"order"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
size=
"small"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
size=
"small"
>
<el-form-item
label=
"用户ID"
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
style=
"width: 80px"
></el-input>
<el-input
v-model=
"searchFrom.user_id"
style=
"width: 80px"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户昵称"
>
<el-form-item
label=
"用户昵称"
>
<el-input
v-model=
"searchFrom.nickname"
style=
"width: 110px"
></el-input>
<el-input
v-model=
"searchFrom.nickname"
style=
"width: 110px"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"收件人手机号"
>
<el-form-item
label=
"收件人手机号"
>
<el-input
v-model=
"searchFrom.receive_mobile"
style=
"width: 120px"
></el-input>
<el-input
v-model=
"searchFrom.receive_mobile"
style=
"width: 120px"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品名称"
>
<el-form-item
label=
"商品名称"
>
<el-select
v-model=
"searchFrom.goods_id"
filterable
placeholder=
"请选择"
style=
"width: 150px"
@
change=
"getOrderList"
clearable
>
<el-select
v-model=
"searchFrom.goods_id"
filterable
placeholder=
"请选择"
style=
"width: 150px"
@
change=
"getOrderList"
clearable
>
<el-option
<el-option
v-for=
"(data,index) in goodList"
v-for=
"(data,index) in goodList"
:key=
"index"
:key=
"index"
:label=
"data | filterGoods"
:label=
"data | filterGoods"
:value=
"data.id"
>
:value=
"data.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"来源"
class=
"test"
>
<el-form-item
label=
"来源"
class=
"test"
>
<el-input
v-model=
"searchFrom.invite_type "
:placeholder=
"inviteSearchPlaceholder"
style=
"width: 150px"
>
<el-input
v-model=
"searchFrom.invite_type "
:placeholder=
"inviteSearchPlaceholder"
style=
"width: 150px"
>
<template
slot=
"prepend"
>
CC -
</
template
>
<template
slot=
"prepend"
>
CC -
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"推广人ID"
>
<el-form-item
label=
"推广人ID"
>
<el-input
v-model=
"searchFrom.invite_id"
:placeholder=
"inviteSearchPlaceholder"
style=
"width: 80px"
></el-input>
<el-input
v-model=
"searchFrom.invite_id"
:placeholder=
"inviteSearchPlaceholder"
style=
"width: 80px"
></el-input>
</el-form-item>
</el-form-item>
<!-- <el-form-item label="团ID">
<!-- <el-form-item label="团ID">
<el-input v-model="searchFrom.order_group_id" ></el-input>
<el-input v-model="searchFrom.order_group_id" ></el-input>
</el-form-item> -->
</el-form-item> -->
<el-form-item
label=
"购买方式"
>
<el-form-item
label=
"购买方式"
>
<el-select
v-model=
"searchFrom.buy_type"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
style=
"width: 100px"
>
<el-select
v-model=
"searchFrom.buy_type"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
style=
"width: 100px"
>
<el-option
<el-option
v-for=
"item in buyTypeOption"
v-for=
"item in buyTypeOption"
:key=
"item.id"
:key=
"item.id"
:label=
"item.value"
:label=
"item.value"
:value=
"item.id"
>
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"支付类型"
>
<el-form-item
label=
"支付类型"
>
<el-select
v-model=
"searchFrom.order_type"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
style=
"width: 120px"
>
<el-select
v-model=
"searchFrom.order_type"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
style=
"width: 120px"
>
<el-option
<el-option
v-for=
"item in buyWay"
v-for=
"item in buyWay"
:key=
"item.id"
:key=
"item.id"
:label=
"item.value"
:label=
"item.value"
:value=
"item.id"
>
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-form-item
label=
"订单状态"
>
<el-select
multiple
v-model=
"searchFrom.status"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-select
multiple
v-model=
"searchFrom.status"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
<el-option
v-for=
"item in orderStatusOption"
v-for=
"item in orderStatusOption"
:key=
"item.id"
:key=
"item.id"
:label=
"item.value"
:label=
"item.value"
:value=
"item.id"
>
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否入课"
>
<el-form-item
label=
"是否入课"
>
<el-select
v-model=
"searchFrom.wait_into_course"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
style=
"width: 120px"
>
<el-select
v-model=
"searchFrom.wait_into_course"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
style=
"width: 120px"
>
<el-option
<el-option
...
@@ -69,66 +69,54 @@
...
@@ -69,66 +69,54 @@
value=
"0"
>
value=
"0"
>
</el-option>
</el-option>
<el-option
<el-option
label=
"未入课"
label=
"未入课"
value=
"1"
>
value=
"1"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"交易订单号"
>
<el-form-item
label=
"交易订单号"
>
<el-input
v-model=
"searchFrom.out_trade_no"
></el-input>
<el-input
v-model=
"searchFrom.out_trade_no"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"购买时间"
>
<el-form-item
label=
"购买时间"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
type=
"datetimerange"
type=
"datetimerange"
range-separator=
"至"
range-separator=
"至"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"{shortcuts:[today,yesterday,last7Day,last30Day]}"
:picker-options=
"{shortcuts:[today,yesterday,last7Day,last30Day]}"
:default-time=
"['00:00:00','23:59:59']"
:default-time=
"['00:00:00','23:59:59']"
@
change=
"getOrderList"
>
@
change=
"getOrderList"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
>
<el-form-item
>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"float:right"
>
<el-form-item
style=
"float:right"
>
<el-button
type=
"success"
plain
@
click=
"add"
v-if=
"!$store.state.readonly"
>
新增订单
</el-button>
<el-button
type=
"success"
plain
@
click=
"add"
v-if=
"!$store.state.readonly"
>
新增订单
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
size=
"small"
:data=
"tableData"
@
expand-change=
"changeRow"
fixed
>
size=
"small"
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
></el-table-column>
:data=
"tableData"
<el-table-column
label=
"购买人"
width=
"200"
>
@
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"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<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
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<!--<el-table-column prop="periods_title" label="期数标题"></el-table-column>-->
prop=
"periods_title"
<el-table-column
label=
"期数名称"
width=
"150px"
>
label=
"期数标题"
>
<
template
slot-scope=
"scope"
>
</el-table-column>
<div
v-html=
"periodName(scope.row)"
></div>
<el-table-column
<!--
{{
periodName
(
scope
.
row
)
}}
-->
prop=
"goods_name"
</
template
>
label=
"商品名称"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goods_name"
label=
"商品名称"
width=
"150px"
></el-table-column>
width=
"250"
<el-table-column
width=
"190"
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
...
@@ -185,7 +173,7 @@
...
@@ -185,7 +173,7 @@
{{
scope
.
row
.
money
|
moneytFilter
}}
{{
scope
.
row
.
money
|
moneytFilter
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"支付类型"
label=
"支付类型"
width=
"80"
>
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -202,28 +190,12 @@
...
@@ -202,28 +190,12 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"pay_at"
label=
"购买时间"
sortable
width=
"95px"
></el-table-column>
prop=
"pay_at"
<el-table-column
prop=
"created_at"
label=
"下单时间"
sortable
width=
"95px"
></el-table-column>
label=
"购买时间"
sortable
>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
</el-table-column>
<el-table-column
width=
"50"
label=
"操作"
v-if=
"!$store.state.readonly"
fixed=
"right"
>
<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"
>
<
template
slot-scope=
"scope"
>
<el-popover
<el-popover
placement=
"top"
width=
"400"
>
placement=
"top"
width=
"400"
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<!--v-if="(scope.row.status == 1 || scope.row.status == 4|| scope.row.status == 5) && $store.state.orderRefund"-->
<!--v-if="(scope.row.status == 1 || scope.row.status == 4|| scope.row.status == 5) && $store.state.orderRefund"-->
<el-button
<el-button
...
@@ -258,7 +230,7 @@
...
@@ -258,7 +230,7 @@
</el-button>
</el-button>
</div>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</el-popover>
</
template
>
</
template
>
...
@@ -267,7 +239,7 @@
...
@@ -267,7 +239,7 @@
<address-dialog
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<address-dialog
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<order-dialog
:newdialogObj=
"newdialogObj"
@
reflash=
"getOrderList"
></order-dialog>
<order-dialog
:newdialogObj=
"newdialogObj"
@
reflash=
"getOrderList"
></order-dialog>
<refund-dialog
:dialogObj=
"refundDialogObj"
@
reflash=
"onAfterRefund"
@
changeShow=
"changeShow"
></refund-dialog>
<refund-dialog
:dialogObj=
"refundDialogObj"
@
reflash=
"onAfterRefund"
@
changeShow=
"changeShow"
></refund-dialog>
<detail-dialog
:dialogObj=
"dialogDetailObj"
@
changeShow=
"changeDetailShow"
/>
<detail-dialog
:dialogObj=
"dialogDetailObj"
@
changeShow=
"changeDetailShow"
/>
<source-dialog
:dialogObj=
"sourceDialog"
/>
<source-dialog
:dialogObj=
"sourceDialog"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
...
@@ -306,7 +278,16 @@
...
@@ -306,7 +278,16 @@
</template>
</template>
<
script
>
<
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
page
from
'../framework/page'
import
addressDialog
from
'./dialog'
import
addressDialog
from
'./dialog'
import
orderDialog
from
'./newDialog'
import
orderDialog
from
'./newDialog'
...
@@ -316,138 +297,171 @@
...
@@ -316,138 +297,171 @@
import
detailDialog
from
'./detail'
import
detailDialog
from
'./detail'
import
refundDetail
from
'./refundDetail'
import
refundDetail
from
'./refundDetail'
import
AddressArray
from
'../framework/address-picker/addr'
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'
;
import
CommonJs
from
'../../util/common'
;
export
default
{
export
default
{
name
:
'index'
,
name
:
'index'
,
data
(){
data
()
{
return
{
return
{
nowPage
:
1
,
total
:
0
,
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'
];
}
},
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'
];
}
},
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
:
''
},
refundDetail
:
{
show
:
false
,
out_trade_no
:
''
},
limit
:
10
,
searchFrom
:
{
nickname
:
''
,
wait_into_course
:
''
,
user_id
:
''
,
invite_type
:
''
,
invite_id
:
''
,
buy_type
:
''
,
order_type
:
''
,
status
:
[
1
,
4
,
5
],
goods_id
:
''
,
out_trade_no
:
''
,
payTime
:
[],
order_group_id
:
""
,
},
tableData
:
[],
dialogObj
:
{
show
:
false
},
newdialogObj
:
{
show
:
false
},
refundDialogObj
:
{
show
:
false
,
id
:
''
,
money
:
0
},
dialogDetailObj
:
{
show
:
false
,
detail
:
{}
},
goodList
:
[],
inviteTypeOption
:
INVITETYPEOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
buyTypeOption
:
BUYTYPEOPTION
,
buyWay
:
BUYWay
,
inviteSearchPlaceholder
:
''
,
rules
:
{
value
:
[
{
required
:
true
,
message
:
'请输入备注'
,
trigger
:
'change'
}
]
},
promoterDialog
:
{
show
:
false
,
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
sourceDialog
:{
limit
:
100
,
show
:
false
,
teacher_id
:
''
out_trade_no
:
''
},
},
teacherList
:
[],
today
:{
loading
:
false
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'
];
}
},
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'
];
}
},
couponDetail
:{
show
:
false
,
order_coupon_id
:
''
},
refundDetail
:{
show
:
false
,
out_trade_no
:
''
},
limit
:
10
,
searchFrom
:
{
nickname
:
''
,
wait_into_course
:
''
,
user_id
:
''
,
invite_type
:
''
,
invite_id
:
''
,
buy_type
:
''
,
order_type
:
''
,
status
:
[
1
,
4
,
5
],
goods_id
:
''
,
out_trade_no
:
''
,
payTime
:
[],
order_group_id
:
""
,
},
tableData
:
[],
dialogObj
:
{
show
:
false
},
newdialogObj
:
{
show
:
false
},
refundDialogObj
:
{
show
:
false
,
id
:
''
,
money
:
0
},
dialogDetailObj
:
{
show
:
false
,
detail
:
{}
},
goodList
:
[],
inviteTypeOption
:
INVITETYPEOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
buyTypeOption
:
BUYTYPEOPTION
,
buyWay
:
BUYWay
,
inviteSearchPlaceholder
:
''
,
rules
:{
value
:[
{
required
:
true
,
message
:
'请输入备注'
,
trigger
:
'change'
}
]
},
promoterDialog
:
{
show
:
false
,
nowPage
:
1
,
total
:
0
,
limit
:
100
,
teacher_id
:
''
},
teacherList
:
[],
loading
:
false
}
},
},
methods
:
{
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
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
if
(
Month
<
10
)
{
Month
=
`0
${
Month
}
`
Month
=
`0
${
Month
}
`
}
}
let
Day
=
date
.
getDate
();
let
Day
=
date
.
getDate
();
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
return
`
${
year
}
-
${
Month
}
-
${
Day
}
`
;
return
`
${
year
}
-
${
Month
}
-
${
Day
}
`
;
},
},
showRef
(
data
){
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
},
},
showCoupon
(
data
){
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
},
},
showSource
(
data
){
showSource
(
data
)
{
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
},
},
changeRow
(
data
,
b
)
{
changeRow
(
data
,
b
)
{
if
(
b
.
indexOf
(
data
)
>-
1
)
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
data
.
refundList
=
res
.
list
data
.
refundList
=
res
.
list
})
})
}
}
},
},
exportTable
(){
exportTable
()
{
let
json
=
{};
let
json
=
{};
if
(
this
.
searchFrom
.
nickname
)
{
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
json
.
nickname
=
this
.
searchFrom
.
nickname
...
@@ -461,13 +475,13 @@
...
@@ -461,13 +475,13 @@
if
(
this
.
searchFrom
.
invite_id
)
{
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
json
.
invite_id
=
this
.
searchFrom
.
invite_id
}
}
if
(
this
.
searchFrom
.
order_group_id
)
{
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
}
}
if
(
this
.
searchFrom
.
buy_type
)
{
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
json
.
buy_type
=
this
.
searchFrom
.
buy_type
}
}
if
(
this
.
searchFrom
.
order_type
)
{
if
(
this
.
searchFrom
.
order_type
)
{
json
.
order_type
=
this
.
searchFrom
.
order_type
json
.
order_type
=
this
.
searchFrom
.
order_type
}
}
if
(
this
.
searchFrom
.
status
)
{
if
(
this
.
searchFrom
.
status
)
{
...
@@ -482,7 +496,7 @@
...
@@ -482,7 +496,7 @@
if
(
this
.
searchFrom
.
receive_mobile
)
{
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
}
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
json
.
pay_start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
}
}
...
@@ -490,20 +504,20 @@
...
@@ -490,20 +504,20 @@
if
(
this
.
searchFrom
.
wait_into_course
)
{
if
(
this
.
searchFrom
.
wait_into_course
)
{
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
}
}
json
.
course_type
=
0
//月课
json
.
course_type
=
0
//月课
exportExcelApi
(
'/api/admin/order/export'
,
json
,
'月课订单列表'
)
exportExcelApi
(
'/api/admin/order/export'
,
json
,
'月课订单列表'
)
},
},
getGoodsOption
(){
getGoodsOption
()
{
let
json
=
{
let
json
=
{
page
:
1
,
page
:
1
,
limit
:
100
,
limit
:
100
,
course_type
:
0
,
course_type
:
0
,
};
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
this
.
goodList
=
res
.
list
;
})
})
},
},
onInviteTypeChange
(
val
){
onInviteTypeChange
(
val
)
{
if
(
val
===
0
)
{
if
(
val
===
0
)
{
this
.
inviteSearchPlaceholder
=
'用户ID'
this
.
inviteSearchPlaceholder
=
'用户ID'
}
else
if
(
val
===
1
)
{
}
else
if
(
val
===
1
)
{
...
@@ -513,7 +527,7 @@
...
@@ -513,7 +527,7 @@
}
}
this
.
getOrderList
();
this
.
getOrderList
();
},
},
detail
(
row
){
detail
(
row
)
{
let
_detail
=
row
;
let
_detail
=
row
;
this
.
dialogDetailObj
=
{
this
.
dialogDetailObj
=
{
show
:
true
,
show
:
true
,
...
@@ -524,40 +538,40 @@
...
@@ -524,40 +538,40 @@
this
.
$prompt
(
''
,
'编辑备注'
,
{
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputType
:
'textarea'
,
inputValue
:
desc
||
''
inputValue
:
desc
||
''
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,{
desc
:
value
}).
then
(
res
=>
{
editOrderDescApi
(
id
,
'order'
,
{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'编辑备注成功'
message
:
'编辑备注成功'
});
this
.
getOrderList
();
});
});
this
.
getOrderList
();
});
});
});
})
})
},
},
onPageChange
(
val
){
onPageChange
(
val
)
{
this
.
nowPage
=
val
this
.
nowPage
=
val
this
.
getOrderList
()
this
.
getOrderList
()
},
},
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
nowPage
=
1
;
this
.
getOrderList
()
this
.
getOrderList
()
},
},
getOrderList
(){
getOrderList
()
{
let
json
=
{
let
json
=
{
limit
:
this
.
limit
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
page
:
this
.
nowPage
};
};
if
(
this
.
searchFrom
.
nickname
)
{
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
json
.
nickname
=
this
.
searchFrom
.
nickname
}
}
if
(
this
.
searchFrom
.
user_id
)
{
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
json
.
user_id
=
this
.
searchFrom
.
user_id
...
@@ -568,13 +582,13 @@
...
@@ -568,13 +582,13 @@
if
(
this
.
searchFrom
.
invite_id
)
{
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
json
.
invite_id
=
this
.
searchFrom
.
invite_id
}
}
if
(
this
.
searchFrom
.
order_group_id
)
{
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
}
}
if
(
this
.
searchFrom
.
buy_type
)
{
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
json
.
buy_type
=
this
.
searchFrom
.
buy_type
}
}
if
(
this
.
searchFrom
.
order_type
)
{
if
(
this
.
searchFrom
.
order_type
)
{
json
.
order_type
=
this
.
searchFrom
.
order_type
json
.
order_type
=
this
.
searchFrom
.
order_type
}
}
if
(
this
.
searchFrom
.
status
)
{
if
(
this
.
searchFrom
.
status
)
{
...
@@ -589,43 +603,43 @@
...
@@ -589,43 +603,43 @@
if
(
this
.
searchFrom
.
receive_mobile
)
{
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
}
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
json
.
pay_start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
}
}
if
(
this
.
searchFrom
.
wait_into_course
)
{
if
(
this
.
searchFrom
.
wait_into_course
)
{
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
}
}
json
.
course_type
=
0
//月课
json
.
course_type
=
0
//月课
getOrderListApi
(
json
).
then
((
res
)
=>
{
getOrderListApi
(
json
).
then
((
res
)
=>
{
res
.
list
.
forEach
(
i
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
i
.
refundList
=
[]
});
});
this
.
tableData
=
res
.
list
;
this
.
tableData
=
res
.
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
})
})
},
},
changeDetailShow
(
data
){
changeDetailShow
(
data
)
{
this
.
dialogDetailObj
.
show
=
data
this
.
dialogDetailObj
.
show
=
data
},
},
changeShow
(
data
){
changeShow
(
data
)
{
this
.
refundDialogObj
.
show
=
data
this
.
refundDialogObj
.
show
=
data
},
},
onRefund
(
id
,
money
){
onRefund
(
id
,
money
)
{
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
money
=
money
;
this
.
refundDialogObj
.
money
=
money
;
this
.
refundDialogObj
.
show
=
true
;
this
.
refundDialogObj
.
show
=
true
;
},
},
onAfterRefund
(){
onAfterRefund
()
{
this
.
refundDialogObj
.
show
=
false
;
this
.
refundDialogObj
.
show
=
false
;
this
.
getOrderList
()
this
.
getOrderList
()
},
},
onUpdateAddress
(){
onUpdateAddress
()
{
this
.
dialogObj
.
show
=
false
;
this
.
dialogObj
.
show
=
false
;
this
.
getOrderList
();
this
.
getOrderList
();
},
},
editAddress
(
row
){
editAddress
(
row
)
{
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
this
.
dialogObj
.
province
=
''
this
.
dialogObj
.
province
=
''
this
.
dialogObj
.
city
=
''
this
.
dialogObj
.
city
=
''
this
.
dialogObj
.
district
=
''
this
.
dialogObj
.
district
=
''
...
@@ -633,18 +647,18 @@
...
@@ -633,18 +647,18 @@
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
return
item
.
label
===
row
.
address_info
.
province_name
return
item
.
label
===
row
.
address_info
.
province_name
})
})
if
(
provinceObj
&&
provinceObj
.
length
>
0
)
{
if
(
provinceObj
&&
provinceObj
.
length
>
0
)
{
this
.
dialogObj
.
province
=
row
.
address_info
.
province_id
?
row
.
address_info
.
province_id
:
provinceObj
[
0
].
value
this
.
dialogObj
.
province
=
row
.
address_info
.
province_id
?
row
.
address_info
.
province_id
:
provinceObj
[
0
].
value
if
(
!
row
.
address_info
.
city
)
{
if
(
!
row
.
address_info
.
city
)
{
this
.
dialogObj
.
city
=
''
this
.
dialogObj
.
city
=
''
}
else
{
}
else
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
((
city
)
=>
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
((
city
)
=>
{
return
city
.
label
===
row
.
address_info
.
city
return
city
.
label
===
row
.
address_info
.
city
})
})
this
.
dialogObj
.
city
=
row
.
address_info
.
city_id
?
row
.
address_info
.
city_id
:
cityObj
[
0
].
value
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
=
''
this
.
dialogObj
.
district
=
''
}
else
{
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
return
district
.
label
===
row
.
address_info
.
area
return
district
.
label
===
row
.
address_info
.
area
});
});
...
@@ -664,26 +678,26 @@
...
@@ -664,26 +678,26 @@
this
.
dialogObj
.
city_name
=
row
.
address_info
?
row
.
address_info
.
city
:
''
;
this
.
dialogObj
.
city_name
=
row
.
address_info
?
row
.
address_info
.
city
:
''
;
this
.
dialogObj
.
district_name
=
row
.
address_info
?
row
.
address_info
.
area
:
''
;
this
.
dialogObj
.
district_name
=
row
.
address_info
?
row
.
address_info
.
area
:
''
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
show
=
true
;
this
.
dialogObj
.
show
=
true
;
},
},
getTeacherList
(
name
){
getTeacherList
(
name
)
{
this
.
loading
=
true
this
.
loading
=
true
let
json
=
{
let
json
=
{
limit
:
this
.
promoterDialog
.
limit
,
limit
:
this
.
promoterDialog
.
limit
,
page
:
this
.
promoterDialog
.
nowPage
page
:
this
.
promoterDialog
.
nowPage
};
};
if
(
name
)
{
if
(
name
)
{
json
.
name
=
name
json
.
name
=
name
}
}
getTeacherListApi
(
json
).
then
(
res
=>
{
getTeacherListApi
(
json
).
then
(
res
=>
{
this
.
teacherList
=
res
.
list
this
.
teacherList
=
res
.
list
this
.
loading
=
false
this
.
loading
=
false
});
});
},
},
handleCurrentTeacherChange
(
val
){
handleCurrentTeacherChange
(
val
)
{
console
.
log
(
'handleCurrentTeacherChange'
,
val
)
console
.
log
(
'handleCurrentTeacherChange'
,
val
)
},
},
updateTeacher
(
val
){
updateTeacher
(
val
)
{
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
...
@@ -696,15 +710,15 @@
...
@@ -696,15 +710,15 @@
this
.
getTeacherList
();
this
.
getTeacherList
();
}
}
},
},
saveTeacher
(){
saveTeacher
()
{
this
.
$confirm
(
'此操作将修改推广人?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将修改推广人?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
console
.
log
(
'this.promoterDialog.teacher_id'
,
this
.
promoterDialog
)
console
.
log
(
'this.promoterDialog.teacher_id'
,
this
.
promoterDialog
)
updateOrderTeacherApi
(
this
.
promoterDialog
.
id
,
this
.
promoterDialog
.
teacher_id
).
then
(
res
=>
{
updateOrderTeacherApi
(
this
.
promoterDialog
.
id
,
this
.
promoterDialog
.
teacher_id
).
then
(
res
=>
{
this
.
promoterDialog
.
id
=
''
;
this
.
promoterDialog
.
id
=
''
;
this
.
promoterDialog
.
teacher_id
=
''
;
this
.
promoterDialog
.
teacher_id
=
''
;
this
.
promoterDialog
.
show
=
false
;
this
.
promoterDialog
.
show
=
false
;
this
.
$message
({
this
.
$message
({
...
@@ -715,8 +729,8 @@
...
@@ -715,8 +729,8 @@
});
});
});
});
},
},
add
()
{
add
()
{
this
.
newdialogObj
.
show
=
true
;
this
.
newdialogObj
.
show
=
true
;
},
},
},
},
components
:
{
components
:
{
...
@@ -729,44 +743,44 @@
...
@@ -729,44 +743,44 @@
couponDialog
,
couponDialog
,
page
page
},
},
mounted
(){
mounted
()
{
if
(
this
.
$route
.
query
.
code
)
{
if
(
this
.
$route
.
query
.
code
)
{
this
.
searchFrom
.
invite_type
=
this
.
$route
.
query
.
code
this
.
searchFrom
.
invite_type
=
this
.
$route
.
query
.
code
}
}
this
.
getOrderList
();
this
.
getOrderList
();
this
.
getGoodsOption
();
this
.
getGoodsOption
();
},
},
watch
:{
watch
:
{
"newdialogObj.show"
:
function
(
val
)
{
"newdialogObj.show"
:
function
(
val
)
{
if
(
!
val
)
{
if
(
!
val
)
{
this
.
getOrderList
();
this
.
getOrderList
();
}
}
}
}
},
},
filters
:{
filters
:
{
payMentFilter
(
val
){
payMentFilter
(
val
)
{
return
val
==
'1'
?
'已付款'
:
'未付款'
return
val
==
'1'
?
'已付款'
:
'未付款'
},
},
courseTypeFilter
(
val
){
courseTypeFilter
(
val
)
{
return
val
.
type
==
'1'
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
return
val
.
type
==
'1'
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
},
},
inviteType
(
value
){
inviteType
(
value
)
{
return
INVITETYPE
[
value
]
return
INVITETYPE
[
value
]
},
},
status
(
value
){
status
(
value
)
{
return
ORDERSTATUS
[
value
]
return
ORDERSTATUS
[
value
]
},
},
buyType
(
value
){
buyType
(
value
)
{
return
BUYTYPE
[
value
]
return
BUYTYPE
[
value
]
},
},
moneytFilter
(
val
){
moneytFilter
(
val
)
{
return
val
=
val
/
100
+
'元'
return
val
=
val
/
100
+
'元'
},
},
filterGoods
(
val
){
filterGoods
(
val
)
{
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
},
},
buyTypeWay
(
value
)
{
buyTypeWay
(
value
)
{
return
BUYTYPEWAY
[
value
]
return
BUYTYPEWAY
[
value
]
},
},
}
}
...
@@ -774,16 +788,17 @@
...
@@ -774,16 +788,17 @@
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.avatar
{
.avatar
{
width
:
50px
;
width
:
50px
;
min-width
:
50px
;
min-width
:
50px
;
height
:
50px
;
height
:
50px
;
margin-right
:
5px
;
margin-right
:
5px
;
border-radius
:
50%
;
border-radius
:
50%
;
}
}
.order
{
padding
:
20px
0
;
.order
{
}
padding
:
20px
0
;
}
</
style
>
</
style
>
<
style
>
<
style
>
.f-c
>
.cell
{
.f-c
>
.cell
{
...
...
src/components/notBuyClass/index.vue
View file @
5bb62fd3
<
template
>
<
template
>
<div
class=
"not_buy"
>
<div
class=
"not_buy"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
inline
size=
"small"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
inline
size=
"small"
>
<el-form-item
label=
"用户ID"
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
style=
"width: 80px"
@
change=
"getList"
></el-input>
<el-input
v-model=
"searchFrom.user_id"
style=
"width: 80px"
@
change=
"getList"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户昵称"
>
<el-form-item
label=
"用户昵称"
>
<el-input
v-model=
"searchFrom.nickname"
@
change=
"getList"
style=
"width: 120px"
></el-input>
<el-input
v-model=
"searchFrom.nickname"
@
change=
"getList"
style=
"width: 120px"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"手机号"
>
<el-form-item
label=
"手机号"
>
<el-input
v-model=
"searchFrom.mobile"
@
change=
"getList"
></el-input>
<el-input
v-model=
"searchFrom.mobile"
@
change=
"getList"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品名称"
>
<el-form-item
label=
"商品名称"
>
<el-select
v-model=
"searchFrom.goods_id"
filterable
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-select
v-model=
"searchFrom.goods_id"
filterable
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-option
<el-option
v-for=
"(data,index) in goodList"
v-for=
"(data,index) in goodList"
:key=
"index"
:key=
"index"
:label=
"data | filterGoods"
:label=
"data | filterGoods"
:value=
"data.id"
>
:value=
"data.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出
</el-button>
<el-button
plain
type=
"success"
v-if=
"!$store.state.readonly"
@
click=
"entranceObj.show=true"
>
无需登录入口
</el-button>
<el-button
plain
type=
"success"
v-if=
"!$store.state.readonly"
@
click=
"entranceObj.show=true"
>
无需登录入口
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
:data=
"configList"
style=
"width: 100%"
size=
"small"
>
<el-table
:data=
"configList"
style=
"width: 100%"
size=
"small"
>
<el-table-column
label=
"用户ID"
sortable
prop=
"scope.row.user_id"
className=
"userInfo"
>
<el-table-column
label=
"用户ID"
sortable
prop=
"scope.row.user_id"
className=
"userInfo"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"class_name"
label=
"班级名称"
>
<el-table-column
prop=
"class_name"
label=
"班级名称"
></el-table-column>
</el-table-column>
<el-table-column
label=
"期数名称"
prop=
"periods_name"
width=
"170px"
>
<el-table-column
label=
"期数标题"
prop=
"periods_name"
>
<
template
slot-scope=
"scope"
>
</el-table-column>
<div
v-html=
"periodName(scope.row)"
></div>
<el-table-column
label=
"商品名称"
prop=
"goods_name"
>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"手机号"
prop=
"mobile"
>
<el-table-column
label=
"商品名称"
prop=
"goods_name"
></el-table-column>
<el-table-column
label=
"手机号"
prop=
"mobile"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
sortable
>
<el-table-column
prop=
"created_at"
label=
"创建时间"
sortable
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"desc"
>
<el-table-column
label=
"备注"
prop=
"desc"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"操作"
v-if=
"!$store.state.readonly"
width=
"220"
>
label=
"操作"
v-if=
"!$store.state.readonly"
width=
"220"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
size=
"mini"
plain
type=
"primary"
>
编辑备注
</el-button>
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
size=
"mini"
plain
type=
"primary"
>
编辑备注
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<page
:nowPage=
"nowPage"
:total=
"total"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:nowPage=
"nowPage"
:total=
"total"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<entrance
:entranceObj=
"entranceObj"
/>
<entrance
:entranceObj=
"entranceObj"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
entrance
from
"./entrance"
;
import
entrance
from
"./entrance"
;
import
{
getClassConfigApi
,
getGoodsListApi
,
updateDescApi
,
exportExcelApi
}
from
"../../service/api"
;
import
{
getClassConfigApi
,
getGoodsListApi
,
updateDescApi
,
exportExcelApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
}
from
"../../util/wordbook"
;
export
default
{
export
default
{
name
:
"notBuyClass"
,
name
:
"notBuyClass"
,
data
()
{
data
()
{
return
{
return
{
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
limit
:
10
,
limit
:
10
,
configList
:
[],
configList
:
[],
entranceObj
:
{
entranceObj
:
{
title
:
"无需登录入口"
,
title
:
"无需登录入口"
,
show
:
false
show
:
false
},
},
searchFrom
:
{
searchFrom
:
{
user_id
:
""
,
user_id
:
""
,
goods_id
:
""
,
goods_id
:
""
,
mobile
:
""
,
mobile
:
""
,
},
},
goodList
:
[],
goodList
:
[],
};
};
},
},
components
:
{
components
:
{
entrance
,
entrance
,
page
page
},
},
filters
:
{
filters
:
{
filterGoods
(
val
)
{
filterGoods
(
val
)
{
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
}
}
},
mounted
()
{
this
.
getList
();
this
.
getGoodsOption
();
},
methods
:
{
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
getList
();
},
},
onSizeChange
(
val
)
{
mounted
()
{
this
.
nowPage
=
1
;
this
.
limit
=
val
;
this
.
getList
();
this
.
getList
();
this
.
getGoodsOption
();
},
},
getList
()
{
let
json
=
{
methods
:
{
limit
:
this
.
limit
,
periodName
(
val
)
{
page
:
this
.
nowPage
let
str
=
''
;
};
if
(
!
val
.
periods_name
)
{
// 搜索筛选
str
=
'-'
if
(
this
.
searchFrom
.
user_id
){
}
else
{
json
.
user_id
=
this
.
searchFrom
.
user_id
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
}
`
}
}
}
if
(
this
.
searchFrom
.
goods_id
){
return
str
json
.
goods_id
=
this
.
searchFrom
.
goods_id
},
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
getList
();
},
onSizeChange
(
val
)
{
this
.
nowPage
=
1
;
this
.
limit
=
val
;
this
.
getList
();
},
getList
()
{
let
json
=
{
limit
:
this
.
limit
,
page
:
this
.
nowPage
};
// 搜索筛选
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
}
if
(
this
.
searchFrom
.
nickname
)
{
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
}
if
(
this
.
searchFrom
.
mobile
)
{
if
(
this
.
searchFrom
.
nickname
)
{
json
.
mobile
=
this
.
searchFrom
.
mobil
e
json
.
nickname
=
this
.
searchFrom
.
nicknam
e
}
}
getClassConfigApi
(
json
).
then
(
res
=>
{
if
(
this
.
searchFrom
.
mobile
)
{
this
.
total
=
res
.
total
;
json
.
mobile
=
this
.
searchFrom
.
mobile
this
.
configList
=
res
.
list
;
}
});
getClassConfigApi
(
json
).
then
(
res
=>
{
},
this
.
total
=
res
.
total
;
getGoodsOption
(){
this
.
configList
=
res
.
list
;
});
},
getGoodsOption
()
{
let
json
=
{
let
json
=
{
page
:
1
,
page
:
1
,
limit
:
100
limit
:
100
};
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
this
.
goodList
=
res
.
list
;
})
})
},
},
editComment
(
id
,
desc
)
{
editComment
(
id
,
desc
)
{
this
.
$prompt
(
''
,
'编辑备注'
,
{
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputType
:
'textarea'
,
inputValue
:
desc
||
''
inputValue
:
desc
||
''
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
updateDescApi
({
desc
:
value
},
id
).
then
(
res
=>
{
updateDescApi
({
desc
:
value
},
id
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'编辑备注成功'
message
:
'编辑备注成功'
});
this
.
getList
();
});
});
this
.
getList
();
});
});
});
})
})
},
},
exportTable
()
{
exportTable
()
{
let
json
=
{};
let
json
=
{};
if
(
this
.
searchFrom
.
user_id
)
{
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
json
.
user_id
=
this
.
searchFrom
.
user_id
}
}
if
(
this
.
searchFrom
.
goods_id
)
{
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
}
if
(
this
.
searchFrom
.
mobile
)
{
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
json
.
mobile
=
this
.
searchFrom
.
mobile
}
}
if
(
this
.
searchFrom
.
nickname
)
{
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
json
.
nickname
=
this
.
searchFrom
.
nickname
}
}
exportExcelApi
(
'/api/admin/user/receive/course/log/export'
,
json
)
exportExcelApi
(
'/api/admin/user/receive/course/log/export'
,
json
)
},
},
}
}
};
};
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.not_buy {
.not_buy {
.head {
.head {
margin-bottom: 10px;
margin-bottom: 10px;
}
}
width: 100%;
padding: 20px 0;
width: 100%;
.page-div {
padding: 20px 0;
text-align: center;
padding-top: 20px;
.page-div {
text-align: center;
padding-top: 20px;
}
}
}
}
.avatar {
.avatar {
width: 50px;
width: 50px;
min-width:
50px !important;
min-width:
50px !important;
height: 50px;
height: 50px;
border-radius: 50%;
border-radius: 50%;
line-height:
1;
line-height:
1;
}
}
</
style
>
</
style
>
<
style
>
<
style
>
.userInfo
>
div
{
.userInfo
>
div
{
display
:
flex
;
display
:
flex
;
flex-flow
:
row
nowrap
;
flex-flow
:
row
nowrap
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
...
...
src/components/order/index.vue
View file @
5bb62fd3
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<el-input
v-model=
"searchFrom.order_group_id"
style=
"width: 80px"
></el-input>
<el-input
v-model=
"searchFrom.order_group_id"
style=
"width: 80px"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否团长"
>
<el-form-item
label=
"是否团长"
>
<el-select
v-model=
"searchFrom.is_captain"
style=
"width: 100px"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-select
v-model=
"searchFrom.is_captain"
style=
"width: 100px"
placeholder=
"请选择"
@
change=
"getOrderList"
clearable
>
<el-option
v-for=
"item in isLeaderOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
<el-option
v-for=
"item in isLeaderOption"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
...
@@ -79,30 +79,33 @@
...
@@ -79,30 +79,33 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
:data=
"tableData"
size=
"small"
@
expand-change=
"changeRow"
style=
"width: 100%"
fixed
>
<el-table
:data=
"tableData"
size=
"small"
@
expand-change=
"changeRow"
style=
"width: 100%"
fixed
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
width=
"120"
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
width=
"120"
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<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
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column><!––>-->
prop=
"periods_title"
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"150px"
>
label=
"期数标题"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
width=
"160"
>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
width=
"160"
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"来源"
>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"来源"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
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>
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
</div>
</div>
<div
v-if=
"scope.row.invite_earnings === 0 && scope.row.invite_id !== 0"
style=
"display: flex;"
>
<div
v-if=
"scope.row.invite_earnings === 0 && scope.row.invite_id !== 0"
style=
"display: flex;"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
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>
收益:
{{
scope
.
row
.
invite_earnings
/
100
}}
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
用户ID:
{{
scope
.
row
.
invite_id
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
<br>
昵称:
{{
scope
.
row
.
invite_nickname
}}
...
@@ -115,7 +118,7 @@
...
@@ -115,7 +118,7 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"order_group_id"
label=
"团ID"
width=
"80"
>
<el-table-column
prop=
"order_group_id"
label=
"团ID"
width=
"80"
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"是否团长"
width=
"80"
>
<el-table-column
label=
"是否团长"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_captain
|
isLeader
}}
{{
scope
.
row
.
is_captain
|
isLeader
}}
</
template
>
</
template
>
...
@@ -149,15 +152,15 @@
...
@@ -149,15 +152,15 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"时间"
width=
"280"
>
<el-table-column
prop=
"created_at"
label=
"时间"
width=
"280"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
下单时间:
{{
scope
.
row
.
created_at
}}
<br>
下单时间:
{{
scope
.
row
.
created_at
}}
<br>
购买时间:
{{
scope
.
row
.
pay_at
}}
<br>
购买时间:
{{
scope
.
row
.
pay_at
}}
<br>
<div
v-if=
"scope.row.buy_type != 1"
>
<div
v-if=
"scope.row.buy_type != 1"
>
成团时间:
{{
scope
.
row
.
group_success_time
}}
<br>
成团时间:
{{
scope
.
row
.
group_success_time
}}
<br>
截止时间:
{{
scope
.
row
.
deadline
}}
截止时间:
{{
scope
.
row
.
deadline
}}
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
<el-table-column
prop=
"desc"
label=
"备注"
>
...
@@ -173,7 +176,7 @@
...
@@ -173,7 +176,7 @@
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
编辑备注
</el-button>
</el-button>
<el-button
@
click=
"editAddress(scope.row)"
plain
type=
"info"
size=
"mini"
>
<el-button
@
click=
"editAddress(scope.row)"
plain
type=
"info"
size=
"mini"
>
编辑收货地址
编辑收货地址
</el-button>
</el-button>
<el-button
@
click=
"updateTeacher(scope.row)"
v-if=
"$store.state.promoter"
type=
"warning"
plain
size=
"mini"
>
<el-button
@
click=
"updateTeacher(scope.row)"
v-if=
"$store.state.promoter"
type=
"warning"
plain
size=
"mini"
>
...
@@ -187,7 +190,7 @@
...
@@ -187,7 +190,7 @@
</el-table>
</el-table>
<address-dialog
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<address-dialog
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<refund-dialog
:dialogObj=
"refundDialogObj"
@
reflash=
"onAfterRefund"
@
changeShow=
"changeShow"
></refund-dialog>
<refund-dialog
:dialogObj=
"refundDialogObj"
@
reflash=
"onAfterRefund"
@
changeShow=
"changeShow"
></refund-dialog>
<detail-dialog
:dialogObj=
"dialogDetailObj"
@
changeShow=
"changeDetailShow"
/>
<detail-dialog
:dialogObj=
"dialogDetailObj"
@
changeShow=
"changeDetailShow"
/>
<source-dialog
:dialogObj=
"sourceDialog"
/>
<source-dialog
:dialogObj=
"sourceDialog"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
...
@@ -205,529 +208,552 @@
...
@@ -205,529 +208,552 @@
<el-button
type=
"primary"
@
click=
"saveTeacher"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"saveTeacher"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getOrderListApi
,
getOrderListApi
,
editOrderDescApi
,
editOrderDescApi
,
getGoodsListApi
,
getGoodsListApi
,
getRefundListApi
,
getRefundListApi
,
exportExcelApi
,
exportExcelApi
,
getTeacherListApi
,
getTeacherListApi
,
updateOrderTeacherApi
,
updateOrderTeacherApi
,
setOrderApi
setOrderApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
addressDialog
from
"./dialog"
;
import
addressDialog
from
"./dialog"
;
import
sourceDialog
from
"./sourceDialog"
;
import
sourceDialog
from
"./sourceDialog"
;
import
refundDialog
from
"./refundDialog"
;
import
refundDialog
from
"./refundDialog"
;
import
couponDialog
from
"./couponDialog"
;
import
couponDialog
from
"./couponDialog"
;
import
detailDialog
from
"./detail"
;
import
detailDialog
from
"./detail"
;
import
refundDetail
from
"./refundDetail"
;
import
refundDetail
from
"./refundDetail"
;
import
AddressArray
from
"../framework/address-picker/addr"
;
import
AddressArray
from
"../framework/address-picker/addr"
;
import
{
import
{
INVITETYPE
,
INVITETYPE
,
ORDERSTATUS
,
ORDERSTATUS
,
BUYTYPE
,
BUYTYPE
,
BUYTYPEOPTION
,
BUYTYPEOPTION
,
ORDERSTATUSOPTION
,
ORDERSTATUSOPTION
,
INVITETYPEOPTION
,
INVITETYPEOPTION
,
GOODSTYPE
,
GOODSTYPE
,
ISLEADER
,
ISLEADER
,
ISLEADEROPTION
ISLEADEROPTION
}
from
"../../util/wordbook"
;
}
from
"../../util/wordbook"
;
import
CommonJs
from
"../../util/common"
;
import
CommonJs
from
"../../util/common"
;
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
data
()
{
data
()
{
return
{
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'
];
}
},
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'
];
}
},
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
:
{
show
:
false
,
out_trade_no
:
""
},
couponDetail
:
{
show
:
false
,
order_coupon_id
:
""
},
refundDetail
:
{
show
:
false
,
out_trade_no
:
""
},
limit
:
10
,
searchFrom
:
{
nickname
:
""
,
wait_into_course
:
''
,
user_id
:
""
,
invite_type
:
""
,
invite_id
:
""
,
buy_type
:
""
,
status
:
[
1
,
4
,
5
],
goods_id
:
""
,
out_trade_no
:
""
,
payTime
:
[],
order_group_id
:
""
,
is_captain
:
""
,
},
tableData
:
[],
dialogObj
:
{
show
:
false
},
refundDialogObj
:
{
show
:
false
,
id
:
""
,
money
:
0
},
dialogDetailObj
:
{
show
:
false
,
detail
:
{}
},
goodList
:
[],
inviteTypeOption
:
INVITETYPEOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
buyTypeOption
:
BUYTYPEOPTION
,
inviteSearchPlaceholder
:
""
,
rules
:
{
value
:
[{
required
:
true
,
message
:
"请输入备注"
,
trigger
:
"change"
}]
},
promoterDialog
:
{
show
:
false
,
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
limit
:
100
,
today
:
{
teacher_id
:
""
text
:
'今天'
,
},
onClick
:
()
=>
{
teacherList
:
[],
this
.
searchFrom
.
payTime
=
[
this
.
formatTime
(
new
Date
())
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
loading
:
false
,
}
isLeaderOption
:
ISLEADEROPTION
,
},
};
yesterday
:
{
},
text
:
'昨天'
,
methods
:
{
onClick
:
()
=>
{
formatTime
(
date
){
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
24
*
60
*
60
*
1000
));
let
year
=
date
.
getFullYear
();
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
preDate
+
' 23:59:59'
];
let
Month
=
date
.
getMonth
()
+
1
;
}
if
(
Month
<
10
){
},
Month
=
`0
${
Month
}
`
last30Day
:
{
}
text
:
'过去30天'
,
let
Day
=
date
.
getDate
();
onClick
:
()
=>
{
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
30
*
24
*
60
*
60
*
1000
));
return
`
${
year
}
-
${
Month
}
-
${
Day
}
`
;
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
},
}
showRef
(
data
)
{
},
this
.
refundDetail
.
show
=
true
;
last7Day
:
{
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
text
:
'过去7天'
,
},
onClick
:
()
=>
{
showCoupon
(
data
)
{
let
preDate
=
this
.
formatTime
(
new
Date
(
new
Date
().
getTime
()
-
7
*
24
*
60
*
60
*
1000
));
this
.
couponDetail
.
show
=
true
;
this
.
searchFrom
.
payTime
=
[
preDate
+
' 00:00:00'
,
this
.
formatTime
(
new
Date
())
+
' 23:59:59'
];
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
}
},
},
showSource
(
data
)
{
sourceDialog
:
{
this
.
sourceDialog
.
show
=
true
;
show
:
false
,
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
out_trade_no
:
""
},
},
changeRow
(
data
,
b
)
{
couponDetail
:
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
show
:
false
,
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
order_coupon_id
:
""
data
.
refundList
=
res
.
list
;
},
});
refundDetail
:
{
}
show
:
false
,
},
out_trade_no
:
""
exportTable
()
{
},
let
json
=
{};
limit
:
10
,
if
(
this
.
searchFrom
.
nickname
)
{
searchFrom
:
{
json
.
nickname
=
this
.
searchFrom
.
nickname
;
nickname
:
""
,
}
wait_into_course
:
''
,
if
(
this
.
searchFrom
.
user_id
)
{
user_id
:
""
,
json
.
user_id
=
this
.
searchFrom
.
user_id
;
invite_type
:
""
,
}
invite_id
:
""
,
if
(
this
.
searchFrom
.
invite_type
)
{
buy_type
:
""
,
json
.
invite_type
=
this
.
searchFrom
.
invite_type
;
status
:
[
1
,
4
,
5
],
}
goods_id
:
""
,
if
(
this
.
searchFrom
.
invite_id
)
{
out_trade_no
:
""
,
json
.
invite_id
=
this
.
searchFrom
.
invite_id
;
payTime
:
[],
}
order_group_id
:
""
,
if
(
this
.
searchFrom
.
order_group_id
)
{
is_captain
:
""
,
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
;
},
}
tableData
:
[],
if
(
this
.
searchFrom
.
buy_type
)
{
dialogObj
:
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
;
show
:
false
}
},
if
(
this
.
searchFrom
.
goods_id
)
{
refundDialogObj
:
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
;
show
:
false
,
}
id
:
""
,
if
(
this
.
searchFrom
.
out_trade_no
)
{
money
:
0
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
;
},
}
dialogDetailObj
:
{
if
(
this
.
searchFrom
.
is_captain
||
this
.
searchFrom
.
is_captain
==
0
)
{
show
:
false
,
json
.
is_captain
=
this
.
searchFrom
.
is_captain
;
detail
:
{}
}
},
if
(
this
.
searchFrom
.
receive_mobile
)
{
goodList
:
[],
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
;
inviteTypeOption
:
INVITETYPEOPTION
,
}
orderStatusOption
:
ORDERSTATUSOPTION
,
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
buyTypeOption
:
BUYTYPEOPTION
,
json
.
pay_start_at
=
this
.
searchFrom
.
payTime
[
0
]
inviteSearchPlaceholder
:
""
,
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
rules
:
{
}
value
:
[{
required
:
true
,
message
:
"请输入备注"
,
trigger
:
"change"
}]
if
(
this
.
searchFrom
.
wait_into_course
)
{
},
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
promoterDialog
:
{
}
show
:
false
,
json
.
course_type
=
1
;
//日课
nowPage
:
1
,
exportExcelApi
(
"/api/admin/order/export"
,
json
,
'日课订单列表'
);
total
:
0
,
},
limit
:
100
,
getGoodsOption
()
{
teacher_id
:
""
let
json
=
{
},
page
:
1
,
teacherList
:
[],
limit
:
100
,
loading
:
false
,
course_type
:
1
,
isLeaderOption
:
ISLEADEROPTION
,
status
:
"1,2"
};
};
},
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
},
formatTime
(
date
)
{
let
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
Month
=
`0
${
Month
}
`
}
let
Day
=
date
.
getDate
();
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
;
return
`
${
year
}
-
${
Month
}
-
${
Day
}
`
;
},
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
},
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
},
showSource
(
data
)
{
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
},
changeRow
(
data
,
b
)
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}).
then
(
res
=>
{
data
.
refundList
=
res
.
list
;
});
}
},
exportTable
()
{
let
json
=
{};
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
;
}
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
;
}
if
(
this
.
searchFrom
.
invite_type
)
{
json
.
invite_type
=
this
.
searchFrom
.
invite_type
;
}
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
;
}
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
;
}
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
;
}
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
;
}
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
;
}
if
(
this
.
searchFrom
.
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
;
}
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
=
1
;
//日课
exportExcelApi
(
"/api/admin/order/export"
,
json
,
'日课订单列表'
);
},
getGoodsOption
()
{
let
json
=
{
page
:
1
,
limit
:
100
,
course_type
:
1
,
status
:
"1,2"
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
this
.
goodList
=
res
.
list
;
});
});
},
},
onInviteTypeChange
(
val
)
{
onInviteTypeChange
(
val
)
{
if
(
val
===
0
)
{
if
(
val
===
0
)
{
this
.
inviteSearchPlaceholder
=
"用户ID"
;
this
.
inviteSearchPlaceholder
=
"用户ID"
;
}
else
if
(
val
===
1
)
{
}
else
if
(
val
===
1
)
{
this
.
inviteSearchPlaceholder
=
"老师ID"
;
this
.
inviteSearchPlaceholder
=
"老师ID"
;
}
else
if
(
val
===
2
)
{
}
else
if
(
val
===
2
)
{
this
.
inviteSearchPlaceholder
=
"推广人ID"
;
this
.
inviteSearchPlaceholder
=
"推广人ID"
;
}
}
this
.
getOrderList
();
this
.
getOrderList
();
},
},
detail
(
row
)
{
detail
(
row
)
{
let
_detail
=
row
;
let
_detail
=
row
;
this
.
dialogDetailObj
=
{
this
.
dialogDetailObj
=
{
show
:
true
,
show
:
true
,
detail
:
_detail
detail
:
_detail
};
};
},
},
editComment
(
id
,
desc
)
{
editComment
(
id
,
desc
)
{
this
.
$prompt
(
""
,
"编辑备注"
,
{
this
.
$prompt
(
""
,
"编辑备注"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
inputType
:
"textarea"
,
inputValue
:
desc
||
""
}).
then
(({
value
})
=>
{
this
.
$confirm
(
"确定保存?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
inputType
:
"textarea"
,
}).
then
(()
=>
{
inputValue
:
desc
||
""
editOrderDescApi
(
id
,
"order"
,
{
desc
:
value
}).
then
(
res
=>
{
}).
then
(({
value
})
=>
{
this
.
$message
({
this
.
$confirm
(
"确定保存?"
,
"提示"
,
{
type
:
"success"
,
confirmButtonText
:
"确定"
,
message
:
"编辑备注成功"
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
editOrderDescApi
(
id
,
"order"
,
{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"编辑备注成功"
});
this
.
getOrderList
();
});
});
this
.
getOrderList
();
});
});
});
});
});
},
},
onPageChange
(
val
)
{
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
nowPage
=
val
;
this
.
getOrderList
();
this
.
getOrderList
();
},
},
onSizeChange
(
val
)
{
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
nowPage
=
1
;
this
.
getOrderList
();
this
.
getOrderList
();
},
},
getOrderList
()
{
getOrderList
()
{
let
json
=
{
let
json
=
{
limit
:
this
.
limit
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
page
:
this
.
nowPage
};
};
if
(
this
.
searchFrom
.
nickname
)
{
if
(
this
.
searchFrom
.
nickname
)
{
json
.
nickname
=
this
.
searchFrom
.
nickname
;
json
.
nickname
=
this
.
searchFrom
.
nickname
;
}
}
if
(
this
.
searchFrom
.
user_id
)
{
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
;
json
.
user_id
=
this
.
searchFrom
.
user_id
;
}
}
if
(
this
.
searchFrom
.
invite_type
)
{
if
(
this
.
searchFrom
.
invite_type
)
{
json
.
invite_type
=
this
.
searchFrom
.
invite_type
;
json
.
invite_type
=
this
.
searchFrom
.
invite_type
;
}
}
if
(
this
.
searchFrom
.
invite_id
)
{
if
(
this
.
searchFrom
.
invite_id
)
{
json
.
invite_id
=
this
.
searchFrom
.
invite_id
;
json
.
invite_id
=
this
.
searchFrom
.
invite_id
;
}
}
if
(
this
.
searchFrom
.
order_group_id
)
{
if
(
this
.
searchFrom
.
order_group_id
)
{
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
;
json
.
order_group_id
=
this
.
searchFrom
.
order_group_id
;
}
}
if
(
this
.
searchFrom
.
buy_type
)
{
if
(
this
.
searchFrom
.
buy_type
)
{
json
.
buy_type
=
this
.
searchFrom
.
buy_type
;
json
.
buy_type
=
this
.
searchFrom
.
buy_type
;
}
}
if
(
this
.
searchFrom
.
status
)
{
if
(
this
.
searchFrom
.
status
)
{
json
.
status
=
this
.
searchFrom
.
status
.
toString
();
json
.
status
=
this
.
searchFrom
.
status
.
toString
();
}
}
if
(
this
.
searchFrom
.
goods_id
)
{
if
(
this
.
searchFrom
.
goods_id
)
{
json
.
goods_id
=
this
.
searchFrom
.
goods_id
;
json
.
goods_id
=
this
.
searchFrom
.
goods_id
;
}
}
if
(
this
.
searchFrom
.
is_captain
||
this
.
searchFrom
.
is_captain
==
0
)
{
if
(
this
.
searchFrom
.
is_captain
||
this
.
searchFrom
.
is_captain
==
0
)
{
json
.
is_captain
=
this
.
searchFrom
.
is_captain
;
json
.
is_captain
=
this
.
searchFrom
.
is_captain
;
}
}
if
(
this
.
searchFrom
.
out_trade_no
)
{
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
;
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
;
}
}
if
(
this
.
searchFrom
.
receive_mobile
)
{
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
;
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
;
}
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
json
.
pay_start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
json
.
pay_end_at
=
this
.
searchFrom
.
payTime
[
1
]
}
}
if
(
this
.
searchFrom
.
wait_into_course
)
{
if
(
this
.
searchFrom
.
wait_into_course
)
{
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
json
.
wait_into_course
=
this
.
searchFrom
.
wait_into_course
}
}
json
.
course_type
=
1
;
//日课
json
.
course_type
=
1
;
//日课
getOrderListApi
(
json
).
then
(
res
=>
{
getOrderListApi
(
json
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[];
i
.
refundList
=
[];
});
});
this
.
tableData
=
res
.
list
;
this
.
tableData
=
res
.
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
});
},
changeDetailShow
(
data
)
{
this
.
dialogDetailObj
.
show
=
data
;
},
changeShow
(
data
)
{
this
.
refundDialogObj
.
show
=
data
;
},
onRefund
(
id
,
money
)
{
this
.
refundDialogObj
.
id
=
id
;
this
.
refundDialogObj
.
money
=
money
;
this
.
refundDialogObj
.
show
=
true
;
},
onAfterRefund
()
{
this
.
refundDialogObj
.
show
=
false
;
this
.
getOrderList
();
},
onUpdateAddress
()
{
this
.
dialogObj
.
show
=
false
;
this
.
getOrderList
();
},
editAddress
(
row
)
{
console
.
log
(
row
)
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
this
.
dialogObj
.
province
=
""
;
this
.
dialogObj
.
city
=
""
;
this
.
dialogObj
.
district
=
""
;
}
else
{
let
provinceObj
=
AddressArray
.
filter
(
item
=>
{
return
item
.
label
===
row
.
address_info
.
province_name
;
});
});
if
(
provinceObj
&&
provinceObj
.
length
>
0
)
{
},
this
.
dialogObj
.
province
=
row
.
address_info
.
province_id
changeDetailShow
(
data
)
{
?
row
.
address_info
.
province_id
this
.
dialogDetailObj
.
show
=
data
;
:
provinceObj
[
0
].
value
;
},
if
(
!
row
.
address_info
.
city
)
{
changeShow
(
data
)
{
this
.
dialogObj
.
city
=
""
;
this
.
refundDialogObj
.
show
=
data
;
}
else
{
},
let
cityObj
=
provinceObj
[
0
].
children
.
filter
(
city
=>
{
onRefund
(
id
,
money
)
{
return
city
.
label
===
row
.
address_info
.
city
;
this
.
refundDialogObj
.
id
=
id
;
});
this
.
refundDialogObj
.
money
=
money
;
this
.
dialogObj
.
city
=
row
.
address_info
.
city_id
this
.
refundDialogObj
.
show
=
true
;
?
row
.
address_info
.
city_id
},
:
cityObj
[
0
].
value
;
onAfterRefund
()
{
if
(
!
row
.
address_info
.
area
)
{
this
.
refundDialogObj
.
show
=
false
;
this
.
dialogObj
.
district
=
""
;
this
.
getOrderList
();
},
onUpdateAddress
()
{
this
.
dialogObj
.
show
=
false
;
this
.
getOrderList
();
},
editAddress
(
row
)
{
console
.
log
(
row
)
if
(
!
row
.
address_info
||
!
row
.
address_info
.
province_name
)
{
this
.
dialogObj
.
province
=
""
;
this
.
dialogObj
.
city
=
""
;
this
.
dialogObj
.
district
=
""
;
}
else
{
let
provinceObj
=
AddressArray
.
filter
(
item
=>
{
return
item
.
label
===
row
.
address_info
.
province_name
;
});
if
(
provinceObj
&&
provinceObj
.
length
>
0
)
{
this
.
dialogObj
.
province
=
row
.
address_info
.
province_id
?
row
.
address_info
.
province_id
:
provinceObj
[
0
].
value
;
if
(
!
row
.
address_info
.
city
)
{
this
.
dialogObj
.
city
=
""
;
}
else
{
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
(
district
=>
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
(
city
=>
{
return
district
.
label
===
row
.
address_info
.
area
;
return
city
.
label
===
row
.
address_info
.
city
;
});
});
this
.
dialogObj
.
district
=
row
.
address_info
.
area_id
this
.
dialogObj
.
city
=
row
.
address_info
.
city_id
?
row
.
address_info
.
area_id
?
row
.
address_info
.
city_id
:
districtObj
[
0
].
value
;
:
cityObj
[
0
].
value
;
if
(
!
row
.
address_info
.
area
)
{
this
.
dialogObj
.
district
=
""
;
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
(
district
=>
{
return
district
.
label
===
row
.
address_info
.
area
;
});
this
.
dialogObj
.
district
=
row
.
address_info
.
area_id
?
row
.
address_info
.
area_id
:
districtObj
[
0
].
value
;
}
}
}
}
else
{
this
.
dialogObj
.
province
=
""
;
this
.
dialogObj
.
district
=
""
;
this
.
dialogObj
.
city
=
""
;
}
}
}
else
{
this
.
dialogObj
.
province
=
""
;
this
.
dialogObj
.
district
=
""
;
this
.
dialogObj
.
city
=
""
;
}
}
}
this
.
dialogObj
.
detail
=
row
.
address_info
?
row
.
address_info
.
address
:
""
;
this
.
dialogObj
.
detail
=
row
.
address_info
?
row
.
address_info
.
address
:
""
;
this
.
dialogObj
.
receive_mobile
=
row
.
address_info
this
.
dialogObj
.
receive_mobile
=
row
.
address_info
?
row
.
address_info
.
receive_mobile
?
row
.
address_info
.
receive_mobile
:
""
;
:
""
;
this
.
dialogObj
.
receive_name
=
row
.
address_info
this
.
dialogObj
.
receive_name
=
row
.
address_info
?
row
.
address_info
.
receive_name
?
row
.
address_info
.
receive_name
:
""
;
:
""
;
this
.
dialogObj
.
province_name
=
row
.
address_info
this
.
dialogObj
.
province_name
=
row
.
address_info
?
row
.
address_info
.
province_name
?
row
.
address_info
.
province_name
:
""
;
:
""
;
this
.
dialogObj
.
city_name
=
row
.
address_info
?
row
.
address_info
.
city
:
""
;
this
.
dialogObj
.
city_name
=
row
.
address_info
?
row
.
address_info
.
city
:
""
;
this
.
dialogObj
.
district_name
=
row
.
address_info
this
.
dialogObj
.
district_name
=
row
.
address_info
?
row
.
address_info
.
area
?
row
.
address_info
.
area
:
""
;
:
""
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
show
=
true
;
this
.
dialogObj
.
show
=
true
;
},
},
getTeacherList
(
name
)
{
getTeacherList
(
name
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
let
json
=
{
let
json
=
{
limit
:
this
.
promoterDialog
.
limit
,
limit
:
this
.
promoterDialog
.
limit
,
page
:
this
.
promoterDialog
.
nowPage
page
:
this
.
promoterDialog
.
nowPage
};
};
if
(
name
)
{
if
(
name
)
{
json
.
name
=
name
;
json
.
name
=
name
;
}
}
getTeacherListApi
(
json
).
then
(
res
=>
{
getTeacherListApi
(
json
).
then
(
res
=>
{
this
.
teacherList
=
res
.
list
;
this
.
teacherList
=
res
.
list
;
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
handleCurrentTeacherChange
(
val
)
{
handleCurrentTeacherChange
(
val
)
{
console
.
log
(
"handleCurrentTeacherChange"
,
val
);
console
.
log
(
"handleCurrentTeacherChange"
,
val
);
},
},
updateTeacher
(
val
)
{
updateTeacher
(
val
)
{
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
show
=
true
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
id
=
val
.
id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
this
.
promoterDialog
.
teacher_id
=
val
.
invite_id
;
this
.
getTeacherList
();
},
remoteMethod
(
query
)
{
if
(
query
!==
""
)
{
this
.
getTeacherList
(
query
);
}
else
{
this
.
getTeacherList
();
this
.
getTeacherList
();
}
},
},
remoteMethod
(
query
)
{
saveTeacher
()
{
if
(
query
!==
""
)
{
this
.
$confirm
(
"此操作将修改推广人?"
,
"提示"
,
{
this
.
getTeacherList
(
query
);
confirmButtonText
:
"确定"
,
}
else
{
cancelButtonText
:
"取消"
,
this
.
getTeacherList
();
type
:
"warning"
}
}).
then
(()
=>
{
},
console
.
log
(
"this.promoterDialog.teacher_id"
,
this
.
promoterDialog
);
saveTeacher
()
{
updateOrderTeacherApi
(
this
.
$confirm
(
"此操作将修改推广人?"
,
"提示"
,
{
this
.
promoterDialog
.
id
,
confirmButtonText
:
"确定"
,
this
.
promoterDialog
.
teacher_id
cancelButtonText
:
"取消"
,
).
then
(
res
=>
{
type
:
"warning"
this
.
promoterDialog
.
id
=
""
;
}).
then
(()
=>
{
this
.
promoterDialog
.
teacher_id
=
""
;
console
.
log
(
"this.promoterDialog.teacher_id"
,
this
.
promoterDialog
);
this
.
promoterDialog
.
show
=
false
;
updateOrderTeacherApi
(
this
.
$message
({
this
.
promoterDialog
.
id
,
type
:
"success"
,
this
.
promoterDialog
.
teacher_id
message
:
"修改成功!"
).
then
(
res
=>
{
this
.
promoterDialog
.
id
=
""
;
this
.
promoterDialog
.
teacher_id
=
""
;
this
.
promoterDialog
.
show
=
false
;
this
.
$message
({
type
:
"success"
,
message
:
"修改成功!"
});
this
.
getOrderList
();
});
});
this
.
getOrderList
();
});
});
});
},
},
components
:
{
addressDialog
,
refundDialog
,
detailDialog
,
refundDetail
,
sourceDialog
,
couponDialog
,
page
},
mounted
()
{
if
(
this
.
$route
.
query
.
code
)
{
this
.
searchFrom
.
invite_type
=
this
.
$route
.
query
.
code
;
}
this
.
getOrderList
();
this
.
getGoodsOption
();
},
watch
:
{
},
filters
:
{
isLeader
(
value
){
return
ISLEADER
[
value
]
},
},
payMentFilter
(
val
)
{
return
val
==
"1"
?
"已付款"
:
"未付款"
;
},
courseTypeFilter
(
val
)
{
return
val
.
type
==
"1"
?
`正式课(
${
val
.
duration
}
个月)`
:
`试听课(
${
val
.
duration
}
天)`
;
},
inviteType
(
value
)
{
return
INVITETYPE
[
value
];
},
status
(
value
)
{
return
ORDERSTATUS
[
value
];
},
},
buyType
(
value
)
{
components
:
{
return
BUYTYPE
[
value
];
addressDialog
,
refundDialog
,
detailDialog
,
refundDetail
,
sourceDialog
,
couponDialog
,
page
},
},
moneytFilter
(
val
)
{
mounted
()
{
return
(
val
=
val
/
100
+
"元"
);
if
(
this
.
$route
.
query
.
code
)
{
this
.
searchFrom
.
invite_type
=
this
.
$route
.
query
.
code
;
}
this
.
getOrderList
();
this
.
getGoodsOption
();
},
},
filterGoods
(
val
)
{
watch
:
{},
return
(
filters
:
{
"["
+
isLeader
(
value
)
{
val
.
id
+
return
ISLEADER
[
value
]
"]"
+
},
"["
+
payMentFilter
(
val
)
{
GOODSTYPE
[
val
.
goods_type
]
+
return
val
==
"1"
?
"已付款"
:
"未付款"
;
"]"
+
},
"["
+
courseTypeFilter
(
val
)
{
val
.
current_price
/
100
+
return
val
.
type
==
"1"
"元]"
+
?
`正式课(
${
val
.
duration
}
个月)`
val
.
name
:
`试听课(
${
val
.
duration
}
天)`
;
);
},
inviteType
(
value
)
{
return
INVITETYPE
[
value
];
},
status
(
value
)
{
return
ORDERSTATUS
[
value
];
},
buyType
(
value
)
{
return
BUYTYPE
[
value
];
},
moneytFilter
(
val
)
{
return
(
val
=
val
/
100
+
"元"
);
},
filterGoods
(
val
)
{
return
(
"["
+
val
.
id
+
"]"
+
"["
+
GOODSTYPE
[
val
.
goods_type
]
+
"]"
+
"["
+
val
.
current_price
/
100
+
"元]"
+
val
.
name
);
}
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.avatar
{
.avatar
{
width
:
50px
;
width
:
50px
;
min-width
:
50px
;
min-width
:
50px
;
height
:
50px
;
height
:
50px
;
margin-right
:
5px
;
margin-right
:
5px
;
border-radius
:
50%
;
border-radius
:
50%
;
}
}
.order
{
padding
:
20px
0
;
.order
{
}
padding
:
20px
0
;
}
</
style
>
</
style
>
<
style
>
<
style
>
.f-c
>
.cell
{
.f-c
>
.cell
{
display
:
flex
!important
;
display
:
flex
!important
;
flex-flow
:
row
;
flex-flow
:
row
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
</
style
>
</
style
>
src/components/teacher/index.vue
View file @
5bb62fd3
...
@@ -550,7 +550,7 @@
...
@@ -550,7 +550,7 @@
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
@import "../../util/public";
.user{
.user{
height: 100%;
/*height: 100%;*/
overflow: auto;
overflow: auto;
padding: 20px 0;
padding: 20px 0;
.btn-content{
.btn-content{
...
...
src/components/teacherDetail/index.vue
View file @
5bb62fd3
...
@@ -3,9 +3,7 @@
...
@@ -3,9 +3,7 @@
<div
class=
"header"
>
<div
class=
"header"
>
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
>
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
>
<div
slot=
"header"
>
<div
slot=
"header"
>
<span>
<span><label>
{{
detail
.
type
|
teacherType
}}
:
</label>
{{
detail
.
name
}}
(T
{{
detail
.
squad
}}
)
</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>
<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>
<div
class=
"card-content"
>
<div
class=
"card-content"
>
...
@@ -36,9 +34,7 @@
...
@@ -36,9 +34,7 @@
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
v-if=
"detail.user_info"
>
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
v-if=
"detail.user_info"
>
<div
slot=
"header"
>
<div
slot=
"header"
>
<span>
绑定用户
</span>
<span>
绑定用户
</span>
<el-button
@
click=
"createInviteLink(detail.user_info)"
style=
"float: right;"
size=
"mini"
plain
type=
"primary"
>
<el-button
@
click=
"createInviteLink(detail.user_info)"
style=
"float: right;"
size=
"mini"
plain
type=
"primary"
>
复制专属链接
</el-button>
复制专属链接
</el-button>
</div>
</div>
<div
class=
"card-content"
>
<div
class=
"card-content"
>
<div
class=
"text item"
>
<div
class=
"text item"
>
...
@@ -78,60 +74,47 @@
...
@@ -78,60 +74,47 @@
<el-tab-pane
label=
"今日任务"
name=
"task"
>
<el-tab-pane
label=
"今日任务"
name=
"task"
>
<task
:parentDetail=
"parentDetail"
></task>
<task
:parentDetail=
"parentDetail"
></task>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"期数列表"
name=
"periods"
>
<el-tab-pane
label=
"期数列表"
name=
"periods"
>
<el-table
<el-table
@
expand-change=
"changeRow"
:data=
"list"
>
@
expand-change=
"changeRow"
:data=
"list"
style=
"width: 100%"
>
<el-table-column
type=
"expand"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-table
<el-table
:data=
"[scope.row]"
>
:data=
"[scope.row]"
<el-table-column
label=
"到课率"
>
style=
"width: 100%"
>
<el-table-column
label=
"到课率"
>
<template
slot-scope=
"scope2"
>
<template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
arrive_course_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
arrive_course_rate
|
percent
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"看课率"
>
label=
"看课率"
>
<
template
slot-scope=
"scope2"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
watch_course_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
watch_course_rate
|
percent
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"完课率"
>
label=
"完课率"
>
<
template
slot-scope=
"scope2"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_course_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
over_course_rate
|
percent
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"作业率"
>
label=
"作业率"
>
<
template
slot-scope=
"scope2"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
work_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
work_rate
|
percent
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"全勤作业率"
>
label=
"全勤作业率"
>
<
template
slot-scope=
"scope2"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_work_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
over_work_rate
|
percent
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"打卡率"
>
label=
"打卡率"
>
<
template
slot-scope=
"scope2"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
clock_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
clock_rate
|
percent
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"全勤打卡率"
>
label=
"全勤打卡率"
>
<
template
slot-scope=
"scope2"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_clock_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
over_clock_rate
|
percent
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"转化率"
>
label=
"转化率"
>
<
template
slot-scope=
"scope2"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
transform_rate
|
percent
}}
</span>
<span>
{{
scope2
.
row
.
transform_rate
|
percent
}}
</span>
</
template
>
</
template
>
...
@@ -139,7 +122,13 @@
...
@@ -139,7 +122,13 @@
</el-table>
</el-table>
</template>
</template>
</el-table-column>
</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=
"class_name"
label=
"班级名称"
></el-table-column>
<el-table-column
prop=
"join_num"
label=
"已进班人数"
width=
"90px"
></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>
<el-table-column
prop=
"need_add_teacher_num"
label=
"需加好友数"
width=
"90px"
></el-table-column>
...
@@ -150,7 +139,7 @@
...
@@ -150,7 +139,7 @@
{{
scope
.
row
.
source
|
classSource
}}
{{
scope
.
row
.
source
|
classSource
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"showUser(scope.row)"
size=
"mini"
plain
type=
"primary"
>
班级成员
</el-button>
<el-button
@
click=
"showUser(scope.row)"
size=
"mini"
plain
type=
"primary"
>
班级成员
</el-button>
</
template
>
</
template
>
...
@@ -158,7 +147,7 @@
...
@@ -158,7 +147,7 @@
</el-table>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</el-tab-pane>
</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
ref=
"form"
:model=
"form"
label-width=
"100px"
inline
>
<el-form-item
label=
"用户ID"
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"form.user_id"
></el-input>
<el-input
v-model=
"form.user_id"
></el-input>
...
@@ -195,39 +184,26 @@
...
@@ -195,39 +184,26 @@
<el-form-item
label=
"交易订单号"
>
<el-form-item
label=
"交易订单号"
>
<el-input
v-model=
"form.out_trade_no"
></el-input>
<el-input
v-model=
"form.out_trade_no"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
:data=
"tableData"
class=
"order_list"
fixed
>
:data=
"tableData"
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
></el-table-column>
style=
"width: 100%"
class=
"order_list"
fixed
>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<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
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
prop=
"periods_title"
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
label=
"期数标题"
>
<
template
slot-scope=
"scope"
>
</el-table-column>
<div
v-html=
"periodName(scope.row)"
></div>
<el-table-column
<!--
{{
periodName
(
scope
.
row
)
}}
-->
prop=
"goods_name"
</
template
>
label=
"商品名称"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
width=
"250"
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
...
@@ -253,39 +229,29 @@
...
@@ -253,39 +229,29 @@
<br>
<br>
手机:
{{
scope
.
row
.
invite_mobile
}}
手机:
{{
scope
.
row
.
invite_mobile
}}
</div>
</div>
<div
v-if=
"scope.row.invite_id === 0"
>
<div
v-if=
"scope.row.invite_id === 0"
>
无
</div>
无
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"优惠活动"
>
label=
"优惠活动"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
无
</span>
无
</span>
<el-button
type=
"text"
v-if=
"scope.row.order_coupon_id !== 0"
@
click=
"showCoupon(scope.row)"
>
<el-button
type=
"text"
v-if=
"scope.row.order_coupon_id !== 0"
@
click=
"showCoupon(scope.row)"
>
优惠券
优惠券
</el-button>
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"付款状态"
width=
"80"
>
label=
"付款状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"实付金额"
width=
"80"
>
label=
"实付金额"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
money
|
moneytFilter
}}
{{
scope
.
row
.
money
|
moneytFilter
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"收货地址"
>
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.user_address_id && scope.row.address_info"
>
<div
v-if=
"scope.row.user_address_id && scope.row.address_info"
>
{{
scope
.
row
.
address_info
.
receive_name
}}
<br>
{{
scope
.
row
.
address_info
.
receive_name
}}
<br>
...
@@ -294,46 +260,23 @@
...
@@ -294,46 +260,23 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"pay_at"
label=
"购买时间"
sortable
></el-table-column>
prop=
"pay_at"
<el-table-column
prop=
"created_at"
label=
"下单时间"
sortable
></el-table-column>
label=
"购买时间"
sortable
>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
</el-table-column>
<el-table-column
width=
"50"
label=
"操作"
v-if=
"!$store.state.readonly"
fixed=
"right"
>
<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"
>
<
template
slot-scope=
"scope"
>
<el-popover
<el-popover
placement=
"top"
width=
"200"
>
placement=
"top"
width=
"200"
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<el-button
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
</el-button>
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
</el-button>
</div>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<page
:total=
"orderListObj.total"
:limit=
"orderListObj.limit"
@
pageChange=
"onPageChange2"
@
sizeChange=
"onSizeChange2"
/>
<page
:total=
"orderListObj.total"
:limit=
"orderListObj.limit"
@
pageChange=
"onPageChange2"
@
sizeChange=
"onSizeChange2"
/>
</el-tab-pane>
</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
ref=
"form"
:model=
"form"
label-width=
"100px"
inline
>
<el-form-item
label=
"用户ID"
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"form.user_id"
></el-input>
<el-input
v-model=
"form.user_id"
></el-input>
...
@@ -370,72 +313,67 @@
...
@@ -370,72 +313,67 @@
<el-form-item
label=
"交易订单号"
>
<el-form-item
label=
"交易订单号"
>
<el-input
v-model=
"form.out_trade_no"
></el-input>
<el-input
v-model=
"form.out_trade_no"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getyunjiList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getyunjiList"
>
搜索
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
:data=
"yunjiList"
class=
"order_list"
fixed
>
:data=
"yunjiList"
<el-table-column
prop=
"order_id"
width=
"80"
label=
"订单号"
></el-table-column>
style=
"width: 100%"
class=
"order_list"
fixed
>
<el-table-column
prop=
"nickname"
label=
"购买人"
>
<el-table-column
prop=
"order_id"
width=
"80"
label=
"订单号"
>
<
template
slot-scope=
"scope"
>
</el-table-column>
<div
v-if=
'scope.row.user_id !== 0'
>
<el-table-column
prop=
"nickname"
label=
"购买人"
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</div>
<div
v-if=
'scope.row.user_id !== 0'
>
</div>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<div
v-if=
'scope.row.user_id === 0'
>
暂未绑定用户
</div>
<div>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</div>
</
template
>
</div>
</el-table-column>
<div
v-if=
'scope.row.user_id === 0'
>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
暂未绑定用户
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
</div>
<
template
slot-scope=
"scope"
>
</
template
>
<div
v-html=
"periodName(scope.row)"
></div>
</el-table-column>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
<el-table-column
prop=
"periods_title"
label=
"期数"
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
</el-table-column>
<el-table-column
prop=
"invite_type"
label=
"来源"
>
<el-table-column
prop=
"invite_type"
label=
"来源"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"付款状态"
width=
"80"
>
<el-table-column
label=
"付款状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"money"
label=
"实付金额"
width=
"70"
>
<el-table-column
prop=
"money"
label=
"实付金额"
width=
"70"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
money
/
100
}}
元
{{
scope
.
row
.
money
/
100
}}
元
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"收货地址"
width=
"150px"
>
<el-table-column
label=
"收货地址"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
姓名:
{{
scope
.
row
.
receiver_name
}}
姓名:
{{
scope
.
row
.
receiver_name
}}
<br>
<br>
tel:
{{
scope
.
row
.
receiver_phone
}}
tel:
{{
scope
.
row
.
receiver_phone
}}
<br>
<br>
{{
scope
.
row
.
receiver_province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
{{
scope
.
row
.
receiver_province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"active_at"
label=
"激活时间"
width=
"90"
>
<el-table-column
prop=
"active_at"
label=
"激活时间"
width=
"90"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
active_at
===
'0000-00-00 00:00:00'
?
'未激活'
:
scope
.
row
.
active_at
}}
{{
scope
.
row
.
active_at
===
'0000-00-00 00:00:00'
?
'未激活'
:
scope
.
row
.
active_at
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
></el-table-column>
</el-table-column>
<el-table-column
prop=
"user_status"
:formatter=
"userStatusFormatter"
label=
"沟通状态"
width=
"90"
></el-table-column>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
</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-table>
<page
:total=
"yunjiListObj.total"
:limit=
"yunjiListObj.limit"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
<page
:total=
"yunjiListObj.total"
:limit=
"yunjiListObj.limit"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"话术列表"
name=
"huashu"
>
<el-tab-pane
label=
"话术列表"
name=
"huashu"
>
<div
class=
"cssbox"
>
<div
class=
"cssbox"
>
<el-tabs
v-model=
"questionListParams.type"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"questionListParams.type"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"话术"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"话术"
name=
"1"
></el-tab-pane>
...
@@ -447,18 +385,21 @@
...
@@ -447,18 +385,21 @@
<
template
slot=
"title"
>
<
template
slot=
"title"
>
{{
item
.
title
}}
{{
item
.
title
}}
</
template
>
</
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
:data=
"modularContent"
style=
"width: 100%"
>
<el-table-column
prop=
"title"
label=
"标题"
></el-table-column>
<el-table-column
prop=
"title"
label=
"标题"
></el-table-column>
<el-table-column
prop=
"keywords"
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
label=
"创建时间"
prop=
"created_at"
></el-table-column>
<el-table-column
width=
"250"
v-if=
"!$store.state.readonly"
label=
"操作"
>
<el-table-column
width=
"250"
v-if=
"!$store.state.readonly"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
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
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<page
:total=
"contentTotal"
:limit=
"contentLimit"
@
pageChange=
"onPageChangeC"
@
sizeChange=
"onSizeChangeC"
/>
<page
:total=
"contentTotal"
:limit=
"contentLimit"
@
pageChange=
"onPageChangeC"
@
sizeChange=
"onSizeChangeC"
/>
</el-collapse-item>
</el-collapse-item>
</el-collapse>
</el-collapse>
<page
:total=
"modularTotal"
:limit=
"modularLimit"
@
pageChange=
"onPageChangeModular"
@
sizeChange=
"onSizeChangeModular"
/>
<page
:total=
"modularTotal"
:limit=
"modularLimit"
@
pageChange=
"onPageChangeModular"
@
sizeChange=
"onSizeChangeModular"
/>
...
@@ -469,18 +410,17 @@
...
@@ -469,18 +410,17 @@
append-to-body
append-to-body
ref=
"ruleForm"
ref=
"ruleForm"
:visible
.
sync=
"postModularContentDialog"
:visible
.
sync=
"postModularContentDialog"
width=
"800px"
width=
"800px"
>
>
<div
class=
"quesion"
>
<div
class=
"quesion"
>
<p
style=
"font-weight:bold"
>
标题:
</p><span>
{{postModularParams.title}}
</span>
<p
style=
"font-weight:bold"
>
标题:
</p><span>
{{postModularParams.title}}
</span>
</div>
</div>
<div
class=
"quesion"
>
<div
class=
"quesion"
>
<p
style=
"font-weight:bold"
>
关键字:
</p><span>
{{postModularParams.keywords}}
</span>
<p
style=
"font-weight:bold"
>
关键字:
</p><span>
{{postModularParams.keywords}}
</span>
</div>
</div>
<div
class=
"ans"
>
<div
class=
"ans"
>
<p
style=
"font-weight:bold"
>
内容:
</p>
<p
style=
"font-weight:bold"
>
内容:
</p>
<div
v-html=
"postModularParams.content"
></div>
<div
v-html=
"postModularParams.content"
></div>
</div>
</div>
<!-- <el-form ref="form" :model="postModularParams">
<!-- <el-form ref="form" :model="postModularParams">
<el-row>
<el-row>
<el-col :span="24">
<el-col :span="24">
...
@@ -562,9 +502,30 @@
...
@@ -562,9 +502,30 @@
</template>
</template>
<
script
>
<
script
>
import
{
getTeacherDetailApi
,
getClassStatisticsApi
,
task4Api
,
getUserListApi
,
getQuestionModularListApi
,
getQuestionModularDetailApi
,
import
{
teacherBindUserApi
,
getOrderListApi
,
getGoodsListApi
,
editOrderDescApi
,
updateOrderTeacherApi
,
getyunjiApi
,
getClassListApi
,
getSourceStudentApi
}
from
"../../service/api"
;
getTeacherDetailApi
,
import
{
TEACHERTYPE
,
ORDERSTATUSOPTION
,
GOODSTYPE
,
ORDERSTATUS
,
CLASSSOURCE
,
USERSTATUSFORMATER
}
from
"../../util/wordbook"
;
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
AddressArray
from
'../framework/address-picker/addr'
import
task
from
'./task'
import
task
from
'./task'
import
page
from
'../framework/page'
import
page
from
'../framework/page'
...
@@ -573,13 +534,14 @@
...
@@ -573,13 +534,14 @@
import
refundDetail
from
'./refundDetail'
import
refundDetail
from
'./refundDetail'
import
UserList
from
'../class/userList'
import
UserList
from
'../class/userList'
import
chooseGoodDialog
from
'./chooseGoodDialog'
import
chooseGoodDialog
from
'./chooseGoodDialog'
let
studentSource
=
{}
let
studentSource
=
{}
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
props
:[
props
:
[
'parentDetail'
'parentDetail'
],
],
components
:{
components
:
{
page
,
page
,
task
,
task
,
UserList
,
UserList
,
...
@@ -588,194 +550,215 @@
...
@@ -588,194 +550,215 @@
refundDetail
,
refundDetail
,
sourceDialog
sourceDialog
},
},
data
(){
data
()
{
let
nowDate
=
new
Date
();
let
nowDate
=
new
Date
();
let
month
=
(
nowDate
.
getMonth
()
+
1
);
let
month
=
(
nowDate
.
getMonth
()
+
1
);
if
(
month
<
10
)
month
=
'0'
+
month
.
toString
();
if
(
month
<
10
)
month
=
'0'
+
month
.
toString
();
nowDate
=
nowDate
.
getFullYear
()
+
'-'
+
month
;
nowDate
=
nowDate
.
getFullYear
()
+
'-'
+
month
;
return
{
return
{
modularContentTitle
:
""
,
modularContentTitle
:
""
,
modularTotal
:
0
,
modularTotal
:
0
,
modularNowPage
:
1
,
modularNowPage
:
1
,
modularLimit
:
10
,
modularLimit
:
10
,
contentTotal
:
0
,
contentTotal
:
0
,
contentNowPage
:
1
,
contentNowPage
:
1
,
contentLimit
:
10
,
contentLimit
:
10
,
postModularContentDialog
:
false
,
postModularContentDialog
:
false
,
modularId
:
""
,
modularId
:
""
,
questionListParams
:
{
questionListParams
:
{
type
:
"1"
,
type
:
"1"
,
pid
:
""
,
pid
:
""
,
keywords
:
''
keywords
:
''
},
},
postModularParams
:
{},
postModularParams
:
{},
modularList
:
[],
modularList
:
[],
modularContent
:
[],
modularContent
:
[],
tabs
:
'task'
,
tabs
:
'task'
,
nowDate
:
nowDate
,
nowDate
:
nowDate
,
yunjiList
:[],
yunjiList
:
[],
searchFrom
:
{
searchFrom
:
{
user_id
:
''
,
user_id
:
''
,
is_add_teacher
:
''
,
is_add_teacher
:
''
,
is_view_course
:
''
,
is_view_course
:
''
,
start_at
:
''
,
start_at
:
''
,
end_at
:
''
end_at
:
''
},
},
form
:
{
form
:
{
nickname
:
''
,
nickname
:
''
,
user_id
:
''
,
user_id
:
''
,
status
:
[
1
,
3
,
4
,
5
],
status
:
[
1
,
3
,
4
,
5
],
goods_id
:
''
,
goods_id
:
''
,
out_trade_no
:
''
,
out_trade_no
:
''
,
receive_mobile
:
""
,
receive_mobile
:
""
,
mobile
:
""
,
mobile
:
""
,
},
},
task4Data
:
null
,
task4Data
:
null
,
goodList
:[],
goodList
:
[],
orderStatusOption
:
ORDERSTATUSOPTION
,
orderStatusOption
:
ORDERSTATUSOPTION
,
tableData
:[],
tableData
:
[],
userList
:[],
userList
:
[],
list
:[],
list
:
[],
id
:
''
,
id
:
''
,
isBindUser
:
true
,
isBindUser
:
true
,
addShow
:
false
,
addShow
:
false
,
detail
:
{},
detail
:
{},
total
:
0
,
total
:
0
,
limit
:
10
,
limit
:
10
,
nowPage
:
1
,
nowPage
:
1
,
userObj
:{
userObj
:
{
classId
:
''
,
classId
:
''
,
title
:
''
,
title
:
''
,
show
:
false
,
show
:
false
,
total
:
0
,
total
:
0
,
limit
:
10
,
limit
:
10
,
nowPage
:
1
,
nowPage
:
1
,
},
},
addId
:
''
,
addId
:
''
,
multipleSelection
:[],
multipleSelection
:
[],
chooseGoodDialogObj
:
{
chooseGoodDialogObj
:
{
show
:
false
,
show
:
false
,
code
:
''
code
:
''
},
},
orderListObj
:{
orderListObj
:
{
total
:
0
,
total
:
0
,
limit
:
10
,
limit
:
10
,
nowPage
:
1
,
nowPage
:
1
,
},
},
yunjiListObj
:{
yunjiListObj
:
{
total
:
0
,
total
:
0
,
limit
:
10
,
limit
:
10
,
nowPage
:
1
,
nowPage
:
1
,
},
},
sourceDialog
:{
sourceDialog
:
{
show
:
false
,
show
:
false
,
out_trade_no
:
''
out_trade_no
:
''
},
},
couponDetail
:{
couponDetail
:
{
show
:
false
,
show
:
false
,
order_coupon_id
:
''
order_coupon_id
:
''
},
},
refundDetail
:{
refundDetail
:
{
show
:
false
,
show
:
false
,
out_trade_no
:
''
out_trade_no
:
''
},
},
}
}
},
},
methods
:{
methods
:
{
onPageChangeModular
(
val
)
{
periodName
(
val
)
{
this
.
modularNowPage
=
val
;
let
str
=
''
;
this
.
getList
();
if
(
!
val
.
periods_title
)
{
},
str
=
'-'
onSizeChangeModular
(
val
)
{
}
else
{
this
.
modularNowPage
=
1
;
if
(
val
.
goods_id
)
{
this
.
modularLimit
=
val
;
str
+=
`【
${
val
.
goods_id
}
】`
this
.
getList
();
}
},
if
(
val
.
periods_title
)
{
onPageChangeC
(
val
)
{
str
+=
`
${
val
.
periods_title
}
<br>`
this
.
contentNowPage
=
val
;
}
this
.
handleChange
();
if
(
val
.
watch_num
)
{
},
str
+=
`
${
val
.
watch_num
}
课时`
onSizeChangeC
(
val
)
{
}
this
.
contentNowPage
=
1
;
if
(
val
.
start_at
)
{
this
.
contentLimit
=
val
;
str
+=
`(
${
val
.
start_at
.
slice
(
5
).
replace
(
'-'
,
''
)}
)`
this
.
handleChange
();
}
},
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
onPageChangeModular
(){
str
+=
`-d
${
val
.
has_watch_num
}
`
}
}
return
str
},
onPageChangeModular
(
val
)
{
this
.
modularNowPage
=
val
;
this
.
getList
();
},
},
showContent
(
data
){
onSizeChangeModular
(
val
)
{
this
.
modularNowPage
=
1
;
this
.
modularLimit
=
val
;
this
.
getList
();
},
onPageChangeC
(
val
)
{
this
.
contentNowPage
=
val
;
this
.
handleChange
();
},
onSizeChangeC
(
val
)
{
this
.
contentNowPage
=
1
;
this
.
contentLimit
=
val
;
this
.
handleChange
();
},
showContent
(
data
)
{
this
.
modularContentTitle
=
data
.
title
this
.
modularContentTitle
=
data
.
title
getQuestionModularDetailApi
(
data
.
id
).
then
(
res
=>
{
getQuestionModularDetailApi
(
data
.
id
).
then
(
res
=>
{
this
.
postModularParams
=
Object
.
assign
({},
res
);
this
.
postModularParams
=
Object
.
assign
({},
res
);
// console.log(this.postModularParams);
// console.log(this.postModularParams);
this
.
postModularContentDialog
=
true
;
this
.
postModularContentDialog
=
true
;
});
});
},
},
handleChange
()
{
handleChange
()
{
this
.
modularContent
=
[];
this
.
modularContent
=
[];
// console.log(val);
// console.log(val);
let
json
=
{
let
json
=
{
type
:
this
.
questionListParams
.
type
,
type
:
this
.
questionListParams
.
type
,
page
:
this
.
contentNowPage
,
page
:
this
.
contentNowPage
,
limit
:
this
.
contentLimit
limit
:
this
.
contentLimit
};
};
if
(
this
.
modularId
)
{
if
(
this
.
modularId
)
{
json
.
pid
=
this
.
modularId
;
json
.
pid
=
this
.
modularId
;
}
}
if
(
this
.
questionListParams
.
keywords
)
{
if
(
this
.
questionListParams
.
keywords
)
{
json
.
keywords
=
this
.
questionListParams
.
keywords
;
json
.
keywords
=
this
.
questionListParams
.
keywords
;
}
}
// this.postModularParams.pid = this.modularId;
// this.postModularParams.pid = this.modularId;
getQuestionModularListApi
(
json
.
type
,
json
).
then
(
res
=>
{
getQuestionModularListApi
(
json
.
type
,
json
).
then
(
res
=>
{
this
.
modularContent
=
res
.
list
;
this
.
modularContent
=
res
.
list
;
console
.
log
(
res
);
console
.
log
(
res
);
// debugger
// debugger
this
.
contentTotal
=
res
.
total
;
this
.
contentTotal
=
res
.
total
;
});
});
},
},
handleClick
(
tab
)
{
handleClick
(
tab
)
{
// console.log(tab.name,413)
// console.log(tab.name,413)
this
.
questionListParams
.
type
=
tab
.
name
;
this
.
questionListParams
.
type
=
tab
.
name
;
// this.postModularParams.type = tab.name;
// this.postModularParams.type = tab.name;
this
.
getList
();
this
.
getList
();
},
},
getList
()
{
getList
()
{
let
json
=
{
let
json
=
{
type
:
this
.
questionListParams
.
type
,
type
:
this
.
questionListParams
.
type
,
modularPage
:
this
.
modularNowPage
,
modularPage
:
this
.
modularNowPage
,
modularLimit
:
this
.
modularLimit
modularLimit
:
this
.
modularLimit
};
};
if
(
this
.
questionListParams
.
pid
)
{
if
(
this
.
questionListParams
.
pid
)
{
json
.
pid
=
this
.
questionListParams
.
pid
;
json
.
pid
=
this
.
questionListParams
.
pid
;
}
}
getQuestionModularListApi
(
json
.
type
,
json
).
then
(
res
=>
{
getQuestionModularListApi
(
json
.
type
,
json
).
then
(
res
=>
{
this
.
modularList
=
res
.
list
;
this
.
modularList
=
res
.
list
;
console
.
log
(
this
.
modularList
);
console
.
log
(
this
.
modularList
);
// debugger
// debugger
this
.
modularTotal
=
res
.
total
;
this
.
modularTotal
=
res
.
total
;
});
});
},
},
userStatusFormatter
(
val
){
userStatusFormatter
(
val
)
{
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
},
},
getTask4
(){
getTask4
()
{
task4Api
(
this
.
id
).
then
(
res
=>
{
task4Api
(
this
.
id
).
then
(
res
=>
{
this
.
task4Data
=
res
this
.
task4Data
=
res
})
})
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
multipleSelection
=
val
;
},
},
onAdd
(){
onAdd
()
{
let
json
=
{
let
json
=
{
is_buy
:
0
is_buy
:
0
}
}
if
(
this
.
multipleSelection
.
length
===
0
)
{
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$message
({
this
.
$message
({
type
:
'error'
,
type
:
'error'
,
message
:
'请选择用户!'
message
:
'请选择用户!'
});
});
return
return
}
else
if
(
this
.
multipleSelection
.
length
!==
1
){
}
else
if
(
this
.
multipleSelection
.
length
!==
1
)
{
this
.
$message
({
this
.
$message
({
type
:
'error'
,
type
:
'error'
,
message
:
'只能选择一个用户!'
message
:
'只能选择一个用户!'
...
@@ -789,7 +772,7 @@
...
@@ -789,7 +772,7 @@
if
(
!
this
.
isBindUser
)
{
if
(
!
this
.
isBindUser
)
{
}
else
{
}
else
{
teacherBindUserApi
(
this
.
id
,
{
user_id
:
this
.
addId
}).
then
(
res
=>
{
teacherBindUserApi
(
this
.
id
,
{
user_id
:
this
.
addId
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'绑定成功!'
message
:
'绑定成功!'
...
@@ -801,15 +784,15 @@
...
@@ -801,15 +784,15 @@
})
})
}
}
},
},
onAddUser
(
flag
){
onAddUser
(
flag
)
{
this
.
isBindUser
=
flag
;
this
.
isBindUser
=
flag
;
this
.
addShow
=
true
;
this
.
addShow
=
true
;
this
.
getUser
();
this
.
getUser
();
},
},
getUser
(){
getUser
()
{
let
json
=
{
let
json
=
{
page
:
this
.
userObj
.
nowPage
,
page
:
this
.
userObj
.
nowPage
,
limit
:
this
.
userObj
.
limit
,
limit
:
this
.
userObj
.
limit
,
};
};
if
(
this
.
searchFrom
.
userId
)
{
if
(
this
.
searchFrom
.
userId
)
{
json
.
user_id
=
this
.
searchFrom
.
userId
json
.
user_id
=
this
.
searchFrom
.
userId
...
@@ -820,14 +803,14 @@
...
@@ -820,14 +803,14 @@
if
(
this
.
searchFrom
.
mobile
)
{
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
json
.
mobile
=
this
.
searchFrom
.
mobile
}
}
getUserListApi
(
json
).
then
(
res
=>
{
getUserListApi
(
json
).
then
(
res
=>
{
this
.
userList
=
res
.
list
;
this
.
userList
=
res
.
list
;
this
.
userObj
.
total
=
res
.
total
;
this
.
userObj
.
total
=
res
.
total
;
})
})
},
},
changeRow
(
data
,
b
)
{
changeRow
(
data
,
b
)
{
if
(
b
.
indexOf
(
data
)
>-
1
)
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getClassStatisticsApi
(
data
.
periods_id
,
data
.
id
).
then
(
res
=>
{
getClassStatisticsApi
(
data
.
periods_id
,
data
.
id
).
then
(
res
=>
{
data
.
arrive_course_rate
=
res
.
arrive_course_rate
;
data
.
arrive_course_rate
=
res
.
arrive_course_rate
;
data
.
watch_course_rate
=
res
.
watch_course_rate
;
data
.
watch_course_rate
=
res
.
watch_course_rate
;
data
.
over_course_rate
=
res
.
over_course_rate
;
data
.
over_course_rate
=
res
.
over_course_rate
;
...
@@ -839,63 +822,63 @@
...
@@ -839,63 +822,63 @@
})
})
}
}
},
},
showUser
(
data
){
showUser
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
this
.
userObj
=
{
this
.
userObj
=
{
classId
:
data
.
id
,
classId
:
data
.
id
,
show
:
true
,
show
:
true
,
title
:
`
${
this
.
detail
.
name
}
班级用户列表
${
classType
}
`
,
title
:
`
${
this
.
detail
.
name
}
班级用户列表
${
classType
}
`
,
teacherId
:
data
.
teacher_id
,
teacherId
:
data
.
teacher_id
,
periods_id
:
data
.
periods_id
,
periods_id
:
data
.
periods_id
,
goods_id
:
data
.
goods_id
,
goods_id
:
data
.
goods_id
,
type
:
data
.
type
type
:
data
.
type
}
}
},
},
onPageChange3
(
val
)
{
/*onPageChange3(val)
{
this.userObj.nowPage = val;
this.userObj.nowPage = val;
this.getUser()
this.getUser()
},
},
*/
onSizeChange3
(
val
)
{
/*onSizeChange3(val)
{
this.userObj.limit = val;
this.userObj.limit = val;
this.userObj.nowPage = 1;
this.userObj.nowPage = 1;
this.getUser();
this.getUser();
},
},
*/
onPageChange
(
val
){
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
nowPage
=
val
;
this
.
getTeacherDetail
();
this
.
getTeacherDetail
();
},
},
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
nowPage
=
1
;
this
.
getTeacherDetail
();
this
.
getTeacherDetail
();
},
},
onPageChange2
(
val
){
onPageChange2
(
val
)
{
this
.
orderListObj
.
nowPage
=
val
;
this
.
orderListObj
.
nowPage
=
val
;
this
.
getOrderList
()
this
.
getOrderList
()
},
},
onSizeChange2
(
val
){
onSizeChange2
(
val
)
{
this
.
orderListObj
.
limit
=
val
;
this
.
orderListObj
.
limit
=
val
;
this
.
orderListObj
.
nowPage
=
1
;
this
.
orderListObj
.
nowPage
=
1
;
this
.
getOrderList
()
this
.
getOrderList
()
},
},
onPageChange3
(
val
)
{
onPageChange3
(
val
)
{
this
.
yunjiListObj
.
nowPage
=
val
;
this
.
yunjiListObj
.
nowPage
=
val
;
this
.
getyunjiList
()
this
.
getyunjiList
()
},
},
onSizeChange3
(
val
){
onSizeChange3
(
val
)
{
this
.
yunjiListObj
.
limit
=
val
;
this
.
yunjiListObj
.
limit
=
val
;
this
.
yunjiListObj
.
nowPage
=
1
;
this
.
yunjiListObj
.
nowPage
=
1
;
this
.
getyunjiList
()
this
.
getyunjiList
()
},
},
getTeacherDetail
(){
getTeacherDetail
()
{
this
.
searchFrom
=
{
this
.
searchFrom
=
{
user_id
:
''
,
user_id
:
''
,
is_add_teacher
:
''
,
is_add_teacher
:
''
,
is_view_course
:
''
,
is_view_course
:
''
,
start_at
:
''
,
start_at
:
''
,
end_at
:
''
end_at
:
''
};
};
let
id
=
this
.
id
;
let
id
=
this
.
id
;
let
json
=
{
let
json
=
{
...
@@ -908,11 +891,11 @@
...
@@ -908,11 +891,11 @@
// })
// })
console
.
log
(
this
.
id
)
console
.
log
(
this
.
id
)
// debugger
// debugger
getTeacherDetailApi
(
id
,
json
).
then
((
res
)
=>
{
getTeacherDetailApi
(
id
,
json
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
detail
=
res
;
this
.
detail
=
res
;
if
(
this
.
detail
.
class_list
)
{
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
.
arrive_course_rate
=
0
;
data
.
watch_course_rate
=
0
;
data
.
watch_course_rate
=
0
;
data
.
over_course_rate
=
0
;
data
.
over_course_rate
=
0
;
...
@@ -922,31 +905,31 @@
...
@@ -922,31 +905,31 @@
data
.
over_clock_rate
=
0
;
data
.
over_clock_rate
=
0
;
data
.
transform_rate
=
0
;
data
.
transform_rate
=
0
;
});
});
this
.
list
=
this
.
detail
.
class_list
.
list
||
[];
this
.
list
=
this
.
detail
.
class_list
.
list
||
[];
this
.
total
=
this
.
detail
.
class_list
.
total
;
this
.
total
=
this
.
detail
.
class_list
.
total
;
}
}
// this.getOrderList();
// this.getOrderList();
})
})
},
},
createInviteLink
(
val
){
createInviteLink
(
val
)
{
this
.
chooseGoodDialogObj
.
show
=
true
;
this
.
chooseGoodDialogObj
.
show
=
true
;
//类型选择项
//类型选择项
if
(
this
.
detail
.
type
==
0
)
{
if
(
this
.
detail
.
type
==
0
)
{
this
.
chooseGoodDialogObj
.
code
=
`CC-TEACHER-
${
val
.
user_id
}
`
;
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
}
`
;
this
.
chooseGoodDialogObj
.
code
=
`CC-XXMM-
${
val
.
user_id
}
`
;
}
else
{
}
else
{
this
.
chooseGoodDialogObj
.
code
=
`CC-TEACHER-
${
val
.
user_id
}
`
;
this
.
chooseGoodDialogObj
.
code
=
`CC-TEACHER-
${
val
.
user_id
}
`
;
}
}
},
},
changeShow
(){
changeShow
()
{
this
.
chooseGoodDialogObj
.
show
=
false
;
this
.
chooseGoodDialogObj
.
show
=
false
;
this
.
chooseGoodDialogObj
.
code
=
''
;
this
.
chooseGoodDialogObj
.
code
=
''
;
},
},
getOrderList
(){
getOrderList
()
{
let
json
=
{
let
json
=
{
limit
:
this
.
orderListObj
.
limit
,
limit
:
this
.
orderListObj
.
limit
,
page
:
this
.
orderListObj
.
nowPage
page
:
this
.
orderListObj
.
nowPage
...
@@ -978,11 +961,11 @@
...
@@ -978,11 +961,11 @@
// }
// }
// json.teacher_id=this.id;
// json.teacher_id=this.id;
// json.invite_id=this.id;
// json.invite_id=this.id;
if
(
this
.
detail
.
user_id
!==
0
)
{
if
(
this
.
detail
.
user_id
!==
0
)
{
json
.
invite_id
=
this
.
detail
.
user_id
;
json
.
invite_id
=
this
.
detail
.
user_id
;
getOrderListApi
(
json
).
then
((
res
)
=>
{
getOrderListApi
(
json
).
then
((
res
)
=>
{
res
.
list
.
forEach
(
i
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
i
.
refundList
=
[]
});
});
this
.
tableData
=
res
.
list
;
this
.
tableData
=
res
.
list
;
this
.
orderListObj
.
total
=
res
.
total
this
.
orderListObj
.
total
=
res
.
total
...
@@ -990,13 +973,13 @@
...
@@ -990,13 +973,13 @@
}
}
},
},
getGoodsOption
(){
getGoodsOption
()
{
let
json
=
{
let
json
=
{
page
:
1
,
page
:
1
,
limit
:
100
,
limit
:
100
,
course_type
:
0
,
course_type
:
0
,
};
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodList
=
res
.
list
;
this
.
goodList
=
res
.
list
;
})
})
},
},
...
@@ -1004,15 +987,15 @@
...
@@ -1004,15 +987,15 @@
this
.
$prompt
(
''
,
'编辑备注'
,
{
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputType
:
'textarea'
,
inputValue
:
desc
||
''
inputValue
:
desc
||
''
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
editOrderDescApi
(
id
,
'order'
,{
desc
:
value
}).
then
(
res
=>
{
editOrderDescApi
(
id
,
'order'
,
{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'编辑备注成功'
message
:
'编辑备注成功'
...
@@ -1022,19 +1005,19 @@
...
@@ -1022,19 +1005,19 @@
});
});
})
})
},
},
showRef
(
data
){
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
},
},
showCoupon
(
data
){
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
},
},
showSource
(
data
){
showSource
(
data
)
{
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
},
},
getyunjiList
(){
getyunjiList
()
{
let
json
=
{
let
json
=
{
limit
:
this
.
yunjiListObj
.
limit
,
limit
:
this
.
yunjiListObj
.
limit
,
page
:
this
.
yunjiListObj
.
nowPage
page
:
this
.
yunjiListObj
.
nowPage
...
@@ -1060,8 +1043,8 @@
...
@@ -1060,8 +1043,8 @@
if
(
this
.
form
.
mobile
)
{
if
(
this
.
form
.
mobile
)
{
json
.
mobile
=
this
.
form
.
mobile
json
.
mobile
=
this
.
form
.
mobile
}
}
if
(
this
.
id
)
{
if
(
this
.
id
)
{
json
.
teacher_id
=
this
.
id
;
json
.
teacher_id
=
this
.
id
;
}
}
getyunjiApi
(
json
).
then
(
res
=>
{
getyunjiApi
(
json
).
then
(
res
=>
{
this
.
yunjiListObj
.
total
=
res
.
total
;
this
.
yunjiListObj
.
total
=
res
.
total
;
...
@@ -1069,51 +1052,51 @@
...
@@ -1069,51 +1052,51 @@
});
});
}
}
},
},
filters
:{
filters
:
{
teacherType
(
value
){
teacherType
(
value
)
{
return
TEACHERTYPE
[
value
]
return
TEACHERTYPE
[
value
]
},
},
percent
(
val
){
percent
(
val
)
{
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
},
},
status
(
value
){
status
(
value
)
{
return
ORDERSTATUS
[
value
]
return
ORDERSTATUS
[
value
]
},
},
moneytFilter
(
val
){
moneytFilter
(
val
)
{
return
val
=
val
/
100
+
'元'
return
val
=
val
/
100
+
'元'
},
},
filterGoods
(
val
){
filterGoods
(
val
)
{
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
return
'['
+
val
.
id
+
']'
+
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
},
},
classSource
(
val
){
classSource
(
val
)
{
// return CLASSSOURCE[val]
// return CLASSSOURCE[val]
return
studentSource
[
val
]
return
studentSource
[
val
]
}
}
},
},
mounted
(){
mounted
()
{
this
.
id
=
this
.
parentDetail
?
this
.
parentDetail
.
id
:
this
.
$route
.
params
.
id
;
this
.
id
=
this
.
parentDetail
?
this
.
parentDetail
.
id
:
this
.
$route
.
params
.
id
;
this
.
getTask4
();
this
.
getTask4
();
getSourceStudentApi
().
then
(
res
=>
{
getSourceStudentApi
().
then
(
res
=>
{
let
obj
=
{}
let
obj
=
{}
res
.
forEach
((
item
,
index
)
=>
{
res
.
forEach
((
item
,
index
)
=>
{
obj
[
item
.
type
]
=
item
.
name
obj
[
item
.
type
]
=
item
.
name
})
})
studentSource
=
obj
studentSource
=
obj
// console.log(obj)
// console.log(obj)
});
});
this
.
getTeacherDetail
();
this
.
getTeacherDetail
();
this
.
getGoodsOption
();
this
.
getGoodsOption
();
},
},
watch
:{
watch
:
{
'tabs'
(
value
){
'tabs'
(
value
)
{
if
(
value
===
'order'
)
{
if
(
value
===
'order'
)
{
this
.
getOrderList
();
this
.
getOrderList
();
}
}
if
(
value
===
'yunji'
)
{
if
(
value
===
'yunji'
)
{
this
.
getyunjiList
();
this
.
getyunjiList
();
}
}
if
(
value
===
'huashu'
)
{
if
(
value
===
'huashu'
)
{
this
.
getList
();
this
.
getList
();
}
}
}
}
...
@@ -1126,13 +1109,16 @@
...
@@ -1126,13 +1109,16 @@
padding: 20px;
padding: 20px;
color: #666;
color: #666;
}
}
.teacher {
.teacher {
padding: 20px 0;
padding: 20px 0;
}
}
.header {
.header {
padding: 0 20px;
padding: 0 20px;
margin-bottom: 20px;
margin-bottom: 20px;
}
}
.el-row {
.el-row {
display: flex;
display: flex;
justify-content: flex-start;
justify-content: flex-start;
...
@@ -1140,49 +1126,59 @@
...
@@ -1140,49 +1126,59 @@
color: #666;
color: #666;
font-size: 16px;
font-size: 16px;
}
}
.text.item{
.text.item {
line-height: 40px;
line-height: 40px;
label{
label {
width: 120px;
width: 120px;
}
}
&.style-fix {
&.style-fix {
/*display: flex;
/*display: flex;
flex-direction: column;
flex-direction: column;
justify-content: space-between;*/
justify-content: space-between;*/
line-height: 25px;
line-height: 25px;
span {
span {
display: block;
display: block;
}
}
}
}
}
}
.el-card{
.el-card {
/*height: 50px;*/
/*height: 50px;*/
display: flex;
display: flex;
justify-content: flex-start;
justify-content: flex-start;
align-items: center;
align-items: center;
.avatar {
.avatar {
width: 120px;
width: 120px;
margin-right: 10px;
margin-right: 10px;
height: 120px;
height: 120px;
border-radius: 1000px;
border-radius: 1000px;
}
}
img{
img {
width: 120px;
width: 120px;
float: left;
float: left;
margin-right: 10px;
margin-right: 10px;
}
}
label{
label {
color: #5982e6;
color: #5982e6;
width: 120px;
width: 120px;
}
}
}
}
.card-content:after{
.card-content:after {
content: '';
content: '';
display: block;
display: block;
clear: both;
clear: both;
}
}
.order_list{
.avatar{
.order_list {
.avatar {
width: 50px;
width: 50px;
min-width: 50px;
min-width: 50px;
height: 50px;
height: 50px;
...
@@ -1190,24 +1186,32 @@
...
@@ -1190,24 +1186,32 @@
border-radius: 50%;
border-radius: 50%;
}
}
}
}
.search{
.search {
padding: 10px 30px;
padding: 10px 30px;
.el-input{display: inline-block;width: 300px;}
.el-input {
display: inline-block;
width: 300px;
}
}
}
</
style
>
</
style
>
<
style
>
<
style
>
.demo-table-expand
{
.demo-table-expand
{
font-size
:
0
;
font-size
:
0
;
}
}
.demo-table-expand
label
{
.demo-table-expand
label
{
width
:
90px
;
width
:
90px
;
color
:
#99a9bf
;
color
:
#99a9bf
;
}
}
.demo-table-expand
.el-form-item
{
.demo-table-expand
.el-form-item
{
margin-right
:
0
;
margin-right
:
0
;
margin-bottom
:
0
;
margin-bottom
:
0
;
width
:
50%
;
width
:
50%
;
}
}
.f-c
>
.cell
{
.f-c
>
.cell
{
display
:
flex
!important
;
display
:
flex
!important
;
flex-flow
:
row
;
flex-flow
:
row
;
...
...
src/components/teacherDetail/task.vue
View file @
5bb62fd3
...
@@ -25,7 +25,8 @@
...
@@ -25,7 +25,8 @@
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"header bg-h"
>
期数
</div>
<div
class=
"header bg-h"
>
期数
</div>
<div>
<div>
{{
data
.
title
}}
<!--
{{
data
.
title
}}
-->
<div
v-html=
"periodName(data)"
></div>
</div>
</div>
</div>
</div>
<div
class=
"over_work"
style=
"background-color: #fffbe4"
>
<div
class=
"over_work"
style=
"background-color: #fffbe4"
>
...
@@ -563,6 +564,29 @@
...
@@ -563,6 +564,29 @@
}
}
}
,
}
,
methods
:{
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
){
formatTime
(
date
){
let
year
=
date
.
getFullYear
();
let
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
let
Month
=
date
.
getMonth
()
+
1
;
...
...
src/components/userDetail/index.vue
View file @
5bb62fd3
...
@@ -44,20 +44,15 @@
...
@@ -44,20 +44,15 @@
</div>
</div>
</div>
</div>
<p
class=
"fl"
v-if=
"!subDetail.nickname"
style=
"clear:both;"
>
(暂无子账户)
</p>
<p
class=
"fl"
v-if=
"!subDetail.nickname"
style=
"clear:both;"
>
(暂无子账户)
</p>
<p
class=
"fl"
v-if=
"subDetail.nickname"
style=
"clear:both;"
>
(子账户)
</p>
<p
class=
"fl"
v-if=
"subDetail.nickname"
style=
"clear:both;"
>
(子账户)
</p>
</el-card>
</el-card>
</div>
</div>
<el-tabs
type=
"border-card"
v-model=
"tabs"
>
<el-tabs
type=
"border-card"
v-model=
"tabs"
>
<el-tab-pane
label=
"期数列表"
name=
"periods"
>
<el-tab-pane
label=
"期数列表"
name=
"periods"
>
<el-table
<el-table
@
expand-change=
"changeRow"
:data=
"periodList"
>
@
expand-change=
"changeRow"
:data=
"periodList"
style=
"width: 100%"
>
<el-table-column
type=
"expand"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-table
<el-table
:data=
"list"
>
:data=
"list"
style=
"width: 100%"
>
<el-table-column
<el-table-column
label=
"到课率"
>
label=
"到课率"
>
<template
slot-scope=
"scope2"
>
<template
slot-scope=
"scope2"
>
...
@@ -97,10 +92,11 @@
...
@@ -97,10 +92,11 @@
</el-table>
</el-table>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"
{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.periods_id}}" >
<router-link
:to=
"
{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.periods_id}}">
{{
scope
.
row
.
periods_title
}}
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</router-link>
</router-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -111,7 +107,7 @@
...
@@ -111,7 +107,7 @@
</el-table-column>
</el-table-column>
<el-table-column
className=
"f-c"
label=
"老师"
>
<el-table-column
className=
"f-c"
label=
"老师"
>
<
template
slot-scope=
"scope"
>
<
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
class=
"f-c"
>
<div>
<div>
<img
class=
"avatar"
:src=
"scope.row.teacher_qr"
>
{{
scope
.
row
.
teacher_name
}}
<img
class=
"avatar"
:src=
"scope.row.teacher_qr"
>
{{
scope
.
row
.
teacher_name
}}
...
@@ -127,43 +123,29 @@
...
@@ -127,43 +123,29 @@
<el-table-column
label=
"操作"
width=
"340px"
>
<el-table-column
label=
"操作"
width=
"340px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"showUser(scope.row)"
size=
"mini"
type=
"primary"
>
班级成员
</el-button>
<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=
"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=
"onGetUserDescList(scope.row)"
>
备注
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"showSourceByDate(scope.row)"
>
看课情况
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"showSourceByDate(scope.row)"
>
看课情况
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"系统订单列表"
name=
"order"
>
<el-tab-pane
label=
"系统订单列表"
name=
"order"
>
<el-table
<el-table
:data=
"userList"
>
:data=
"userList"
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
></el-table-column>
style=
"width: 100%"
>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<el-table-column
prop=
"out_trade_no"
label=
"订单号"
>
</el-table-column>
<el-table-column
label=
"购买人"
className=
"f-c"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
prop=
"periods_title"
<
template
slot-scope=
"scope"
>
label=
"期数标题"
>
<div
v-html=
"periodName(scope.row)"
></div>
</el-table-column>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
<el-table-column
</
template
>
prop=
"goods_name"
label=
"商品名称"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
width=
"250"
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人属性"
>
prop=
"invite_id"
className=
"f-c"
label=
"推广人属性"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"display: flex;color: #409eff;cursor: pointer"
>
<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"
/>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
...
@@ -239,100 +221,74 @@
...
@@ -239,100 +221,74 @@
label=
"下单时间"
>
label=
"下单时间"
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"外部订单列表"
name=
"yunji"
>
<el-tab-pane
label=
"外部订单列表"
name=
"yunji"
>
<el-table
<el-table
:data=
"yunjiList"
>
:data=
"yunjiList"
style=
"width: 100%"
>
<el-table-column
prop=
"order_id"
width=
"80"
label=
"订单号"
>
<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>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</div>
</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>
<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
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
prop=
"money"
label=
"实付金额"
width=
"70"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
money
/
100
}}
元
</
template
>
</el-table-column>
<el-table-column
label=
"收货地址"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
姓名:
{{
scope
.
row
.
receiver_name
}}
<br>
tel:
{{
scope
.
row
.
receiver_phone
}}
<br>
{{
scope
.
row
.
receiver_province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"active_at"
label=
"激活时间"
width=
"90"
>
<
template
slot-scope=
"scope"
>
{{
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>
</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>
<el-table-column
<el-table-column
prop=
"nickname"
label=
"购买人"
>
prop=
"receive_mobile"
<
template
slot-scope=
"scope"
>
label=
"收件人手机号"
>
<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>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"170px"
>
prop=
"province_name"
<
template
slot-scope=
"scope"
>
label=
"省"
>
<div
v-html=
"periodName(scope.row)"
></div>
<!--
{{
periodName
(
scope
.
row
)
}}
-->
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
prop=
"city"
<el-table-column
prop=
"invite_type"
label=
"来源"
>
label=
"市"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"teacher_name"
label=
"班级老师"
></el-table-column>
prop=
"area"
<el-table-column
label=
"付款状态"
width=
"80"
>
label=
"地区名称"
>
<
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>
<el-table-column
<el-table-column
prop=
"money"
label=
"实付金额"
width=
"70"
>
prop=
"address"
<
template
slot-scope=
"scope"
>
label=
"详细地址"
>
{{
scope
.
row
.
money
/
100
}}
元
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"收货地址"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
姓名:
{{
scope
.
row
.
receiver_name
}}
<br>
tel:
{{
scope
.
row
.
receiver_phone
}}
<br>
{{
scope
.
row
.
receiver_province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"active_at"
label=
"激活时间"
width=
"90"
>
<
template
slot-scope=
"scope"
>
{{
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>
</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"
>
<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
<!-- <el-table-column
prop="is_del"
prop="is_del"
label="是否删除">
label="是否删除">
...
@@ -340,86 +296,55 @@
...
@@ -340,86 +296,55 @@
{{scope.row.is_del == 0?'否':'是'}}
{{scope.row.is_del == 0?'否':'是'}}
</template>
</template>
</el-table-column> -->
</el-table-column> -->
<el-table-column
<el-table-column
prop=
"created_at"
label=
"创建时间"
></el-table-column>
prop=
"created_at"
<el-table-column
prop=
"updated_at"
label=
"更新时间"
></el-table-column>
label=
"创建时间"
>
<el-table-column
label=
"操作"
width=
"100px"
>
</el-table-column>
<el-table-column
prop=
"updated_at"
label=
"更新时间"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100px"
>
<
template
slot-scope=
"scope"
>
<
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
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"绑定记录"
name=
"subList"
>
<el-tab-pane
label=
"绑定记录"
name=
"subList"
>
<el-table
<el-table
:data=
"subListData"
>
:data=
"subListData"
<el-table-column
prop=
"cur_date"
label=
"绑定时间"
></el-table-column>
style=
"width: 100%"
>
<el-table-column
prop=
"unbind_at"
label=
"解绑时间"
></el-table-column>
<el-table-column
<el-table-column
prop=
"user_nickname"
label=
"主账号"
></el-table-column>
prop=
"cur_date"
<el-table-column
prop=
"sub_user_nickname"
label=
"子账号"
></el-table-column>
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-table>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"发货记录"
name=
"deliverRecord"
>
<el-tab-pane
label=
"发货记录"
name=
"deliverRecord"
>
<el-table
<el-table
:data=
"deliverRecordList"
>
:data=
"deliverRecordList"
<el-table-column
width=
"220"
className=
"f-c"
label=
"用户"
>
style=
"width: 100%"
>
<
template
slot-scope=
"scope"
>
<el-table-column
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
width=
"220"
</
template
>
className=
"f-c"
</el-table-column>
label=
"用户"
>
<el-table-column
prop=
"address"
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.user_avatar"
/>
{{
scope
.
row
.
user_nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
手机:
{{
scope
.
row
.
user_mobile
}}
{{
scope
.
row
.
receive_name
}}
<br>
</
template
>
{{
scope
.
row
.
receive_mobile
}}
<br>
</el-table-column>
{{
scope
.
row
.
province_name
}}{{
scope
.
row
.
city_name
}}{{
scope
.
row
.
area_name
}}{{
scope
.
row
.
address
}}
<el-table-column
prop=
"address"
label=
"收货地址"
>
</
template
>
<
template
slot-scope=
"scope"
>
</el-table-column>
{{
scope
.
row
.
receive_name
}}
<br>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
{{
scope
.
row
.
receive_mobile
}}
<br>
<el-table-column
prop=
"theme_name"
label=
"主题"
></el-table-column>
{{
scope
.
row
.
province_name
}}{{
scope
.
row
.
city_name
}}{{
scope
.
row
.
area_name
}}{{
scope
.
row
.
address
}}
<el-table-column
prop=
"deliver_start_at"
label=
"预计发货开始时间"
></el-table-column>
</
template
>
<el-table-column
prop=
"deliver_end_at"
label=
"预计发货结束时间"
></el-table-column>
</el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
></el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
>
<el-table-column
prop=
"status"
label=
"物流状态"
>
</el-table-column>
<
template
slot-scope=
"scope"
>
<el-table-column
prop=
"theme_name"
label=
"主题"
>
<!--
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br>
-->
</el-table-column>
<span>
名称:
{{
scope
.
row
.
express_name
}}
<br>
单号:
{{
scope
.
row
.
express_no
}}
</span>
<el-table-column
prop=
"deliver_start_at"
label=
"预计发货开始时间"
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"deliver_end_at"
label=
"预计发货结束时间"
>
<!-- <el-table-column width="150" label="操作" v-if="!$store.state.readonly" fixed="right">
</el-table-column>
<template slot-scope="scope">
<el-table-column
prop=
"deliver_at"
label=
"发货时间"
>
<el-button @click="editAddress(scope.row)" plain type="info" size="mini">
</el-table-column>
编辑收货地址
<el-table-column
prop=
"status"
label=
"物流状态"
>
</el-button>
<
template
slot-scope=
"scope"
>
</template>
<!--
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br>
-->
</el-table-column> -->
<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">
<template slot-scope="scope">
<el-button @click="editAddress(scope.row)" plain type="info" size="mini">
编辑收货地址
</el-button>
</template>
</el-table-column> -->
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -456,7 +381,7 @@
...
@@ -456,7 +381,7 @@
<el-button
type=
"primary"
@
click=
"changePrivilegeSub()"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"changePrivilegeSub()"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 地址编辑 -->
<!-- 地址编辑 -->
<address-dialogC
:dialogObj=
"addressDialog"
@
reflash=
"onUpdateAddress"
></address-dialogC>
<address-dialogC
:dialogObj=
"addressDialog"
@
reflash=
"onUpdateAddress"
></address-dialogC>
<!-- 备注 -->
<!-- 备注 -->
<el-dialog
:modal=
"false"
:visible
.
sync=
"descDialog.show"
title=
"备注列表"
width=
"60%"
>
<el-dialog
:modal=
"false"
:visible
.
sync=
"descDialog.show"
title=
"备注列表"
width=
"60%"
>
...
@@ -561,68 +486,79 @@
...
@@ -561,68 +486,79 @@
<
/el-table
>
<
/el-table
>
<
page
:
nowPage
=
"lookDetail.nowPage"
:
total
=
"lookDetail.total"
:
limit
=
"lookDetail.limit"
@
pageChange
=
"onLookDetailPageChange"
@
sizeChange
=
"onLookDetailSizeChange"
/>
<
page
:
nowPage
=
"lookDetail.nowPage"
:
total
=
"lookDetail.total"
:
limit
=
"lookDetail.limit"
@
pageChange
=
"onLookDetailPageChange"
@
sizeChange
=
"onLookDetailSizeChange"
/>
<
/el-dialog
>
<
/el-dialog
>
<
sourceByDateDialog
:
dialogObj
=
sourceByDateDialogJson
ref
=
"sourceByDateDialogDom"
><
/sourceByDateDialog
>
<
sourceByDateDialog
:
dialogObj
=
sourceByDateDialogJson
ref
=
"sourceByDateDialogDom"
><
/sourceByDateDialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
,
userLookApi
,
getUserDescListApi
,
addPeriodsClassUserDescApi
,
getDeliverRecordApi
,
import
{
updateUserPrivilegeApi
,
getyunjiApi
,
fetchAddressListApi
,
getSubAccountInfoApi
,
getUserSubAccountListApi
}
from
"../../service/api"
;
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
,
userLookApi
,
getUserDescListApi
,
addPeriodsClassUserDescApi
,
getDeliverRecordApi
,
updateUserPrivilegeApi
,
getyunjiApi
,
fetchAddressListApi
,
getSubAccountInfoApi
,
getUserSubAccountListApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
page
from
'../framework/page'
import
sourceDialog
from
'../order/sourceDialog'
import
sourceDialog
from
'../order/sourceDialog'
import
refundDetail
from
'../order/refundDetail'
import
refundDetail
from
'../order/refundDetail'
import
couponDialog
from
'../order/couponDialog'
import
couponDialog
from
'../order/couponDialog'
import
addressDialogC
from
"./addressdialog"
;
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
teacherDialog
from
'./dialog'
import
UserList
from
'../class/userList'
import
UserList
from
'../class/userList'
import
sourceByDateDialog
from
'../teacherDetail/sourceByDateDialog'
import
sourceByDateDialog
from
'../teacherDetail/sourceByDateDialog'
import
AddressArray
from
"../framework/address-picker/addr"
;
import
AddressArray
from
"../framework/address-picker/addr"
;
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
data
(){
data
()
{
return
{
return
{
userList
:[],
userList
:
[],
yunjiList
:[],
yunjiList
:
[],
addressList
:[],
addressList
:
[],
total
:
0
,
total
:
0
,
addressDialog
:{
addressDialog
:
{
show
:
false
show
:
false
}
,
addressParams
:{
}
,
}
,
sourceDialog
:{
addressParams
:
{
}
,
show
:
false
,
sourceDialog
:
{
out_trade_no
:
''
show
:
false
,
out_trade_no
:
''
}
,
}
,
tabs
:
'periods'
,
tabs
:
'periods'
,
couponDetail
:{
couponDetail
:
{
show
:
false
,
show
:
false
,
order_coupon_id
:
''
order_coupon_id
:
''
}
,
}
,
refundDetail
:{
refundDetail
:
{
show
:
false
,
show
:
false
,
out_trade_no
:
''
out_trade_no
:
''
}
,
}
,
nowPage
:
1
,
nowPage
:
1
,
limit
:
5
,
limit
:
5
,
id
:
''
,
id
:
''
,
detail
:
{
}
,
detail
:
{
}
,
subDetail
:{
}
,
subDetail
:
{
}
,
subListData
:[],
subListData
:
[],
periodList
:
[],
periodList
:
[],
dialogObj
:{
dialogObj
:
{
show
:
false
,
show
:
false
,
title
:
'绑定老师'
,
title
:
'绑定老师'
,
id
:
0
,
id
:
0
,
teacher_id
:
0
teacher_id
:
0
}
,
}
,
list
:
[],
list
:
[],
userObj
:{
userObj
:
{
classId
:
''
,
classId
:
''
,
title
:
''
,
title
:
''
,
show
:
false
,
show
:
false
,
}
,
}
,
privilegeDialog
:
{
privilegeDialog
:
{
show
:
false
,
show
:
false
,
...
@@ -636,16 +572,16 @@
...
@@ -636,16 +572,16 @@
descList
:
[],
descList
:
[],
nowPage
:
1
,
nowPage
:
1
,
limit
:
10
,
limit
:
10
,
total
:
0
,
total
:
0
,
userInfo
:
null
userInfo
:
null
}
,
}
,
lookDetail
:{
lookDetail
:
{
show
:
false
,
show
:
false
,
loading
:
false
,
loading
:
false
,
list
:[],
list
:
[],
nowPage
:
1
,
nowPage
:
1
,
limit
:
10
,
limit
:
10
,
total
:
0
total
:
0
}
,
}
,
isAddTeacherList
:
[
isAddTeacherList
:
[
{
{
...
@@ -673,11 +609,11 @@
...
@@ -673,11 +609,11 @@
value
:
5
value
:
5
}
}
],
],
sourceByDateDialogJson
:{
}
,
sourceByDateDialogJson
:
{
}
,
deliverRecordList
:[]
deliverRecordList
:
[]
}
}
}
,
}
,
components
:{
components
:
{
page
,
page
,
teacherDialog
,
teacherDialog
,
UserList
,
UserList
,
...
@@ -687,135 +623,158 @@
...
@@ -687,135 +623,158 @@
sourceByDateDialog
,
sourceByDateDialog
,
addressDialogC
addressDialogC
}
,
}
,
props
:[
props
:
[
'parentDetail'
'parentDetail'
],
],
mounted
(){
mounted
()
{
this
.
id
=
this
.
parentDetail
?
this
.
parentDetail
.
id
:
this
.
$route
.
params
.
id
;
this
.
id
=
this
.
parentDetail
?
this
.
parentDetail
.
id
:
this
.
$route
.
params
.
id
;
this
.
getDetail
();
this
.
getDetail
();
}
,
}
,
watch
:{
watch
:
{
'tabs'
(
value
){
'tabs'
(
value
)
{
if
(
value
===
'order'
)
{
if
(
value
===
'order'
)
{
this
.
getUser
()
this
.
getUser
()
}
}
if
(
value
===
'yunji'
)
{
if
(
value
===
'yunji'
)
{
this
.
getyunjiOrder
()
this
.
getyunjiOrder
()
}
}
if
(
value
===
'address'
)
{
if
(
value
===
'address'
)
{
this
.
getAddressList
()
this
.
getAddressList
()
}
}
if
(
value
===
'subList'
)
{
if
(
value
===
'subList'
)
{
this
.
getUserSubAccountList
()
this
.
getUserSubAccountList
()
}
}
if
(
value
===
'deliverRecord'
)
{
if
(
value
===
'deliverRecord'
)
{
this
.
getDeliverRecordList
()
this
.
getDeliverRecordList
()
}
}
}
}
}
,
}
,
methods
:{
methods
:
{
// editAddress(row)
{
// editAddress(row)
{
// this.addressParams = row
// this.addressParams = row
// this.addressParams.show=true
// this.addressParams.show=true
// console.log(row)
// console.log(row)
//
}
,
//
}
,
getDeliverRecordList
(){
periodName
(
val
)
{
getDeliverRecordApi
({
user_id
:
this
.
id
,
page
:
1
,
limit
:
20
}
).
then
(
res
=>
{
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
this
.
deliverRecordList
=
res
.
list
console
.
log
(
this
.
deliverRecordList
)
console
.
log
(
this
.
deliverRecordList
)
}
)
}
)
}
,
}
,
onUpdateAddress
()
{
onUpdateAddress
()
{
this
.
dialogObj
.
show
=
false
;
this
.
dialogObj
.
show
=
false
;
this
.
getAddressList
();
this
.
getAddressList
();
}
,
}
,
addAddress
(
row
)
{
addAddress
(
row
)
{
this
.
addressDialog
.
userid
=
this
.
id
;
this
.
addressDialog
.
userid
=
this
.
id
;
this
.
addressDialog
.
show
=
true
;
this
.
addressDialog
.
show
=
true
;
}
,
}
,
editAddress
(
row
)
{
editAddress
(
row
)
{
if
(
!
row
||
!
row
.
province_name
)
{
if
(
!
row
||
!
row
.
province_name
)
{
this
.
addressDialog
.
province
=
""
;
this
.
addressDialog
.
province
=
""
;
this
.
addressDialog
.
city
=
""
;
this
.
addressDialog
.
city
=
""
;
this
.
addressDialog
.
district
=
""
;
this
.
addressDialog
.
district
=
""
;
}
else
{
}
else
{
let
provinceObj
=
AddressArray
.
filter
(
item
=>
{
let
provinceObj
=
AddressArray
.
filter
(
item
=>
{
return
item
.
label
===
row
.
province_name
;
return
item
.
label
===
row
.
province_name
;
}
);
}
);
if
(
provinceObj
&&
provinceObj
.
length
>
0
)
{
if
(
provinceObj
&&
provinceObj
.
length
>
0
)
{
this
.
addressDialog
.
province
=
row
.
province_id
this
.
addressDialog
.
province
=
row
.
province_id
?
row
.
province_id
?
row
.
province_id
:
provinceObj
[
0
].
value
;
:
provinceObj
[
0
].
value
;
if
(
!
row
.
city
)
{
if
(
!
row
.
city
)
{
this
.
addressDialog
.
city
=
""
;
this
.
addressDialog
.
city
=
""
;
}
else
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
(
city
=>
{
return
city
.
label
===
row
.
city
;
}
);
this
.
addressDialog
.
city
=
row
.
city_id
?
row
.
city_id
:
cityObj
[
0
].
value
;
if
(
!
row
.
area
)
{
this
.
addressDialog
.
district
=
""
;
}
else
{
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
(
district
=>
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
(
city
=>
{
return
district
.
label
===
row
.
area
;
return
city
.
label
===
row
.
city
;
}
);
}
);
this
.
addressDialog
.
district
=
row
.
area_id
this
.
addressDialog
.
city
=
row
.
city_id
?
row
.
area_id
?
row
.
city_id
:
districtObj
[
0
].
value
;
:
cityObj
[
0
].
value
;
if
(
!
row
.
area
)
{
this
.
addressDialog
.
district
=
""
;
}
else
{
let
districtObj
=
cityObj
[
0
].
children
.
filter
(
district
=>
{
return
district
.
label
===
row
.
area
;
}
);
this
.
addressDialog
.
district
=
row
.
area_id
?
row
.
area_id
:
districtObj
[
0
].
value
;
}
}
}
}
else
{
this
.
addressDialog
.
province
=
""
;
this
.
addressDialog
.
district
=
""
;
this
.
addressDialog
.
city
=
""
;
}
}
}
else
{
this
.
addressDialog
.
province
=
""
;
this
.
addressDialog
.
district
=
""
;
this
.
addressDialog
.
city
=
""
;
}
}
}
this
.
addressDialog
.
detail
=
row
?
row
.
address
:
""
;
this
.
addressDialog
.
detail
=
row
?
row
.
address
:
""
;
this
.
addressDialog
.
receive_mobile
=
row
this
.
addressDialog
.
receive_mobile
=
row
?
row
.
receive_mobile
?
row
.
receive_mobile
:
""
;
:
""
;
this
.
addressDialog
.
receive_name
=
row
this
.
addressDialog
.
receive_name
=
row
?
row
.
receive_name
?
row
.
receive_name
:
""
;
:
""
;
this
.
addressDialog
.
province_name
=
row
this
.
addressDialog
.
province_name
=
row
?
row
.
province_name
?
row
.
province_name
:
""
;
:
""
;
this
.
addressDialog
.
city_name
=
row
?
row
.
city
:
""
;
this
.
addressDialog
.
city_name
=
row
?
row
.
city
:
""
;
this
.
addressDialog
.
district_name
=
row
this
.
addressDialog
.
district_name
=
row
?
row
.
area
?
row
.
area
:
""
;
:
""
;
this
.
addressDialog
.
is_del
=
row
.
is_del
;
this
.
addressDialog
.
is_del
=
row
.
is_del
;
this
.
addressDialog
.
id
=
row
.
id
;
this
.
addressDialog
.
id
=
row
.
id
;
this
.
addressDialog
.
show
=
true
;
this
.
addressDialog
.
show
=
true
;
console
.
log
(
this
.
addressDialog
)
console
.
log
(
this
.
addressDialog
)
// debugger
// debugger
}
,
}
,
getAddressList
()
{
getAddressList
(){
fetchAddressListApi
(
this
.
id
).
then
(
res
=>
{
fetchAddressListApi
(
this
.
id
).
then
(
res
=>
{
this
.
addressList
=
res
this
.
addressList
=
res
// console.log(this.addressList)
// console.log(this.addressList)
}
)
}
)
}
,
}
,
userStatusFormatter
(
val
){
userStatusFormatter
(
val
)
{
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
return
(
USERSTATUSFORMATER
[
val
.
user_status
])
}
,
}
,
showSourceByDate
(
row
){
showSourceByDate
(
row
)
{
this
.
sourceByDateDialogJson
=
{
this
.
sourceByDateDialogJson
=
{
"periods_id"
:
row
.
periods_id
,
"periods_id"
:
row
.
periods_id
,
"user_id"
:
row
.
user_id
,
"user_id"
:
row
.
user_id
,
json
:{
json
:
{
limit
:
10
,
limit
:
10
,
page
:
0
page
:
0
}
}
}
}
this
.
$refs
.
sourceByDateDialogDom
.
dialogShow
=
true
this
.
$refs
.
sourceByDateDialogDom
.
dialogShow
=
true
}
,
}
,
getUserLook
(){
getUserLook
()
{
if
(
!
this
.
lookDetail
.
data
)
return
;
if
(
!
this
.
lookDetail
.
data
)
return
;
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
let
json
=
{
...
@@ -823,46 +782,46 @@
...
@@ -823,46 +782,46 @@
page
:
this
.
lookDetail
.
nowPage
page
:
this
.
lookDetail
.
nowPage
}
}
let
data
=
this
.
lookDetail
.
data
;
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
.
list
=
res
.
list
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
total
=
res
.
total
;
this
.
lookDetail
.
total
=
res
.
total
;
}
)
}
)
}
,
}
,
onLookDetailPageChange
(
val
){
onLookDetailPageChange
(
val
)
{
this
.
lookDetail
.
nowPage
=
val
this
.
lookDetail
.
nowPage
=
val
this
.
getUserLook
();
this
.
getUserLook
();
}
,
}
,
onLookDetailSizeChange
(
val
){
onLookDetailSizeChange
(
val
)
{
this
.
lookDetail
.
limit
=
val
this
.
lookDetail
.
limit
=
val
this
.
lookDetail
.
nowPage
=
1
;
this
.
lookDetail
.
nowPage
=
1
;
this
.
getUserLook
();
this
.
getUserLook
();
}
,
}
,
onDescDialogPageChange
(
val
){
onDescDialogPageChange
(
val
)
{
this
.
descDialog
.
nowPage
=
val
this
.
descDialog
.
nowPage
=
val
this
.
getUserDescList
()
this
.
getUserDescList
()
}
,
}
,
onDescDialogSizeChange
(
val
){
onDescDialogSizeChange
(
val
)
{
this
.
descDialog
.
limit
=
val
this
.
descDialog
.
limit
=
val
this
.
descDialog
.
nowPage
=
1
;
this
.
descDialog
.
nowPage
=
1
;
this
.
getUserDescList
()
this
.
getUserDescList
()
}
,
}
,
showRef
(
data
){
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
}
,
}
,
showCoupon
(
data
){
showCoupon
(
data
)
{
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
show
=
true
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
this
.
couponDetail
.
order_coupon_id
=
data
.
order_coupon_id
;
}
,
}
,
showSource
(
data
){
showSource
(
data
)
{
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
show
=
true
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
this
.
sourceDialog
.
out_trade_no
=
data
.
out_trade_no
;
}
,
}
,
changeRow
(
data
,
b
)
{
changeRow
(
data
,
b
)
{
this
.
list
=
[];
this
.
list
=
[];
if
(
b
.
indexOf
(
data
)
>-
1
)
{
if
(
b
.
indexOf
(
data
)
>
-
1
)
{
getPeriodsStatisticsApi
(
data
.
periods_id
).
then
(
res
=>
{
getPeriodsStatisticsApi
(
data
.
periods_id
).
then
(
res
=>
{
data
.
arrive_course_rate
=
res
.
arrive_course_rate
;
data
.
arrive_course_rate
=
res
.
arrive_course_rate
;
data
.
watch_course_rate
=
res
.
watch_course_rate
;
data
.
watch_course_rate
=
res
.
watch_course_rate
;
data
.
over_course_rate
=
res
.
over_course_rate
;
data
.
over_course_rate
=
res
.
over_course_rate
;
...
@@ -875,75 +834,75 @@
...
@@ -875,75 +834,75 @@
}
)
}
)
}
}
}
,
}
,
onPageChange
(
val
){
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
nowPage
=
val
;
this
.
getUser
();
this
.
getUser
();
}
,
}
,
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
nowPage
=
1
;
this
.
nowPage
=
1
;
this
.
limit
=
val
;
this
.
limit
=
val
;
this
.
getUser
();
this
.
getUser
();
}
,
}
,
getUser
(){
getUser
()
{
let
json
=
{
let
json
=
{
user_id
:
this
.
id
,
user_id
:
this
.
id
,
limit
:
this
.
limit
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
,
page
:
this
.
nowPage
,
status
:
'1,3,4,5'
status
:
'1,3,4,5'
}
;
}
;
getOrderListApi
(
json
).
then
(
res
=>
{
getOrderListApi
(
json
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
i
.
refundList
=
[]
}
);
}
);
this
.
userList
=
res
.
list
;
this
.
userList
=
res
.
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
}
)
}
)
}
,
}
,
getDetail
(){
getDetail
()
{
if
(
!
this
.
id
)
return
;
if
(
!
this
.
id
)
return
;
getUserDetailApi
(
this
.
id
).
then
(
res
=>
{
getUserDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
detail
=
res
;
this
.
detail
=
res
;
if
(
res
.
periods_list
)
{
if
(
res
.
periods_list
)
{
this
.
periodList
=
res
.
periods_list
this
.
periodList
=
res
.
periods_list
}
}
console
.
log
(
res
)
console
.
log
(
res
)
}
)
}
)
getSubAccountInfoApi
(
this
.
id
).
then
(
res
=>
{
getSubAccountInfoApi
(
this
.
id
).
then
(
res
=>
{
if
(
res
.
family_user
==
1
)
{
if
(
res
.
family_user
==
1
)
{
this
.
subDetail
=
res
.
sub_user_info
this
.
subDetail
=
res
.
sub_user_info
}
}
}
)
}
)
}
,
}
,
getUserSubAccountList
(){
getUserSubAccountList
()
{
getUserSubAccountListApi
(
this
.
id
).
then
(
res
=>
{
getUserSubAccountListApi
(
this
.
id
).
then
(
res
=>
{
this
.
subListData
=
res
this
.
subListData
=
res
}
)
}
)
}
,
}
,
bindTeacher
(){
bindTeacher
()
{
let
data
=
this
.
detail
let
data
=
this
.
detail
this
.
dialogObj
=
{
this
.
dialogObj
=
{
show
:
true
,
show
:
true
,
title
:
'绑定老师'
,
title
:
'绑定老师'
,
id
:
data
.
user_id
,
id
:
data
.
user_id
,
teacher_id
:
data
.
teacher_id
teacher_id
:
data
.
teacher_id
}
}
}
,
}
,
showUser
(
data
){
showUser
(
data
)
{
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
let
classType
=
data
.
type
==
1
?
'(带班班级)'
:
'(观摩班级)'
console
.
log
(
data
)
console
.
log
(
data
)
this
.
userObj
=
{
this
.
userObj
=
{
classId
:
data
.
class_id
,
classId
:
data
.
class_id
,
show
:
true
,
show
:
true
,
title
:
`${data.teacher_name
}
班级用户列表${classType
}
`
,
title
:
`${data.teacher_name
}
班级用户列表${classType
}
`
,
teacherId
:
data
.
teacher_id
,
teacherId
:
data
.
teacher_id
,
periods_id
:
data
.
periods_id
,
periods_id
:
data
.
periods_id
,
goods_id
:
data
.
goods_id
,
goods_id
:
data
.
goods_id
,
classPage
:
true
,
classPage
:
true
,
type
:
data
.
type
type
:
data
.
type
}
}
}
,
}
,
//编辑备注 看课情况
//编辑备注 看课情况
editPrivilege
(
val
){
editPrivilege
(
val
)
{
this
.
privilegeDialog
=
{
this
.
privilegeDialog
=
{
id
:
val
.
id
,
id
:
val
.
id
,
isAllowView
:
val
.
is_view_course
===
1
,
isAllowView
:
val
.
is_view_course
===
1
,
...
@@ -952,7 +911,7 @@
...
@@ -952,7 +911,7 @@
show
:
true
show
:
true
}
}
}
,
}
,
onGetUserDescList
(
val
){
onGetUserDescList
(
val
)
{
this
.
descDialog
.
show
=
true
;
this
.
descDialog
.
show
=
true
;
this
.
descDialog
.
userInfo
=
{
this
.
descDialog
.
userInfo
=
{
user_id
:
val
.
user_id
,
user_id
:
val
.
user_id
,
...
@@ -962,17 +921,17 @@
...
@@ -962,17 +921,17 @@
this
.
descDialog
.
id
=
val
.
id
;
this
.
descDialog
.
id
=
val
.
id
;
this
.
getUserDescList
();
this
.
getUserDescList
();
}
,
}
,
getUserDescList
(){
getUserDescList
()
{
let
json
=
{
let
json
=
{
page
:
this
.
descDialog
.
nowPage
,
page
:
this
.
descDialog
.
nowPage
,
limit
:
this
.
descDialog
.
limit
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
.
descList
=
res
.
list
;
this
.
descDialog
.
total
=
res
.
total
;
this
.
descDialog
.
total
=
res
.
total
;
}
)
}
)
}
,
}
,
userLook
(
data
){
userLook
(
data
)
{
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
let
json
=
{
...
@@ -980,10 +939,10 @@
...
@@ -980,10 +939,10 @@
page
:
this
.
lookDetail
.
nowPage
page
:
this
.
lookDetail
.
nowPage
}
}
this
.
lookDetail
.
data
=
{
this
.
lookDetail
.
data
=
{
periods_id
:
data
.
periods_id
,
periods_id
:
data
.
periods_id
,
user_id
:
data
.
user_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
.
list
=
res
.
list
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
total
=
res
.
total
;
this
.
lookDetail
.
total
=
res
.
total
;
...
@@ -994,8 +953,8 @@
...
@@ -994,8 +953,8 @@
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
inputValue
:
''
inputValue
:
''
}
).
then
(({
value
}
)
=>
{
}
).
then
(({
value
}
)
=>
{
addPeriodsClassUserDescApi
(
id
,
{
desc
:
value
}
).
then
(
res
=>
{
addPeriodsClassUserDescApi
(
id
,
{
desc
:
value
}
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'编辑备注成功'
message
:
'编辑备注成功'
...
@@ -1004,7 +963,7 @@
...
@@ -1004,7 +963,7 @@
}
);
}
);
}
)
}
)
}
,
}
,
changePrivilegeSub
(){
changePrivilegeSub
()
{
this
.
$confirm
(
'此操作将修改用户权限?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将修改用户权限?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
...
@@ -1015,7 +974,7 @@
...
@@ -1015,7 +974,7 @@
is_add_teacher
:
this
.
privilegeDialog
.
is_add_teacher
,
is_add_teacher
:
this
.
privilegeDialog
.
is_add_teacher
,
weight
:
this
.
privilegeDialog
.
weight
weight
:
this
.
privilegeDialog
.
weight
}
}
updateUserPrivilegeApi
(
this
.
privilegeDialog
.
id
,
_json
).
then
(
res
=>
{
updateUserPrivilegeApi
(
this
.
privilegeDialog
.
id
,
_json
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'修改成功!'
message
:
'修改成功!'
...
@@ -1026,42 +985,42 @@
...
@@ -1026,42 +985,42 @@
}
);
}
);
}
);
}
);
}
,
}
,
getyunjiOrder
(){
getyunjiOrder
()
{
let
json
=
{
let
json
=
{
limit
:
this
.
limit
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
page
:
this
.
nowPage
}
;
}
;
json
.
user_id
=
this
.
id
json
.
user_id
=
this
.
id
getyunjiApi
(
json
).
then
(
res
=>
{
getyunjiApi
(
json
).
then
(
res
=>
{
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
yunjiList
=
res
.
list
?
res
.
list
:
[];
this
.
yunjiList
=
res
.
list
?
res
.
list
:
[];
}
);
}
);
}
}
}
,
}
,
filters
:{
filters
:
{
payMentFilter
(
val
){
payMentFilter
(
val
)
{
return
val
==
'1'
?
'已付款'
:
'未付款'
return
val
==
'1'
?
'已付款'
:
'未付款'
}
,
}
,
courseTypeFilter
(
val
){
courseTypeFilter
(
val
)
{
return
val
.
type
==
'1'
?
`正式课(${val.duration
}
个月)`
:
`试听课(${val.duration
}
天)`
return
val
.
type
==
'1'
?
`正式课(${val.duration
}
个月)`
:
`试听课(${val.duration
}
天)`
}
,
}
,
inviteType
(
value
){
inviteType
(
value
)
{
return
INVITETYPE
[
value
]
return
INVITETYPE
[
value
]
}
,
}
,
status
(
value
){
status
(
value
)
{
return
ORDERSTATUS
[
value
]
return
ORDERSTATUS
[
value
]
}
,
}
,
buyType
(
value
){
buyType
(
value
)
{
return
BUYTYPE
[
value
]
return
BUYTYPE
[
value
]
}
,
}
,
moneytFilter
(
val
){
moneytFilter
(
val
)
{
return
val
=
val
/
100
+
'元'
return
val
=
val
/
100
+
'元'
}
,
}
,
percent
(
val
){
percent
(
val
)
{
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
}
,
}
,
isdel
(
val
){
isdel
(
val
)
{
return
val
==
0
?
'未删除'
:
'已删除'
return
val
==
0
?
'未删除'
:
'已删除'
}
}
}
}
}
}
...
@@ -1069,62 +1028,79 @@
...
@@ -1069,62 +1028,79 @@
<
style
scoped
lang
=
"less"
>
<
style
scoped
lang
=
"less"
>
@
import
"../../util/public"
;
@
import
"../../util/public"
;
.
box
{
display
:
flex
;
}
.
user
-
card
{
.
box
{
margin
:
10
px
;
width
:
600
px
;
display
:
flex
;
}
.
user
-
card
{
margin
:
10
px
;
width
:
600
px
;
padding
:
20
px
;
padding
:
20
px
;
// display: flex;
// display: flex;
.
text
.
item
{
.
text
.
item
{
line
-
height
:
30
px
;
line
-
height
:
30
px
;
}
}
.
card
-
content
{
img
{
.
card
-
content
{
img
{
float
:
left
;
float
:
left
;
}
}
}
}
label
{
label
{
color
:
#
5982
e6
;
color
:
#
5982
e6
;
width
:
100
px
;
width
:
100
px
;
display
:
inline
-
block
;
display
:
inline
-
block
;
text
-
align
:
right
;
text
-
align
:
right
;
}
}
.
el
-
col
{
.
el
-
col
{
height
:
30
px
;
height
:
30
px
;
line
-
height
:
30
px
;
line
-
height
:
30
px
;
}
}
.
title
{
.
title
{
height
:
50
px
;
height
:
50
px
;
line
-
height
:
60
px
;
line
-
height
:
60
px
;
margin
-
bottom
:
20
px
;
margin
-
bottom
:
20
px
;
a
{
a
{
display
:
block
;
display
:
block
;
img
{
img
{
width
:
80
px
;
width
:
80
px
;
border
-
radius
:
100
px
;
border
-
radius
:
100
px
;
}
}
}
}
}
}
}
}
.
width400
{
width
:
400
px
;
.
width400
{
}
width
:
400
px
;
}
.
avatar
{
.
avatar
{
width
:
50
px
;
width
:
50
px
;
height
:
50
px
;
height
:
50
px
;
border
-
radius
:
50
%
;
border
-
radius
:
50
%
;
}
}
.
user
{
.
user
{
height
:
100
%
;
height
:
100
%
;
overflow
:
auto
;
overflow
:
auto
;
/*padding: 20px 0;*/
/*padding: 20px 0;*/
.
btn
-
content
{
.
btn
-
content
{
text
-
align
:
center
;
text
-
align
:
center
;
}
}
}
}
.
header
{
.
header
{
padding
:
0
20
px
;
padding
:
0
20
px
;
margin
-
bottom
:
20
px
;
margin
-
bottom
:
20
px
;
}
}
.
header
{
.
header
{
.
el
-
row
{
.
el
-
row
{
display
:
flex
;
display
:
flex
;
...
@@ -1133,14 +1109,17 @@
...
@@ -1133,14 +1109,17 @@
color
:
#
666
;
color
:
#
666
;
font
-
size
:
16
px
;
font
-
size
:
16
px
;
margin
:
25
px
0
;
margin
:
25
px
0
;
label
{
label
{
margin
-
right
:
10
px
;
margin
-
right
:
10
px
;
}
}
}
}
.
avatar
{
.
avatar
{
margin
-
right
:
10
px
;
margin
-
right
:
10
px
;
}
}
}
}
.
b
-
title
{
.
b
-
title
{
padding
:
20
px
;
padding
:
20
px
;
color
:
#
666
;
color
:
#
666
;
...
...
src/components/yunji/index.vue
View file @
5bb62fd3
...
@@ -156,7 +156,12 @@
...
@@ -156,7 +156,12 @@
<div
v-if=
'scope.row.user_id === 0'
>
用户未绑定
</div>
<div
v-if=
'scope.row.user_id === 0'
>
用户未绑定
</div>
</
template
>
</
template
>
</el-table-column>
</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>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
</el-table-column>
</el-table-column>
...
@@ -500,6 +505,29 @@ export default {
...
@@ -500,6 +505,29 @@ export default {
});
});
},
},
methods
:
{
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
){
initClearOtherOrder
(
id
){
this
.
$confirm
(
'确认清除?'
,
'提示'
,
{
this
.
$confirm
(
'确认清除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
...
src/service/api.js
View file @
5bb62fd3
...
@@ -1363,8 +1363,8 @@ export const getStaffRecordApi = function (json) {
...
@@ -1363,8 +1363,8 @@ export const getStaffRecordApi = function (json) {
};
};
// 系统配置设备
// 系统配置设备
export
const
getTeacherTypeListApi
=
function
(
json
)
{
export
const
getTeacherTypeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/teacher/type/list`
,
json
)
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/teacher/type/list`
,
json
)
};
};
export
const
postTeacherTypeListApi
=
function
(
json
)
{
export
const
postTeacherTypeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/teacher/type/add`
,
json
)
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/teacher/type/add`
,
json
)
};
};
...
@@ -1375,3 +1375,7 @@ export const postMediaConvertApi = function (json) {
...
@@ -1375,3 +1375,7 @@ export const postMediaConvertApi = function (json) {
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/public/media/convert`
,
json
)
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/public/media/convert`
,
json
)
};
};
///api/public/media/convert
///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