Commit 57dbae1d authored by baixian's avatar baixian

上课记录修改

parent be8d4def
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="text/javascript" src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.21da11.js"></script></body> <script type="text/javascript" src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.3004e0.js"></script></body>
</html> </html>
\ No newline at end of file
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
recordParams: { recordParams: {
teacher_id: '', teacher_id: '',
start_time: '', start_time: '',
end_time: '', start_time_end: '',
class_id: '', class_id: '',
status: '', status: '',
course_id: '', course_id: '',
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
let newTotal = recordTotal; let newTotal = recordTotal;
const data = yield call(classRecordAjax.getRecordList, { const data = yield call(classRecordAjax.getRecordList, {
...newParams, ...newParams,
end_time: params.end_time ? params.end_time : moment().format('YYYY-MM-DD HH:mm:ss'), start_time_end: newParams.start_time_end ? newParams.start_time_end : moment().format('YYYY-MM-DD HH:mm:ss'),
}); });
setTimeout(loading); setTimeout(loading);
if (data.code == 200) { if (data.code == 200) {
...@@ -298,7 +298,7 @@ export default { ...@@ -298,7 +298,7 @@ export default {
recordParams: { recordParams: {
teacher_id: '', teacher_id: '',
start_time: '', start_time: '',
end_time: '', start_time_end: '',
class_id: '', class_id: '',
status: '', status: '',
course_id: '', course_id: '',
......
...@@ -195,6 +195,7 @@ export default { ...@@ -195,6 +195,7 @@ export default {
* goCallStudent({ payload }, { call, put, select }) { * goCallStudent({ payload }, { call, put, select }) {
const { recordParams } = yield select(state => state.classrecord); const { recordParams } = yield select(state => state.classrecord);
recordParams.status = 2; recordParams.status = 2;
recordParams.start_time_end = moment().format('YYYY-MM-DD HH:mm:ss');
yield put({ yield put({
type: 'updateState', type: 'updateState',
payload: { payload: {
......
...@@ -132,14 +132,14 @@ class StaticCenter extends React.Component { ...@@ -132,14 +132,14 @@ class StaticCenter extends React.Component {
searchTimeItemChange = (e, key) => { searchTimeItemChange = (e, key) => {
const { dispatch } = this.props; const { dispatch } = this.props;
const start_time = (e[0] && moment(e[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')) || ''; const start_time = (e[0] && moment(e[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')) || '';
const end_time = (e[1] && moment(e[1]).format('YYYY-MM-DD HH:mm:ss')) || ''; const start_time_end = (e[1] && moment(e[1]).format('YYYY-MM-DD HH:mm:ss')) || '';
dispatch({ dispatch({
type: 'classrecord/selectRecord', type: 'classrecord/selectRecord',
payload: { payload: {
params: { params: {
page: 1, page: 1,
start_time, start_time,
end_time, start_time_end,
}, },
}, },
}); });
...@@ -155,11 +155,11 @@ class StaticCenter extends React.Component { ...@@ -155,11 +155,11 @@ class StaticCenter extends React.Component {
page: 1, page: 1,
teacher_id: '', teacher_id: '',
start_time: '', start_time: '',
end_time: '',
class_id: '', class_id: '',
status: '', status: '',
course_id: '', course_id: '',
class_room_id: '', class_room_id: '',
start_time_end: '',
}, },
}, },
}); });
...@@ -482,13 +482,14 @@ class StaticCenter extends React.Component { ...@@ -482,13 +482,14 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 8 }} xl={{ span: 8 }}> <Col xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 8 }} xl={{ span: 8 }}>
<FormItem {...formItemLayout} label="上课时间"> <FormItem {...formItemLayout} label="上课时间">
{getFieldDecorator('time', { {getFieldDecorator('time', {
initialValue: [recordParams.start_time == '' ? null : moment(recordParams.start_time), recordParams.end_time == '' ? null : moment(recordParams.end_time)], initialValue: [recordParams.start_time == '' ? null : moment(recordParams.start_time), recordParams.start_time_end == '' ? null : moment(recordParams.start_time_end)],
})( })(
<RangePicker <RangePicker
style={{ width: '100%' }} style={{ width: '100%' }}
format="YYYY-MM-DD" format="YYYY-MM-DD"
disabledDate={this.disabledDate} disabledDate={this.disabledDate}
onChange={e => this.searchTimeItemChange(e, 'time')} onChange={e => this.searchTimeItemChange(e, 'time')}
placeholder={['上课开始时间', '上课结束时间']}
/>, />,
)} )}
</FormItem> </FormItem>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment