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
a0b030aa
Commit
a0b030aa
authored
Dec 04, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
cef4e8b6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
13 deletions
+36
-13
index.html
index.html
+1
-1
CallStudents.js
src/components/CallStudents.js
+11
-3
callstudents.js
src/models/callstudents.js
+1
-0
EditClassModal.js
src/pages/classmgt/EditClassModal.js
+14
-5
RenewEdit.js
src/pages/student/RenewEdit.js
+2
-2
eliminateEdit.js
src/pages/student/eliminateEdit.js
+6
-1
index.js
src/pages/studentinfo/index.js
+1
-1
No files found.
index.html
View file @
a0b030aa
...
...
@@ -17,6 +17,6 @@
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"dist/main.js?15753
59807220
"
charset=
"utf-8"
></script>
<script
src=
"dist/main.js?15753
74432412
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/components/CallStudents.js
View file @
a0b030aa
...
...
@@ -77,20 +77,28 @@ class CallStudentsForm extends React.Component {
},
delay
);
};
}
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
;
}
changeExpand
=
(
e
)
=>
{
const
{
dispatch
}
=
this
.
props
;
(
this
.
debounce
(()
=>
{
dispatch
({
type
:
'callstudents/changeExpandA'
,
// 更新点名状态是到课或迟到学生为输入的课时数
payload
:
{
value
:
e
,
value
:
this
.
checkData
(
String
(
e
))
,
},
});
},
300
))();
dispatch
({
type
:
'callstudents/changeExpand'
,
payload
:
{
value
:
e
,
value
:
this
.
checkData
(
String
(
e
))
,
},
});
}
...
...
@@ -99,7 +107,7 @@ class CallStudentsForm extends React.Component {
dispatch
({
type
:
'callstudents/callStudentExpendChange'
,
payload
:
{
value
:
e
,
value
:
this
.
checkData
(
String
(
e
))
,
index
,
},
});
...
...
src/models/callstudents.js
View file @
a0b030aa
...
...
@@ -511,6 +511,7 @@ 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/pages/classmgt/EditClassModal.js
View file @
a0b030aa
...
...
@@ -66,6 +66,19 @@ class EditClassModal extends React.Component {
title
:
e
.
target
.
value
,
});
}
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
,
...
...
@@ -223,13 +236,9 @@ class EditClassModal extends React.Component {
{
getFieldDecorator
(
'expend'
,
{
initialValue
:
editClassInfo
.
expend
,
rules
:
[
{
pattern
:
/^
\d
+$/
,
message
:
'请输入大于0的整数'
,
},
{
required
:
true
,
message
:
'课次消耗不能为空'
},
],
})(
<
InputNumber
placeholder
=
"请输入课次消耗"
style
=
{{
width
:
'100%'
}}
/>
)
}
})(
<
InputNumber
min
=
{
0
}
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'expend'
)}
placeholder
=
"请输入课次消耗"
style
=
{{
width
:
'100%'
}}
/>
)
}
<
/Col
>
<
Col
span
=
{
5
}
style
=
{{
color
:
'#000000'
,
fontSize
:
'14px'
}}
>
课时
...
...
src/pages/student/RenewEdit.js
View file @
a0b030aa
...
...
@@ -210,12 +210,12 @@ class RenewEdit extends React.Component {
{
getFieldDecorator
(
'buy'
,
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'请输入购买课时'
,
},
],
})(
<
InputNumber
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'buy'
)}
placeholder
=
"请输入购买课时"
style
=
{{
width
:
200
}}
/>
,
<
InputNumber
min
=
{
0
}
onBlur
=
{
e
=>
this
.
changeValue
(
e
,
'buy'
)}
placeholder
=
"请输入购买课时"
style
=
{{
width
:
200
}}
/>
,
)}
<
/Form.Item
>
<
/Col
>
...
...
src/pages/student/eliminateEdit.js
View file @
a0b030aa
...
...
@@ -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
&&
Number
(
currentCourse
.
give
)
<
0
)
{
if
(
Number
(
currentCourse
.
surplus
)
<=
0
)
{
Modal
.
warn
({
title
:
'学生的这个课程已经没有课时了,请提醒续费'
,
});
...
...
@@ -219,8 +219,13 @@ class eliminateEdit extends React.Component {
>
{
getFieldDecorator
(
'expend'
,
{
rules
:
[
{
required
:
false
,
message
:
currentCourse
.
course_mode
==
1
?
'消耗课时不能为空'
:
'消耗时段不能为空'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
currentCourse
.
course_mode
==
1
&&
value
==
''
)
{
callback
(
'消耗课时不能为空'
);
return
;
}
if
(
currentCourse
.
course_mode
==
2
&&
!
/^
[
1-9
]\d
*$/
.
test
(
value
))
{
callback
(
'请输入大于0的整数'
);
return
;
...
...
src/pages/studentinfo/index.js
View file @
a0b030aa
...
...
@@ -634,7 +634,7 @@ class StudentMgt extends React.Component {
children
:
<
div
className
=
{
pageStyle
.
classNamebox
}
>
{
record
.
course_mode
==
1
&&
<
span
>
{
record
.
expend_buy
}
/{record.expend_give}</
span
>
}
{
record
.
course_mode
==
2
&&
<
div
style
=
{{
textAlign
:
'center'
}}
>
剩余天数:
{
record
.
expend
}
天
<
/div>
}
{
record
.
course_mode
==
2
&&
<
div
style
=
{{
textAlign
:
'center'
}}
>
剩余天数:
{
record
.
surplus
}
天
<
/div>
}
{
record
.
course_mode
==
3
&&
'-'
}
<
/div>
,
props
:
{},
...
...
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