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
53a660b9
Commit
53a660b9
authored
Dec 25, 2018
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
云集订单展示老师班级人数情况
parent
a3f04251
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
278 additions
and
268 deletions
+278
-268
index.vue
src/components/yunji/index.vue
+278
-268
No files found.
src/components/yunji/index.vue
View file @
53a660b9
...
@@ -9,31 +9,19 @@
...
@@ -9,31 +9,19 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"绑定状态"
>
<el-form-item
label=
"绑定状态"
>
<el-select
v-model=
"searchFrom.user_buy"
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-select
v-model=
"searchFrom.user_buy"
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-option
<el-option
v-for=
"item in useTypeList"
:key=
"item.user_buy"
:label=
"item.value"
:value=
"item.user_buy"
>
v-for=
"item in useTypeList"
:key=
"item.user_buy"
:label=
"item.value"
:value=
"item.user_buy"
>
</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.goods_id"
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-select
v-model=
"searchFrom.goods_id"
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-option
<el-option
v-for=
"(data,index) in goodList"
:key=
"index"
:label=
"data | filterGoods"
:value=
"data.id"
>
v-for=
"(data,index) in goodList"
:key=
"index"
:label=
"data | filterGoods"
:value=
"data.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"老师"
>
<el-form-item
label=
"老师"
>
<el-select
v-model=
"searchFrom.teacher_id"
placeholder=
"请选择"
@
change=
"getList"
clearable
filterable
>
<el-select
v-model=
"searchFrom.teacher_id"
placeholder=
"请选择"
@
change=
"getList"
clearable
filterable
>
<el-option
<el-option
v-for=
"(data,index) in teacherList"
:key=
"index"
:label=
"data.name"
:value=
"data.id"
>
v-for=
"(data,index) in teacherList"
:key=
"index"
:label=
"data.name"
:value=
"data.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -64,286 +52,308 @@
...
@@ -64,286 +52,308 @@
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"getList"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"getList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable(list)"
>
导出
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable(list)"
>
导出
</el-button>
<el-button
type=
"success"
plain
@
click=
"classListOption()"
>
班级分布
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
:data=
"list"
style=
"width: 100%"
>
:data=
"list"
<el-table-column
prop=
"order_id"
label=
"订单号"
>
style=
"width: 100%"
>
<el-table-column
prop=
"order_id"
label=
"订单号"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"nickname"
label=
"购买人"
>
prop=
"nickname"
label=
"购买人"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
v-if=
'scope.row.user_id !== 0'
style=
"display: flex"
>
<div
v-if=
'scope.row.user_id !== 0'
style=
"display: flex"
>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<div>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</div>
<img
class=
"avatar"
:src=
"scope.row.avatar"
/>
<div>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</div>
</div>
</div>
<div
v-if=
'scope.row.user_id === 0'
>
<div
v-if=
'scope.row.user_id === 0'
>
暂未绑定用户
暂未绑定用户
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goods_name"
label=
"商品名称"
>
prop=
"goods_name"
label=
"商品名称"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"receiver_name"
label=
"姓名"
>
prop=
"receiver_name"
label=
"姓名"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"receiver_phone"
label=
"手机号"
>
prop=
"receiver_phone"
label=
"手机号"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"收货地址"
>
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
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
<el-table-column
prop=
"teacher_name"
label=
"班级老师"
>
prop=
"teacher_name"
label=
"班级老师"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"create_time"
label=
"创建时间"
sortable
>
prop=
"create_time"
label=
"创建时间"
sortable
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"pay_time"
label=
"支付时间"
sortable
>
prop=
"pay_time"
label=
"支付时间"
sortable
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"desc"
label=
"备注"
>
prop=
"desc"
label=
"备注"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
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=
"bindTeacher(scope.row)"
size=
"mini"
plain
type=
"success"
>
绑定老师
</el-button>
-->
<!--
<el-button
@
click=
"bindTeacher(scope.row)"
size=
"mini"
plain
type=
"success"
>
绑定老师
</el-button>
-->
<el-button
@
click=
"editNote(scope.row.id, scope.row.desc)"
size=
"mini"
plain
type=
"primary"
>
编辑备注
</el-button>
<el-button
@
click=
"editNote(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"
/>
<el-dialog
:title=
"classObj.title"
:visible
.
sync=
"classObj.show"
center
width=
"800px"
>
<el-table
:data=
"classList"
>
<el-table-column
prop=
"teacher_name"
label=
"班级老师"
>
</el-table-column>
<el-table-column
prop=
"num"
label=
"班级人数"
>
</el-table-column>
</el-table>
<div
style=
"margin-top:20px;"
>
同步时间:{{last_pull_time}}
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
</span>
</el-dialog>
<teacher-dialog
:dialogObj=
"dialogObj"
></teacher-dialog>
<teacher-dialog
:dialogObj=
"dialogObj"
></teacher-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
page
from
'../framework/page'
import
page
from
"../framework/page"
;
import
teacherDialog
from
'./dialog'
import
teacherDialog
from
"./dialog"
;
import
{
getyunjiApi
,
getGoodsListApi
,
exportExcelApi
,
getTeacherListApi
,
orderDescApi
}
from
"../../service/api"
;
import
{
import
{
GOODSTYPE
}
from
"../../util/wordbook"
;
getyunjiApi
,
export
default
{
getGoodsListApi
,
exportExcelApi
,
getTeacherListApi
,
orderDescApi
}
from
"../../service/api"
;
import
{
GOODSTYPE
}
from
"../../util/wordbook"
;
export
default
{
name
:
"smsRecord"
,
name
:
"smsRecord"
,
components
:
{
components
:
{
page
,
page
,
teacherDialog
teacherDialog
},
},
data
()
{
data
()
{
return
{
return
{
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
limit
:
10
,
limit
:
10
,
useTypeList
:
[
useTypeList
:
[
{
{
user_buy
:
0
,
user_buy
:
0
,
value
:
'未绑定'
value
:
"未绑定"
},
},
{
{
user_buy
:
1
,
user_buy
:
1
,
value
:
'已绑定'
value
:
"已绑定"
},
}
],
],
searchFrom
:
{
searchFrom
:
{
goods_id
:
''
,
goods_id
:
""
,
mobile
:
''
,
mobile
:
""
,
order_id
:
''
,
order_id
:
""
,
teacher_id
:
''
,
teacher_id
:
""
,
payTime
:
[],
payTime
:
[],
syncTime
:[],
syncTime
:
[]
},
},
list
:
[],
list
:
[],
teacherList
:
[],
teacherList
:
[],
goodList
:
[],
goodList
:
[],
dialogObj
:
{
dialogObj
:
{
show
:
false
,
show
:
false
,
title
:
'绑定老师'
,
title
:
"绑定老师"
,
order_id
:
0
,
order_id
:
0
,
teacher_id
:
0
teacher_id
:
0
},
},
}
classObj
:{
show
:
false
,
title
:
"班级分布"
,
order_id
:
0
,
teacher_id
:
0
},
classList
:[],
last_pull_time
:
"无"
,
};
},
},
filters
:
{
filters
:
{
filterStatus
:
function
(
value
)
{
filterStatus
:
function
(
value
)
{
let
msg
=
''
;
let
msg
=
""
;
if
(
value
===
0
)
{
if
(
value
===
0
)
{
msg
=
'未绑定'
msg
=
"未绑定"
;
}
else
{
}
else
{
msg
=
"已绑定"
msg
=
"已绑定"
;
}
}
return
msg
;
return
msg
;
},
},
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
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
this
.
getGoodsOption
();
this
.
getGoodsOption
();
this
.
getTeacherList
();
this
.
getTeacherList
();
},
},
methods
:
{
methods
:
{
onPageChange
(
val
)
{
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
nowPage
=
val
;
this
.
getList
()
this
.
getList
();
},
},
getTeacherList
()
{
getTeacherList
()
{
let
json
=
{
let
json
=
{
page
:
1
,
page
:
1
,
limit
:
200
limit
:
200
}
};
getTeacherListApi
(
json
).
then
(
res
=>
{
getTeacherListApi
(
json
).
then
(
res
=>
{
this
.
teacherList
=
res
.
list
;
this
.
teacherList
=
res
.
list
;
});
});
},
},
onSizeChange
(
val
)
{
onSizeChange
(
val
)
{
this
.
nowPage
=
1
;
this
.
nowPage
=
1
;
this
.
limit
=
val
;
this
.
limit
=
val
;
this
.
getList
()
this
.
getList
();
},
},
getList
()
{
getList
()
{
let
json
=
{
let
json
=
{
limit
:
this
.
limit
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
,
page
:
this
.
nowPage
};
};
if
(
this
.
searchFrom
.
mobile
)
{
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
json
.
mobile
=
this
.
searchFrom
.
mobile
;
}
}
if
(
this
.
searchFrom
.
teacher_id
)
{
if
(
this
.
searchFrom
.
teacher_id
)
{
json
.
teacher_id
=
this
.
searchFrom
.
teacher_id
json
.
teacher_id
=
this
.
searchFrom
.
teacher_id
;
}
}
if
(
this
.
searchFrom
.
goods_name
)
{
if
(
this
.
searchFrom
.
goods_name
)
{
json
.
goods_name
=
this
.
searchFrom
.
goods_name
json
.
goods_name
=
this
.
searchFrom
.
goods_name
;
}
}
if
(
this
.
searchFrom
.
user_buy
||
this
.
searchFrom
.
user_buy
==
0
)
{
if
(
this
.
searchFrom
.
user_buy
||
this
.
searchFrom
.
user_buy
==
0
)
{
json
.
user_buy
=
this
.
searchFrom
.
user_buy
json
.
user_buy
=
this
.
searchFrom
.
user_buy
;
}
}
if
(
this
.
searchFrom
.
order_id
)
{
if
(
this
.
searchFrom
.
order_id
)
{
json
.
order_id
=
this
.
searchFrom
.
order_id
json
.
order_id
=
this
.
searchFrom
.
order_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
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
json
.
start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
start_at
=
this
.
searchFrom
.
payTime
[
0
];
json
.
end_at
=
this
.
searchFrom
.
payTime
[
1
]
json
.
end_at
=
this
.
searchFrom
.
payTime
[
1
];
}
}
if
(
this
.
searchFrom
.
syncTime
&&
this
.
searchFrom
.
syncTime
.
length
>
0
)
{
if
(
this
.
searchFrom
.
syncTime
&&
this
.
searchFrom
.
syncTime
.
length
>
0
)
{
json
.
pull_start_at
=
this
.
searchFrom
.
syncTime
[
0
]
json
.
pull_start_at
=
this
.
searchFrom
.
syncTime
[
0
];
json
.
pull_end_at
=
this
.
searchFrom
.
syncTime
[
1
]
json
.
pull_end_at
=
this
.
searchFrom
.
syncTime
[
1
];
}
}
getyunjiApi
(
json
).
then
((
res
)
=>
{
getyunjiApi
(
json
).
then
(
res
=>
{
console
.
log
(
res
.
list
)
console
.
log
(
res
.
list
);
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
list
=
res
.
list
?
res
.
list
:
[]
this
.
list
=
res
.
list
?
res
.
list
:
[];
})
console
.
log
(
res
)
this
.
classList
=
res
.
teacher
;
if
(
res
.
last_pull_time
){
this
.
last_pull_time
=
res
.
last_pull_time
;
}
});
},
},
getGoodsOption
()
{
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
;
})
});
},
},
bindTeacher
(
data
)
{
bindTeacher
(
data
)
{
this
.
dialogObj
=
{
this
.
dialogObj
=
{
show
:
true
,
show
:
true
,
title
:
'绑定老师'
,
title
:
"绑定老师"
,
id
:
data
.
id
,
id
:
data
.
id
,
teacher_id
:
data
.
teacher_id
teacher_id
:
data
.
teacher_id
}
};
},
},
editNote
(
id
,
desc
)
{
editNote
(
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
(()
=>
{
orderDescApi
({
desc
:
value
},
id
).
then
(
res
=>
{
orderDescApi
({
desc
:
value
},
id
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
"success"
,
message
:
'编辑备注成功'
message
:
"编辑备注成功"
});
});
this
.
getList
();
this
.
getList
();
});
});
});
});
})
});
},
},
exportTable
(
data
)
{
exportTable
(
data
)
{
if
(
data
.
length
>
0
)
{
if
(
data
.
length
>
0
)
{
let
json
=
{};
let
json
=
{};
if
(
this
.
searchFrom
.
order_id
)
{
if
(
this
.
searchFrom
.
order_id
)
{
json
.
order_id
=
this
.
searchFrom
.
order_id
json
.
order_id
=
this
.
searchFrom
.
order_id
;
}
}
if
(
this
.
searchFrom
.
user_buy
||
this
.
searchFrom
.
user_buy
==
0
)
{
if
(
this
.
searchFrom
.
user_buy
||
this
.
searchFrom
.
user_buy
==
0
)
{
json
.
user_buy
=
this
.
searchFrom
.
user_buy
json
.
user_buy
=
this
.
searchFrom
.
user_buy
;
}
}
if
(
this
.
searchFrom
.
mobile
)
{
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
json
.
mobile
=
this
.
searchFrom
.
mobile
;
}
}
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
.
teacher_id
)
{
if
(
this
.
searchFrom
.
teacher_id
)
{
json
.
teacher_id
=
this
.
searchFrom
.
teacher_id
json
.
teacher_id
=
this
.
searchFrom
.
teacher_id
;
}
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
)
{
json
.
start_at
=
this
.
searchFrom
.
payTime
[
0
]
json
.
start_at
=
this
.
searchFrom
.
payTime
[
0
];
json
.
end_at
=
this
.
searchFrom
.
payTime
[
1
]
json
.
end_at
=
this
.
searchFrom
.
payTime
[
1
]
;
}
}
if
(
this
.
searchFrom
.
syncTime
&&
this
.
searchFrom
.
syncTime
.
length
>
0
)
{
if
(
this
.
searchFrom
.
syncTime
&&
this
.
searchFrom
.
syncTime
.
length
>
0
)
{
json
.
pull_start_at
=
this
.
searchFrom
.
syncTime
[
0
]
json
.
pull_start_at
=
this
.
searchFrom
.
syncTime
[
0
]
;
json
.
pull_end_at
=
this
.
searchFrom
.
syncTime
[
1
]
json
.
pull_end_at
=
this
.
searchFrom
.
syncTime
[
1
];
}
}
exportExcelApi
(
`api/admin/yunji/order/export`
,
json
);
exportExcelApi
(
`api/admin/yunji/order/export`
,
json
);
}
}
},
},
classListOption
()
{
this
.
classObj
.
show
=
true
;
}
}
}
}
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.sms
{
.sms
{
padding
:
20px
0
;
padding
:
20px
0
;
}
}
.avatar
{
.avatar
{
width
:
50px
;
width
:
50px
;
min-width
:
50px
;
min-width
:
50px
;
margin-right
:
10px
;
margin-right
:
10px
;
height
:
50px
;
height
:
50px
;
border-radius
:
50%
;
border-radius
:
50%
;
}
}
</
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
;
align-items
:
center
;
align-items
:
center
;
}
}
</
style
>
</
style
>
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