Commit 9691500b authored by sujie@126.com's avatar sujie@126.com

dd

parent 6a5aa984
This diff is collapsed.
......@@ -18,7 +18,7 @@
"bizcharts-plugin-slider": "^2.1.1-beta.1",
"blueimp-md5": "^2.10.0",
"bundle-loader": "^0.5.6",
"clipboard": "^2.0.0",
"clipboard": "^2.0.4",
"co": "^4.6.0",
"console-polyfill": "^0.3.0",
"cropper": "^3.1.4",
......
import React from 'react';
import ClipboardJS from 'clipboard';
import { Modal, Icon, message } from 'antd';
import { imagify } from '../utils/index';
import pageStyle from './InviteCodeDialog.less';
class InviteCodeDialog extends React.Component {
constructor(props) {
super(props);
this.state = {
// date: '',
};
}
componentDidMount() { // 挂载
const clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
clipboard.on('success', () => {
message.success('复制成功');
});
}
componentWillUnmount() { // 卸载
}
render() {
const {
previewQrcodeShow,
previewQrcode,
closeQrcodeShow,
type,
} = this.props;
return (
<div className={pageStyle.container} style={{ display: previewQrcodeShow ? 'flex' : 'none' }}>
<div className={pageStyle.mask}></div>
<div className={pageStyle.qrcodeBox}>
<Icon type="close-circle" className={pageStyle.closeIcon} onClick={closeQrcodeShow} />
<div className={pageStyle.boxHeader}>
<div className={pageStyle.headerTitle}>{type == 1 ? '老师邀请码' : '学员邀请码'}</div>
</div>
<div className={pageStyle.tips1}>
请将该二维码发送至{type == 1 ? '管理群或老师' : '班级群或学员'}
</div>
<div className={pageStyle.tips2}>
TA长按识别扫码即可加入机构
</div>
<div className={pageStyle.qrCode}>
<img className={pageStyle.qrCodeImage} src={imagify(previewQrcode)} alt="" />
</div>
<div className={pageStyle.footer}>
<div className={pageStyle.tips3} id="copy">耽误大家2秒钟,长按识别二维码填写信息加入咱们的机构</div>
<div className={pageStyle.copybtn} data-clipboard-target="#copy" id="btnCopyLink">复制文案</div>
</div>
</div>
</div>
);
}
}
InviteCodeDialog.propTypes = {
};
export default InviteCodeDialog;
@import '../less/variables.less';
@keyframes qrCodefadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.container {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
}
.mask {
position: absolute;
z-index: 1;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.qrcodeBox {
height: 400px;
border-radius: 10px;
background-color: #fff;
box-shadow:0px 4px 12px 0px rgba(0,0,0,0.2);
position: relative;
z-index: 2;
animation: qrCodefadeIn 0.1s linear 1 forwards;
// overflow: hidden;
max-width: 520px;
width: calc(100% - 10px);
}
.boxHeader {
height: 100px;
background-image: url('@{imagesroot}qrboxheader.png');
background-size: 100% 100%;
}
.headerTitle {
color: #fff;
text-align: center;
font-size: 18px;
line-height: 1;
padding-top: 22px;
}
.closeIcon {
position: absolute;
font-size: 30px;
color: rgba(255, 255, 255 ,0.7);
// right: 0;
// top: 0;
right: -15px;
z-index: 2;
top: -15px;
cursor: pointer;
&:hover {
transition: 0.2s;
color: rgba(255, 255, 255 ,1);
}
}
.tips1{
font-size:14px;
font-family:PingFangSC-Regular,PingFangSC;
font-weight: bold;
color:rgba(0,0,0,1);
text-align: center;
}
.tips2{
font-size:12px;
font-family:PingFangSC-Regular,PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.43);
text-align: center;
padding: 20px 0;
}
.qrCode {
text-align: center;
}
.qrCodeImage {
width: 160px;
height: 160px;
display: block;
margin: 0 auto;
}
.footer{
width: 100%;
height:44px;
background:rgba(235,235,235,1);
border-radius:0px 0px 4px 4px;
position: absolute;
left: 0;
bottom: 0;
padding: 0 18px;
display: flex;
align-items: center;
justify-content: space-between;
}
.tips3{
font-size:12px;
font-family:PingFangSC-Regular,PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.43);
}
.copybtn{
font-size:14px;
font-family:PingFangSC-Regular,PingFangSC;
font-weight:bold;
color:rgba(24,144,255,1);
cursor: pointer;
}
\ No newline at end of file
......@@ -103,6 +103,7 @@ export default {
selectedClasskey: [],
selectedClass: [],
statusChangeSubmitting: false,
classrRgistrationShow: true,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......
......@@ -101,6 +101,7 @@ export default {
},
studentListTotal: 0,
goRenewCourseShow: false, // 续课弹窗的显示
goNewRenewCourseShow: false, //
selectdeStudent: {}, // 当前操作的学生信息
renewCourseArr: [],
eliminateSubmitting: false,
......@@ -128,6 +129,8 @@ export default {
previewQrcodeShow: false,
previewBindQrcode: '',
previewBindQrcodeShow: false,
inviteCodeShow: false,
inviteCode: '',
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......@@ -139,17 +142,7 @@ export default {
const { courseList } = yield select(state => state.students);
const studentCourse = selectdeStudent.student_courses;
const studentCourseIdArr = studentCourse.map(ele => ele.course_id);
// 把modetype==3提取出来
// const modetype3Arr = studentCourse.filter(ele => ele.course_mode == 3);
// // 把coursemode == 1 的提取出来并排序
// const modetype1Arr = studentCourse.filter(ele => ele.course_mode == 1).sort((pre, next) => pre.surplus - next.surplus);
// // 把coursemode == 2 的提取出来并排序
// const modetype2Arr = studentCourse.filter(ele => ele.course_mode == 2).sort((pre, next) => pre.surplus - next.surplus);
// 把courseList中的不属于学生 的课程单独过滤;
// const courseListNotHasArr = courseList.filter(ele => studentCourseIdArr.indexOf(ele.id) == -1);
const renewCourses = courseList;
// const
// console.log(renewCourses, 'renewCourses');
yield put({
type: 'updateState',
payload: {
......@@ -432,7 +425,7 @@ export default {
},
* studentsAdd({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const { studentSubmiting, studentAvator } = yield select(state => state.students);
const { studentSubmiting, studentAvator, schoolUserInfo } = yield select(state => state.students);
if (!sid) {
return;
}
......@@ -460,6 +453,7 @@ export default {
give,
class_ids,
operator_id,
isBuycourse,
} = payload;
const classids = new Array(class_ids).join(',');
const loadmessage = message.loading('资料保存中...', 0);
......@@ -483,16 +477,22 @@ export default {
});
setTimeout(loadmessage);
if (data.code == 200) {
const cousrsebordata = yield call(courseAjax.coursesBuyOrRenew, {
student_id: data.data.id,
course_id,
mode_type,
buy,
give,
class_ids: classids,
operator_id,
});
if (cousrsebordata.code == 200) {
if (isBuycourse) {
//
const { courseList } = yield select(state => state.students);
const renewCourses = courseList;
yield put({
type: 'updateState',
payload: {
selectdeStudent: data.data,
goNewRenewCourseShow: true,
courseList,
renewCourses,
addOrUpdateDiaShow: false,
// operator: schoolUserInfo,
},
});
} else {
message.success('保存成功', 1);
yield put({
type: 'updateState',
......@@ -511,22 +511,20 @@ export default {
school_id: sid,
},
});
} else {
message.error('课程添加失败,请在续课中添加', 2);
}
yield put({
type: 'studentsList',
payload: {
params: {
yield put({
type: 'studentsList',
payload: {
params: {
},
},
},
});
yield put({
type: 'updateState',
payload: {
addOrUpdateDiaShow: false,
},
});
});
yield put({
type: 'updateState',
payload: {
addOrUpdateDiaShow: false,
},
});
}
} else {
yield put({
type: 'webapp/errorrequestresolve',
......@@ -551,6 +549,7 @@ export default {
type: 'updateState',
payload: {
goRenewCourseShow: false,
goNewRenewCourseShow: false,
},
});
message.success('保存成功', 1);
......@@ -989,6 +988,25 @@ export default {
},
});
},
* createInviteQrcode({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const qrcodeData = yield call(commonAjax.generateQrcode, {
scene: `s=${sid}`,
page: 'src/pages/setting/bindmobile',
});
if (qrcodeData.code == 200) {
message.success('小程序码生成成功', 1);
yield put({
type: 'updateState',
payload: {
inviteCode: qrcodeData.data.url,
inviteCodeShow: true,
},
});
} else {
message.error('小程序码生成失败', 1);
}
},
},
reducers: {
save(state, action) {
......
......@@ -8,6 +8,7 @@ import {
} from '../utils/index';
import errorcode from '../common/errorcode';
import * as teachersAjax from '../services/teachers';
import * as commonAjax from '../services/common';
export default {
namespace: 'teachers',
state: {
......@@ -50,6 +51,8 @@ export default {
invitationTeacherList: [],
invitationTeacherTotal: 0,
invitationShow: false,
inviteCodeShow: false,
inviteCode: '',
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......@@ -374,6 +377,25 @@ export default {
},
});
},
* createInviteQrcode({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const qrcodeData = yield call(commonAjax.generateQrcode, {
scene: `s=${sid}`,
page: 'src/pages/setting/bindmobile',
});
if (qrcodeData.code == 200) {
message.success('小程序码生成成功', 1);
yield put({
type: 'updateState',
payload: {
inviteCode: qrcodeData.data.url,
inviteCodeShow: true,
},
});
} else {
message.error('小程序码生成失败', 1);
}
},
},
reducers: {
save(state, action) {
......
import { connect } from 'dva';
import React from 'react';
import PropTypes from 'prop-types';
import { message, Row, Col, Input, Select, Modal, Form, Radio, InputNumber } from 'antd';
import pageStyle from './classrRgistration.less';
import { pageIn } from '../../utils/index';
class ClassrRgistration extends React.Component {
state = {
type: 1,
};
componentWillMount() {
}
componentDidUpdate() {
}
componentWillUpdate() {
}
componentDidMount() { // 挂载
pageIn('班级管理');
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
}
componentWillUnmount() { // 卸载
}
componentWillReceiveProps(nextProps) {
}
save = () => {
const {
form, save, isEdit, editClassInfo,
} = this.props;
form.validateFields((err, values) => {
if (!err) {
if (isEdit == 1 && values.capacity < editClassInfo.class_student_count) {
message.warn(`班级容量不能小于当前班级人数${editClassInfo.class_student_count}人`, 1);
return;
}
save(values, form);
}
});
}
close = () => {
const { form, close } = this.props;
form.resetFields();
close();
}
onRadioChange = (e) => {
this.setState({
type: e.target.value,
});
}
onBuyChange = (e) => {
//
}
onGiveChange = (e) => {
//
}
render() {
const {
visible,
editClassInfo,
classSubmitting,
classroomList,
isEdit,
} = this.props;
const { type } = this.state;
const { getFieldDecorator } = this.props.form;
return (
<Modal
visible={visible}
title="班级快捷报名"
okText="确定"
onCancel={this.close}
onOk={this.save}
className="modifyclassModal"
confirmLoading={classSubmitting}
maskClosable={false}
zIndex={110}
>
<div className={pageStyle.tipsBox}>
<div className={pageStyle.tipsIcon}></div>
<div className={pageStyle.tipsContent}>
<div className={pageStyle.tipsItem}>
<span className={pageStyle.boldText}>使用场景:</span>
<span >1.班级建好后,想批量把线下的学员直接添加进班级!发送二维码给新学员扫码即可进入班级!</span>
</div>
<div className={pageStyle.tipsItem}>
<span className={pageStyle.boldText}>&nbsp;&nbsp;如:</span>
<span >首次使用系统,李老师现在想把线下书法一班的学员批量添加进来,将二维码发送给学员,学员扫描后自动购买课时和自动分班到该班级;</span>
</div>
</div>
</div>
<div className={pageStyle.radioBox}>
<Radio.Group onChange={this.onRadioChange} value={type}>
<Radio value={1}>批量邀请学员进班</Radio>
<Radio value={2}>批量给学员购买课时/天同时自动邀请进班</Radio>
</Radio.Group>
</div>
<div className={pageStyle.fromBox}>
<div className={pageStyle.fromTitle}>收费模式</div>
<div className={pageStyle.fromItem}>
<Radio.Group onChange={this.onRadioChange} value={type}>
<Radio value={1}>课时收费</Radio>
<Radio value={2}>按天收费</Radio>
<Radio value={3}>按班级收费</Radio>
</Radio.Group>
</div>
<div className={pageStyle.fromItem}>
<span>购买: </span><InputNumber min={1} max={10} defaultValue={3} onChange={this.onBuyChange} /><span>课时</span>
</div>
<div className={pageStyle.fromItem}>
<span>赠送:: </span><InputNumber min={1} max={10} defaultValue={3} onChange={this.onGiveChange} /><span>课时</span>
</div>
<div className={pageStyle.frombtn}>生成报名码</div>
</div>
</Modal>
);
}
}
ClassrRgistration.propTypes = {
isEdit: PropTypes.bool,
};
ClassrRgistration.defaultProps = {
isEdit: false,
};
const ClassMgt = Form.create()(ClassrRgistration);
export default ClassMgt;
:global {
.modifyclassModal {
.ant-form-explain {
padding-left: 0;
}
}
}
.tipsBox{
display: flex;
}
.tipsIcon{
width:3px;
height:19px;
background:rgba(24,144,255,1);
border-radius:2px;
margin-right: 8px;
margin-top: 2px;
}
.tipsItem{
padding-bottom: 10px;
}
.tipsContent{
flex: 1;
}
.boldText{
font-weight:700;
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import { pageIn, hasBtnPower } from '../../utils/index';
import EditClassModal from './EditClassModal';
import ClassRoomMgt from './classRoomMgt';
import ClassStatusChangeModal from './ClassStatusChangeModal';
import ClassrRgistration from './classrRgistration';
const { Option } = Select;
const { TextArea } = Input;
......@@ -381,6 +382,7 @@ class ClassMgtForm extends React.Component {
ClassStatusChangeModalShow,
editClassInfo,
classSubmitting,
classrRgistrationShow,
} = this.props;
const visible = false;
const columns = [
......@@ -464,9 +466,9 @@ class ClassMgtForm extends React.Component {
render: (text, record, index) => {
return (
<div className={pageStyle.tableoperatebox}>
<a className={pageStyle.alink} href="javascript:;" onClick={() => this.goClassDetail(record, 2)}>班级报名</a>
<span className={pageStyle.divideline}>|</span>
<a className={pageStyle.alink} href="javascript:;" onClick={() => this.goClassDetail(record, 2)}>学员管理</a>
{/* <span className={pageStyle.divideline}>|</span>
<a className={pageStyle.alink} href="javascript:;">布置作业</a> */}
<span className={pageStyle.divideline}>|</span>
<span>
<a className={pageStyle.alink} href="javascript:;" onClick={() => this.goThemeMgt(record)}>主题管理</a>
......@@ -613,6 +615,9 @@ class ClassMgtForm extends React.Component {
onok={this.saveStatusChange}
{...this.props}
/>
<ClassrRgistration
visible={classrRgistrationShow}
/>
</div>
);
}
......@@ -643,6 +648,7 @@ function mapStateToProps(state) {
copyClassListQueryParamsB,
selectedClasskey,
statusChangeSubmitting,
classrRgistrationShow,
} = state.classmgt;
return {
classList,
......@@ -664,6 +670,7 @@ function mapStateToProps(state) {
copyClassListQueryParamsB,
selectedClasskey,
statusChangeSubmitting,
classrRgistrationShow,
};
}
export default connect(mapStateToProps)(ClassMgt);
......
import { connect } from 'dva';
import React from 'react';
import { Icon, Button, Row, Col, Input, InputNumber, Select, Checkbox, Table, Modal, Form, Alert, DatePicker } from 'antd';
import { Icon, Button, Row, Col, Input, InputNumber, Select, Checkbox, Table, Modal, Form, Alert, DatePicker, Radio } from 'antd';
import moment from 'moment';
import pageStyle from './StudentAdd.less';
import { pageIn, imagify } from '../../utils/index';
......@@ -23,6 +23,7 @@ class StudentAddForm extends React.Component {
],
modeType: 1,
usefulClassList: [],
showMoreInfo: false,
// ages: 0,
// addVisible: false,
// delVisible: false,
......@@ -39,8 +40,9 @@ class StudentAddForm extends React.Component {
const toyear = new Date().getFullYear() + 1;
this.state.cage = toyear - dateString.format('YYYY') || 0;
}
handleSubmit = (e) => {
handleSubmit = (e, flag) => {
const { dispatch, save } = this.props;
console.log(flag);
e.preventDefault();
this.props.form.validateFields((err, values) => {
if (!err) {
......@@ -77,6 +79,7 @@ class StudentAddForm extends React.Component {
give,
class_ids,
operator_id,
isBuycourse: flag || false,
});
}
});
......@@ -136,6 +139,11 @@ class StudentAddForm extends React.Component {
uploadtype: 'studentAvatorupload',
});
}
showMoreInfoEvent = () => {
this.setState({
showMoreInfo: !this.state.showMoreInfo,
});
}
render() {
const {
visible,
......@@ -147,7 +155,7 @@ class StudentAddForm extends React.Component {
studentAvator,
} = this.props;
const {
usefulClassList, modeType, modeTypeArr,
usefulClassList, modeType, modeTypeArr, showMoreInfo,
} = this.state;
const { getFieldDecorator } = this.props.form;
return (
......@@ -162,6 +170,14 @@ class StudentAddForm extends React.Component {
zIndex={110}
destroyOnClose
maskClosable={false}
footer={[
<Button key="back" onClick={(e) => { this.handleSubmit(e, 1); }}>
保存并购买课时
</Button>,
<Button key="submit" type="primary" onClick={this.handleSubmit}>
确定
</Button>,
]}
>
<Form labelAlign="left" className="addstudentcontent">
<div className={pageStyle.info} style={{ paddingLeft: 24, paddingRight: 24 }}>
......@@ -252,6 +268,34 @@ class StudentAddForm extends React.Component {
})(<Input style={{ width: 200 }} maxLength={11} placeholder="输入手机号码" />)}
</Form.Item>
</Col>
</Col>
<Col sm={{ span: 16 }} className={pageStyle.name}>
<Col span={24} className={pageStyle.name}>
<Form.Item
label="&nbsp;&nbsp;性别:"
labelCol={{
xs: { span: 24 },
sm: { span: 6 },
}}
wrapperCol={{
xs: { span: 24 },
sm: { span: 18 },
}}
>
{getFieldDecorator('gender', {
rules: [],
})(
<Radio.Group>
<Radio value={1}></Radio>
<Radio value={2}></Radio>
</Radio.Group>,
)}
</Form.Item>
</Col>
</Col>
<Col span={24} className={pageStyle.name}> <Col sm={{ span: 16 }} className={pageStyle.name}><div className={pageStyle.addmore} onClick={this.showMoreInfoEvent}>{showMoreInfo ? '隐藏' : '填写'}更多学员信息 {showMoreInfo ? '-' : '+'}</div></Col></Col>
{showMoreInfo &&
<Col sm={{ span: 16 }} className={pageStyle.name}>
<Col span={24} className={pageStyle.name}>
<Form.Item
label="备用电话"
......@@ -276,89 +320,61 @@ class StudentAddForm extends React.Component {
</Form.Item>
</Col>
</Col>
<Col sm={{ span: 8 }} className={pageStyle.name}>
}
{showMoreInfo &&
<Col sm={{ span: 16 }} className={pageStyle.name}>
<Col span={24} className={pageStyle.name}>
<Form.Item
label="年级"
labelCol={{
xs: { span: 24 },
sm: { span: 5 },
sm: { span: 6 },
}}
wrapperCol={{
xs: { span: 24 },
sm: { span: 19 },
sm: { span: 18 },
}}
>
{getFieldDecorator('grade', {
rules: [
{
required: false,
message: '请输入手机号码',
},
],
rules: [],
})(<Input placeholder="输入年级" />)}
</Form.Item>
</Col>
<Col span={24} className={pageStyle.name}>
</Col>}
{showMoreInfo &&
<Col sm={{ span: 16 }} className={pageStyle.name}>
<Col span={24} className={pageStyle.textArea}>
<Form.Item
label="性别:"
label="备注"
labelCol={{
xs: { span: 24 },
sm: { span: 5 },
sm: { span: 6 },
}}
wrapperCol={{
xs: { span: 24 },
sm: { span: 19 },
sm: { span: 18 },
}}
>
<span></span>
{getFieldDecorator('gender', {
{getFieldDecorator('remark', {
rules: [
{
required: false,
message: '请输入手机号码',
message: '请输入备注',
},
{
max: 200,
message: '备注最多200个字符',
},
],
})(
<Select placeholder="选择性别">
<Option value="1"></Option>
<Option value="2"></Option>
</Select>,
<TextArea rows={3} placeholder="请输入备注" />,
)}
</Form.Item>
</Col>
</Col>
<Col span={24} className={pageStyle.textArea}>
<Form.Item
label="备注"
labelCol={{
xs: { span: 24 },
sm: { span: 4 },
}}
wrapperCol={{
xs: { span: 24 },
sm: { span: 20 },
}}
>
{getFieldDecorator('remark', {
rules: [
{
required: false,
message: '请输入备注',
},
{
max: 200,
message: '备注最多200个字符',
},
],
})(
<TextArea rows={3} placeholder="请输入备注" />,
)}
</Form.Item>
</Col>
</Col>}
</Row>
</div>
<div
{/* <div
style={{
fontSize: '16px',
fontWeight: 700,
......@@ -607,7 +623,7 @@ class StudentAddForm extends React.Component {
</Col>
</Row>
</Col>
</Row>
</Row> */}
</Form>
</Modal>
);
......
......@@ -26,4 +26,19 @@
// margin-bottom: 20px;
}
}
}
.addmore{
width:153px;
height:32px;
background:rgba(255,255,255,1);
border-radius:4px;
border:1px solid rgba(24,144,255,1);
font-size:14px;
font-family:PingFangSC-Regular,PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:32px;
text-align: center;
margin-left: 92px;
cursor: pointer;
}
\ No newline at end of file
......@@ -4,12 +4,14 @@ import { Icon, Button, Row, Col, Input, Select, Checkbox, Form, InputNumber, Tab
import pageStyle from './index.less';
import { pageIn, hasBtnPower, imagify } from '../../utils/index';
import RenewEdit from './RenewEdit';
import NewRenewEdit from './newRenewEdit';
import OperatorChange from '../../components/operatorChange';
import EliminateEdit from './eliminateEdit';
import SelfJoin from './SelfJoin';
import StudentAdd from './StudentAdd';
import Cropper from '../../components/Cropper';
import QrcodeShow from '../../components/qrcodeShow';
import InviteCodeDialog from '../../components/InviteCodeDialog';
const { Option } = Select;
const { TextArea } = Input;
class StudentMgt extends React.Component {
......@@ -190,6 +192,7 @@ class StudentMgt extends React.Component {
type: 'students/updateState',
payload: {
goRenewCourseShow: false,
goNewRenewCourseShow: false,
selectdeStudent: {},
},
});
......@@ -496,6 +499,23 @@ class StudentMgt extends React.Component {
qrCodeTitle: `请学员${student.name}扫描绑定小程序`,
});
}
closeInviteCodeDialog = () => {
const { dispatch } = this.props;
dispatch({
type: 'students/updateState',
payload: {
inviteCodeShow: false,
},
});
}
inviteCodeDialogVisible = (visible) => {
const { dispatch } = this.props;
dispatch({
type: 'students/createInviteQrcode',
payload: {
},
});
}
render() {
const { getFieldDecorator } = this.props.form;
const {
......@@ -514,6 +534,7 @@ class StudentMgt extends React.Component {
searchstudentListQueryParams,
selectdeStudent,
goRenewCourseShow,
goNewRenewCourseShow,
eliminateSubmitting,
renewCourses,
courseRelateClassList,
......@@ -539,6 +560,8 @@ class StudentMgt extends React.Component {
renewCourseSelectMode,
modeToCourse,
// 续课的逻辑代码
inviteCodeShow,
inviteCode,
} = this.props;
const { qrCodeTitle } = this.state;
const columns = [
......@@ -650,6 +673,7 @@ class StudentMgt extends React.Component {
{/* <Button className={pageStyle.headerbtn}>批量操作</Button> */}
{hasBtnPower('sjd/student', 'enrolCode') && <Button className={pageStyle.headerbtn} onClick={this.toSetSelfJoin}>自助报名二维码</Button>}
{hasBtnPower('sjd/student', 'bundlingCode') && <Button id={pageStyle.headerself} className={pageStyle.headerbtn} onClick={this.bindQrcodeShow}>自助绑定二维码</Button>}
{hasBtnPower('sjd/student', 'bundlingCode') && <Button id={pageStyle.headerself} className={pageStyle.headerbtn} onClick={() => this.inviteCodeDialogVisible(true)}>快捷邀请学员</Button>}
</div>
<div className={pageStyle.search}>
<div className={pageStyle.title}>学员搜索</div>
......@@ -812,6 +836,23 @@ class StudentMgt extends React.Component {
renewCourseSelectMode={renewCourseSelectMode}
modeToCourse={modeToCourse}
/>
<NewRenewEdit
operator={operator}
studentinfo={selectdeStudent}
editClassInfo={editClassInfo}
teacherList={teacherList}
wrappedComponentRef={this.saveFormRef}
visible={goNewRenewCourseShow}
close={this.closeEditClassModal}
save={this.sureRenewCourse}
classList={courseRelateClassList}
renewCourses={renewCourses}
searchCourseRelateClass={this.searchCourseRelateClass}
toChangeOperator={this.toChangeOperator}
renewCourse={renewCourse}
renewCourseSelectMode={renewCourseSelectMode}
modeToCourse={modeToCourse}
/>
<EliminateEdit
studentinfo={selectdeStudent}
courseList={courseList}
......@@ -864,7 +905,14 @@ class StudentMgt extends React.Component {
toAddCourseQrcode={this.toAddCourseQrcode}
seeCourseTmpQrcode={this.seeCourseTmpQrcode}
/>
<InviteCodeDialog
previewQrcodeShow={inviteCodeShow}
closeQrcodeShow={this.closeInviteCodeDialog}
previewQrcode={inviteCode}
type={2}
/>
</div>
);
}
}
......@@ -891,6 +939,7 @@ function mapStateToProps(state) {
searchstudentListQueryParams,
selectdeStudent,
goRenewCourseShow,
goNewRenewCourseShow,
courseList,
eliminateSubmitting,
renewCourses,
......@@ -914,6 +963,8 @@ function mapStateToProps(state) {
renewCourse,
renewCourseSelectMode,
modeToCourse,
inviteCodeShow,
inviteCode,
// 续课的逻辑代码
} = state.students;
const {
......@@ -934,6 +985,7 @@ function mapStateToProps(state) {
searchstudentListQueryParams,
selectdeStudent,
goRenewCourseShow,
goNewRenewCourseShow,
eliminateSubmitting,
renewCourses,
courseRelateClassList,
......@@ -959,6 +1011,8 @@ function mapStateToProps(state) {
renewCourse,
renewCourseSelectMode,
modeToCourse,
inviteCodeShow,
inviteCode,
// 续课的逻辑代码
};
}
......
This diff is collapsed.
.teacher{
padding-top: 60px;
text-align: right;
}
.changeOperate {
margin-left: 10px;
}
.studentinfo{
border-bottom: 1px solid rgba(0,0,0,0.09);
}
.infotitle{
font-size:16px;
font-family:PingFangSC-Medium,PingFangSC;
font-weight:700;
color:rgba(0,0,0,0.85);
line-height:24px;
padding-left: 10px;
padding-bottom: 20px;
}
.infoitem{
font-size:14px;
font-family:PingFangSC-Regular,PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.6);
line-height:22px;
padding-left: 5px;
padding-bottom: 20px;
}
.pt20{
padding-top: 20px;
}
\ No newline at end of file
......@@ -69,7 +69,7 @@ class EditClassModal extends React.Component {
<Row>
{editType == 'add' &&
<Form.Item
label="轻校账号"
label="老师手机号"
labelCol={{
xs: { span: 24 },
sm: { span: 4 },
......
......@@ -3,6 +3,7 @@ import React from 'react';
import { Icon, Button, Row, Col, Input, Select, Modal, InputNumber, Radio, Table, Form, Pagination } from 'antd';
import pageStyle from './index.less';
import EditTeacher from './EditTeacher';
import InviteCodeDialog from '../../components/InviteCodeDialog';
import { pageIn, hasBtnPower } from '../../utils/index';
const { Option } = Select;
......@@ -174,6 +175,24 @@ class ClassMgt extends React.Component {
},
});
}
inviteCodeDialogVisible = (visible) => {
//
const { dispatch } = this.props;
dispatch({
type: 'teachers/createInviteQrcode',
payload: {
},
});
}
closeInviteCodeDialog = () => {
const { dispatch } = this.props;
dispatch({
type: 'teachers/updateState',
payload: {
inviteCodeShow: false,
},
});
}
render() {
const {
teachersinfo,
......@@ -188,6 +207,8 @@ class ClassMgt extends React.Component {
invitationTeacherTotal,
queryTeacherInvitationParams,
invitationShow,
inviteCodeShow,
inviteCode,
} = this.props;
const { getFieldDecorator } = this.props.form;
const columns = [
......@@ -273,6 +294,7 @@ class ClassMgt extends React.Component {
<div className={pageStyle.container}>
<div className={pageStyle.headerbox}>
{hasBtnPower('sjd/teacher', 'addTeacher') && <Button icon="plus" className={pageStyle.headerbtn} type="primary" onClick={() => this.setModal1Visible(true)}>添加</Button>}
<Button icon="none" className={pageStyle.headerbtn} type="primary" onClick={() => this.inviteCodeDialogVisible(true)}>快捷邀请老师</Button>
</div>
<div className={pageStyle.search}>
<div className={pageStyle.searchbox}>
......@@ -311,10 +333,10 @@ class ClassMgt extends React.Component {
<div className={pageStyle.table}>
<div className={pageStyle.title}>
<div className={pageStyle.titlename}>老师信息</div>
<div className={pageStyle.teacherNotice} onClick={() => this.showInvitationTeacherShow(true)}>
{/* <div className={pageStyle.teacherNotice} onClick={() => this.showInvitationTeacherShow(true)}>
<img src={`${__IMGCDN__}icon_notice.png`} className={pageStyle.teacherNoticeIcon} alt="" />
<span>老师加入通知</span>
</div>
</div> */}
</div>
<div className={pageStyle.tablebox}>
<Table
......@@ -364,14 +386,6 @@ class ClassMgt extends React.Component {
<div className={`${pageStyle.invitationstatus} ${ele.status == 1 ? pageStyle.waitjoin : pageStyle.notjoin}`}>{ele.status == 1 && '待加入'}{ele.status == 2 && '已加入'}{ele.status == 3 && '拒绝加入'}</div>
</div>
))}
{/* <div className={pageStyle.invitationitem}>
<div className={pageStyle.invitationteachername}>刘老师</div>
<div className={`${pageStyle.invitationstatus} ${pageStyle.notjoin}`}>待加入</div>
</div>
<div className={pageStyle.invitationitem}>
<div className={pageStyle.invitationteachername}>刘老师</div>
<div className={`${pageStyle.invitationstatus} ${pageStyle.notjoin}`}>拒绝加入</div>
</div> */}
<div className={pageStyle.invitationPagination}>
<Pagination
showSizeChanger
......@@ -385,7 +399,14 @@ class ClassMgt extends React.Component {
</div>
</div>
</Modal>
<InviteCodeDialog
previewQrcodeShow={inviteCodeShow}
closeQrcodeShow={this.closeInviteCodeDialog}
previewQrcode={inviteCode}
type={1}
/>
</div>
);
}
}
......@@ -407,6 +428,8 @@ function mapStateToProps(state) {
queryTeacherInvitationParams,
invitationTeacherTotal,
invitationShow,
inviteCodeShow,
inviteCode,
} = state.teachers;
const {
courseList,
......@@ -424,6 +447,8 @@ function mapStateToProps(state) {
queryTeacherInvitationParams,
invitationTeacherTotal,
invitationShow,
inviteCodeShow,
inviteCode,
};
}
export default connect(mapStateToProps)(ForgotPassword);
......
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