diff --git a/src/js/api.js b/src/js/api.js
index b921601..e67cb4a 100644
--- a/src/js/api.js
+++ b/src/js/api.js
@@ -32,6 +32,7 @@ API['course'] = {
API['approve'] = {
getApproveList: `${ORIGIN}/stadium/coach/getApproveList`, // 小程序-课程列表
+ handleApprove: `${ORIGIN}/stadium/coach/handleApprove`, // 小程序-处理审批
}
export default { ORIGIN, API };
diff --git a/src/pages/approve/list/list.vue b/src/pages/approve/list/list.vue
index 01cca96..d479927 100644
--- a/src/pages/approve/list/list.vue
+++ b/src/pages/approve/list/list.vue
@@ -4,51 +4,52 @@
预约审批
- 99
+
请假审批
- 99
+
换班审批
- 99
+
- 审核人数:3人
+ 审核人数: 0人
审批记录
-
-
+
+
抱歉,没有相关课程订单信息...
-
+
-
- 胡可课
+
+ {{e.user_name || '-'}}
- 羽毛球课程(羽毛球课)
+ {{e.course_name || '-'}}
- 2020-08-22 10:30
+ {{k || '-'}}
-
- 通过
+
+
+
原因:
- 作业内容作业内容作业内容作业内容作业内容作业内容作业内容作业内容作业内容作业内…
+ {{e.for_leave_reason || '-'}}
@@ -61,12 +62,13 @@
-
- 全选
+
+
+ 全选
- 不同意
- 同意
+ 不同意
+ 同意
@@ -80,6 +82,12 @@ import { mapState } from 'vuex';
export default {
computed: {
...mapState([ 'storeInfo' ]),
+ isSelectAll(){
+ let { approveList } = this;
+ if(approveList.length<=0)return false;
+ let bolArr = approveList.map(e=>!!e.defineSelected);
+ return !bolArr.includes(false);
+ }
},
data(){
return {
@@ -91,14 +99,58 @@ export default {
this.getApproveList();
},
methods: {
+ selectAll(){
+ let { isSelectAll } = this;
+ let _list = [...this.approveList];
+ if(_list.length<=0)return
+ console.warn(this.isSelectAll)
+ this.approveList = _list.map(e=>{
+ return {
+ ...e,
+ defineSelected: !this.isSelectAll,
+ }
+ })
+ console.warn(this.approveList)
+ },
+ selectItem(index){
+ let _list = [...this.approveList];
+ _list[index].defineSelected = !_list[index].defineSelected;
+ this.approveList = _list;
+ },
+ handleApprove: util.debounce(function(status){
+ let { approveList } = this;
+ let _selectedArr = approveList.filter(ele=>{
+ return ele.defineSelected
+ })
+ if(_selectedArr.length<=0)return;
+ servers.post({
+ url: API.approve.handleApprove,
+ data: {
+ status,
+ approve_ids: _selectedArr.map(item=>item.id || ''),
+ },
+ isDefaultGet: false,
+ })
+ .then(res=>{
+ if(res.data.code == 0){
+ util.showNone(res.data.message || '操作成功!');
+ setTimeout(_=> util.routeTo(), 1200);
+ }else{
+ util.showNone(res.data.message || '操作失败!');
+ }
+ })
+ }, 300, 300),
tabChange(i){
+ this.approveList = [];
this.tabIdx = i;
+ this.getApproveList(i);
},
toRecord(){
util.routeTo(`/pages/approve/record/record`,'nT');
},
getApproveList(approve_type = 0){
let { storeInfo } = this;
+ util.showLoad();
servers.get({
url: API.approve.getApproveList,
data: {
@@ -109,7 +161,8 @@ export default {
failMsg: '加载失败!'
})
.then(res=>{
- let _list = res.list || [];
+ util.hideLoad();
+ let _list = res.list || [{},{}];
this.approveList = _list;
console.warn('approve list --->', res);
})
@@ -178,7 +231,6 @@ export default {
.l-bar{
padding: 0 50upx;
height: 92upx;
- background-color: yellowgreen;
@include centerFlex(space-between);
>view{
font-size: 28upx;
@@ -197,6 +249,7 @@ export default {
.l-list{
padding: 0 24upx;
.l-item{
+ margin-bottom: 24upx;
padding: 24upx;
background-color: #fff;
.l-content{
@@ -211,7 +264,6 @@ export default {
width: 100upx;
height: 100upx;
border-radius: 50%;
- background-color: skyblue;
}
>view{
max-width: 120upx;
@@ -242,10 +294,10 @@ export default {
height: 36upx;
border: 2upx solid #9a9a9d;
border-radius: 50%;
- >image{
- width: 100%;
- height: 100%;
- }
+ }
+ .s-img{
+ width: 36upx;
+ height: 36upx;
}
.s-txt{
font-size: 28upx;
@@ -301,7 +353,6 @@ export default {
display: block;
width: 346upx;
height: 346upx;
- background-color: skyblue;
}
>view{
text-align: center;
@@ -327,12 +378,18 @@ export default {
color: #333;
@include centerFlex(flex-start);
>view{
- margin-right: 14upx;
width: 36upx;
height: 36upx;
border-radius: 50%;
border: 2upx solid #9a9a9d;
}
+ >image{
+ width: 36upx;
+ height: 36upx;
+ }
+ >text{
+ margin-left: 14upx;
+ }
}
.bb-btns{
diff --git a/src/pages/approve/record/record.vue b/src/pages/approve/record/record.vue
index 50a8ce4..f34cd28 100644
--- a/src/pages/approve/record/record.vue
+++ b/src/pages/approve/record/record.vue
@@ -4,24 +4,24 @@
预约审批
- 99
+
请假审批
- 99
+
换班审批
- 99
+
-
+
@@ -55,17 +55,46 @@
@@ -125,6 +154,7 @@ export default {
.r-list{
padding: 0 24upx;
.l-item{
+ margin-bottom: 24upx;
padding: 24upx;
background-color: #fff;
.l-content{
diff --git a/src/pages/course/class_list/class_list.vue b/src/pages/course/class_list/class_list.vue
index e84184d..1326fa8 100644
--- a/src/pages/course/class_list/class_list.vue
+++ b/src/pages/course/class_list/class_list.vue
@@ -19,7 +19,7 @@
学员
- 点名
+ 点名
作业
@@ -47,6 +47,18 @@ export default {
this.getClassList(_query.course_id)
},
methods: {
+ toRollCall(e){
+ return util.showNone('开发中');
+ console.warn(e);
+ let { optionsQuery } = this;
+ let _query = {
+ ...optionsQuery,
+ class_id: e.id,
+ class_name: e.class_name,
+ }
+ console.log(e,'eeeeee')
+ util.routeTo(`/pages/course/roll_call/roll_call?query=${util.jsonStr(_query)}`, 'nT');
+ },
toTask(e){
let { optionsQuery } = this;
let _query = {
diff --git a/src/pages/course/roll_call/roll_call.vue b/src/pages/course/roll_call/roll_call.vue
index ce8418e..f3b5089 100644
--- a/src/pages/course/roll_call/roll_call.vue
+++ b/src/pages/course/roll_call/roll_call.vue
@@ -1,29 +1,31 @@
- 12
+ {{optionsQuery.course_name || '-'}}
-
+
-
-
-
+
+
+
+
+
- Adjoin
-
+ {{e.name || '-'}}
+
- 12345679083
-
+ {{e.mobile || '-'}}
+
- 剩余次数: 10次
+ 剩余次数: {{e.number || 0}}次
未点名
@@ -33,8 +35,55 @@
@@ -77,7 +126,10 @@ export default {
margin-right: 26upx;
width: 40upx;
height: 40upx;
- background-color: skyblue;
+ >image{
+ width: 100%;
+ height: 100%;
+ }
}
.ri-avatar{
flex-shrink: 0;
@@ -86,7 +138,6 @@ export default {
width: 116upx;
height: 116upx;
border-radius: 50%;
- background-color: skyblue;
}
.ri-content{
flex-grow: 1;
@@ -108,7 +159,6 @@ export default {
margin-left: 12upx;
width: 36upx;
height: 36upx;
- background-color: skyblue;
}
}
.ri-phone{
diff --git a/src/pages/course/student_list/student_list.vue b/src/pages/course/student_list/student_list.vue
index f61ba87..840b7c8 100644
--- a/src/pages/course/student_list/student_list.vue
+++ b/src/pages/course/student_list/student_list.vue
@@ -15,7 +15,7 @@
{{e.mobile || '-'}}
-
+
剩余次数: {{e.number || 0}}次
@@ -62,6 +62,11 @@ export default {
})
},
methods: {
+ phoneCall(num){
+ uni.makePhoneCall({
+ phoneNumber: num || '-'
+ })
+ },
toReview(e){
let { optionsQuery } = this;
let _query = {
diff --git a/src/pages/course/task_finish/task_finish.vue b/src/pages/course/task_finish/task_finish.vue
index a49ab29..2743c76 100644
--- a/src/pages/course/task_finish/task_finish.vue
+++ b/src/pages/course/task_finish/task_finish.vue
@@ -62,12 +62,13 @@ export default {
methods: {
remindAll: util.debounce(function(){
let { optionsQuery, finishList } = this;
- console.warn(optionsQuery)
+ console.warn(optionsQuery, 'optionsQuery')
+ console.warn(finishList, 'finishList')
servers.post({
url: API.course.homeworkRemind,
data: {
homework_id: optionsQuery.homework_id,
- homework_record_ids: finishList.map(e=>e.id),
+ homework_record_ids: finishList.map(e=>e.record.id),
},
isDefaultGet: false,
})
diff --git a/src/static/images/no_result.png b/src/static/images/no_result.png
new file mode 100644
index 0000000..6fe895b
Binary files /dev/null and b/src/static/images/no_result.png differ
diff --git a/src/static/images/selected_c97.png b/src/static/images/selected_c97.png
new file mode 100644
index 0000000..cacc64c
Binary files /dev/null and b/src/static/images/selected_c97.png differ