Commit 36f75b28 authored by baixian's avatar baixian

优化

parent 9082d681
......@@ -13,10 +13,10 @@
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<script src="/js/ueeditor/ueditor.config.js?20200107" charset="utf-8"></script><script src="/js/ueeditor/ueditor.all.js?20200107" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20200107" charset="utf-8"></script>
<script src="js/console-polyfill.js?20200107" charset="utf-8"></script><script src="js/es6-shim.min.js?20200107" charset="utf-8"></script><script src="js/es5-shim.js?20200107" charset="utf-8"></script><script src="js/es5-sham.min.js?20200107" charset="utf-8"></script><script src="js/json3.min.js?20200107" charset="utf-8"></script><script src="js/html5shiv.min.js?20200107" charset="utf-8"></script><script src="js/polyfill.js?20200107" charset="utf-8"></script><script src="lib/vendor.dll.js?20200107" charset="utf-8"></script>
</head>
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.1b6459.js"></script></body>
<script type="text/javascript" src="/dist/main.a7d695.js"></script></body>
</html>
\ No newline at end of file
......@@ -173,6 +173,24 @@ export default {
}
yield delay(100);
yield put(routerRedux.goBack());
yield put({
type: 'updateState',
payload: {
saveLoading: false,
editCrmInfo: {
reserve_mobile: [''],
name: '',
mobile: '',
source_type: '',
intent_course_id: '',
remark: '',
birthday: '',
gender: 1,
customers: [],
id: 0,
},
},
});
} else {
yield put({
type: 'webapp/errorrequestresolve',
......
......@@ -390,7 +390,7 @@ export default {
const loadmessage = message.loading('购买中...', 0);
const data = yield call(studentsAjax.studentsAdd, {
school_id: sid,
name: studentInfo.name,
name: values.name,
birthday: studentInfo.birthday,
mobile: studentInfo.mobile,
avatar: '',
......
......@@ -266,7 +266,7 @@ export default {
const loadmessage = message.loading('购买中...', 0);
const data = yield call(studentsAjax.studentsAdd, {
school_id: sid,
name: studentInfo.name,
name: values.name,
birthday: studentInfo.birthday,
mobile: studentInfo.mobile,
avatar: '',
......
......@@ -371,6 +371,43 @@ export default {
title: '数据中心',
key: 10,
},
{
title: '潜客管理',
key: 60,
children: [{
title: '潜客管理权限',
key: 600,
ffid: 60,
children: [{
isbtn: true,
title: '我是按钮的',
key: 6000,
children: [{
key: 60000,
name: '新增潜在学员',
fid: 600,
ffid: 60,
}, {
key: 60001,
name: '一键导入',
fid: 600,
ffid: 60,
},
{
key: 60002,
name: '编辑学员信息',
fid: 600,
ffid: 60,
}, {
key: 60003,
name: '购课',
fid: 600,
ffid: 60,
},
],
}],
}],
},
{
title: '在线课堂',
key: 11,
......
......@@ -174,8 +174,7 @@ class AddCrmForm extends React.Component {
{getFieldDecorator('name', {
initialValue: editCrmInfo.name,
rules: [
{ required: true, message: '学员姓名不能为空' },
{ max: 20, message: '学员姓名不能超过20位!' },
{ max: 20, message: '学员姓名字数不能超过20位!' },
],
})(
<Input style={{ width: 260 }} placeholder="请填写学员姓名" />,
......
This diff is collapsed.
.teacher{
padding-top: 60px;
text-align: right;
}
.changeOperate {
margin-left: 10px;
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ import { routerRedux } from 'dva/router';
import pageStyle from './index.less';
import { pageIn, hasBtnPower, btnPermission } from '../../utils/index';
import ChangeStatusModal from './ChangeStatusModal';
import RenewEdit from '../student/RenewEdit';
import RenewEdit from './RenewEdit';
import BtnPermission from '../../components/BtnPermission';
import ClueImport from './ClueImport';
import BindSjdAccount from './BindSjdAccount';
......@@ -344,6 +344,7 @@ class Crm extends React.Component {
courseList,
operator,
schoolUserInfo,
studentInfo,
} = this.props;
const { isExpendMore } = this.state;
const columns = [
......@@ -372,22 +373,11 @@ class Crm extends React.Component {
dataIndex: 'source_type',
key: 'source_type',
render: (text, record) => {
// <Option value={1}>在线购买</Option>
// <Option value={2}>在线招生</Option>
// <Option value={3}>来电咨询</Option>
// <Option value={4}>地推</Option>
// <Option value={5}>外呼电话</Option>
// <Option value={6}>转介绍</Option>
// <Option value={7}>客户直访</Option>
// <Option value={8}>其他</Option>
// <Option value={9}>小程序线索</Option>
// <Option value={10}>商家岛活动</Option>
// <Option value={11}>导入</Option>
switch (text) {
case 1:
return '在线招生';
return '在线购买';
case 2:
return '来电咨询';
return '在线招生';
case 3:
return '来电咨询';
case 4:
......@@ -471,7 +461,9 @@ class Crm extends React.Component {
render: (text, record) => {
return (
<div className={pageStyle.tableoperatebox}>
<span className="hreflink" onClick={() => this.goBuyCourse(record)}>购课</span>
<BtnPermission btnId="60003">
<span className="hreflink" onClick={() => this.goBuyCourse(record)}>购课</span>
</BtnPermission>
<Divider type="vertical" />
<span className="hreflink" onClick={() => this.handleChangeStatus(record)}>跟进</span>
</div>
......@@ -482,8 +474,12 @@ class Crm extends React.Component {
return (
<div className={pageStyle.container}>
<div className={pageStyle.headerbox}>
<Button size="small" className={pageStyle.headerbtn} type="primary" onClick={this.goAddCrm}>添加潜在学员</Button>
<Button size="small" className={pageStyle.headerbtn} onClick={this.toImportClue}>一键导入</Button>
<BtnPermission btnId="60000">
<Button size="small" className={pageStyle.headerbtn} type="primary" onClick={this.goAddCrm}>添加潜在学员</Button>
</BtnPermission>
<BtnPermission btnId="60001">
<Button size="small" className={pageStyle.headerbtn} onClick={this.toImportClue}>一键导入</Button>
</BtnPermission>
</div>
<div className={pageStyle.searchbox}>
<Row
......@@ -610,9 +606,9 @@ class Crm extends React.Component {
classList={courseRelateClassList}
renewCourses={courseList}
operator={operator}
studentInfo={studentInfo}
close={this.closeEditClassModal}
save={this.sureRenewCourse}
isOperator
/>
</div>
);
......@@ -645,6 +641,7 @@ function mapStateToProps(state) {
courseRelateClassList,
courseList,
operator,
studentInfo,
} = state.crm;
const {
guideStep,
......@@ -679,6 +676,7 @@ function mapStateToProps(state) {
courseList,
operator,
schoolUserInfo,
studentInfo,
};
}
export default connect(mapStateToProps)(CrmForm);
......
......@@ -67,9 +67,12 @@ class AddLogModal extends React.Component {
<FormItem label="结果情况" {...formItemModalLineLayout}>
{getFieldDecorator('content', {
initialValue: '',
rules: [{ required: true, message: '结果情况不能为空' }],
rules: [
{ required: true, message: '结果情况不能为空' },
{ max: 200, message: '字数不能超过200个!' },
],
})(
<TextArea rows={4} placeholder="请输入跟进的结果情况" />,
<TextArea maxLength={210} rows={4} placeholder="请输入跟进的结果情况" />,
)}
</FormItem>
<FormItem label="沟通方式" {...formItemModalLineLayout}>
......
......@@ -22,7 +22,7 @@ import pageStyle from './index.less';
import { pageIn, hasBtnPower, btnPermission, translateType, formatDate } from '../../utils/index';
import AddLogModal from './AddLogModal';
import BtnPermission from '../../components/BtnPermission';
import RenewEdit from '../student/RenewEdit';
import RenewEdit from '../crm/RenewEdit';
const { Option } = Select;
const { TextArea } = Input;
const { Search } = Input;
......@@ -198,6 +198,7 @@ class Crm extends React.Component {
courseRelateClassList,
courseList,
operator,
studentInfo,
} = this.props;
const { tabIndex } = this.state;
const activityColumns = [
......@@ -346,13 +347,17 @@ class Crm extends React.Component {
<div className={pageStyle.rightTop}>
<div className={pageStyle.rightName}><span>{crmDetail.mobile}</span>{crmDetail.name && crmDetail.name}</div>
<div className={pageStyle.btnList}>
<Button className={pageStyle.btn} size="small" type="primary" onClick={() => this.goBuyCourse(crmDetail)}>购课</Button>
<Button className={pageStyle.btn} size="small" onClick={() => this.goEditCrm(crmDetail.id)}>编辑</Button>
<BtnPermission btnId="60003">
<Button className={pageStyle.btn} size="small" type="primary" onClick={() => this.goBuyCourse(crmDetail)}>购课</Button>
</BtnPermission>
<BtnPermission btnId="60002">
<Button className={pageStyle.btn} size="small" onClick={() => this.goEditCrm(crmDetail.id)}>编辑</Button>
</BtnPermission>
</div>
</div>
<Descriptions>
<Descriptions.Item label="备用电话">
{crmDetail && crmDetail.reserve_mobile && crmDetail.reserve_mobile.map(item => item).join('')
{crmDetail && crmDetail.reserve_mobile && crmDetail.reserve_mobile.map(item => item).join(' ')
}
</Descriptions.Item>
<Descriptions.Item label="意向课程">{crmDetail.intent_course && crmDetail.intent_course.title}</Descriptions.Item>
......@@ -462,7 +467,7 @@ class Crm extends React.Component {
operator={operator}
close={this.closeEditClassModal}
save={this.sureRenewCourse}
isOperator
studentInfo={studentInfo}
/>
</div>
);
......@@ -487,6 +492,7 @@ function mapStateToProps(state) {
courseRelateClassList,
courseList,
operator,
studentInfo,
} = state.crmdetail;
const {
guideStep,
......@@ -513,6 +519,7 @@ function mapStateToProps(state) {
courseList,
operator,
schoolUserInfo,
studentInfo,
};
}
export default connect(mapStateToProps)(CrmForm);
......
......@@ -129,7 +129,6 @@ class RenewEdit extends React.Component {
renewCourses,
operator,
toChangeOperator,
isOperator,
} = this.props;
const { selectedCourse, modeType, mybuyCourse } = this.state;
const { getFieldDecorator } = this.props.form;
......@@ -383,7 +382,7 @@ class RenewEdit extends React.Component {
})(
<span>{operator.nickname}</span>,
)}
{!isOperator && <span className={`hreflink ${pageStyle.changeOperate}`} onClick={() => toChangeOperator(true)}>修改</span>}
<span className={`hreflink ${pageStyle.changeOperate}`} onClick={() => toChangeOperator(true)}>修改</span>
</Form.Item>
</Col>
</Row>
......
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