Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
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
wangxuelai
wechatapp.shangjiadao.com
Commits
a7cd2ee9
Commit
a7cd2ee9
authored
Dec 10, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
46424907
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
131 additions
and
60 deletions
+131
-60
rollcallindex.js
business/pages/classservice/rollcallindex.js
+72
-4
rollcallindex.wxml
business/pages/classservice/rollcallindex.wxml
+33
-33
rollcallindex.wxss
business/pages/classservice/rollcallindex.wxss
+11
-3
classservice.js
service/business/classservice.js
+2
-2
index.js
src/pages/myclassrecord/index.js
+9
-14
infovideo.js
src/pages/websiteindex/infovideo.js
+0
-3
infovideo.wxss
src/pages/websiteindex/infovideo.wxss
+4
-1
No files found.
business/pages/classservice/rollcallindex.js
View file @
a7cd2ee9
...
...
@@ -4,7 +4,8 @@ import {
callsListPOST
,
schedulesDetailGet
,
callsListGet
,
leavesListGet
leavesListGet
,
leavesPUT
}
from
'../../../service/business/classservice.js'
import
{
studentsListGet
...
...
@@ -47,7 +48,9 @@ Page({
approvalDetailShow
:
false
,
leavesList
:[],
leavesListTotal
:
0
,
curLeaveDetail
:
''
unApprovalTotal
:
0
,
// 待处理
curLeaveDetail
:
''
,
showApprovalBox
:
true
},
/**
...
...
@@ -204,6 +207,9 @@ Page({
const
index
=
e
.
currentTarget
.
dataset
.
index
;
const
item
=
e
.
currentTarget
.
dataset
.
item
;
const
_callsList
=
this
.
data
.
callsList
;
if
(
item
.
fixed
&&
item
.
fixed
==
3
&&
index
!=
3
){
return
}
_callsList
.
find
((
ele
)
=>
ele
.
id
==
item
.
id
).
statusType
=
index
;
this
.
setData
({
callsList
:
_callsList
,
...
...
@@ -322,9 +328,12 @@ Page({
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
){
let
unApproval
=
data
.
list
.
filter
(
ele
=>
ele
.
status
==
1
).
length
||
0
;
this
.
setData
({
leavesList
:
data
.
list
,
leavesListTotal
:
data
.
total
leavesListTotal
:
data
.
total
,
unApprovalTotal
:
unApproval
,
showApprovalBox
:
unApproval
>
0
?
true
:
false
})
}
})
...
...
@@ -525,6 +534,14 @@ Page({
'otherPunishCount'
:
Number
(
_punishCount
)
-
1
})
},
hideApprovalDailog
(
e
){
const
{
flag
}
=
e
.
target
.
dataset
if
(
flag
){
this
.
setData
({
approvalDailogShow
:
false
})
}
},
hideApprovalDetail
(
e
){
const
{
flag
}
=
e
.
target
.
dataset
if
(
flag
){
...
...
@@ -538,5 +555,56 @@ Page({
this
.
setData
({
curLeaveDetail
:
item
})
}
if
(
item
.
status
==
1
)
{
this
.
setData
({
approvalDailogShow
:
true
,
curLeaveDetail
:
item
})
}
else
{
this
.
setData
({
approvalDetailShow
:
true
,
curLeaveDetail
:
item
})
}
},
approvalHandle
(
e
){
const
{
index
}
=
e
.
currentTarget
.
dataset
;
const
{
curLeaveDetail
,
otherPunishCount
,
leavesList
,
callsList
}
=
this
.
data
;
let
unApprovalTotal
=
this
.
data
.
unApprovalTotal
;
leavesPUT
({
status
:
index
,
expend
:
otherPunishCount
,
id
:
curLeaveDetail
.
id
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
){
wx
.
showToast
({
title
:
'审批成功'
,
icon
:
'success'
,
duration
:
2000
})
unApprovalTotal
-=
1
;
leavesList
.
find
((
ele
)
=>
{
return
ele
.
id
==
curLeaveDetail
.
id
}).
status
=
index
;
try
{
Object
.
assign
(
callsList
.
find
((
ele
)
=>
{
return
ele
.
id
==
curLeaveDetail
.
student
.
id
}),{
statusType
:
3
,
fixed
:
index
});
}
catch
(
error
)
{
}
this
.
setData
({
unApprovalTotal
,
leavesList
,
approvalDailogShow
:
false
,
callsList
})
}
})
},
goCallStudent
(){
if
(
this
.
data
.
unApprovalTotal
>
0
){
return
}
this
.
setData
({
showApprovalBox
:
false
})
},
})
\ No newline at end of file
business/pages/classservice/rollcallindex.wxml
View file @
a7cd2ee9
...
...
@@ -25,7 +25,7 @@
</view>
</view>
<view class="line-16"></view>
<
!-- <view class="student-list
">
<
view class="student-list" wx:if="{{!showApprovalBox}}
">
<view class="title-box">
<view class="left-box">
<view class="long-text">学员姓名</view>
...
...
@@ -38,9 +38,9 @@
</view>
</view>
<view class="" wx:if="{{!emptyPage}}">
<view class="list-item" wx:for="{{callsList}}" wx:key="{{index}}">
-->
<view class="list-item" wx:for="{{callsList}}" wx:key="{{index}}">
<!-- 来自点名详情 编辑 -->
<
!-- <
view class="item-left" wx:if="{{from=='rollcalldetail'}}">
<view class="item-left" wx:if="{{from=='rollcalldetail'}}">
<image class="avatar" src="{{filter.imagify(item.formal_school_student.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.formal_school_student.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="content" >
...
...
@@ -53,9 +53,9 @@
<view class="count-data">{{item.student_course?item.student_course.surplus:0}}</view>
</view>
</view>
</view>
-->
</view>
<!-- 来自上课点名 -->
<
!-- <
view class="item-left" wx:if="{{from!='rollcalldetail'}}">
<view class="item-left" wx:if="{{from!='rollcalldetail'}}">
<image class="avatar" src="{{filter.imagify(item.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="content">
...
...
@@ -102,29 +102,29 @@
<view class="empty-content-box" wx:else>
<empty-content text="{{searchName!=''?'查找结果为空~':'暂无数据~'}}" emptyimg="common/empty/empty_b.png"></empty-content>
</view>
</view>
-->
<view class="leave-examination-list">
<view class="title-box">有 {{
leavesList
Total}} 条请假审批需先处理</view>
</view>
<view class="leave-examination-list"
wx:if="{{showApprovalBox}}"
>
<view class="title-box">有 {{
unApproval
Total}} 条请假审批需先处理</view>
<view class="leave-student-list">
<view class="list-item" wx:for="{{
call
sList}}" wx:key="{{index}}">
<view class="list-item" wx:for="{{
leave
sList}}" wx:key="{{index}}">
<view class="left">
<view class="avatar">
<image class="" src="{{filter.imagify(item.
formal_school_student.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.formal_school_
student.avatar}}"></image>
<image class="" src="{{filter.imagify(item.
student.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.
student.avatar}}"></image>
<image class="" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
</view>
<view class="info">
<view class="nickname">
武剑奇
</view>
<view class="time">
2019.12.06 17:06
</view>
<view class="nickname">
{{item.student.name}}
</view>
<view class="time">
{{item.created_at}}
</view>
</view>
</view>
<view class="right">
<view class="status
">等审批
</view>
<view class="btn" bindtap="goApproval" data-item="{{item}}">
去处理
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"/></view>
<view class="status
{{(item.status == 3 || item.status == 4) ? 'status2' : ''}}">{{item.status == 1 ? '等审批' : (item.status == 3 ? '已通过' : '未通过')}}
</view>
<view class="btn" bindtap="goApproval" data-item="{{item}}">
{{item.status == 1 ? '去处理' : '查看详情'}}
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"/></view>
</view>
</view>
</view>
</view>
<
!-- <view class="footer-box
">
<
view class="footer-box" wx:if="{{!showApprovalBox}}
">
<view class="count-box">
<view class="count-item">
<view class="name">到课</view>
...
...
@@ -149,8 +149,8 @@
</form>
完成点名
</view>
</view>
-->
<view class="footer-box leave-footer-box">完成审批,继续点名</view>
</view>
<view class="footer-box leave-footer-box"
style="{{unApprovalTotal>0 ? 'background:rgba(230,230,230,1); color:rgba(147,147,147,1);' : ''}}" bindtap="goCallStudent" wx:if="{{showApprovalBox}}"
>完成审批,继续点名</view>
<view class="dailog" wx:if="{{sureDailogShow}}">
<view class="mask"></view>
...
...
@@ -179,26 +179,26 @@
</view>
</view>
</view>
<view class="approval-dailog" wx:if="{{approvalDailogShow}}">
<view class="approval-dailog" wx:if="{{approvalDailogShow}}"
bindtap="hideApprovalDailog" data-flag="{{1}}"
>
<view class="content-box">
<view class="student-info">
<view class="left">
<view class="avatar">
<image class="" src="{{filter.imagify(
item.formal_school_student.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.formal_school_
student.avatar}}"></image>
<image class="" src="{{filter.imagify(
curLeaveDetail.student.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{curLeaveDetail.
student.avatar}}"></image>
<image class="" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
</view>
<view class="name-box">
<view class="name">
武剑奇
</view>
<view class="phone">
1873511365
</view>
<view class="name">
{{curLeaveDetail.student.name}}
</view>
<view class="phone">
{{curLeaveDetail.student.mobile}}
</view>
</view>
</view>
<view class="right">
<view class="count">
120
</view>
<view class="count">
{{curLeaveDetail.student.leave_count}}
</view>
<view class="count-name">历史请假 (次)</view>
</view>
</view>
<view class="leave-reason">请假原因:
家里有事情
</view>
<view class="approval-time">申请时间:
2019.12.06 17:06
</view>
<view class="leave-reason">请假原因:
{{curLeaveDetail.content}}
</view>
<view class="approval-time">申请时间:
{{curLeaveDetail.created_at}}
</view>
<view class="class-hour punish">
<view class="label">额外扣除课时:</view>
<view class="ipt-box">
...
...
@@ -209,8 +209,8 @@
</view>
</view>
<view class="footer-btn">
<view class="btn-box">驳回申请</view>
<view class="btn-box sure">通过申请</view>
<view class="btn-box"
data-index="{{4}}" bindtap="approvalHandle"
>驳回申请</view>
<view class="btn-box sure"
data-index="{{3}}" bindtap="approvalHandle"
>通过申请</view>
</view>
</view>
</view>
...
...
@@ -219,22 +219,22 @@
<view class="student-info">
<view class="left">
<view class="avatar">
<image class="" src="{{filter.imagify(
item.formal_school_student.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.formal_school_
student.avatar}}"></image>
<image class="" src="{{filter.imagify(
curLeaveDetail.student.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{curLeaveDetail.
student.avatar}}"></image>
<image class="" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
</view>
<view class="name-box">
<view class="name">
武剑奇
</view>
<view class="phone">
1873511365
</view>
<view class="name">
{{curLeaveDetail.student.name}}
</view>
<view class="phone">
{{curLeaveDetail.student.mobile}}
</view>
</view>
</view>
<view class="right">
<view class="count">
120
</view>
<view class="count">
{{curLeaveDetail.student.leave_count}}
</view>
<view class="count-name">历史请假 (次)</view>
</view>
</view>
<view class="leave-reason">请假原因:
家里有事情
</view>
<view class="approval-time">申请时间:
2019.12.06 17:06
</view>
<view class="other-punish">额外扣除课时:
8
</view>
<view class="leave-reason">请假原因:
{{curLeaveDetail.content}}
</view>
<view class="approval-time">申请时间:
{{curLeaveDetail.created_at}}
</view>
<view class="other-punish">额外扣除课时:
{{curLeaveDetail.expend}}
</view>
<view class="pass-flag">
<view class="text">已通过</view>
</view>
...
...
business/pages/classservice/rollcallindex.wxss
View file @
a7cd2ee9
...
...
@@ -501,16 +501,24 @@
.leave-examination-list .leave-student-list .list-item .right .status{
width:84rpx;
height:40rpx;
background:rgba(
101,184,244
,.15);
background:rgba(
255,77,77
,.15);
border-radius:6rpx;
font-size:24rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(
101,184,244
,1);
color:rgba(
255,77,77
,1);
line-height:40rpx;
text-align: center;
margin-right: 40rpx;
}
.leave-examination-list .leave-student-list .list-item .right .status2{
background:rgba(101,184,244,0.15);
color:rgba(101,184,244,1);
}
.leave-examination-list .leave-student-list .list-item .right .status3{
background:rgba(101,184,244,0.15);
color:rgba(101,184,244,1);
}
.leave-examination-list .leave-student-list .list-item .right .btn{
display: flex;
align-items: center;
...
...
@@ -609,7 +617,7 @@
font-weight:400;
color:rgba(0,0,0,1);
line-height: 30rpx;
padding: 55rpx
0
30rpx 32rpx;
padding: 55rpx
30rpx
30rpx 32rpx;
border-bottom: 1px solid rgba(0,0,0,.05);
}
.approval-dailog .content-box .approval-time{
...
...
service/business/classservice.js
View file @
a7cd2ee9
...
...
@@ -205,7 +205,7 @@ function leavesListGet (data) {
function
leavesPUT
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
`
${
apis
.
business
.
classservice
.
leaves
}${
data
.
id
}
`
,
url
:
`
${
apis
.
business
.
classservice
.
leaves
}
/
${
data
.
id
}
`
,
data
,
method
:
'PUT'
,
errorresolve
:
1
,
...
...
@@ -214,7 +214,7 @@ function leavesPUT (data) {
function
leavesDetailGet
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
`
${
apis
.
business
.
classservice
.
leaves
}${
data
.
id
}
`
,
url
:
`
${
apis
.
business
.
classservice
.
leaves
}
/
${
data
.
id
}
`
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
...
...
src/pages/myclassrecord/index.js
View file @
a7cd2ee9
...
...
@@ -191,29 +191,24 @@ Page({
transformList
(
list
){
var
list_middle
=
[]
;
var
list_middle
=
{}
;
for
(
var
i
in
list
)
{
var
d
=
list
[
i
];
var
date
=
d
.
schedule
.
call_time
.
slice
(
0
,
7
);
if
(
list_middle
.
hasOwnProperty
(
date
))
{
list_middle
[
date
].
push
(
d
);
}
else
{
list_middle
[
date
]
=
[
d
]
if
(
d
.
schedule
){
var
date
=
d
.
schedule
.
call_time
.
slice
(
0
,
7
);
if
(
list_middle
.
hasOwnProperty
(
date
))
{
list_middle
[
date
].
push
(
d
);
}
else
{
list_middle
[
date
]
=
[
d
]
}
}
}
var
list_after
=
[];
for
(
var
i
in
list_middle
)
{
var
d
=
list_middle
[
i
];
if
(
d
.
length
>
0
)
{
// for(var i in d){
// var m = d[i].start_time.slice(4,10).split('-');
// var startT = d[i].start_time.slice(11,16);
// var endT = d[i].end_time.slice(11,16);
// var newMonth = m[1]+'月'+m[2]+'日';
// }
list_after
.
push
({
month
:
i
,
statics
:
d
});
}
}
...
...
src/pages/websiteindex/infovideo.js
View file @
a7cd2ee9
...
...
@@ -361,7 +361,6 @@ Page({
}
else
{
text
=
Math
.
floor
(
time
/
(
60
*
60
*
24
))
+
'天前'
;
}
return
item
.
info
.
nickname
+
''
+
text
+
'查看了机构'
})
},
()
=>
{
...
...
@@ -381,8 +380,6 @@ Page({
})
}
else
{}
}).
catch
(()
=>
{})
},
commentscrollbottom
()
{
this
.
getCommentList
(
'up'
);
...
...
src/pages/websiteindex/infovideo.wxss
View file @
a7cd2ee9
...
...
@@ -313,9 +313,12 @@
0% {
opacity: 0;
}
8
0% {
2
0% {
opacity: 1;
}
80% {
opacity: 1;
}
100%{
opacity: 0;
}
...
...
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