Commit 1516015b authored by wangxuelai's avatar wangxuelai

''

parents e8a57cb6 654825d3
......@@ -151,8 +151,8 @@ export default {
},
activeurl: `${__IMGCDN__}menu/crmactive.png`,
notactiveurl: `${__IMGCDN__}menu/crm.png`,
path: '/sjd/potential',
relativePath: ['/sjd/potential', '/sjd/addpotential'],
path: '/sjd/crm',
relativePath: ['/sjd/crm', '/sjd/addcrm', '/sjd/crmdetail/:id'],
},
{
id: '30',
......
......@@ -100,7 +100,13 @@ export default {
},
* goAddCrm({ payload }, { put, select }) {
yield put(routerRedux.push({
pathname: '/sjd/addpotential',
pathname: '/sjd/addcrm',
}));
},
* goDetail({ payload }, { put, select }) {
const { id } = payload;
yield put(routerRedux.push({
pathname: `/sjd/crmdetail/${id}`,
}));
},
* pageInit({ payload }, { call, put, select }) {
......
......@@ -863,7 +863,7 @@ export default {
},
});
}
if (pathname === '/sjd/potential') {
if (pathname === '/sjd/crm') {
dispatch({
type: 'crm/queryinfo',
payload: {
......@@ -879,7 +879,31 @@ export default {
},
});
}
if (pathname === '/sjd/addpotential') {
const potentialactive = pathToRegexp('/sjd/crmdetail/:id').exec(pathname);
if (potentialactive) {
// dispatch({
// type: 'onlineclasses/findCourse',
// payload: {
// id: potentialactive[1],
// },
// });
dispatch({
type: 'updateState',
payload: {
breadcrumbList: [
{
path: 'sjd/crm',
name: '潜客管理',
},
{
path: pathname,
name: '潜客详情',
},
],
},
});
}
if (pathname === '/sjd/addcrm') {
dispatch({
type: 'addcrm/queryinfo',
payload: {
......@@ -890,7 +914,7 @@ export default {
payload: {
breadcrumbList: [
{
path: 'sjd/potential',
path: 'sjd/crm',
name: '潜客管理',
},
{
......
......@@ -159,7 +159,7 @@ class AddCrmForm extends React.Component {
>
{getFieldDecorator(`names[${index}]`, {
rules: [
{ required: true, message: '请输入您的手机号!' },
{ required: false, message: '请输入您的手机号!' },
{ pattern: /^1[3456789]{1}[0-9]{9}$/, message: '请输入正确的手机号码!' },
{ max: 11, message: '手机号长度为11位!' },
],
......
......@@ -125,6 +125,15 @@ class Crm extends React.Component {
closeClueImport = () => {
console.log('哈哈哈');
}
goDetail = (record) => {
const { dispatch } = this.props;
dispatch({
type: 'crm/goDetail',
payload: {
id: record.id,
},
});
}
render() {
const {
userPermission,
......@@ -140,7 +149,7 @@ class Crm extends React.Component {
key: 'mobile',
render: (text, record) => {
return (
<span className="hreflink">{text}</span>
<span className="hreflink" onClick={() => this.goDetail(record)}>{text}</span>
);
},
},
......
This diff is collapsed.
@import '../../less/variables.less';
.container {
background-color: #fff;
border-radius: 2px;
padding: 20px;
}
.headerbox{
background-color: #fff;
.headerbtn {
margin: 0 16px 0 0;
}
padding-bottom: 18px;
}
.searchrow {
.formitem {
display: flex;
align-items: center;
margin-bottom: 16px;
.formitemlabel {
color: #000000;
font-size: 14px;
line-height: 1;
min-width: 70px;
white-space: nowrap;
}
}
}
.selectitem {
display: block;
}
.searchbtnbox {
height: 54px;
display: flex;
align-items: flex-end;
}
.resetbtn {
margin-right: 16px;
}
.tablebox {
background: #fff;
:global {
.ant-table-fixed {
border-bottom: 1px solid #E8E8E8 !important;
}
.ant-table tbody tr:nth-child(2n) {
background-color: #FBFBFB;
}
.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 11px 10px;
}
.ant-table-bordered .ant-table-tbody tr td {
border-bottom: none;
border-right: none!important;
}
.ant-table-bordered .ant-table-thead tr th {
border-bottom: none;
border-right: none!important;
}
.ant-table-bordered .ant-table-thead tr th:last-child {
border-right: 1px solid #e8e8e8!important;
}
.ant-table-bordered .ant-table-tbody tr td:last-child {
border-right: 1px solid #e8e8e8!important;
}
.ant-table-bordered .ant-table-tbody tr:last-child {
border-bottom: 1px solid #e8e8e8!important;
}
}
}
.divideline {
color: #E9E9E9;
padding: 0 8px;
}
.alink {
color: #1890FF;
}
.classNamebox {
max-width: 250px;
word-break: break-all;
color: #1890FF;
cursor: pointer;
// background-color: #fff;
}
.tableoperatebox {
min-width: 160px;
line-height: 30px;
}
.endsearchcol {
margin-bottom: 18px;
}
.endclassfooter {
display: flex;
align-items: center;
justify-content: space-between;
}
.classroomitem {
margin-bottom: 5px;
.classroom {
color:rgba(0,0,0,0.85);
}
.aLink {
color: #1890FF;
padding-left: 21px;
}
}
.activeamount{
background-color: #cccccc;
color: #666666;
text-align: center;
line-height: 50px;
font-size: 20px;
}
.rightList {
display: flex;
align-items: center;
height: 32px;
.resetIcon {
width: 14px;
height: 14px;
cursor: pointer;
margin-right: 15px;
}
.expend {
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(102,102,102,1);
display: inline-block;
cursor: pointer;
}
}
.tablefooterbox {
color: rgba(0,0,0,0.6);
font-size: 16px;
line-height: 50px;
display: flex;
background-color: #fff;
align-items: center;
justify-content: space-between;
padding-left: 14px;
padding-right: 14px;
margin-top: 10px;
.tablefooterstatic {
color:rgba(0,0,0,0.65);
font-size: 14px;
}
}
.tabList {
display: flex;
border-bottom: 1px solid #E8E8E8;
margin-bottom: 18px;
.tabItem {
font-size:13px;
font-weight:400;
color:rgba(102,102,102,1);
line-height:18px;
padding: 0 30px 10px;
cursor: pointer;
position: relative;
&:hover {
font-weight:600;
color:#1890FF;
}
}
.tabItemActive {
font-size:13px;
font-weight:600;
color:#1890FF;
line-height:18px;
padding: 0 30px 10px;
cursor: pointer;
position: relative;
font-family:PingFangSC-Semibold,PingFang SC;
&:after {
content: '';
display: block;
width: 30%;
height: 2px;
background-color: #1890FF;
position: absolute;
bottom: 0;
left: 35%;
}
}
}
......@@ -246,6 +246,11 @@ const AddCrm = props => (
{ AddCrm => (<AddCrm {...props} />) }
</Bundle>
);
const CrmDetail = props => (
<Bundle load={() => import(/* webpackChunkName:"CrmDetail" */'./pages/crmdetail/index')}>
{ CrmDetail => (<CrmDetail {...props} />) }
</Bundle>
);
function RouterConfig({ history }) {
return (
<ConfigProvider locale={zhCN}>
......@@ -288,8 +293,9 @@ function RouterConfig({ history }) {
<Route path="/sjd/singleclass/detail/:id" exact component={SingleDetail} />
<Route path="/sjd/record" exact component={ClassRecord} />
<Route path="/sjd/permissionsetting/:id" exact component={PermissionSetting} />
<Route path="/sjd/potential" exact component={Crm} />
<Route path="/sjd/addpotential" exact component={AddCrm} />
<Route path="/sjd/crm" exact component={Crm} />
<Route path="/sjd/addcrm" exact component={AddCrm} />
<Route path="/sjd/crmdetail/:id" exact component={CrmDetail} />
<Route component={Errorpage} />
</Switch>
</SjdIndex>
......
......@@ -16,14 +16,6 @@ export function crmAdd(params) {
data,
});
}
export function courseDetail(params) {
const data = qs.stringify(params);
return request({
url: `${api.courses.courses}/${params.id}?${data}`,
method: 'GET',
data,
});
}
export function crmEdit(params) {
const data = qs.stringify(params);
return request({
......@@ -32,35 +24,3 @@ export function crmEdit(params) {
data,
});
}
export function coursesBuyOrRenew(params) {
const data = qs.stringify(params);
return request({
url: `${api.courses.coursesBuyOrRenew}`,
method: 'POST',
data,
});
}
export function coursesExit(params) {
const data = qs.stringify(params);
return request({
url: `${api.courses.coursesExit}`,
method: 'POST',
data,
});
}
export function coursesChange(params) {
const data = qs.stringify(params);
return request({
url: `${api.courses.coursesChange}`,
method: 'POST',
data,
});
}
export function coursesEliminate(params) {
const data = qs.stringify(params);
return request({
url: `${api.courses.coursesEliminate}`,
method: 'POST',
data,
});
}
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