Commit 90fb70f3 authored by baixian's avatar baixian

优化

parent 45ff5538
...@@ -57,7 +57,7 @@ class OpeartorChangeForm extends React.Component { ...@@ -57,7 +57,7 @@ class OpeartorChangeForm extends React.Component {
message: '请选择操作人', 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.Item>
</Form> </Form>
......
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import { message } from 'antd'; import { message } from 'antd';
import { delay } from 'redux-saga';
import { import {
LocalStorage, LocalStorage,
SessionStorage, SessionStorage,
...@@ -439,12 +440,13 @@ export default { ...@@ -439,12 +440,13 @@ export default {
const newStudentAddParams = { ...studentAddParams }; const newStudentAddParams = { ...studentAddParams };
newStudentAddParams.force = 1; newStudentAddParams.force = 1;
if (params && params.type === 'index') { if (params && params.type === 'index') {
yield put(routerRedux.push('/sjd/student'));
yield put({ yield put({
type: 'studentsAdd', type: 'studentsAdd',
payload: { payload: {
...newStudentAddParams, ...newStudentAddParams,
params: { params: {
type: 'index', // 首页 type: 'sureAdd',
}, },
}, },
}); });
...@@ -565,6 +567,11 @@ export default { ...@@ -565,6 +567,11 @@ export default {
indexQrcodeTitle: `请学员${data.data.name}扫描绑定小程序`, indexQrcodeTitle: `请学员${data.data.name}扫描绑定小程序`,
}, },
}); });
yield delay(350);
}
console.log(params, 'params');
if (params && params.type === 'sureAdd') {
yield delay(300);
} }
if (isBuycourse) { if (isBuycourse) {
const { courseList } = yield select(state => state.students); const { courseList } = yield select(state => state.students);
......
...@@ -134,7 +134,7 @@ class StaticCenter extends React.Component { ...@@ -134,7 +134,7 @@ class StaticCenter extends React.Component {
goDeadlineStudent = () => { goDeadlineStudent = () => {
const { dispatch, renew } = this.props; const { dispatch, renew } = this.props;
if (renew.total === 0) { if (renew.total === 0) {
message.warning('还没有续费提醒噢~'); message.warning('暂无学员课时数过低需要续费喔');
return; return;
} }
dispatch({ dispatch({
...@@ -144,7 +144,7 @@ class StaticCenter extends React.Component { ...@@ -144,7 +144,7 @@ class StaticCenter extends React.Component {
goBirthStudent = () => { goBirthStudent = () => {
const { dispatch, birthday } = this.props; const { dispatch, birthday } = this.props;
if (birthday.total === 0) { if (birthday.total === 0) {
message.warning('还没有学员过生日噢~'); message.warning('今天没有学员生日喔');
return; return;
} }
dispatch({ dispatch({
...@@ -154,7 +154,7 @@ class StaticCenter extends React.Component { ...@@ -154,7 +154,7 @@ class StaticCenter extends React.Component {
goCallStudent = () => { goCallStudent = () => {
const { dispatch, callData } = this.props; const { dispatch, callData } = this.props;
if (callData.total === 0) { if (callData.total === 0) {
message.warning('还没有未点名的学生噢~'); message.warning('当前暂无未点名课次喔');
return; return;
} }
dispatch({ dispatch({
...@@ -170,7 +170,7 @@ class StaticCenter extends React.Component { ...@@ -170,7 +170,7 @@ class StaticCenter extends React.Component {
goPlanStudent = () => { goPlanStudent = () => {
const { dispatch, assign } = this.props; const { dispatch, assign } = this.props;
if (assign.total === 0) { if (assign.total === 0) {
message.warning('还没有分配的学员噢~'); message.warning('当前暂无未分配学员喔');
return; return;
} }
dispatch({ dispatch({
......
...@@ -755,6 +755,7 @@ class StudentMgt extends React.Component { ...@@ -755,6 +755,7 @@ class StudentMgt extends React.Component {
qrCodeTitle, isExpendMore, isChecked, isShowQuestion, qrCodeTitle, isExpendMore, isChecked, isShowQuestion,
verifyValue, verifyValue,
} = this.state; } = this.state;
console.log(operator, 'operator');
const columns = [ const columns = [
{ {
title: '学员姓名', title: '学员姓名',
......
import { connect } from 'dva'; import { connect } from 'dva';
import React from 'react'; 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 pageStyle from './newRenewEdit.less';
import { pageIn } from '../../utils/index'; import { pageIn } from '../../utils/index';
const { Option } = Select; const { Option } = Select;
...@@ -23,6 +23,10 @@ class NewRenewEdit extends React.Component { ...@@ -23,6 +23,10 @@ class NewRenewEdit extends React.Component {
e.preventDefault(); e.preventDefault();
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) { if (!err) {
if (values.operator_id === undefined || values.operator_id === '') {
message.warning('请先选择修改人');
return;
}
save(values, () => { save(values, () => {
form.resetFields(); form.resetFields();
}); });
...@@ -221,7 +225,7 @@ class NewRenewEdit extends React.Component { ...@@ -221,7 +225,7 @@ class NewRenewEdit extends React.Component {
{getFieldDecorator('buy', { {getFieldDecorator('buy', {
rules: [ rules: [
{ {
required: false, required: true,
message: '请输入购买课时', message: '请输入购买课时',
}, },
], ],
...@@ -245,7 +249,7 @@ class NewRenewEdit extends React.Component { ...@@ -245,7 +249,7 @@ class NewRenewEdit extends React.Component {
{getFieldDecorator('give', { {getFieldDecorator('give', {
rules: [ rules: [
{ {
required: false, required: true,
message: '请输入赠送课时', message: '请输入赠送课时',
}, },
], ],
...@@ -273,7 +277,7 @@ class NewRenewEdit extends React.Component { ...@@ -273,7 +277,7 @@ class NewRenewEdit extends React.Component {
{getFieldDecorator('buy', { {getFieldDecorator('buy', {
rules: [ rules: [
{ {
required: false, required: true,
message: '请输入购买天数', message: '请输入购买天数',
}, },
], ],
...@@ -298,7 +302,7 @@ class NewRenewEdit extends React.Component { ...@@ -298,7 +302,7 @@ class NewRenewEdit extends React.Component {
{getFieldDecorator('give', { {getFieldDecorator('give', {
rules: [ rules: [
{ {
required: false, required: true,
message: '请输入赠送天数', message: '请输入赠送天数',
}, },
], ],
......
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