Commit 4e0f3ef1 authored by wangxuelai's avatar wangxuelai

'erp搜索临时学员和补课学员BUG修改'

parent 64701e32
......@@ -20,7 +20,8 @@
"globals" : {
"_CDN_": true,
"__IMGCDN__": true,
"qq": true
"qq": true,
"ENVIRONMENT": true
},
"rules":{
"import/newline-after-import": 0,
......
......@@ -4,12 +4,14 @@ export default {
"development": {
define: {
'_CDN_': '',
'ENVIRONMENT': 'dev',
// '__IMGCDN__': 'http://wxloss.oss-cn-hangzhou.aliyuncs.com/qingxiaobiz/'
'__IMGCDN__': 'https://cdn.img.shangjiadao.cn/qingxiao/biz/image/'
}
},
"production": {
define: {
'ENVIRONMENT': 'pro',
'_CDN_': '',
'__IMGCDN__': 'https://cdn.img.shangjiadao.cn/qingxiao/biz/image/'
}
......
import { pathify } from '../utils/index';
const { location } = window;
const basepath = `${location.protocol}//${pathify(window.location.host)}/`;
let api = '';
let dakaapi = '';
if (ENVIRONMENT == 'pro') {
api = 'https://wx.m.shangjiadao.cn/v2/api/';
dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
} else if (ENVIRONMENT == 'dev') {
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
}
// const api = 'https://test.wp53.cn/v2/api/';
// const dakaapi = 'https:clock.wp53.cn/v3/';
const api = 'https://wx.m.shangjiadao.cn/v2/api/';
const dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
// const api = 'https://wx.m.shangjiadao.cn/v2/api/';
// const dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
export default {
userRegister: `${api}service/user/register`,
getVerifyCode: `${api}service/user/verify_code`,
......
......@@ -165,13 +165,9 @@ class CallStudentsForm extends React.Component {
type: 'callstudents/updateState',
payload: {
linshiStudentModalShow: false,
},
});
dispatch({
type: 'callstudents/updateState',
payload: {
selectedLinshiClassKey: [],
selectedLinshiClassRow: [],
linshiStudentSearchName: '',
},
});
}
......@@ -185,13 +181,6 @@ class CallStudentsForm extends React.Component {
selectedbukeClassRow: [],
},
});
// dispatch({
// type: 'callstudents/updateState',
// payload: {
// selectedbukeClassKey: [],
// selectedbukeClassRow: [],
// },
// });
}
addbukeStudent = () => {
const { dispatch } = this.props;
......@@ -206,6 +195,7 @@ class CallStudentsForm extends React.Component {
payload: {
params: {
page: 1,
keyword: '',
},
},
});
......@@ -223,10 +213,30 @@ class CallStudentsForm extends React.Component {
payload: {
params: {
page: 1,
keyword: '',
},
},
});
}
searchToAddStudent = () => {
const { linshiStudentSearchName, dispatch } = this.props;
dispatch({
type: 'callstudents/queryLinShiStudentList',
payload: {
params: {
page: 1,
keyword: linshiStudentSearchName,
},
},
});
dispatch({
type: 'callstudents/updateState',
payload: {
selectedLinshiClassKey: [],
selectedLinshiClassRow: [],
},
});
}
onLinShiStudentSelectChange = (selectedRowKeys, selectedRows) => {
const { dispatch } = this.props;
dispatch({
......@@ -252,13 +262,6 @@ class CallStudentsForm extends React.Component {
dispatch({
type: 'callstudents/sureaddLinShiStudent',
});
// dispatch({
// type: 'callstudents/updateState',
// payload: {
// selectedLinshiClassKey: [],
// selectedLinshiClassRow: [],
// },
// });
}
sureaddbukeStudent = () => {
const { dispatch } = this.props;
......@@ -295,6 +298,72 @@ class CallStudentsForm extends React.Component {
},
});
}
searchbukeStudent = () => {
const { dispatch } = this.props;
dispatch({
type: 'callstudents/updateState',
payload: {
selectedbukeClassKey: [],
selectedbukeClassRow: [],
},
});
dispatch({
type: 'callstudents/querybukeStudentList',
payload: {
params: {
page: 1,
},
},
});
}
bukeStudentsizeChange = (page, perPage) => {
const { dispatch } = this.props;
dispatch({
type: 'callstudents/querybukeStudentList',
payload: {
params: {
page: 1,
perPage,
},
},
});
}
changebukeStudentPagination = (page, perPage) => {
const { dispatch } = this.props;
dispatch({
type: 'callstudents/querybukeStudentList',
payload: {
params: {
page,
perPage,
},
},
});
}
linshiStudentsizeChange = (page, perPage) => {
const { dispatch } = this.props;
dispatch({
type: 'callstudents/queryLinShiStudentList',
payload: {
params: {
page,
perPage,
},
},
});
}
changeLinshiStudentPagination = (page, perPage) => {
const { dispatch } = this.props;
dispatch({
type: 'callstudents/queryLinShiStudentList',
payload: {
params: {
page,
perPage,
},
},
});
}
render() {
const {
callStudentsShow,
......@@ -667,6 +736,7 @@ class CallStudentsForm extends React.Component {
value={linshiStudentSearchName}
onChange={this.linshiStudentSearchNameChange}
suffix={<Icon type="search" />}
allowClear
/>
</Col>
<Col lg={{ span: 8 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol}>
......@@ -685,9 +755,9 @@ class CallStudentsForm extends React.Component {
<Pagination
showSizeChanger
showQuickJumper
onShowSizeChange={this.toAddClassStudentsizeChange}
onShowSizeChange={this.linshiStudentsizeChange}
total={Number(linshiStudentTotal)}
onChange={this.changeToAddClassStudentPagination}
onChange={this.changeLinshiStudentPagination}
current={Number(queryLinshiStudentListParams.page) || 1}
pageSize={queryLinshiStudentListParams.perPage}
/>
......@@ -717,7 +787,7 @@ class CallStudentsForm extends React.Component {
>
<Row gutter={21}>
<Col lg={{ span: 8 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol}>
<Input placeholder="搜索学员" value={bukeStudentSearchName} onChange={this.bukeStudentSearchNameChange} suffix={<Icon type="search" />} />
<Input placeholder="搜索学员" value={bukeStudentSearchName} allowClear onChange={this.bukeStudentSearchNameChange} suffix={<Icon type="search" />} />
</Col>
<Col lg={{ span: 8 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol}>
<Button type="primary" style={{ marginRight: '15px' }} onClick={this.searchbukeStudent}>搜索</Button>
......
......@@ -95,7 +95,8 @@ class SjdMenu extends React.Component {
className={`${SjdMenuStyle.menusider} menusider`}
>
<div>
<div className={collapsed ? SjdMenuStyle.collapsedlogo : SjdMenuStyle.uncollapsedlogo} onClick={this.goHome} />
{/* <div className={collapsed ? SjdMenuStyle.collapsedlogo : SjdMenuStyle.uncollapsedlogo} onClick={this.goHome} /> */}
<div className={SjdMenuStyle.uncollapsedlogo} onClick={this.goHome} />
<Menu
theme="dark"
mode="inline"
......
......@@ -62,6 +62,7 @@ export default {
extra: 'time,recently_course',
course_id: 0,
type: '3,4',
keyword: '',
},
bukeStudentListLoading: false,
selectedbukeClassKey: [],
......@@ -77,7 +78,7 @@ export default {
effects: {
* queryLinShiStudentList({ payload }, { call, put, select }) {
const {
classId, queryLinshiStudentListParams, linshiStudentTotal, courseId,
classId, queryLinshiStudentListParams, linshiStudentTotal, courseId, linshiStudentListLoading,
} = yield select(state => state.callstudents);
const { params } = payload;
const { sid } = yield select(state => state.webapp);
......@@ -94,13 +95,13 @@ export default {
school_id: sid,
extra: 'time,recently_course',
});
const courseplanListDate = yield call(classMgtAjax.classStudentList, newqueryToAddStudentListParams);
yield put({
type: 'updateState',
payload: {
linshiStudentListLoading: false,
},
});
const courseplanListDate = yield call(classMgtAjax.classStudentList, newqueryToAddStudentListParams);
if (courseplanListDate.code == 200) {
if (courseplanListDate.data && courseplanListDate.data.total !== undefined) {
newclassStudentTotal = courseplanListDate.data.total;
......@@ -124,8 +125,9 @@ export default {
},
* querybukeStudentList({ payload }, { call, put, select }) {
const {
querybukeStudentListParams, bukeStudentTotal, bukeStudentListLoading, courseId, classId,
querybukeStudentListParams, bukeStudentTotal, bukeStudentListLoading, courseId, classId, bukeStudentSearchName,
} = yield select(state => state.callstudents);
const { params } = payload;
const { sid } = yield select(state => state.webapp);
if (bukeStudentListLoading) {
return;
......@@ -137,12 +139,13 @@ export default {
},
});
let newcallStudentTotal = bukeStudentTotal;
const newqueryScheduleStudentListParams = Object.assign(querybukeStudentListParams, {
const newqueryScheduleStudentListParams = Object.assign(querybukeStudentListParams, params, {
school_id: sid,
exclude_class_id: classId,
exclude_class_students_status: 1,
extra: 'time,recently_course',
course_id: courseId,
keyword: bukeStudentSearchName,
});
const linshiStudengListDate = yield call(schedulemgtAjax.getStudentCalls, newqueryScheduleStudentListParams);
yield put({
......@@ -158,7 +161,7 @@ export default {
yield put({
type: 'updateState',
payload: {
queryScheduleStudentListParams: { ...newqueryScheduleStudentListParams },
querybukeStudentListParams: { ...newqueryScheduleStudentListParams },
bukeStudentList: linshiStudengListDate.data.list,
bukeStudentTotal: newcallStudentTotal,
},
......@@ -438,6 +441,7 @@ export default {
type: 'updateState',
payload: {
callStudentTotal: newcallStudentTotal,
linshiStudentSearchName: '',
callStudentOperateList: [...callStudentOperateList],
linshiStudentModalShow: false,
bukeStudentModalShow: false,
......@@ -673,6 +677,7 @@ export default {
extra: 'time,recently_course',
course_id: 0,
type: '3,4',
keyword: '',
},
bukeStudentListLoading: false,
selectedbukeClassKey: [],
......
......@@ -795,7 +795,7 @@ export default {
type: 'updateState',
payload: {
addClassStudentModalShow: false,
toAddStudentSearchName: '',
// toAddStudentSearchName: '',
},
});
yield put({
......
......@@ -45,11 +45,6 @@ class SjdIndex extends React.Component {
const {
collapsed, location, userInfo, showExpired, menuDrawerShow, screenIsBig, globalErrorType,
} = this.props;
// let hasRoot = false;
// if ((LocalStorage.getItem('user') && LocalStorage.getItem('user').token) || (LocalStorage.getItem('teacher') && LocalStorage.getItem('teacher').token)) {
// hasRoot = true;
// }
// const redirectDom = (<Redirect to={{ pathname: '/login', state: { from: location } }} />);
let contentMarginLeft = 0;
let paddingRight = 20;
let paddingLeft = 20;
......
......@@ -375,7 +375,7 @@ class ClassDetailForm extends React.Component {
type: 'classdetail/updateState',
payload: {
addClassStudentModalShow: false,
toAddStudentSearchName: '',
// toAddStudentSearchName: '',
},
});
dispatch({
......
......@@ -35,22 +35,22 @@ class Institutions extends React.Component {
</div>
{schoolDetail.contact_people &&
<div className={pageStyles.rowline} gutter="32">
<div className={pageStyles.rowinfotitle}>系人:</div>
<div className={pageStyles.rowinfotitle}>&nbsp;&nbsp;&nbsp;&nbsp;人:</div>
<div className={pageStyles.rowinfo}>{schoolDetail.contact_people}</div>
</div>
}
{schoolDetail.tel_phone &&
<div className={pageStyles.rowline} gutter="32">
<div className={pageStyles.rowinfotitle}>联系方式:</div>
<div className={pageStyles.rowinfotitle}>联系方式</div>
<div className={pageStyles.rowinfo}>{schoolDetail.tel_phone.join(',')}</div>
</div>
}
<div className={pageStyles.rowline} gutter="32">
<div className={pageStyles.rowinfotitle}>机构位置:</div>
<div className={pageStyles.rowinfotitle}>机构位置</div>
<div className={pageStyles.rowinfo}>{schoolDetail.location_address}</div>
</div>
<div className={pageStyles.rowline} gutter="32">
<div className={pageStyles.rowinfotitle}>科目类别:</div>
<div className={pageStyles.rowinfotitle}>科目类别</div>
<div className={`${pageStyles.rowinfo} ${pageStyles.categorybox}`}>
{schoolDetail.category && schoolDetail.category.length > 0 && categorys.map((ele) => {
const content = [];
......@@ -66,7 +66,7 @@ class Institutions extends React.Component {
<div className={pageStyles.rowinfo}>家门口</div>
</div> */}
<div className={pageStyles.rowline} gutter="32">
<div className={pageStyles.rowinfotitle}>构码:</div>
<div className={pageStyles.rowinfotitle}>&nbsp;&nbsp;&nbsp;&nbsp;码:</div>
<div className={pageStyles.rowinfo}>{schoolDetail.code}</div>
</div>
</div>
......
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