Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.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
biz.qingxiao.com
Commits
c19c757c
Commit
c19c757c
authored
Dec 04, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
924e2ff8
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
268 additions
and
71 deletions
+268
-71
index.html
index.html
+1
-1
CallStudents.js
src/components/CallStudents.js
+28
-4
PlanCourse.js
src/components/PlanCourse.js
+15
-15
classrecord.js
src/models/classrecord.js
+6
-1
indexstaic.js
src/models/indexstaic.js
+4
-4
students.js
src/models/students.js
+0
-2
teachersinfo.js
src/models/teachersinfo.js
+5
-2
index.js
src/pages/classdetail/index.js
+1
-0
index.js
src/pages/classrecord/index.js
+96
-10
index.less
src/pages/classrecord/index.less
+1
-0
index.js
src/pages/index/index.js
+12
-1
RenewEdit.js
src/pages/student/RenewEdit.js
+6
-4
RepeatStudent.js
src/pages/student/RepeatStudent.js
+1
-0
eliminateEdit.js
src/pages/student/eliminateEdit.js
+40
-11
index.js
src/pages/student/index.js
+20
-5
index.js
src/pages/studentinfo/index.js
+1
-1
index.js
src/pages/teacherinfo/index.js
+14
-10
index.less
src/pages/teacherinfo/index.less
+17
-0
No files found.
index.html
View file @
c19c757c
...
...
@@ -17,6 +17,6 @@
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"dist/main.js?1575
374432412
"
charset=
"utf-8"
></script>
<script
src=
"dist/main.js?1575
457876256
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/components/CallStudents.js
View file @
c19c757c
...
...
@@ -631,10 +631,22 @@ class CallStudentsForm extends React.Component {
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课日期:
<
/span
>
<
span
className
=
{
pageStyle
.
detaildesc
}
>
{
callStudentSchedule
.
start_date
}
<
/span
>
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
}}
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
,
display
:
'flex'
}}
>
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课老师:
<
/span
>
{
callStudentSchedule
.
school_teacher
&&
callStudentSchedule
.
school_teacher
.
nickname
&&
<
span
className
=
{
pageStyle
.
detaildesc
}
>
{
callStudentSchedule
.
school_teacher
.
nickname
}
<
/span
>
<
span
style
=
{{
width
:
'100px'
,
display
:
'block'
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
}}
className
=
{
pageStyle
.
detaildesc
}
title
=
{
callStudentSchedule
.
school_teacher
.
nickname
}
>
{
callStudentSchedule
.
school_teacher
.
nickname
}
<
/span
>
}
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
}}
>
...
...
@@ -668,10 +680,22 @@ class CallStudentsForm extends React.Component {
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课日期:
<
/span
>
<
span
className
=
{
pageStyle
.
detaildesc
}
>
{
callStudentSchedule
.
start_date
}
<
/span
>
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
}}
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
,
display
:
'flex'
}}
>
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课老师:
<
/span
>
{
callStudentSchedule
.
school_teacher
&&
callStudentSchedule
.
school_teacher
.
nickname
&&
<
span
className
=
{
pageStyle
.
detaildesc
}
>
{
callStudentSchedule
.
school_teacher
.
nickname
}
<
/span
>
<
span
style
=
{{
width
:
'100px'
,
display
:
'block'
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
}}
className
=
{
pageStyle
.
detaildesc
}
title
=
{
callStudentSchedule
.
school_teacher
.
nickname
}
>
{
callStudentSchedule
.
school_teacher
.
nickname
}
<
/span
>
}
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
}}
>
...
...
src/components/PlanCourse.js
View file @
c19c757c
...
...
@@ -177,20 +177,20 @@ class classRoomMgt extends React.Component {
}
classChange
=
(
e
)
=>
{
const
{
classList
,
dispatch
,
form
}
=
this
.
props
;
let
teacherList
=
[];
//
let teacherList = [];
form
.
resetFields
(
'teacher_id'
);
if
(
!
e
)
{
teacherList
=
[];
}
else
{
const
currentClass
=
classList
.
find
(
ele
=>
ele
.
id
==
e
);
teacherList
=
currentClass
?
currentClass
.
school_teachers
||
[]
:
[];
}
dispatch
({
type
:
'plancourse/updateState'
,
payload
:
{
teacherList
,
},
});
//
if (!e) {
//
teacherList = [];
//
} else {
//
const currentClass = classList.find(ele => ele.id == e);
//
teacherList = currentClass ? currentClass.school_teachers || [] : [];
//
}
//
dispatch({
//
type: 'plancourse/updateState',
//
payload: {
//
teacherList,
//
},
//
});
}
render
()
{
const
{
...
...
@@ -643,7 +643,7 @@ function mapStateToProps(state) {
calendarData
,
selectPlanDays
,
currentTimestamp
,
teacherList
,
//
teacherList,
classList
,
widthClassSelect
,
}
=
state
.
plancourse
;
...
...
@@ -657,7 +657,7 @@ function mapStateToProps(state) {
calendarData
,
selectPlanDays
,
currentTimestamp
,
teacherList
,
//
teacherList,
classList
,
widthClassSelect
,
};
...
...
src/models/classrecord.js
View file @
c19c757c
...
...
@@ -39,6 +39,7 @@ export default {
perPage
:
10
,
schedule_id
:
0
,
},
datetime
:
''
,
callStudentTotal
:
0
,
},
subscriptions
:
{
...
...
@@ -84,7 +85,8 @@ export default {
const
newParams
=
Object
.
assign
(
recordParams
,
params
,
{
school_id
:
sid
,
// teacher_id: schoolUserInfo.id,
my
:
LocalStorage
.
getItem
(
'role'
)
==
1
?
1
:
''
,
my_class
:
LocalStorage
.
getItem
(
'role'
)
==
1
?
1
:
''
,
end_time
:
params
.
end_time
?
params
.
end_time
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
});
let
newTotal
=
recordTotal
;
const
data
=
yield
call
(
classRecordAjax
.
getRecordList
,
newParams
);
...
...
@@ -99,6 +101,7 @@ export default {
recordList
:
data
.
data
&&
data
.
data
.
list
,
recordTotal
:
newTotal
,
recordParams
:
{
...
newParams
},
datetime
:
data
.
datetime
,
},
});
}
else
{
...
...
@@ -106,6 +109,7 @@ export default {
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
datetime
:
data
.
datetime
,
},
});
}
...
...
@@ -310,6 +314,7 @@ export default {
perPage
:
10
,
schedule_id
:
0
,
},
callStudentTotal
:
0
,
},
});
},
...
...
src/models/indexstaic.js
View file @
c19c757c
...
...
@@ -183,15 +183,15 @@ export default {
yield
put
(
routerRedux
.
push
(
'/sjd/student'
));
},
*
goCallStudent
({
payload
},
{
call
,
put
,
select
})
{
const
{
classListQueryParams
}
=
yield
select
(
state
=>
state
.
classmgt
);
classListQueryParams
.
miss_call_day
=
7
;
const
{
recordParams
}
=
yield
select
(
state
=>
state
.
classrecord
);
recordParams
.
status
=
2
;
yield
put
({
type
:
'updateState'
,
payload
:
{
classListQueryParams
:
{
...
classListQuery
Params
},
recordParams
:
{
...
record
Params
},
},
});
yield
put
(
routerRedux
.
push
(
'/sjd/
classmgt
'
));
yield
put
(
routerRedux
.
push
(
'/sjd/
record
'
));
},
*
goPlanClass
({
payload
},
{
call
,
put
,
select
})
{
const
{
classListQueryParams
}
=
yield
select
(
state
=>
state
.
classmgt
);
...
...
src/models/students.js
View file @
c19c757c
...
...
@@ -558,7 +558,6 @@ export default {
});
setTimeout
(
loadmessage
);
if
(
data
.
code
==
200
)
{
console
.
log
(
data
.
data
.
name
,
'data'
);
if
(
params
&&
params
.
type
===
'index'
)
{
yield
put
(
routerRedux
.
push
(
'/sjd/student'
));
yield
put
({
...
...
@@ -569,7 +568,6 @@ export default {
});
yield
delay
(
350
);
}
console
.
log
(
params
,
'params'
);
if
(
params
&&
params
.
type
===
'sureAdd'
)
{
yield
delay
(
300
);
}
...
...
src/models/teachersinfo.js
View file @
c19c757c
...
...
@@ -248,7 +248,7 @@ export default {
type
:
'selectCourseStatistical'
,
payload
:
{
params
:
{
end_time
:
moment
().
format
(
'YYYY-MM-DD'
)
,
end_time
:
''
,
},
},
});
...
...
@@ -694,7 +694,10 @@ export default {
teacher_id
:
teacherId
,
});
let
newTotal
=
courseStaticTotal
;
const
data
=
yield
call
(
teachersAjax
.
selectCourseStatistical
,
newParams
);
const
data
=
yield
call
(
teachersAjax
.
selectCourseStatistical
,
{
...
newParams
,
end_time
:
params
.
end_time
?
params
.
end_time
:
moment
().
format
(
'YYYY-MM-DD'
),
});
if
(
data
.
code
==
200
)
{
if
(
data
.
data
.
total
!=
undefined
)
{
newTotal
=
data
.
data
.
total
;
...
...
src/pages/classdetail/index.js
View file @
c19c757c
...
...
@@ -1459,6 +1459,7 @@ class ClassDetailForm extends React.Component {
classroomMgt
=
{
this
.
classroomMgt
}
addCourseTime
=
{
this
.
addCourseTime
}
manageCourseTime
=
{
this
.
manageCourseTime
}
teacherList
=
{
teacherList
||
[]}
classId
=
{
classId
}
saveSubmit
=
{
this
.
plancoursesaveSubmit
}
timeArr
=
{
timeArr
}
...
...
src/pages/classrecord/index.js
View file @
c19c757c
...
...
@@ -17,11 +17,13 @@ import {
Tag
,
Badge
,
Tooltip
,
message
,
}
from
'antd'
;
import
moment
from
'moment'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
,
hasBtnPower
,
DayCount
,
pricify
}
from
'../../utils/index'
;
import
course
from
'../../models/course'
;
import
CallStudents
from
'../../components/CallStudents'
;
const
{
Option
}
=
Select
;
const
FormItem
=
Form
.
Item
;
const
{
RangePicker
}
=
DatePicker
;
...
...
@@ -82,8 +84,8 @@ class StaticCenter extends React.Component {
let
start_time
;
let
end_time
;
if
(
time
)
{
start_time
=
moment
(
time
[
0
]).
format
(
'YYYY-MM-DD'
)
;
end_time
=
moment
(
time
[
1
]).
format
(
'YYYY-MM-DD'
)
;
start_time
=
(
time
[
0
]
&&
moment
(
time
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
))
||
''
;
end_time
=
(
time
[
1
]
&&
moment
(
time
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
))
||
''
;
delete
[
'time'
];
}
dispatch
({
...
...
@@ -158,6 +160,75 @@ class StaticCenter extends React.Component {
disabledDate
=
(
current
)
=>
{
return
current
&&
current
>
moment
();
}
toCallStudents
=
(
schedule
)
=>
{
const
{
dispatch
,
datetime
,
classStudentTotal
,
}
=
this
.
props
;
if
(
schedule
.
class
.
graduation_status
==
2
)
{
Modal
.
warn
({
title
:
'已结业班级不允许点名'
,
});
return
;
}
if
(
new
Date
(
datetime
.
replace
(
/-/g
,
'/'
)).
getTime
()
-
new
Date
(
schedule
.
start_time
.
replace
(
/-/g
,
'/'
)).
getTime
()
<
(
-
2
*
3600
*
1000
))
{
message
.
error
(
' 开课前两小时才能点名'
);
return
;
}
dispatch
({
type
:
'callstudents/updateState'
,
payload
:
{
callStudentsShow
:
true
,
expend
:
schedule
.
class
.
expend
,
copyExpend
:
schedule
.
class
.
expend
,
courseId
:
schedule
.
course_id
,
classroomId
:
schedule
.
class_room_id
,
classId
:
schedule
.
class_id
,
canAddStudent
:
true
,
rule_leave
:
(
schedule
.
course
&&
schedule
.
course
.
rule_leave
)
||
1
,
rule_absent
:
(
schedule
.
course
&&
schedule
.
course
.
rule_absent
)
||
1
,
},
});
dispatch
({
type
:
'callstudents/queryCallStudentList'
,
payload
:
{
callStudentSchedule
:
schedule
,
callType
:
1
,
},
});
}
toEditCallStudents
=
(
schedule
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'callstudents/updateState'
,
payload
:
{
callStudentsShow
:
true
,
expend
:
schedule
.
class
.
expend
,
copyExpend
:
schedule
.
class
.
expend
,
courseId
:
schedule
.
course_id
,
classroomId
:
schedule
.
class_room_id
,
classId
:
schedule
.
class_id
,
canAddStudent
:
false
,
rule_leave
:
(
schedule
.
course
&&
schedule
.
course
.
rule_leave
)
||
1
,
rule_absent
:
(
schedule
.
course
&&
schedule
.
course
.
rule_absent
)
||
1
,
},
});
dispatch
({
type
:
'callstudents/queryEditCallStudentList'
,
payload
:
{
callStudentSchedule
:
schedule
,
callType
:
1
,
},
});
}
saveCallStudents
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classrecord/selectRecord'
,
payload
:
{
params
:
{},
},
});
}
render
()
{
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
...
...
@@ -235,7 +306,7 @@ class StaticCenter extends React.Component {
dataIndex
:
'call_teacher'
,
key
:
'call_teacher'
,
render
:
(
text
,
record
)
=>
{
return
<
div
>
{
record
.
nickname
||
'-'
}
<
/div>
;
return
<
div
>
{
(
record
.
call_teacher
&&
record
.
call_teacher
.
nickname
)
||
'-'
}
<
/div>
;
},
},
{
...
...
@@ -257,7 +328,7 @@ class StaticCenter extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
record
.
class_student_sign_count
}
/{record.class_student_count
}
{
!
record
.
call_time
?
<
span
>-
/{record.class_student_count}</
span
>
:
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
showCallDetail
(
record
)}
>
{
record
.
class_student_sign_count
}
/{record.class_student_count}</
span
>
}
<
/div
>
);
},
...
...
@@ -269,7 +340,7 @@ class StaticCenter extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
!
record
.
call_time
?
<
div
className
=
{
pageStyle
.
sizeColor1
}
><
Badge
color
=
"#FF3434"
/>
未点名
<
/div> : <div className={pageStyle.sizeColor2} onClick={
()
=> this.showCallDetail
(
record
)
}><Badge color="#7BD762" /
>
已点名
<
/div>
}
{
!
record
.
call_time
?
<
div
className
=
{
pageStyle
.
sizeColor1
}
onClick
=
{()
=>
this
.
toCallStudents
(
record
)}
><
Badge
color
=
"#FF3434"
/>
未点名
<
/div> : <div className={pageStyle.sizeColor2} onClick={
()
=> this.toEditCallStudents
(
record
)
}><Badge color="#7BD762" /
>
已点名
<
/div>
}
<
/div
>
);
},
...
...
@@ -364,7 +435,9 @@ class StaticCenter extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"班级"
>
{
getFieldDecorator
(
'class_id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'class_id'
,
{
initialValue
:
recordParams
.
class_id
,
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
classList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
...
...
@@ -374,7 +447,9 @@ class StaticCenter extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"点名状态"
>
{
getFieldDecorator
(
'status'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'status'
,
{
initialValue
:
recordParams
.
status
,
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
<
Option
value
=
{
1
}
>
已点名
<
/Option
>
...
...
@@ -385,7 +460,9 @@ class StaticCenter extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"课程"
>
{
getFieldDecorator
(
'course_id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'course_id'
,
{
initialValue
:
recordParams
.
course_id
,
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
courseList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
...
...
@@ -397,7 +474,9 @@ class StaticCenter extends React.Component {
schoolUserInfo
.
type
===
2
&&
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"老师"
>
{
getFieldDecorator
(
'teacher_id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'teacher_id'
,
{
initialValue
:
recordParams
.
teacher_id
,
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
teacherList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
nickname
}
<
/Option>
)
}
...
...
@@ -408,7 +487,9 @@ class StaticCenter extends React.Component {
}
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"教室"
>
{
getFieldDecorator
(
'class_room_id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'class_room_id'
,
{
initialValue
:
recordParams
.
class_room_id
,
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
roomList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
...
...
@@ -481,6 +562,9 @@ class StaticCenter extends React.Component {
)}
/
>
<
/Modal
>
<
CallStudents
callBack
=
{
this
.
saveCallStudents
}
/
>
<
/div
>
);
}
...
...
@@ -504,6 +588,7 @@ function mapStateToProps(state) {
callStudentList
,
callDetailShow
,
queryCallStudentListParams
,
datetime
,
}
=
state
.
classrecord
;
const
{
schoolUserInfo
}
=
state
.
webapp
;
return
{
...
...
@@ -520,6 +605,7 @@ function mapStateToProps(state) {
callDetailShow
,
queryCallStudentListParams
,
schoolUserInfo
,
datetime
,
};
}
export
default
connect
(
mapStateToProps
)(
staticForm
);
...
...
src/pages/classrecord/index.less
View file @
c19c757c
...
...
@@ -12,6 +12,7 @@
font-size:14px;
font-weight:400;
color:#FF3434;
cursor: pointer;
}
.sizeColor2 {
font-size:14px;
...
...
src/pages/index/index.js
View file @
c19c757c
...
...
@@ -311,7 +311,14 @@ class StaticCenter extends React.Component {
});
}
saveStudent
=
(
value
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
schoolUserInfo
,
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'students/updateState'
,
payload
:
{
operator
:
schoolUserInfo
,
addOrUpdateDiaShow
:
false
,
},
});
dispatch
({
type
:
'students/studentsAdd'
,
payload
:
{
...
...
@@ -1023,6 +1030,9 @@ function mapStateToProps(state) {
studentChangeScheduleListTotal
,
studentChangeScheduleListQueryParams
,
}
=
state
.
classdetail
;
const
{
schoolUserInfo
,
}
=
this
.
props
;
return
{
staticcenter
,
clockCharts
,
...
...
@@ -1067,6 +1077,7 @@ function mapStateToProps(state) {
studentChangeScheduleListLoading
,
studentChangeScheduleListTotal
,
studentChangeScheduleListQueryParams
,
schoolUserInfo
,
};
}
export
default
connect
(
mapStateToProps
)(
StaticCenter
);
...
...
src/pages/student/RenewEdit.js
View file @
c19c757c
...
...
@@ -10,6 +10,7 @@ class RenewEdit extends React.Component {
state
=
{
modeType
:
0
,
selectedCourse
:
{},
mybuyCourse
:
{},
};
componentDidMount
()
{
// 挂载
pageIn
(
'续费管理'
);
...
...
@@ -30,7 +31,7 @@ class RenewEdit extends React.Component {
});
}
courseChange
=
(
value
)
=>
{
const
{
renewCourses
,
searchCourseRelateClass
}
=
this
.
props
;
const
{
renewCourses
,
searchCourseRelateClass
,
studentinfo
}
=
this
.
props
;
if
(
value
==
''
)
{
this
.
setState
({
modeType
:
0
,
...
...
@@ -129,7 +130,7 @@ class RenewEdit extends React.Component {
operator
,
toChangeOperator
,
}
=
this
.
props
;
const
{
selectedCourse
,
modeType
}
=
this
.
state
;
const
{
selectedCourse
,
modeType
,
mybuyCourse
}
=
this
.
state
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
return
(
<
Modal
...
...
@@ -197,7 +198,7 @@ class RenewEdit extends React.Component {
<
div
className
=
{
pageStyle
.
buytimebox
}
>
<
Col
className
=
{
pageStyle
.
course
}
>
<
Form
.
Item
label
=
"
购买
课时"
label
=
"
付费
课时"
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
...
...
@@ -240,7 +241,8 @@ class RenewEdit extends React.Component {
],
})(
<
InputNumber
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'give'
)}
placeholder
=
"请输入赠送课时"
style
=
{{
width
:
200
}}
/>
,
)}
)}
<
div
>
赠送课时只能单独消课,点名不会自动扣除赠送课时喔
<
/div
>
<
/Form.Item
>
<
/Col
>
<
/div
>
...
...
src/pages/student/RepeatStudent.js
View file @
c19c757c
...
...
@@ -101,6 +101,7 @@ class RepeatStudent extends React.Component {
columns
=
{
columns
}
pagination
=
{
false
}
loading
=
{
loading
}
rowKey
=
"id"
className
=
{
`
${
pageStyle
.
repeatStudentTable
}
repeatStudentTable`
}
/
>
<
/Modal
>
...
...
src/pages/student/eliminateEdit.js
View file @
c19c757c
...
...
@@ -29,13 +29,33 @@ class eliminateEdit extends React.Component {
e
.
preventDefault
();
const
{
save
,
form
}
=
this
.
props
;
const
{
currentCourse
}
=
this
.
state
;
const
that
=
this
;
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
Number
(
currentCourse
.
surplus
)
<=
0
)
{
Modal
.
warn
({
title
:
'学生的这个课程已经没有课时了,请提醒续费'
,
});
return
;
if
(
currentCourse
.
course_mode
==
1
)
{
if
(
Number
(
currentCourse
.
surplus
)
<=
0
)
{
Modal
.
warn
({
title
:
'学生的这个课程已经没有课时了,请提醒续费'
,
});
return
;
}
}
else
if
(
currentCourse
.
course_mode
==
2
)
{
const
courseType
=
that
.
props
.
form
.
getFieldValue
(
'course_type'
);
if
(
courseType
==
1
)
{
if
(
Number
(
currentCourse
.
surplus_buy
)
<=
0
)
{
Modal
.
warn
({
title
:
'学生的这个课程已经没有购买课时了,请提醒续费'
,
});
return
;
}
}
else
if
(
courseType
==
2
)
{
if
(
Number
(
currentCourse
.
surplus_give
)
<=
0
)
{
Modal
.
warn
({
title
:
'学生的这个课程已经没有赠送课时了,请提醒续费'
,
});
return
;
}
}
}
save
({
...
values
,
...
...
@@ -103,8 +123,8 @@ class eliminateEdit extends React.Component {
});
this
.
setState
({
expendValue
:
Number
(
currentCourse
.
surplus
-
value
),
giveCourseValue
:
Number
(
getFieldValue
(
'course_type'
))
===
2
?
Number
(
studentinfo
.
surplus_give
-
value
)
:
studentinfo
.
surplus_give
,
payCourseValue
:
Number
(
getFieldValue
(
'course_type'
))
===
1
?
Number
(
studentinfo
.
surplus_buy
-
Number
(
value
))
:
studentinfo
.
surplus_buy
,
giveCourseValue
:
Number
(
getFieldValue
(
'course_type'
))
===
2
?
Number
(
currentCourse
.
surplus_give
-
value
)
:
currentCourse
.
surplus_give
,
payCourseValue
:
Number
(
getFieldValue
(
'course_type'
))
===
1
?
Number
(
currentCourse
.
surplus_buy
-
Number
(
value
))
:
currentCourse
.
surplus_buy
,
});
}
});
...
...
@@ -200,8 +220,8 @@ class eliminateEdit extends React.Component {
initialValue
:
'1'
,
})(
<
Radio
.
Group
>
<
Radio
value
=
"1"
>
付费
(剩余课时
{
studentinfo
.
surplus_buy
}
)
<
/Radio
>
<
Radio
value
=
"2"
>
赠送
(赠送课时
{
studentinfo
.
surplus_give
}
)
<
/Radio
>
<
Radio
value
=
"1"
>
付费
{
currentCourse
.
surplus_buy
!==
undefined
?
`(剩余课时
${
currentCourse
.
surplus_buy
}
)`
:
''
}
<
/Radio
>
<
Radio
value
=
"2"
>
赠送
{
currentCourse
.
surplus_give
!==
undefined
?
`(剩余课时
${
currentCourse
.
surplus_give
}
)`
:
''
}
<
/Radio
>
<
/Radio.Group>
,
)}
<
/Form.Item> : '
'
...
...
@@ -230,8 +250,17 @@ class eliminateEdit extends React.Component {
callback
(
'请输入大于0的整数'
);
return
;
}
if
(
currentCourse
.
surplus
&&
currentCourse
.
surplus
>
0
&&
value
>
currentCourse
.
surplus
)
{
callback
(
'消除课时不能大于剩余课时'
);
if
(
getFieldValue
(
'course_type'
)
==
1
&&
currentCourse
.
course_mode
==
1
&&
value
>
currentCourse
.
surplus_buy
)
{
callback
(
'消除课时不能大于剩余付费课时'
);
return
;
}
if
(
getFieldValue
(
'course_type'
)
==
2
&&
currentCourse
.
course_mode
==
1
&&
value
>
currentCourse
.
surplus_give
)
{
callback
(
'消除课时不能大于剩余赠送课时'
);
return
;
}
if
(
currentCourse
.
course_mode
==
2
&&
value
>
currentCourse
.
surplus
)
{
callback
(
'消除天数不能大于剩余天数'
);
return
;
}
callback
();
},
...
...
src/pages/student/index.js
View file @
c19c757c
...
...
@@ -755,7 +755,6 @@ class StudentMgt extends React.Component {
qrCodeTitle
,
isExpendMore
,
isChecked
,
isShowQuestion
,
verifyValue
,
}
=
this
.
state
;
console
.
log
(
operator
,
'operator'
);
const
columns
=
[
{
title
:
'学员姓名'
,
...
...
@@ -798,26 +797,41 @@ class StudentMgt extends React.Component {
},
{
title
:
'购买总课时'
,
dataIndex
:
'totoalbuy'
,
key
:
'totoalbuy'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
Number
(
record
.
buy
)
+
Number
(
record
.
give
)}
<
/div
>
);
},
},
{
title
:
'付费课时'
,
dataIndex
:
'buy'
,
key
:
'buy'
,
},
{
title
:
'付费课时(消耗/总数)'
,
title
:
'赠送课时'
,
dataIndex
:
'give'
,
key
:
'give'
,
},
{
title
:
'消耗付费课时/赠送课时'
,
dataIndex
:
'expend_buy'
,
key
:
'expend_buy'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
record
.
expend_buy
}
/ {record.
buy
}</
div
>
<
div
>
{
record
.
expend_buy
}
/ {record.
expend_give
}</
div
>
);
},
},
{
title
:
'
赠送课时(消耗/总数)
'
,
title
:
'
剩余付费课时/赠送课时
'
,
dataIndex
:
'expend_give'
,
key
:
'expend_give'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
record
.
expend_give
}
/ {record.
give}</
div
>
<
div
>
{
record
.
surplus_buy
}
/ {record.surplus_
give}</
div
>
);
},
},
...
...
@@ -1152,6 +1166,7 @@ class StudentMgt extends React.Component {
editClassInfo
=
{
editClassInfo
}
teacherList
=
{
teacherList
}
wrappedComponentRef
=
{
this
.
saveFormRef
}
studentinfo
=
{
selectdeStudent
}
visible
=
{
goRenewCourseShow
}
close
=
{
this
.
closeEditClassModal
}
save
=
{
this
.
sureRenewCourse
}
...
...
src/pages/studentinfo/index.js
View file @
c19c757c
...
...
@@ -753,7 +753,7 @@ class StudentMgt extends React.Component {
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
19
}}
lg
=
{{
span
:
19
}}
xl
=
{{
span
:
16
}}
xxl
=
{{
span
:
12
}}
>
<
Descriptions
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
img
src
=
{
`
${
__IMGCDN__
}
/teacher/people_icon.png`
}
alt
=
""
/>
{
studentsdetail
.
name
}
<
/Descriptions.Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
img
src
=
{
`
${
__IMGCDN__
}
/teacher/wx_icon.png`
}
alt
=
""
/>
{
studentsdetail
.
consumer_id
==
0
?
'未绑定'
:
<
div
><
span
>
已绑定
<
/span><span className="hreflink" onClick={this.unbindWx} style={{ paddingLeft: '10px' }}>解除绑定</
span
><
/div
>}</
Descriptions
.
Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
img
src
=
{
`
${
__IMGCDN__
}
/teacher/wx_icon.png`
}
alt
=
""
/>
{
studentsdetail
.
consumer_id
==
0
?
'未绑定'
:
<
span
><
span
>
已绑定
<
/span><span className="hreflink" onClick={this.unbindWx} style={{ paddingLeft: '10px' }}>解除绑定</
span
><
/span
>}</
Descriptions
.
Item
>
<
Descriptions
.
Item
label
=
"备用电话"
className
=
{
pageStyle
.
item
}
>
{
studentsdetail
.
reserve_mobile
}
<
/Descriptions.Item
>
<
/Descriptions
>
<
Descriptions
>
...
...
src/pages/teacherinfo/index.js
View file @
c19c757c
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Icon
,
Button
,
Row
,
Col
,
message
,
Tabs
,
Select
,
Descriptions
,
InputNumber
,
DatePicker
,
Tooltip
,
Form
,
Table
,
Modal
,
Input
,
Pagination
}
from
'antd'
;
import
{
Icon
,
Button
,
Row
,
Col
,
message
,
Tabs
,
Select
,
Descriptions
,
InputNumber
,
DatePicker
,
Tooltip
,
Form
,
Table
,
Modal
,
Input
,
Pagination
,
Badge
}
from
'antd'
;
import
moment
from
'moment'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
,
imagify
,
hasBtnPower
}
from
'../../utils/index'
;
...
...
@@ -288,8 +288,8 @@ class teachersForm extends React.Component {
type
:
'teachersinfo/teachersDoneRecordSearchChange'
,
payload
:
{
params
:
{
start_time
:
e
[
0
].
format
(
'YYYY-MM-DD'
)
,
end_time
:
e
[
1
].
format
(
'YYYY-MM-DD'
)
,
start_time
:
(
e
[
0
]
&&
e
[
0
].
format
(
'YYYY-MM-DD'
))
||
''
,
end_time
:
(
e
[
1
]
&&
e
[
1
].
format
(
'YYYY-MM-DD'
))
||
''
,
},
},
});
...
...
@@ -429,8 +429,8 @@ class teachersForm extends React.Component {
let
start_time
;
let
end_time
;
if
(
time
)
{
start_time
=
moment
(
time
[
0
]).
format
(
'YYYY-MM-DD'
)
;
end_time
=
moment
(
time
[
1
]).
format
(
'YYYY-MM-DD'
)
;
start_time
=
(
time
[
0
]
&&
moment
(
time
[
0
]).
format
(
'YYYY-MM-DD'
))
||
''
;
end_time
=
(
time
[
1
]
&&
moment
(
time
[
1
]).
format
(
'YYYY-MM-DD'
))
||
''
;
delete
[
'time'
];
}
dispatch
({
...
...
@@ -598,7 +598,7 @@ class teachersForm extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
record
.
class_student_sign_count
}
/{record.class_student_count
}
{
!
record
.
call_time
?
<
span
>-
/{record.class_student_count}</
span
>
:
<
span
onClick
=
{()
=>
this
.
showCallDetail
(
record
)}
className
=
"hreflink"
>
{
record
.
class_student_sign_count
}
/{record.class_student_count}</
span
>
}
<
/div
>
);
},
...
...
@@ -610,7 +610,8 @@ class teachersForm extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
!
record
.
call_time
?
<
div
>
未点名
<
/div> : <span className="hreflink" onClick={
()
=> this.showCallDetail
(
record
)
}>已点名</
span
>
}
{
!
record
.
call_time
?
<
div
className
=
{
pageStyle
.
sizeColor1
}
onClick
=
{()
=>
this
.
toCallStudents
(
record
)}
><
Badge
color
=
"#FF3434"
/>
未点名
<
/div> : <div className={pageStyle.sizeColor2} onClick={
()
=> this.toEditCallStudents
(
record
)
}><Badge color="#7BD762" /
>
已点名
<
/div>
}
{
/* {!record.call_time ? <div>未点名</div> : <span className="hreflink" >sss已点名</span>} */
}
<
/div
>
);
},
...
...
@@ -936,9 +937,12 @@ class teachersForm extends React.Component {
<
/Col
>
<
Col
span
=
{
12
}
>
<
Descriptions
style
=
{{
width
:
600
}}
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
img
src
=
{
`
${
__IMGCDN__
}
/teacher/people_icon.png`
}
alt
=
""
/>
{
teachersdetail
.
nickname
}
<
/Descriptions.Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
/teacher/people_icon.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
teacherName
}
>
{
teachersdetail
.
nickname
}
<
/div
>
<
/Descriptions.Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
img
src
=
{
`
${
__IMGCDN__
}
/teacher/phone_icon.png`
}
alt
=
""
/>
{
teachersdetail
.
phone
||
'-'
}
<
/Descriptions.Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
label
=
"备注"
>
{
teachersdetail
.
remark
}
<
/Descriptions.Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
div
className
=
{
pageStyle
.
remark
}
title
=
{
teachersdetail
.
remark
}
>
备注:
{
teachersdetail
.
remark
}
<
/div>
</
Descriptions
.
Item
>
<
/Descriptions
>
<
/Col
>
<
/Row
>
...
...
@@ -1084,7 +1088,7 @@ class teachersForm extends React.Component {
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
24
}}
md
=
{{
span
:
8
}}
lg
=
{{
span
:
5
}}
xl
=
{{
span
:
5
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"上课时间"
>
{
getFieldDecorator
(
'time'
,
{
initialValue
:
[
null
,
moment
(
moment
().
format
(
'YYYY-MM-DD'
))
],
initialValue
:
[
null
,
null
],
})(
<
RangePicker
disabledDate
=
{
this
.
disabledDate
}
...
...
src/pages/teacherinfo/index.less
View file @
c19c757c
...
...
@@ -8,8 +8,19 @@
background-color: #fff;
}
.item {
.remark {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
:global {
.ant-descriptions-item-content {
display: flex;
word-break: break-all;
&>img {
width: 22px;
height: 22px;
...
...
@@ -26,6 +37,12 @@
background-color: #fff;
margin-top: 23px;
}
.teacherName {
width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.titlebox {
line-height: 55px;
border-bottom: 1px solid #E9E9E9;
...
...
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