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
cef4e8b6
Commit
cef4e8b6
authored
Dec 03, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
fada4b2b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
479 additions
and
113 deletions
+479
-113
index.html
index.html
+2
-2
CourseChart.js
src/components/CourseChart.js
+42
-29
CourseChart.less
src/components/CourseChart.less
+11
-3
classrecord.js
src/models/classrecord.js
+17
-18
coursechart.js
src/models/coursechart.js
+2
-2
indexstaic.js
src/models/indexstaic.js
+11
-8
index.js
src/pages/classrecord/index.js
+18
-8
index.js
src/pages/index/index.js
+309
-27
RenewEdit.js
src/pages/student/RenewEdit.js
+26
-5
eliminateEdit.js
src/pages/student/eliminateEdit.js
+25
-8
Renew.js
src/pages/studentinfo/Renew.js
+15
-2
index.js
src/pages/studentinfo/index.js
+1
-1
No files found.
index.html
View file @
cef4e8b6
...
...
@@ -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=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?2011191012222"
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>
<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>
</head>
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?15222111274997073861
"
charset=
"utf-8"
></script>
<script
src=
"
dist/main.js?1575359807220
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/components/CourseChart.js
View file @
cef4e8b6
This diff is collapsed.
Click to expand it.
src/components/CourseChart.less
View file @
cef4e8b6
.titlebox {
display: flex;
align-items: center;
justify-content: space-between;
//
justify-content: space-between;
height: 55px;
padding: 0 22px 0 24px;
.title {
...
...
@@ -68,8 +68,8 @@
.courseInfoBox {
position: absolute;
display: flex;
//
align-items: center;
//
justify-content: center;
align-items: center;
justify-content: center;
flex-direction: column;
word-break: break-all;
overflow: hidden;
...
...
@@ -77,6 +77,9 @@
border-style: solid;
border-width: 1px;
border-top-width: 3px;
border-radius: 4px;
font-size: 14px;
padding: 10px;
}
}
.courseDetailStyle {
...
...
@@ -153,12 +156,17 @@
}
&:first-child {
border-right: 1px solid rgba(255,255,255,0.2);
border-bottom-left-radius: 6px;
}
&:last-child {
border-bottom-right-radius: 6px;
}
}
}
:global {
.ant-popover-content {
width: 280px;
overflow: hidden;
.ant-popover-content {
border-radius: 4px;
}
...
...
src/models/classrecord.js
View file @
cef4e8b6
...
...
@@ -2,6 +2,7 @@
import
{
routerRedux
}
from
'dva/router'
;
import
{
message
}
from
'antd'
;
import
{
delay
}
from
'redux-saga'
;
import
moment
from
'moment'
;
import
co
from
'co'
;
import
{
LocalStorage
,
...
...
@@ -38,6 +39,7 @@ export default {
perPage
:
10
,
schedule_id
:
0
,
},
callStudentTotal
:
0
,
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -46,11 +48,11 @@ export default {
effects
:
{
*
queryinfo
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'webapp/querymemberinfo'
,
payload
:
{
},
});
//
yield put({
//
type: 'webapp/querymemberinfo',
//
payload: {
//
},
//
});
yield
delay
(
260
);
yield
put
({
type
:
'selectTeacher'
,
...
...
@@ -68,6 +70,7 @@ export default {
type
:
'selectRecord'
,
payload
:
{
params
:
{
end_time
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
},
},
});
...
...
@@ -77,17 +80,12 @@ export default {
const
{
sid
,
schoolUserInfo
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
recordParams
,
recordTotal
}
=
yield
select
(
state
=>
state
.
classrecord
);
const
loading
=
message
.
loading
(
'数据加载中...'
,
0.5
);
let
newParams
;
if
(
schoolUserInfo
&&
schoolUserInfo
.
type
===
1
)
{
newParams
=
Object
.
assign
(
recordParams
,
params
,
{
school_id
:
sid
,
teacher_id
:
schoolUserInfo
.
id
,
});
}
else
{
newParams
=
Object
.
assign
(
recordParams
,
params
,
{
school_id
:
sid
,
});
}
// let newParams;
const
newParams
=
Object
.
assign
(
recordParams
,
params
,
{
school_id
:
sid
,
// teacher_id: schoolUserInfo.id,
my
:
LocalStorage
.
getItem
(
'role'
)
==
1
?
1
:
''
,
});
let
newTotal
=
recordTotal
;
const
data
=
yield
call
(
classRecordAjax
.
getRecordList
,
newParams
);
setTimeout
(
loading
);
...
...
@@ -100,6 +98,7 @@ export default {
payload
:
{
recordList
:
data
.
data
&&
data
.
data
.
list
,
recordTotal
:
newTotal
,
recordParams
:
{
...
newParams
},
},
});
}
else
{
...
...
@@ -268,8 +267,8 @@ export default {
ELE
.
student_type
=
ele
.
student_type
;
ELE
.
expend
=
ele
.
expend
;
// 统一的扣课时
ELE
.
remark
=
decodeURIComponent
(
ele
.
remark
);
ELE
.
name
=
ele
.
formal_school_student
.
name
;
ELE
.
mobile
=
ele
.
formal_school_student
.
mobile
;
ELE
.
name
=
ele
.
formal_school_student
&&
ele
.
formal_school_student
.
name
;
ELE
.
mobile
=
ele
.
formal_school_student
&&
ele
.
formal_school_student
.
mobile
;
ELE
.
surplus
=
ele
.
surplus
;
callStudentOperateList
.
push
(
ELE
);
});
...
...
src/models/coursechart.js
View file @
cef4e8b6
...
...
@@ -42,8 +42,8 @@ export default {
},
effects
:
{
*
queryInfo
({
payload
},
{
call
,
put
,
select
})
{
const
{
date
T
ime
}
=
payload
;
const
currentTimestamp
=
new
Date
(
date
T
ime
.
replace
(
/-/g
,
'/'
)).
getTime
();
const
{
date
t
ime
}
=
payload
;
const
currentTimestamp
=
new
Date
(
date
t
ime
.
replace
(
/-/g
,
'/'
)).
getTime
();
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
src/models/indexstaic.js
View file @
cef4e8b6
...
...
@@ -54,7 +54,7 @@ export default {
teacherList
:
[],
courseList
:
[],
classroomList
:
[],
date
T
ime
:
''
,
date
t
ime
:
''
,
classRoomMgtShow
:
false
,
classRoomSubmitting
:
false
,
addCourseTimeShow
:
false
,
...
...
@@ -66,6 +66,9 @@ export default {
end_time
:
''
,
tabIndex
:
1
,
courseTimeListShow
:
false
,
changeScheduleShow
:
false
,
selectScheduleinfo
:
{},
changeScheduleIndex
:
1
,
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -163,8 +166,8 @@ export default {
},
*
goBirthStudent
({
payload
},
{
call
,
put
,
select
})
{
const
{
studentListQueryParams
}
=
yield
select
(
state
=>
state
.
students
);
const
{
date
T
ime
}
=
yield
select
(
state
=>
state
.
indexstaic
);
const
todayDate
=
new
Date
(
date
T
ime
.
replace
(
/-/g
,
'-'
));
const
{
date
t
ime
}
=
yield
select
(
state
=>
state
.
indexstaic
);
const
todayDate
=
new
Date
(
date
t
ime
.
replace
(
/-/g
,
'-'
));
const
month
=
todayDate
.
getMonth
()
+
1
;
const
day
=
todayDate
.
getDate
();
studentListQueryParams
.
birthday_month
=
month
;
...
...
@@ -203,7 +206,7 @@ export default {
},
*
goPlanStudent
({
payload
},
{
call
,
put
,
select
})
{
const
{
studentListQueryParams
,
searchstudentListQueryParams
}
=
yield
select
(
state
=>
state
.
students
);
const
{
date
T
ime
}
=
yield
select
(
state
=>
state
.
indexstaic
);
const
{
date
t
ime
}
=
yield
select
(
state
=>
state
.
indexstaic
);
studentListQueryParams
.
assign_class_status
=
2
;
searchstudentListQueryParams
.
assign_class_status
=
2
;
studentListQueryParams
.
birthday_start
=
''
;
...
...
@@ -485,7 +488,7 @@ export default {
yield
put
({
type
:
'coursechart/queryInfo'
,
payload
:
{
date
T
ime
:
staticcenter
.
datetime
,
date
t
ime
:
staticcenter
.
datetime
,
},
});
if
(
staticcenter
.
code
==
200
)
{
...
...
@@ -493,7 +496,7 @@ export default {
type
:
'updateState'
,
payload
:
{
sid
,
date
T
ime
:
staticcenter
.
datetime
,
date
t
ime
:
staticcenter
.
datetime
,
staticcenter
:
staticcenter
.
data
,
},
});
...
...
@@ -501,7 +504,7 @@ export default {
yield
put
({
type
:
'updateState'
,
payload
:
{
date
T
ime
:
staticcenter
.
datetime
,
date
t
ime
:
staticcenter
.
datetime
,
},
});
yield
put
({
...
...
@@ -622,7 +625,7 @@ export default {
teacherList
:
[],
courseList
:
[],
classroomList
:
[],
date
T
ime
:
''
,
date
t
ime
:
''
,
classRoomMgtShow
:
false
,
classRoomSubmitting
:
false
,
addCourseTimeShow
:
false
,
...
...
src/pages/classrecord/index.js
View file @
cef4e8b6
...
...
@@ -155,6 +155,9 @@ class StaticCenter extends React.Component {
},
});
}
disabledDate
=
(
current
)
=>
{
return
current
&&
current
>
moment
();
}
render
()
{
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
...
...
@@ -339,21 +342,28 @@ class StaticCenter extends React.Component {
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
headerWrap
}
>
<
Card
bordered
=
{
false
}
bodyStyle
=
{{
padding
:
'15px 20px 0 20px'
,
boxShadow
:
'0px 6px 6px 0px rgba(0, 0, 0, 0.04)'
}}
>
<
Form
labelAlign
=
"
lef
t"
onSubmit
=
{
this
.
handleSearch
}
>
<
Form
labelAlign
=
"
righ
t"
onSubmit
=
{
this
.
handleSearch
}
>
<
Row
gutter
=
{{
sm
:
2
,
xs
:
12
,
md
:
24
,
lg
:
24
,
sm
:
12
,
xs
:
12
,
md
:
12
,
lg
:
12
,
}}
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"上课时间"
>
{
getFieldDecorator
(
'time'
,
{
initialValue
:
''
})(
<
RangePicker
style
=
{{
width
:
'100%'
}}
/>
,
{
getFieldDecorator
(
'time'
,
{
initialValue
:
[
recordParams
.
start_time
==
''
?
null
:
moment
(
recordParams
.
start_time
),
recordParams
.
end_time
==
''
?
null
:
moment
(
recordParams
.
end_time
)],
})(
<
RangePicker
style
=
{{
width
:
'100%'
}}
showTime
format
=
"YYYY-MM-DD HH:mm:ss"
disabledDate
=
{
this
.
disabledDate
}
/>
,
)}
<
/FormItem
>
<
/Col
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"班
级"
>
<
FormItem
{...
formItemLayout
}
label
=
"班级"
>
{
getFieldDecorator
(
'class_id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
...
...
@@ -374,7 +384,7 @@ class StaticCenter extends React.Component {
<
/FormItem
>
<
/Col
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"课
程"
>
<
FormItem
{...
formItemLayout
}
label
=
"课程"
>
{
getFieldDecorator
(
'course_id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
...
...
@@ -386,7 +396,7 @@ 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
=
"老
师"
>
<
FormItem
{...
formItemLayout
}
label
=
"老师"
>
{
getFieldDecorator
(
'teacher_id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
...
...
@@ -397,7 +407,7 @@ 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
=
"教
室"
>
<
FormItem
{...
formItemLayout
}
label
=
"教室"
>
{
getFieldDecorator
(
'class_room_id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
...
...
src/pages/index/index.js
View file @
cef4e8b6
This diff is collapsed.
Click to expand it.
src/pages/student/RenewEdit.js
View file @
cef4e8b6
...
...
@@ -106,6 +106,19 @@ class RenewEdit extends React.Component {
form
.
resetFields
();
close
();
}
checkData
=
(
value
)
=>
{
let
str
=
value
.
replace
(
/
[^\d\.]
/g
,
''
);
const
pointIndex
=
str
.
search
(
/
\.
/
);
if
(
pointIndex
!==
-
1
)
{
str
=
str
.
substr
(
0
,
pointIndex
+
1
).
replace
(
/
\.
/
,
'.5'
);
}
return
str
;
}
changeValue
=
(
e
,
type
)
=>
{
this
.
props
.
form
.
setFieldsValue
({
[
type
]:
this
.
checkData
(
e
.
target
.
value
),
});
}
render
()
{
const
{
visible
,
...
...
@@ -202,7 +215,7 @@ class RenewEdit extends React.Component {
},
],
})(
<
InputNumber
placeholder
=
"请输入购买课时"
style
=
{{
width
:
200
}}
/>
,
<
InputNumber
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'buy'
)}
placeholder
=
"请输入购买课时"
style
=
{{
width
:
200
}}
/>
,
)}
<
/Form.Item
>
<
/Col
>
...
...
@@ -226,7 +239,7 @@ class RenewEdit extends React.Component {
},
],
})(
<
InputNumber
placeholder
=
"请输入赠送课时"
style
=
{{
width
:
200
}}
/>
,
<
InputNumber
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'give'
)}
placeholder
=
"请输入赠送课时"
style
=
{{
width
:
200
}}
/>
,
)}
<
/Form.Item
>
<
/Col
>
...
...
@@ -249,9 +262,13 @@ class RenewEdit extends React.Component {
{
getFieldDecorator
(
'buy'
,
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'请输入购买天数'
,
},
{
pattern
:
/^
[
1-9
]\d
*$/
,
message
:
'请输入大于0的整数'
,
},
],
})(
<
InputNumber
placeholder
=
"请输入购买天数"
style
=
{{
width
:
200
}}
/>
,
...
...
@@ -272,10 +289,14 @@ class RenewEdit extends React.Component {
}}
>
{
getFieldDecorator
(
'give'
,
{
rules
:
[
rules
:
[
{
required
:
false
,
message
:
'请输入赠送天数'
,
message
:
'请输入在赠送天数'
,
},
{
pattern
:
/^
[
1-9
]\d
*$/
,
message
:
'请输入大于0的整数'
,
},
],
})(
...
...
src/pages/student/eliminateEdit.js
View file @
cef4e8b6
...
...
@@ -31,7 +31,7 @@ class eliminateEdit extends React.Component {
const
{
currentCourse
}
=
this
.
state
;
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
currentCourse
.
surplus
<=
0
)
{
if
(
currentCourse
.
surplus
<=
0
&&
Number
(
currentCourse
.
give
)
<
0
)
{
Modal
.
warn
({
title
:
'学生的这个课程已经没有课时了,请提醒续费'
,
});
...
...
@@ -77,16 +77,34 @@ class eliminateEdit extends React.Component {
payCourseValue
:
0
,
});
}
checkData
=
(
value
)
=>
{
let
str
=
value
.
replace
(
/
[^\d\.]
/g
,
''
);
const
pointIndex
=
str
.
search
(
/
\.
/
);
if
(
pointIndex
!==
-
1
)
{
str
=
str
.
substr
(
0
,
pointIndex
+
1
).
replace
(
/
\.
/
,
'.5'
);
}
return
str
;
}
expendChange
=
(
e
)
=>
{
const
{
currentCourse
}
=
this
.
state
;
const
{
studentinfo
}
=
this
.
props
;
const
{
getFieldDecorator
,
getFieldValue
}
=
this
.
props
.
form
;
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
let
value
=
0
;
if
(
currentCourse
.
course_mode
===
1
)
{
value
=
this
.
checkData
(
e
.
target
.
value
);
}
else
{
const
{
value
:
avalue
}
=
e
.
target
;
value
=
avalue
;
}
this
.
props
.
form
.
setFieldsValue
({
expend
:
value
,
});
this
.
setState
({
expendValue
:
Number
(
currentCourse
.
surplus
-
Number
(
e
.
target
.
value
)
),
giveCourseValue
:
Number
(
getFieldValue
(
'course_type'
))
===
2
?
Number
(
studentinfo
.
surplus_give
-
Number
(
e
.
target
.
value
)
)
:
studentinfo
.
surplus_give
,
payCourseValue
:
Number
(
getFieldValue
(
'course_type'
))
===
1
?
Number
(
studentinfo
.
surplus_buy
-
Number
(
e
.
target
.
value
))
:
studentinfo
.
surplus_buy
,
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
,
});
}
});
...
...
@@ -201,11 +219,10 @@ class eliminateEdit extends React.Component {
>
{
getFieldDecorator
(
'expend'
,
{
rules
:
[
{
required
:
true
,
message
:
'消耗课时不能为空'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
<
1
)
{
callback
(
'
消除课时不能小于1
'
);
if
(
currentCourse
.
course_mode
==
2
&&
!
/^
[
1-9
]\d
*$/
.
test
(
value
)
)
{
callback
(
'
请输入大于0的整数
'
);
return
;
}
if
(
currentCourse
.
surplus
&&
currentCourse
.
surplus
>
0
&&
value
>
currentCourse
.
surplus
)
{
...
...
@@ -216,7 +233,7 @@ class eliminateEdit extends React.Component {
},
],
})(
<
InputNumber
step
=
{
currentCourse
.
course_mode
===
1
?
0.5
:
1
}
onBlur
=
{
e
=>
this
.
expendChange
(
e
)}
placeholder
=
"请输入消课数量"
style
=
{{
width
:
200
}}
/>
,
<
InputNumber
min
=
{
0
}
onBlur
=
{
e
=>
this
.
expendChange
(
e
)}
placeholder
=
"请输入消课数量"
style
=
{{
width
:
200
}}
/>
,
)}
<
span
className
=
"ant-form-text"
>
{
currentCourse
.
course_mode
===
1
?
'课时'
:
'天'
}
<
/span
>
<
/Form.Item
>
...
...
src/pages/studentinfo/Renew.js
View file @
cef4e8b6
...
...
@@ -43,6 +43,19 @@ class StudentAddForm extends React.Component {
}
});
}
checkData
=
(
value
)
=>
{
let
str
=
value
.
replace
(
/
[^\d\.]
/g
,
''
);
const
pointIndex
=
str
.
search
(
/
\.
/
);
if
(
pointIndex
!==
-
1
)
{
str
=
str
.
substr
(
0
,
pointIndex
+
1
).
replace
(
/
\.
/
,
'.5'
);
}
return
str
;
}
changeValue
=
(
e
,
type
)
=>
{
this
.
props
.
form
.
setFieldsValue
({
[
type
]:
this
.
checkData
(
e
.
target
.
value
),
});
}
render
()
{
const
{
visible
,
...
...
@@ -135,7 +148,7 @@ class StudentAddForm extends React.Component {
},
],
})(
<
InputNumber
min
=
{
1
}
style
=
{{
width
:
200
}}
/>
,
<
InputNumber
min
=
{
1
}
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'buy'
)}
style
=
{{
width
:
200
}}
/>
,
)}
<
/Form.Item
>
<
/Col
>
...
...
@@ -160,7 +173,7 @@ class StudentAddForm extends React.Component {
// },
],
})(
<
InputNumber
min
=
{
0
}
style
=
{{
width
:
200
}}
/>
,
<
InputNumber
min
=
{
0
}
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'give'
)}
style
=
{{
width
:
200
}}
/>
,
)}
<
/Form.Item
>
<
/Col
>
...
...
src/pages/studentinfo/index.js
View file @
cef4e8b6
...
...
@@ -772,7 +772,7 @@ class StudentMgt extends React.Component {
<
/div
>
<
div
className
=
{
pageStyle
.
table
}
>
<
div
className
=
{
pageStyle
.
title
}
>
<
Tabs
defaultActiveKey
=
"1"
onChange
=
{
this
.
tabChange
}
>
<
Tabs
defaultActiveKey
=
"1"
animated
=
{
false
}
onChange
=
{
this
.
tabChange
}
>
<
TabPane
tab
=
"报读课程"
key
=
"1"
>
<
div
className
=
{
pageStyle
.
tabsbtn
}
>
<
Button
type
=
{
currentCourseQueryParams
.
type
==
1
?
'primary'
:
''
}
style
=
{{
marginRight
:
'15px'
}}
onClick
=
{()
=>
this
.
HistoryRead
(
1
)}
>
当前报读课程
<
/Button
>
...
...
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