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
924e2ff8
Commit
924e2ff8
authored
Dec 04, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bww-v1' into wxl-develop
parents
a0b030aa
9a82d43f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
17 deletions
+105
-17
operatorChange.js
src/components/operatorChange.js
+1
-1
students.js
src/models/students.js
+24
-4
teachersinfo.js
src/models/teachersinfo.js
+4
-1
index.js
src/pages/index/index.js
+52
-4
index.js
src/pages/student/index.js
+5
-0
newRenewEdit.js
src/pages/student/newRenewEdit.js
+9
-5
index.js
src/pages/teacherinfo/index.js
+10
-2
No files found.
src/components/operatorChange.js
View file @
924e2ff8
...
...
@@ -57,7 +57,7 @@ class OpeartorChangeForm extends React.Component {
message
:
'请选择操作人'
,
},
],
})(
<
Select
>
{
teacherList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
nickname
}
<
/Option>
)
}</
Select
>
)
})(
<
Select
placeholder
=
"请选择操作人"
>
{
teacherList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
nickname
}
<
/Option>
)
}</
Select
>
)
}
<
/Form.Item
>
<
/Form
>
...
...
src/models/students.js
View file @
924e2ff8
import
{
routerRedux
}
from
'dva/router'
;
import
{
message
}
from
'antd'
;
import
{
delay
}
from
'redux-saga'
;
import
{
LocalStorage
,
SessionStorage
,
...
...
@@ -433,14 +434,28 @@ export default {
}
},
*
sureAddRepeatStudent
({
payload
},
{
call
,
put
,
select
})
{
const
{
params
}
=
payload
;
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
studentAddParams
}
=
yield
select
(
state
=>
state
.
students
);
const
newStudentAddParams
=
{
...
studentAddParams
};
newStudentAddParams
.
force
=
1
;
yield
put
({
type
:
'studentsAdd'
,
payload
:
newStudentAddParams
,
});
if
(
params
&&
params
.
type
===
'index'
)
{
yield
put
(
routerRedux
.
push
(
'/sjd/student'
));
yield
put
({
type
:
'studentsAdd'
,
payload
:
{
...
newStudentAddParams
,
params
:
{
type
:
'sureAdd'
,
},
},
});
}
else
{
yield
put
({
type
:
'studentsAdd'
,
payload
:
newStudentAddParams
,
});
}
},
*
queryRepeatStudents
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
...
...
@@ -552,6 +567,11 @@ export default {
indexQrcodeTitle
:
`请学员
${
data
.
data
.
name
}
扫描绑定小程序`
,
},
});
yield
delay
(
350
);
}
console
.
log
(
params
,
'params'
);
if
(
params
&&
params
.
type
===
'sureAdd'
)
{
yield
delay
(
300
);
}
if
(
isBuycourse
)
{
const
{
courseList
}
=
yield
select
(
state
=>
state
.
students
);
...
...
src/models/teachersinfo.js
View file @
924e2ff8
import
{
routerRedux
}
from
'dva/router'
;
import
moment
from
'moment'
;
import
{
message
}
from
'antd'
;
import
{
LocalStorage
,
...
...
@@ -246,7 +247,9 @@ export default {
yield
put
({
type
:
'selectCourseStatistical'
,
payload
:
{
params
:
{},
params
:
{
end_time
:
moment
().
format
(
'YYYY-MM-DD'
),
},
},
});
},
...
...
src/pages/index/index.js
View file @
924e2ff8
...
...
@@ -19,8 +19,10 @@ import AddCourseTime from '../classdetail/AddCourseTime';
import
CourseTimeList
from
'../classdetail/CourseTimeList'
;
import
StudentAdd
from
'../student/StudentAdd'
;
import
Cropper
from
'../../components/Cropper'
;
import
RepeatStudent
from
'../student/RepeatStudent'
;
import
CallStudents
from
'../../components/CallStudents'
;
import
ChangeCourse
from
'../classdetail/ChangeCourse'
;
const
{
RangePicker
}
=
DatePicker
;
class
StaticCenter
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -116,7 +118,7 @@ class StaticCenter extends React.Component {
goDeadlineStudent
=
()
=>
{
const
{
dispatch
,
renew
}
=
this
.
props
;
if
(
renew
.
total
===
0
)
{
message
.
warning
(
'
还没有续费提醒噢~
'
);
message
.
warning
(
'
暂无学员课时数过低需要续费喔
'
);
return
;
}
dispatch
({
...
...
@@ -126,7 +128,7 @@ class StaticCenter extends React.Component {
goBirthStudent
=
()
=>
{
const
{
dispatch
,
birthday
}
=
this
.
props
;
if
(
birthday
.
total
===
0
)
{
message
.
warning
(
'
还没有学员过生日噢~
'
);
message
.
warning
(
'
今天没有学员生日喔
'
);
return
;
}
dispatch
({
...
...
@@ -136,7 +138,7 @@ class StaticCenter extends React.Component {
goCallStudent
=
()
=>
{
const
{
dispatch
,
callData
}
=
this
.
props
;
if
(
callData
.
total
===
0
)
{
message
.
warning
(
'
还没有未点名的学生噢~
'
);
message
.
warning
(
'
当前暂无未点名课次喔
'
);
return
;
}
dispatch
({
...
...
@@ -152,7 +154,7 @@ class StaticCenter extends React.Component {
goPlanStudent
=
()
=>
{
const
{
dispatch
,
assign
}
=
this
.
props
;
if
(
assign
.
total
===
0
)
{
message
.
warning
(
'
还没有分配的学员噢~
'
);
message
.
warning
(
'
当前暂无未分配学员喔
'
);
return
;
}
dispatch
({
...
...
@@ -354,6 +356,17 @@ class StaticCenter extends React.Component {
},
});
}
sureAddRepeatStudent
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'students/sureAddRepeatStudent'
,
payload
:
{
params
:
{
type
:
'index'
,
// 首页
},
},
});
}
changeSchedule
=
(
record
)
=>
{
const
{
dispatch
,
datetime
}
=
this
.
props
;
if
(
new
Date
(
datetime
.
replace
(
/-/g
,
'/'
)).
getTime
()
-
new
Date
(
record
.
start_time
.
replace
(
/-/g
,
'/'
)).
getTime
()
>
0
)
{
...
...
@@ -480,6 +493,15 @@ class StaticCenter extends React.Component {
},
});
}
cancelAddRepeatStudent
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'students/updateState'
,
payload
:
{
repeatStudentShow
:
false
,
},
});
}
closeChangeSchedule
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
...
...
@@ -615,6 +637,9 @@ class StaticCenter extends React.Component {
cropperboxShow
,
uploadImgUrl
,
avatorUploader
,
repeatStudentShow
,
queryRepeatStudentsLoading
,
repeatStudentList
,
studentChangeScheduleShow
,
studentChangeScheduleList
,
studentChangeScheduleListLoading
,
...
...
@@ -908,6 +933,21 @@ class StaticCenter extends React.Component {
sureCropper
=
{
this
.
sureCropper
}
uploadImgUrl
=
{
uploadImgUrl
}
/>
}
<
RepeatStudent
visible
=
{
repeatStudentShow
}
onCancel
=
{
this
.
cancelAddRepeatStudent
}
onOk
=
{
this
.
sureAddRepeatStudent
}
loading
=
{
queryRepeatStudentsLoading
}
dataSource
=
{
repeatStudentList
}
/
>
{
/* <AddCourseTime */
}
{
/* visible={addCourseTimeShow} */
}
{
/* saveCourseTime={this.saveCourseTime} */
}
{
/* close={this.closeAddCourseTime} */
}
{
/* timeArr={timeArr} */
}
{
/* addTimeSubmitting={addTimeSubmitting} */
}
{
/* delTime={this.delTime} */
}
{
/* /> */
}
<
ChangeCourse
{...
this
.
props
}
scheduleStudentsizeChange
=
{
this
.
scheduleStudentsizeChange
}
...
...
@@ -964,6 +1004,9 @@ function mapStateToProps(state) {
const
{
addOrUpdateDiaShow
,
studentAvator
,
repeatStudentShow
,
queryRepeatStudentsLoading
,
repeatStudentList
,
}
=
state
.
students
;
const
{
changeScheduleShow
,
...
...
@@ -1006,6 +1049,11 @@ function mapStateToProps(state) {
datetime
,
studentAvator
,
cropperboxShow
,
uploadImgUrl
,
avatorUploader
,
repeatStudentShow
,
queryRepeatStudentsLoading
,
repeatStudentList
,
changeScheduleShow
,
changeScheduleIndex
,
selectScheduleinfo
,
...
...
src/pages/student/index.js
View file @
924e2ff8
...
...
@@ -550,6 +550,10 @@ class StudentMgt extends React.Component {
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'students/sureAddRepeatStudent'
,
payload
:
{
params
:
{
},
},
});
}
toDeleteModal
=
(
record
)
=>
{
...
...
@@ -751,6 +755,7 @@ class StudentMgt extends React.Component {
qrCodeTitle
,
isExpendMore
,
isChecked
,
isShowQuestion
,
verifyValue
,
}
=
this
.
state
;
console
.
log
(
operator
,
'operator'
);
const
columns
=
[
{
title
:
'学员姓名'
,
...
...
src/pages/student/newRenewEdit.js
View file @
924e2ff8
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Icon
,
Button
,
Row
,
Col
,
Input
,
InputNumber
,
Select
,
Checkbox
,
Table
,
Modal
,
Form
,
Alert
}
from
'antd'
;
import
{
message
,
Button
,
Row
,
Col
,
Input
,
InputNumber
,
Select
,
Checkbox
,
Table
,
Modal
,
Form
,
Alert
}
from
'antd'
;
import
pageStyle
from
'./newRenewEdit.less'
;
import
{
pageIn
}
from
'../../utils/index'
;
const
{
Option
}
=
Select
;
...
...
@@ -23,6 +23,10 @@ class NewRenewEdit extends React.Component {
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
values
.
operator_id
===
undefined
||
values
.
operator_id
===
''
)
{
message
.
warning
(
'请先选择修改人'
);
return
;
}
save
(
values
,
()
=>
{
form
.
resetFields
();
});
...
...
@@ -221,7 +225,7 @@ class NewRenewEdit extends React.Component {
{
getFieldDecorator
(
'buy'
,
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'请输入购买课时'
,
},
],
...
...
@@ -245,7 +249,7 @@ class NewRenewEdit extends React.Component {
{
getFieldDecorator
(
'give'
,
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'请输入赠送课时'
,
},
],
...
...
@@ -273,7 +277,7 @@ class NewRenewEdit extends React.Component {
{
getFieldDecorator
(
'buy'
,
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'请输入购买天数'
,
},
],
...
...
@@ -298,7 +302,7 @@ class NewRenewEdit extends React.Component {
{
getFieldDecorator
(
'give'
,
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'请输入赠送天数'
,
},
],
...
...
src/pages/teacherinfo/index.js
View file @
924e2ff8
...
...
@@ -375,6 +375,9 @@ class teachersForm extends React.Component {
},
});
}
disabledDate
=
(
current
)
=>
{
return
current
&&
current
>
moment
();
}
closeChangeSchedule
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
...
...
@@ -1080,8 +1083,13 @@ 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
:
''
})(
<
RangePicker
style
=
{{
width
:
'100%'
}}
/>
,
{
getFieldDecorator
(
'time'
,
{
initialValue
:
[
null
,
moment
(
moment
().
format
(
'YYYY-MM-DD'
))],
})(
<
RangePicker
disabledDate
=
{
this
.
disabledDate
}
style
=
{{
width
:
'100%'
}}
/>
,
)}
<
/FormItem
>
<
/Col
>
...
...
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