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
3ce1fdbc
Commit
3ce1fdbc
authored
Dec 04, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
c19c757c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
39 deletions
+46
-39
index.html
index.html
+2
-2
CallStudents.js
src/components/CallStudents.js
+10
-6
CourseChart.less
src/components/CourseChart.less
+1
-1
callstudents.js
src/models/callstudents.js
+12
-9
classrecord.js
src/models/classrecord.js
+4
-3
index.js
src/pages/index/index.js
+1
-1
eliminateEdit.js
src/pages/student/eliminateEdit.js
+16
-17
No files found.
index.html
View file @
3ce1fdbc
...
...
@@ -12,11 +12,11 @@
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script>
<script
src=
"
js/console-polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es6-shim.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es5-shim.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es5-sham.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/json3.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/html5shiv.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"
lib/vendor.dll.js?20191012222"
charset=
"utf-8"
></script>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/
lib/vendor.dll.js?20191012222"
charset=
"utf-8"
></script>
</head>
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"
dist/main.js?1575457876256
"
charset=
"utf-8"
></script>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1575469097289
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/components/CallStudents.js
View file @
3ce1fdbc
...
...
@@ -400,6 +400,7 @@ class CallStudentsForm extends React.Component {
canAddStudent
,
callType
,
searchCallStudentValue
,
courseId
,
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
studentcolumns
=
[
...
...
@@ -427,7 +428,7 @@ class CallStudentsForm extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
classNamebox
}
>
{
(
record
.
surplus
)
||
0
}
课时
{
record
.
surplus
==
'-'
?
record
.
surplus
:
`
${
record
.
surplus
||
0
}
课时`
}
<
/div
>
);
},
...
...
@@ -509,9 +510,10 @@ class CallStudentsForm extends React.Component {
dataIndex
:
'course'
,
key
:
'course'
,
render
:
(
text
,
record
,
index
)
=>
{
const
courseName
=
(
record
.
student_courses
.
find
(
ele
=>
ele
.
course_id
==
courseId
)
&&
record
.
student_courses
.
find
(
ele
=>
ele
.
course_id
==
courseId
).
course
.
title
)
||
''
;
return
(
<
div
className
=
{
pageStyle
.
classNamebox
}
>
{
(
record
.
recently_course
&&
record
.
recently_course
.
title
)
||
''
}
{
courseName
}
<
/div
>
);
},
...
...
@@ -592,7 +594,7 @@ class CallStudentsForm extends React.Component {
key
:
'surplus'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
classNamebox
}
>
{(
record
.
student_course
&&
record
.
student_course
.
surplus
)
||
0
}
<
/div
>
<
div
className
=
{
pageStyle
.
classNamebox
}
>
{(
record
.
student_course
&&
record
.
student_course
.
surplus
_buy
)
||
0
}
<
/div
>
);
},
},
...
...
@@ -651,7 +653,7 @@ class CallStudentsForm extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
}}
>
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课教室:
<
/span
>
<
span
className
=
{
pageStyle
.
detaildesc
}
>
{(
callStudentSchedule
.
class_room
&&
callStudentSchedule
.
class_room
.
title
)
||
'未设置'
}
<
/span
>
<
span
className
=
{
pageStyle
.
detaildesc
}
style
=
{{
display
:
'inline-block'
,
maxWidth
:
'100px'
,
whiteSpace
:
'nowrap'
}}
>
{(
callStudentSchedule
.
class_room
&&
callStudentSchedule
.
class_room
.
title
)
||
'未设置'
}
<
/span
>
<
/Col
>
<
/Row
>
<
Row
gutter
=
{
16
}
className
=
{
pageStyle
.
detailrow
}
type
=
"flex"
style
=
{{
marginBottom
:
'12px'
}}
>
...
...
@@ -700,7 +702,7 @@ class CallStudentsForm extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
}}
>
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课教室:
<
/span
>
<
span
className
=
{
pageStyle
.
detaildesc
}
>
{(
callStudentSchedule
.
class_room
&&
callStudentSchedule
.
class_room
.
title
)
||
'未设置'
}
<
/span
>
<
span
className
=
{
pageStyle
.
detaildesc
}
style
=
{{
display
:
'inline-block'
,
maxWidth
:
'100px'
,
whiteSpace
:
'nowrap'
}}
>
{(
callStudentSchedule
.
class_room
&&
callStudentSchedule
.
class_room
.
title
)
||
'未设置'
}
<
/span
>
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
>
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课时间:
<
/span
>
...
...
@@ -726,7 +728,7 @@ class CallStudentsForm extends React.Component {
{
classDetail
.
class_room
&&
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
style
=
{{
marginBottom
:
'20px'
}}
>
<
span
className
=
{
pageStyle
.
detailtitle
}
>
上课教室:
<
/span
>
<
span
className
=
{
pageStyle
.
detaildesc
}
>
{(
classDetail
.
class_room
&&
classDetail
.
class_room
.
title
)
||
'未设置'
}
<
/span
>
<
span
style
=
{{
display
:
'inline-block'
,
maxWidth
:
'100px'
,
whiteSpace
:
'nowrap'
}}
className
=
{
pageStyle
.
detaildesc
}
>
{(
classDetail
.
class_room
&&
classDetail
.
class_room
.
title
)
||
'未设置'
}
<
/span
>
<
/Col>
}
<
/Row
>
<
Row
gutter
=
{
16
}
className
=
{
pageStyle
.
detailrow
}
type
=
"flex"
style
=
{{
marginBottom
:
'12px'
}}
>
...
...
@@ -932,6 +934,7 @@ function mapStateToProps(state) {
callType
,
classDetail
,
searchCallStudentValue
,
courseId
,
}
=
state
.
callstudents
;
return
{
callStudentsShow
,
...
...
@@ -960,6 +963,7 @@ function mapStateToProps(state) {
callType
,
classDetail
,
searchCallStudentValue
,
courseId
,
};
}
export
default
connect
(
mapStateToProps
)(
CallStudents
);
...
...
src/components/CourseChart.less
View file @
3ce1fdbc
...
...
@@ -79,7 +79,7 @@
border-top-width: 3px;
border-radius: 4px;
font-size: 14px;
padding: 10px;
//
padding: 10px;
}
}
.courseDetailStyle {
...
...
src/models/callstudents.js
View file @
3ce1fdbc
...
...
@@ -94,6 +94,8 @@ export default {
exclude_class_id
:
classId
,
school_id
:
sid
,
extra
:
'time,recently_course'
,
student_status
:
1
,
status
:
1
,
});
const
courseplanListDate
=
yield
call
(
classMgtAjax
.
classStudentList
,
newqueryToAddStudentListParams
);
yield
put
({
...
...
@@ -177,7 +179,7 @@ export default {
},
*
queryCallStudentList
({
payload
},
{
call
,
put
,
select
})
{
const
{
queryCallStudentListParams
,
callStudentTotal
,
callStudentListLoading
,
expend
,
classId
,
queryCallStudentListParams
,
callStudentTotal
,
callStudentListLoading
,
expend
,
classId
,
courseId
,
}
=
yield
select
(
state
=>
state
.
callstudents
);
const
{
callStudentSchedule
,
callType
}
=
payload
;
if
(
callStudentListLoading
)
{
...
...
@@ -225,6 +227,7 @@ export default {
}
const
callStudentOperateList
=
[];
callStudengListDate
.
data
.
list
.
forEach
((
ele
)
=>
{
const
callCourse
=
ele
.
student_courses
.
find
(
ele
=>
ele
.
course_id
==
courseId
);
const
ELE
=
{};
ELE
.
student_id
=
ele
.
id
;
ELE
.
type
=
''
;
...
...
@@ -233,7 +236,7 @@ export default {
ELE
.
remark
=
''
;
ELE
.
name
=
ele
.
name
;
ELE
.
mobile
=
ele
.
mobile
;
ELE
.
surplus
=
ele
.
surplus
;
ELE
.
surplus
=
(
callCourse
&&
callCourse
.
course_mode
==
1
&&
callCourse
.
surplus_buy
!==
undefined
&&
callCourse
.
surplus_buy
)
||
'-'
;
ELE
.
mobile
=
ele
.
mobile
;
callStudentOperateList
.
push
(
ELE
);
});
...
...
@@ -322,7 +325,6 @@ export default {
course_id
:
callStudentSchedule
.
course_id
,
});
const
callStudengListDate
=
yield
call
(
schedulemgtAjax
.
getStudentCalls
,
newqueryScheduleStudentListParams
);
console
.
log
(
'ddddddddddddddddddddddd'
);
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
@@ -343,7 +345,7 @@ export default {
ELE
.
remark
=
decodeURIComponent
(
ele
.
remark
);
ELE
.
name
=
ele
.
formal_school_student
.
name
;
ELE
.
mobile
=
ele
.
formal_school_student
.
mobile
;
ELE
.
surplus
=
(
ele
.
student_course
&&
ele
.
student_course
.
surplus
)
||
0
;
ELE
.
surplus
=
(
ele
.
student_course
&&
ele
.
student_course
.
course_mode
==
1
&&
ele
.
student_course
.
surplus_buy
!==
undefined
&&
ele
.
student_course
.
surplus_buy
)
||
'-'
;
callStudentOperateList
.
push
(
ELE
);
});
yield
put
({
...
...
@@ -366,7 +368,7 @@ export default {
},
*
sureaddLinShiStudent
({
payload
},
{
call
,
put
,
select
})
{
const
{
selectedLinshiClassKey
,
selectedLinshiClassRow
,
callStudentOperateList
,
callStudentTotal
,
selectedLinshiClassKey
,
selectedLinshiClassRow
,
callStudentOperateList
,
callStudentTotal
,
courseId
,
}
=
yield
select
(
state
=>
state
.
callstudents
);
let
newcallStudentTotal
=
callStudentTotal
;
if
(
selectedLinshiClassKey
.
length
==
0
)
{
...
...
@@ -383,6 +385,7 @@ export default {
}
}
selectedLinshiClassRow
.
forEach
((
ele
)
=>
{
const
callCourse
=
ele
.
student_courses
.
find
(
ele
=>
ele
.
course_id
==
courseId
);
callStudentOperateList
.
push
({
student_id
:
ele
.
id
,
type
:
''
,
...
...
@@ -391,7 +394,7 @@ export default {
remark
:
''
,
name
:
ele
.
name
,
mobile
:
ele
.
mobile
,
surplus
:
ele
.
surplus
,
surplus
:
(
callCourse
&&
callCourse
.
course_mode
==
1
&&
callCourse
.
surplus_buy
!==
undefined
&&
callCourse
.
surplus_buy
)
||
'-'
,
});
});
newcallStudentTotal
=
callStudentOperateList
.
length
;
...
...
@@ -408,7 +411,7 @@ export default {
},
*
sureaddbukeStudent
({
payload
},
{
call
,
put
,
select
})
{
const
{
selectedbukeClassKey
,
selectedbukeClassRow
,
callStudentOperateList
,
callStudentTotal
,
selectedbukeClassKey
,
selectedbukeClassRow
,
callStudentOperateList
,
callStudentTotal
,
courseId
,
}
=
yield
select
(
state
=>
state
.
callstudents
);
let
newcallStudentTotal
=
callStudentTotal
;
if
(
selectedbukeClassKey
.
length
==
0
)
{
...
...
@@ -425,6 +428,7 @@ export default {
}
}
selectedbukeClassRow
.
forEach
((
ele
)
=>
{
const
callCourse
=
ele
.
student_course
;
const
ELE
=
{};
ELE
.
student_id
=
ele
.
student_id
;
ELE
.
call_id
=
ele
.
id
;
...
...
@@ -434,7 +438,7 @@ export default {
ELE
.
remark
=
''
;
ELE
.
name
=
ele
.
formal_school_student
.
name
;
ELE
.
mobile
=
ele
.
formal_school_student
.
mobile
;
ELE
.
surplus
=
ele
.
surplus
;
ELE
.
surplus
=
(
callCourse
&&
callCourse
.
course_mode
==
1
&&
callCourse
.
surplus_buy
!==
undefined
&&
callCourse
.
surplus_buy
)
||
'-'
;
callStudentOperateList
.
push
(
ELE
);
});
newcallStudentTotal
=
callStudentOperateList
.
length
;
...
...
@@ -511,7 +515,6 @@ export default {
},
*
changeExpandA
({
payload
},
{
call
,
put
,
select
})
{
const
{
value
}
=
payload
;
console
.
log
(
value
);
const
{
callStudentOperateList
,
copyExpend
}
=
yield
select
(
state
=>
state
.
callstudents
);
let
newValue
=
copyExpend
;
if
(
value
>=
copyExpend
)
{
...
...
src/models/classrecord.js
View file @
3ce1fdbc
...
...
@@ -71,7 +71,6 @@ export default {
type
:
'selectRecord'
,
payload
:
{
params
:
{
end_time
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
},
},
});
...
...
@@ -86,10 +85,12 @@ export default {
school_id
:
sid
,
// teacher_id: schoolUserInfo.id,
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
);
const
data
=
yield
call
(
classRecordAjax
.
getRecordList
,
{
...
newParams
,
end_time
:
params
.
end_time
?
params
.
end_time
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
});
setTimeout
(
loading
);
if
(
data
.
code
==
200
)
{
if
(
data
.
data
.
total
!=
undefined
)
{
...
...
src/pages/index/index.js
View file @
3ce1fdbc
...
...
@@ -1032,7 +1032,7 @@ function mapStateToProps(state) {
}
=
state
.
classdetail
;
const
{
schoolUserInfo
,
}
=
this
.
props
;
}
=
state
.
webapp
;
return
{
staticcenter
,
clockCharts
,
...
...
src/pages/student/eliminateEdit.js
View file @
3ce1fdbc
...
...
@@ -33,13 +33,6 @@ class eliminateEdit extends React.Component {
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
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
)
{
...
...
@@ -56,6 +49,13 @@ class eliminateEdit extends React.Component {
return
;
}
}
}
else
if
(
currentCourse
.
course_mode
==
2
)
{
if
(
Number
(
currentCourse
.
surplus
)
<=
0
)
{
Modal
.
warn
({
title
:
'学生的这个课程已经没有课时了,请提醒续费'
,
});
return
;
}
}
save
({
...
values
,
...
...
@@ -175,13 +175,14 @@ class eliminateEdit extends React.Component {
}}
>
{
getFieldDecorator
(
'student_course_id'
,
{
initialValue
:
''
,
rules
:
[{
required
:
true
,
message
:
'课程不能为空'
}],
})(
<
Select
style
=
{{
width
:
200
}}
onChange
=
{
this
.
selectMyCourse
}
placeholder
=
"请选择课程"
>
{
courseExcludeClassTypeList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
course
.
title
}
<
/Option>
)
}
<
/Select>
)
}
<
/Form.Item
>
{
getFieldValue
(
'student_course_id'
)
!=
undefined
?
(
{
currentCourse
.
id
&&
<
Form
.
Item
label
=
"当前剩余"
labelCol
=
{{
...
...
@@ -200,11 +201,9 @@ class eliminateEdit extends React.Component {
<
span
>
{
currentCourse
.
surplus
||
0
}
天
<
/span
>
}
<
/Form.Item
>
)
:
(
''
)}
}
{
currentCourse
.
course_mode
===
1
?
currentCourse
.
id
&&
currentCourse
.
course_mode
===
1
?
<
Form
.
Item
label
=
"选择课时类型"
labelCol
=
{{
...
...
@@ -250,15 +249,15 @@ class eliminateEdit extends React.Component {
callback
(
'请输入大于0的整数'
);
return
;
}
if
(
getFieldValue
(
'course_type'
)
==
1
&&
currentCourse
.
course_mode
==
1
&&
value
>
currentCourse
.
surplus_buy
)
{
if
(
getFieldValue
(
'course_type'
)
==
1
&&
currentCourse
.
course_mode
==
1
&&
Number
(
value
)
>
Number
(
currentCourse
.
surplus_buy
)
)
{
callback
(
'消除课时不能大于剩余付费课时'
);
return
;
}
if
(
getFieldValue
(
'course_type'
)
==
2
&&
currentCourse
.
course_mode
==
1
&&
value
>
currentCourse
.
surplus_give
)
{
if
(
getFieldValue
(
'course_type'
)
==
2
&&
currentCourse
.
course_mode
==
1
&&
Number
(
value
)
>
Number
(
currentCourse
.
surplus_give
)
)
{
callback
(
'消除课时不能大于剩余赠送课时'
);
return
;
}
if
(
currentCourse
.
course_mode
==
2
&&
value
>
currentCourse
.
surplus
)
{
if
(
currentCourse
.
course_mode
==
2
&&
Number
(
value
)
>
Number
(
currentCourse
.
surplus
)
)
{
callback
(
'消除天数不能大于剩余天数'
);
return
;
}
...
...
@@ -271,7 +270,7 @@ class eliminateEdit extends React.Component {
)}
<
span
className
=
"ant-form-text"
>
{
currentCourse
.
course_mode
===
1
?
'课时'
:
'天'
}
<
/span
>
<
/Form.Item
>
{
getFieldValue
(
'student_course_id'
)
!=
undefine
d
&&
currentCourse
.
course_mode
===
1
?
(
{
currentCourse
.
i
d
&&
currentCourse
.
course_mode
===
1
?
(
<
Form
.
Item
label
=
"消课后总剩余课时"
labelCol
=
{{
...
...
@@ -292,7 +291,7 @@ class eliminateEdit extends React.Component {
)
:
(
''
)}
{
getFieldValue
(
'student_course_id'
)
!=
undefine
d
&&
currentCourse
.
course_mode
==
2
?
(
{
currentCourse
.
i
d
&&
currentCourse
.
course_mode
==
2
?
(
<
Form
.
Item
label
=
"消课后"
labelCol
=
{{
...
...
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