123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743 |
- import React, { Component } from 'react';
- import '../content.less';
- import LeftTab from '../leftTab';
- import {getMenu} from '../publicMenu.js'
- import {default as SignatureStatistics} from "./operationalData/signatureStatistics";
- import {default as PublicStatistics} from "./publicStatistics/index";
- import {default as FollowUpSummary} from "./managementFollow/followUpSummary/index";
- class Content extends Component {
- constructor() {
- super();
- this.state = {
- loading: false,
- component: <div></div>,
- };
- }
- componentWillMount() {
- var ids=window.location.href.indexOf('rid=');
- var idk=window.location.href.substr(ids+4);
- var rid=idk.split('#');
- let menu=getMenu(rid);
- let curry;
- if(menu[0].subMenus.length>0){
- curry=menu[0].subMenus[0].url.split('#');
- }else{
- curry=menu[0].url.split('#');
- };
- if (window.location.hash) {
- this.getKey(window.location.hash.substr(1));
- } else {
- this.getKey(curry[1]);
- };
- }
- getKey(key) {
- switch (key) {
- // //我的单位客户
- // case 'myOrganization':
- // require.ensure([], () => {
- // const MyClient = require('./customerData/myClient').default;
- // this.setState({
- // component: <MyClient ApiUrl={''}/>
- // });
- // });
- // break;
- // // 单位客户查询
- // case 'organizationQuery':
- // require.ensure([], () => {
- // const CompanyCustomer = require('./customerData/companyCustomer').default;
- // this.setState({
- // component:<CompanyCustomer ApiUrl={''}/>,
- // });
- // });
- // break;
- //我的个人客户
- // case 'myPersonal':
- // require.ensure([], () => {
- // const IndividualCustomer = require('./individualCustomer/individualCustomer').default;
- // this.setState({
- // component: <IndividualCustomer ApiUrl={''}/>
- //
- // });
- // });
- // break;
- //我的被拒绝客户
- case 'myReject':
- require.ensure([], () => {
- const MyReject = require('./individualCustomer/myReject').default;
- this.setState({
- component: <MyReject ApiUrl={''}/>
- });
- });
- break;
- // //个人客户查询
- // case 'personalQuery':
- // require.ensure([], () => {
- // const QueryCustomer = require('./individualCustomer/queryCustomer').default;
- // this.setState({
- // component:<QueryCustomer ApiUrl={''}/>,
- // });
- // });
- // break;
- //专家查询
- case 'expertQuery':
- require.ensure([], () => {
- const ExpertQuery = require('./individualCustomer/expertQuery').default;
- this.setState({
- component:<ExpertQuery ApiUrl={''}/>,
- });
- });
- break;
- //公共客户查询
- case 'publicQuery':
- require.ensure([], () => {
- const Qublicquery = require('./individualCustomer/publicQuery').default;
- this.setState({
- component:<Qublicquery ApiUrl={''}/>,
- });
- });
- break;
- //个人客户管理
- case 'personalManage':
- require.ensure([], () => {
- const PersonalManage = require('./customerManagement/personalManages').default;
- this.setState({
- component:<PersonalManage ApiUrl={''}/>,
- });
- });
- break;
- //专家管理
- case 'expertManage':
- require.ensure([], () => {
- const ExpertManage = require('./customerManagement/expertManage').default;
- this.setState({
- component:<ExpertManage ApiUrl={''}/>,
- });
- });
- break;
- //专家审核
- case 'expertAudit':
- require.ensure([], () => {
- const ExpertReview = require('./reviewed/expertReview').default;
- this.setState({
- component:<ExpertReview ApiUrl={''}/>,
- });
- });
- break;
- //实名认证审核
- case 'identityAudit':
- require.ensure([], () => {
- const IdentityAudits = require('./reviewed/identityAudits').default;
- this.setState({
- component:<IdentityAudits ApiUrl={''}/>,
- });
- });
- break;
- //客户录入审核
- case 'enteringAudit':
- require.ensure([], () => {
- const EnteringAudit = require('./reviewed/enteringAudit').default;
- this.setState({
- component:<EnteringAudit ApiUrl={''}/>,
- });
- });
- break;
- //专家发布
- case 'expertPublish':
- require.ensure([], () => {
- const ExpertRelease = require('./release/expertRelease').default;
- this.setState({
- component:<ExpertRelease ApiUrl={''}/>,
- });
- });
- break;
- //专家发布新
- case 'releaseExpert':
- require.ensure([], () => {
- const ReleaseExpert = require('./release/releaseExpert').default;
- this.setState({
- component:<ReleaseExpert ApiUrl={''}/>,
- });
- });
- break;
- //公共客户管理
- case 'publicManage':
- require.ensure([], () => {
- const PublicManages = require('./customerManagement/publicManages').default;
- this.setState({
- component:<PublicManages ApiUrl={''}/>,
- });
- });
- break;
- //部门客户管理
- case 'adminCustomerStatistics':
- require.ensure([], () => {
- const AdminCustomerStatistics = require('./customerManagement/adminCustomerStatistics').default;
- this.setState({
- component:<AdminCustomerStatistics ApiUrl={''}/>,
- });
- });
- break;
- //部门客户管理3
- // case 'adminCustomerStatistics3':
- // require.ensure([], () => {
- // const AdminCustomerStatistics3 = require('./customerManagement/adminCustomerStatistics3').default;
- // this.setState({
- // component:<AdminCustomerStatistics3 ApiUrl={''}/>,
- // });
- // });
- // break;
- //单位客户管理
- case 'organizationManage':
- require.ensure([], () => {
- const OrganizationManage = require('./customerManagement/organizationManages').default;
- this.setState({
- component:<OrganizationManage ApiUrl={''}/>,
- });
- });
- break;
- //我的业务
- case 'myBusiness':
- require.ensure([], () => {
- const MyBusiness = require('./customerService/myBusiness').default;
- this.setState({
- component:<MyBusiness ApiUrl={''}/>,
- });
- });
- break;
- //业务管理
- case 'businessMange':
- require.ensure([], () => {
- const BusinessMange = require('./customerService/businessManges').default;
- this.setState({
- component:<BusinessMange ApiUrl={''}/>,
- });
- });
- break;
- //业务查询
- case 'businessQuery':
- require.ensure([], () => {
- const ServiceQuery = require('./customerService/serviceQuery').default;
- this.setState({
- component:<ServiceQuery ApiUrl={''}/>,
- });
- });
- break;
- //客户拜访统计
- case 'visitStatistics':
- require.ensure([], () => {
- const VisitStatistics = require('./statistics/visitStatistics').default;
- this.setState({
- component:<VisitStatistics ApiUrl={''}/>,
- });
- });
- break;
- //状态统计
- case 'statusStatistics':
- require.ensure([], () => {
- const StatusStatistics = require('./statistics/statusStatistics').default;
- this.setState({
- component:<StatusStatistics ApiUrl={''}/>,
- });
- });
- break;
- //进度统计
- case 'followStatistics':
- require.ensure([], () => {
- const FollowStatistics = require('./statistics/followStatistics').default;
- this.setState({
- component:<FollowStatistics ApiUrl={''}/>,
- });
- });
- break;
- /*
- *报表开发
- */
- case 'personalReport':
- require.ensure([], () => {
- const Jurisdiction = require('./report/personalReport').default;
- this.setState({
- component: <Jurisdiction ApiUrl={''}/>
- });
- });
- break;
- case 'departmentReport':
- require.ensure([], () => {
- const DepartmentReport = require('./report/departmentReport').default;
- this.setState({
- component: <DepartmentReport ApiUrl={''}/>
- });
- });
- break;
- /*拜访记录统计*/
- //客户营销日统计
- case 'diurnalStatistics':
- require.ensure([], () => {
- const DiurnalStatistics = require('./customerMarketing/diurnalStatistics').default;
- this.setState({
- component: <DiurnalStatistics ApiUrl={''}/>
- });
- });
- break;
- //客户营销时段统计
- case 'timeStatistics':
- require.ensure([], () => {
- const TimeStatistics = require('./customerMarketing/timeStatistics').default;
- this.setState({
- component: <TimeStatistics ApiUrl={''}/>
- });
- });
- break;
- /*意向客户*/
- //个人意向客户
- case 'personalIntention':
- require.ensure([], () => {
- const PersonalIntention = require('./NEW/intentionCustomer/intentionCustomer').default;
- this.setState({
- component: <PersonalIntention
- intentionState={1}
- ApiUrl={'/api/admin/customer/listPrivatePersonalCustomer'}
- detailApi={'/api/admin/customer/findPersonalCustomerDetail'}
- />
- });
- });
- break;
- //渠道-(营销总监)
- case 'channel':
- require.ensure([], () => {
- const CompanyIntention = require('./NEW/intentionCustomer/channel').default;
- this.setState({
- component: <CompanyIntention
- type={2} // 0营销员 1渠道专员 2营销总监 3营销经理 4释放 5未分配 6已分配 7已签单
- channel={false} //是否能导入渠道
- deliver={1} //是否能转交或分配 0不能 1总监分配 2经理分配
- followUp={true} //是否能跟进
- isGuidanceLv={true} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={false} //是否可以编辑指导
- recovery={false} //是否可以回收
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //渠道-(营销经理)
- case 'channelManage':
- require.ensure([], () => {
- const CompanyIntention = require('./NEW/intentionCustomer/channel').default;
- this.setState({
- component: <CompanyIntention
- type={3} // 0营销员 1渠道专员 2营销总监 3营销经理 4释放 5未分配 6已分配 7已签单
- channel={false} //是否能导入渠道
- deliver={2} //是否能转交或分配 0不能 1总监分配 2经理分配
- followUp={true} //是否能跟进
- isGuidanceLv={false} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={true} //是否可以编辑指导
- recovery={true} //是否可以回收
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //渠道-(营销员)
- case 'channelMarketing':
- require.ensure([], () => {
- const CompanyIntention = require('./NEW/intentionCustomer/channel').default;
- this.setState({
- component: <CompanyIntention
- type={0} // 0营销员 1渠道专员 2营销总监 3营销经理 4释放 5未分配 6已分配 7已签单
- channel={false} //是否能导入渠道
- deliver={0} //是否能转交或分配 0不能 1总监分配 2经理分配
- followUp={true} //是否能跟进
- isGuidanceLv={false} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={true} //是否可以编辑指导
- recovery={true} //是否可以回收
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //渠道-(渠道专员)
- case 'channelCommissioner':
- require.ensure([], () => {
- const CompanyIntention = require('./NEW/intentionCustomer/channel').default;
- this.setState({
- component: <CompanyIntention
- type={1} // 0营销员 1渠道专员 2营销总监 3营销经理 4释放 5未分配 6已分配 7已签单
- channel={true} //是否能导入渠道
- deliver={0}
- followUp={false}
- isGuidanceLv={true} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={false} //是否可以编辑指导
- recovery={false} //是否可以回收
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //渠道统计-(渠道总监)
- case 'channelStatistics':
- require.ensure([], () => {
- const CompanyIntention = require('./NEW/intentionCustomer/channelStatistics').default;
- this.setState({
- component: <CompanyIntention/>
- });
- });
- break;
- //单位意向客户
- case 'companyIntention':
- require.ensure([], () => {
- const CompanyIntention = require('./NEW/intentionCustomer/intentionCustomer').default;
- this.setState({
- component: <CompanyIntention
- intentionState={0}
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户跟进汇总(看所有人的)
- case 'followUpSummaryAdmin':
- require.ensure([], () => {
- const FollowUpSummary = require('./managementFollow/followUpSummary/index').default;
- this.setState({
- component: <FollowUpSummary
- isCustomerAdmin
- isGuidanceLv={true} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={false} //是否可以编辑指导
- shiroType={2}
- />
- });
- });
- break;
- //客户跟进汇总(只能看自己的)
- case 'followUpSummaryOrdinary':
- require.ensure([], () => {
- const FollowUpSummary = require('./managementFollow/followUpSummary/index').default;
- this.setState({
- component: <FollowUpSummary
- isCustomerAdmin
- isGuidanceLv={true} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={false} //是否可以编辑指导
- shiroType={0}
- />
- });
- });
- break;
- //客户跟进汇总(既能看自己的也能看自己下级的)
- case 'followUpSummaryManager':
- require.ensure([], () => {
- const FollowUpSummary = require('./managementFollow/followUpSummary/index').default;
- this.setState({
- component: <FollowUpSummary
- isCustomerAdmin
- isGuidanceLv={true} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={false} //是否可以编辑指导
- shiroType={1}
- />
- });
- });
- break;
- //跟进管理 营销经理
- case 'customerFollow':
- require.ensure([], () => {
- const CustomerFollow = require('./managementFollow/customerFollow/index').default;
- this.setState({
- component: <CustomerFollow
- isGuidanceLv={true} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={true} //是否可以编辑指导
- />
- });
- });
- break;
- //跟进管理 营销总监 和 总裁
- case 'readOnlyCustomerFollow':
- require.ensure([], () => {
- const CustomerFollow = require('./managementFollow/customerFollow/index').default;
- this.setState({
- component: <CustomerFollow
- isGuidanceLv={true} //是否可查看指导 也用于判断是否为跟进管理页面
- isEditGuidanceLv={false} //是否可以编辑指导
- />
- });
- });
- break;
- //部门统计 总裁账户可见
- case 'departmentStatistics':
- require.ensure([], () => {
- const DepartmentStatistics = require('./statistics/departmentStatistics/index').default;
- this.setState({
- component: <DepartmentStatistics/>
- });
- });
- break;
- //客户资料
- case 'crm':
- require.ensure([], () => {
- const Crm = require('./NEW/crm/crm').default;
- this.setState({
- component: <Crm
- intentionState={0}
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户资料维护(营销员)
- case 'crmMaintain':
- require.ensure([], () => {
- const Crm = require('./NEW/crm/crm').default;
- this.setState({
- component: <Crm
- isMaintain
- intentionState={0}
- shiroType={1}//0 咨询师 1营销员
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户资料维护(咨询师)
- case 'crmMaintainZXS':
- require.ensure([], () => {
- const Crm = require('./NEW/crm/crm').default;
- this.setState({
- component: <Crm
- isMaintain
- intentionState={0}
- shiroType={0}//0 咨询师 1营销员
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户资料维护(超级管理员以及客服查看)
- case 'crmMaintainAdmin':
- require.ensure([], () => {
- const Crm = require('./NEW/crm/crm').default;
- this.setState({
- component: <Crm
- isMaintain
- intentionState={0}
- shiroType={2}//0 咨询师 1营销员 2管理员
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户资料
- case 'crmCount':
- require.ensure([], () => {
- const CrmCount = require('./NEW/crm/crmCount').default;
- this.setState({
- component: <CrmCount
- intentionState={0}
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户资料
- case 'crmAll':
- require.ensure([], () => {
- const CrmAll = require('./NEW/crm/crmAll').default;
- this.setState({
- component: <CrmAll
- intentionState={0}
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户资料
- case 'patentPayment':
- require.ensure([], () => {
- const PatentPayment = require('./NEW/crm/patentPayment').default;
- this.setState({
- component: <PatentPayment
- intentionState={0}
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- //客户资料-仅读
- case 'patentPaymentOnlyRead':
- require.ensure([], () => {
- const PatentPayment = require('./NEW/crm/patentPayment').default;
- this.setState({
- component: <PatentPayment
- isOnlyRead={true}
- intentionState={0}
- ApiUrl={'/api/admin/customer/listPrivateOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
- />
- });
- });
- break;
- /*签单客户*/
- //个人签单客户
- case 'personalSign':
- require.ensure([], () => {
- const PersonalSign = require('./NEW/signCustomer/signCustomer').default;
- this.setState({
- component: <PersonalSign
- intentionState={1}
- ApiUrl={'/api/admin/customer/listSignPersonalCustomer'}
- //ApiUrl={'/api/admin/customer/listPrivatePersonalCustomer'}
- detailApi={'/api/admin/customer/findPersonalCustomerDetail'}
- />
- });
- });
- break;
- //单位签单客户
- case 'companySign':
- require.ensure([], () => {
- const CompanySign = require('./NEW/signCustomer/signCustomer').default;
- this.setState({
- component: <CompanySign
- intentionState={0}
- ApiUrl={'/api/admin/customer/listSignOrganizationCustomer'}
- detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}/>
- });
- });
- break;
- //个人客户查询
- case 'personalQuery':
- require.ensure([], () => {
- const PersonalQuery = require('./NEW/query/queryCutomer').default;
- this.setState({
- component: <PersonalQuery
- intentionState={1}
- ApiUrl={'/api/admin/customer/listAllPersonalCustomer'}
- detailApi={'/api/admin/customer/getLockedProject'}
- />
- });
- });
- break;
- //单位客户查询
- case 'organizationQuery':
- require.ensure([], () => {
- const CompanyQuery = require('./NEW/query/queryCutomer').default;
- this.setState({
- component: <CompanyQuery
- intentionState={0}
- ApiUrl={'/api/admin/customer/listAllOrganizationCustomer'}
- detailApi={'/api/admin/customer/getLockedProject'}
- />
- });
- });
- break;
- //个人公共客户
- case 'personalPublicCustomer':
- require.ensure([], () => {
- const PersonalPublicCustomer = require('./NEW/publicCustomer/publicCustomer').default;
- this.setState({
- component: <PersonalPublicCustomer
- intentionState={1}
- ApiUrl={'/api/admin/customer/listPublicPersonalCustomer'}
- />
- });
- });
- break;
- //高新复审总数
- case 'reexamine':
- require.ensure([], () => {
- const Reexamine = require('./operationalData/reexamine').default;
- this.setState({
- component: <Reexamine/>
- });
- });
- break;
- //签单统计表
- case 'signatureStatistics':
- require.ensure([], () => {
- const SignatureStatistics = require('./operationalData/signatureStatistics').default;
- this.setState({
- component: <SignatureStatistics/>
- });
- });
- break;
- //面谈统计表
- case 'interviewStatistics':
- require.ensure([], () => {
- const InterviewStatistics = require('./operationalData/interviewStatistics').default;
- this.setState({
- component: <InterviewStatistics/>
- });
- });
- break;
- //全国应收款统计表
- case 'receivablesStatistics':
- require.ensure([], () => {
- const ReceivablesStatistics = require('./operationalData/receivablesStatistics').default;
- this.setState({
- component: <ReceivablesStatistics/>
- });
- });
- break;
- //公出统计
- case 'publicStatistics':
- require.ensure([], () => {
- const PublicStatistics = require('./publicStatistics/index').default;
- this.setState({
- component: <PublicStatistics/>
- });
- });
- break;
- //公出汇总
- case 'publicSummary':
- require.ensure([], () => {
- const PublicSummary = require('./publicSummary/index').default;
- this.setState({
- component: <PublicSummary/>
- });
- });
- break;
- //单位公共客户
- case 'organizationPublicCustomer':
- require.ensure([], () => {
- const OrganizationPublicCustomer = require('./NEW/publicCustomer/publicCustomer').default;
- this.setState({
- component: <OrganizationPublicCustomer
- intentionState={0}
- ApiUrl={'/api/admin/customer/listPublicOrganizationCustomer'}
- />
- });
- });
- break;
- default:
- require.ensure([], () => {
- const Module = require('../module').default;
- this.setState({
- component:<Module ApiUrl={''}/>
- });
- });
- };
- window.location.hash = key;
- }
- render() {
- return (
- <div className="manage-content">
- <LeftTab handlekey={this.getKey.bind(this)} />
- <div className="content-right">
- {this.state.component}
- </div>
- </div>
- )
- }
- }
- export default Content;
|