Browse Source

渠道统计

HW 3 years ago
parent
commit
be68f813b6

+ 22 - 2
js/component/dataDic.js

@@ -1549,7 +1549,12 @@ module.exports = {
     },
     {
       value: "3",
-      key: "已存在私有",
+      key: "已存在自己私有客户库",
+      color:'#108ee9'
+    },
+    {
+      value: "12",
+      key: "已存在他人私有客户库",
       color:'#108ee9'
     },
     {
@@ -1559,7 +1564,12 @@ module.exports = {
     },
     {
       value: "5",
-      key: "已存在签单",
+      key: "已存在自己签单库",
+      color:'#316388'
+    },
+    {
+      value: "13",
+      key: "已存在他人签单库",
       color:'#316388'
     },
     {
@@ -1573,6 +1583,16 @@ module.exports = {
       color:'#fa0e84'
     },
     {
+      value: "10",
+      key: "已存在自己渠道库",
+      color:'#461ddb'
+    },
+    {
+      value: "11",
+      key: "已存在他人渠道库",
+      color:'#461ddb'
+    },
+    {
       value: "8",
       key: "已释放",
       color:'#0c0c0c'

+ 24 - 12
js/component/manageCenter/customer/NEW/intentionCustomer/channel.jsx

@@ -201,7 +201,19 @@ class Channel extends Component{
         this.changeAssigner = this.changeAssigner.bind(this);
     }
 
+    componentWillReceiveProps (nextProps) {
+        let next = JSON.stringify(nextProps);
+        let props = JSON.stringify(this.props);
+        if(next !== props){
+            location.reload();
+        }
+    }
+
     componentDidMount() {
+        this.initialization();
+    }
+
+    initialization(){
         //城市
         let provinces = [];
         provinceList.map(function (item) {
@@ -302,16 +314,16 @@ class Channel extends Component{
             dataIndex: "remarks",
             key: "remarks",
             render: (text) => {
-             return (
-                 <Tooltip placement="topLeft" title={text}>
-                     <div style={{
-                         maxWidth:'150px',
-                         overflow:'hidden',
-                         textOverflow: "ellipsis",
-                         whiteSpace:'nowrap',
-                     }}>{text}</div>
-                 </Tooltip>
-             )
+                return (
+                    <Tooltip placement="topLeft" title={text}>
+                        <div style={{
+                            maxWidth:'150px',
+                            overflow:'hidden',
+                            textOverflow: "ellipsis",
+                            whiteSpace:'nowrap',
+                        }}>{text}</div>
+                    </Tooltip>
+                )
             }
         });
         this.setState({
@@ -338,7 +350,7 @@ class Channel extends Component{
             crossDomain: false,
             url: globalConfig.context + '/api/admin/customer/listChannelCustomer',
             data: {
-                type:this.props.channel ? 1 : undefined,
+                type:this.props.type,
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
                 name: this.state.nameSearch,
@@ -740,7 +752,7 @@ class Channel extends Component{
                             />
                             <Select
                                 placeholder="分配状态"
-                                style={{ width: 100 }}
+                                style={{ width: 170 }}
                                 value={this.state.statusSearch}
                                 onChange={(e) => {
                                     this.setState({ statusSearch: e });

+ 307 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/channelStatistics.jsx

@@ -0,0 +1,307 @@
+import React,{Component} from "react";
+import {Button, DatePicker, message, Select, Spin, Table, Tabs} from "antd";
+import moment from "moment";
+import {ChooseList} from "../../../order/orderNew/chooseList";
+import $ from "jquery/src/ajax";
+import {
+    ShowModal,
+} from "@/tools.js";
+import ShowModalDiv from "@/showModal.jsx";
+import StatisticalDetails from './statisticalDetails';
+
+import './channelStatistics.less';
+
+const {TabPane} = Tabs;
+const { RangePicker } = DatePicker;
+
+class ChannelStatistics extends Component{
+    constructor(props) {
+        super(props);
+        this.state={
+            columns: [
+                {
+                    title: "编号",
+                    dataIndex: "key",
+                    key: "key",
+                },
+                {
+                    title: "渠道专员",
+                    dataIndex: "name",
+                    key: "name",
+                },
+                {
+                    title: "当前客户总数",
+                    dataIndex: "counts",
+                    key: "counts",
+                    className:'content',
+                    render: (text, record, index) => {
+                        return (
+                            <div className='item' onClick={()=>{
+                                this.tableRowClick(1,record);
+                            }}>
+                                {text}
+                            </div>
+                        )
+                    }
+                },
+                {
+                    title: "释放客数",
+                    dataIndex: "common",
+                    key: "common",
+                    className:'content',
+                    render: (text, record, index) => {
+                        return (
+                            <div className='item' onClick={()=>{
+                                this.tableRowClick(4,record);
+                            }}>
+                                {text}
+                            </div>
+                        )
+                    }
+                },
+                {
+                    title: "未分配数",
+                    dataIndex: "unallocated",
+                    key: "unallocated",
+                    className:'content',
+                    render: (text, record, index) => {
+                        return (
+                            <div className='item' onClick={()=>{
+                                this.tableRowClick(5,record);
+                            }}>
+                                {text}
+                            </div>
+                        )
+                    }
+                },
+                {
+                    title: "已分配数",
+                    dataIndex: "allocated",
+                    key: "allocated",
+                    className:'content',
+                    render: (text, record, index) => {
+                        return (
+                            <div className='item' onClick={()=>{
+                                this.tableRowClick(6,record);
+                            }}>
+                                {text}
+                            </div>
+                        )
+                    }
+                },
+                {
+                    title: "已签单数",
+                    dataIndex: "sign",
+                    key: "sign",
+                    className:'content',
+                    render: (text, record, index) => {
+                        return (
+                            <div className='item' onClick={()=>{
+                                this.tableRowClick(7,record);
+                            }}>
+                                {text}
+                            </div>
+                        )
+                    }
+                },
+            ],
+            changeList:[],
+            dataSource:[],
+            detailsType:'',// 0营销员 1渠道专员 2营销总监 3营销经理 4释放 5未分配 6已分配 7已签单
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return "共" + total + "条数据";
+                },
+            },
+            pageNo:1,
+            listLoading:false,
+
+            releaseDate:[],
+            visible: false,
+        }
+        this.tableRowClick = this.tableRowClick.bind(this);
+        this.loadData = this.loadData.bind(this);
+        this.search = this.search.bind(this);
+        this.reset = this.reset.bind(this);
+        this.changeList = this.changeList.bind(this);
+        this.onCancel = this.onCancel.bind(this);
+    }
+
+    componentDidMount() {
+        this.loadData();
+    }
+
+    loadData(pageNo = 1) {
+        this.setState({
+            listLoading: true,
+            selectedRows: [],
+            selectedRowKeys: [],
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/customer/listChannelCounts',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                startTime: this.state.releaseDate[0],
+                endTime: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                ShowModal(this);
+                let theArr = [];
+                if (data.error.length > 0) {
+                    message.warning(data.error[0].message);
+                } else {
+                    if(data.data.list.length === 0 && pageNo !== 1){
+                        this.loadData(pageNo - 1)
+                    }else{
+                        for (let i = 0; i < data.data.list.length; i++) {
+                            let thisdata = data.data.list[i];
+                            thisdata.key = (pageNo - 1) * 10 + i + 1;
+                            theArr.push(thisdata);
+                        }
+                        this.state.pagination.current = data.data.pageNo;
+                        this.state.pagination.total = data.data.totalCount;
+                        this.setState({
+                            pageNo: data.data.pageNo,
+                            dataSource: theArr,
+                            pagination: this.state.pagination,
+                        })
+                    }
+                }
+            }.bind(this),
+        }).always(
+            function () {
+                this.setState({
+                    listLoading: false,
+                });
+            }.bind(this)
+        );
+    }
+
+    search(){
+        this.loadData();
+    }
+
+    reset(){
+        this.setState({
+            releaseDate:[],
+        },()=>{
+            this.loadData();
+        })
+    }
+
+    onCancel(){
+        this.setState({
+            aid:'',
+            visible: false,
+            detailsType:'',
+        })
+    }
+
+    changeList(arr) {
+        const newArr = [];
+        this.state.columns.forEach(item => {
+            arr.forEach(val => {
+                if (val === item.title) {
+                    newArr.push(item);
+                }
+            });
+        });
+        this.setState({
+            changeList: newArr
+        });
+    }
+
+    tableRowClick(type,record) {
+        this.setState({
+            visible: true,
+            aid:record.aid,
+            detailsType:type
+        })
+    }
+
+    render() {
+        return (
+            <div className="user-content">
+                <ShowModalDiv ShowModal={this.state.showModal} />
+                <div className="content-title">
+                    <span>渠道客户统计</span>
+                </div>
+                <div className="user-search">
+                    <Tabs
+                        defaultActiveKey="1"
+                        className="test"
+                    >
+                        <TabPane tab="搜索" key="1" style={{paddingTop:'10px'}}>
+                            <RangePicker
+                                value={[
+                                    this.state.releaseDate[0]
+                                        ? moment(this.state.releaseDate[0])
+                                        : null,
+                                    this.state.releaseDate[1]
+                                        ? moment(this.state.releaseDate[1])
+                                        : null,
+                                ]}
+                                onChange={(data, dataString) => {
+                                    this.setState({ releaseDate: dataString });
+                                }}
+                            />
+                            <Button
+                                type="primary"
+                                style={{ marginLeft: "10px", marginRight: 10 }}
+                                onClick={this.search}
+                            >
+                                搜索
+                            </Button>
+                            <Button onClick={this.reset}>重置</Button>
+                        </TabPane>
+                        <TabPane tab="更改表格显示数据" key="3">
+                            <div style={{ marginLeft: 10 }}>
+                                <ChooseList
+                                    columns={this.state.columns}
+                                    changeFn={this.changeList}
+                                    changeList={this.state.changeList}
+                                    top={55}
+                                    margin={11}
+                                />
+                            </div>
+                        </TabPane>
+                    </Tabs>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.listLoading}>
+                        <Table
+                            size="middle"
+                            className={'intentionCustomerTable'}
+                            columns={
+                                this.state.changeList.length !== 0
+                                    ? this.state.changeList
+                                    : this.state.columns
+                            }
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}
+                        />
+                    </Spin>
+                </div>
+                <StatisticalDetails
+                    visible={this.state.visible}
+                    onCancel={this.onCancel}
+                    aid={this.state.aid}
+                    type={this.state.detailsType}
+                />
+            </div>
+        )
+    }
+}
+
+export default ChannelStatistics;

+ 11 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/channelStatistics.less

@@ -0,0 +1,11 @@
+.content{
+  padding: 0 !important;
+  .item{
+    padding: 10px 8px;
+    cursor: pointer;
+  }
+  .item:hover{
+    background: #58a3ffd1;
+    color: white;
+  }
+}

+ 3 - 3
js/component/manageCenter/customer/NEW/intentionCustomer/duplicateData.jsx

@@ -24,9 +24,9 @@ class DuplicateData extends Component{
                     title: "社会性质",
                     dataIndex: "societyTag",
                     key: "societyTag",
-                    render: (text) => {
-                        return getSocialAttribute(text);
-                    },
+                    // render: (text) => {
+                    //     return getSocialAttribute(text);
+                    // },
                 },
                 {
                     title: "客户联系人",

+ 315 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/statisticalDetails.jsx

@@ -0,0 +1,315 @@
+import React,{Component} from "react";
+import {Button, message, Modal, Spin, Table, Tooltip} from "antd";
+import {
+    getSocialAttribute,
+    getChannelAllocationStatus
+} from "@/tools.js";
+import {
+    channelAllocationStatus
+} from "@/dataDic.js";
+import $ from "jquery/src/ajax";
+import IntentionDetail from "./intentionDetail/intentionDetail";
+
+class StatisticalDetails extends Component{
+    constructor(props) {
+        super(props);
+        this.state={
+            columns: [
+                {
+                    title: "客户名称",
+                    dataIndex: "userName",
+                    key: "userName",
+                    render: (text,record) => {
+                        return (
+                            <span>
+                                {record.recovery === 1 ? <div style={{
+                                    background:'#ef7207',
+                                    color:'#FFF',
+                                    padding: '1px 7px',
+                                    borderRadius:'5px',
+                                    fontSize:'12px',
+                                    display: 'inline-block',
+                                    marginRight:'10px'
+                                }}>
+                                    回收
+                                </div> : null}
+                                {text}
+				            </span>
+                        )
+                    },
+                },
+                {
+                    title: "地区",
+                    dataIndex: "locationProvince",
+                    key: "locationProvince",
+                },
+                {
+                    title: "社会性质",
+                    dataIndex: "societyTag",
+                    key: "societyTag",
+                    render: (text) => {
+                        return getSocialAttribute(text);
+                    },
+                },
+                {
+                    title: "渠道专员",
+                    dataIndex: "channelName",
+                    key: "channelName",
+                },
+                {
+                    title: "客户联系人",
+                    dataIndex: "contacts",
+                    key: "contacts",
+                },
+                {
+                    title: "联系电话",
+                    dataIndex: "contactMobile",
+                    key: "contactMobile",
+                },
+                {
+                    title: "渠道初始时间",
+                    dataIndex: "createTimes",
+                    key: "createTimes",
+                },
+                {
+                    title: "分配状态",
+                    dataIndex: "status",
+                    key: "status",
+                    render: (text) => (
+                        getChannelAllocationStatus(text,true)
+                    )
+                },
+                {
+                    title: "当前跟进人",
+                    dataIndex: "adminName",
+                    key: "adminName",
+                    render: (text, record) => {
+                        return (
+                            record.status !== 0 ? text : ''
+                        )
+                    }
+                },
+                {
+                    title: "跟进操作",
+                    dataIndex: "abc",
+                    key: "abc",
+                    render: (text, record, index) => {
+                        return (
+                            <div style={{
+                                display: 'flex',
+                                flexFlow:'row',
+                                alignItems:'center',
+                            }}>
+                                <Button
+                                    onClick={(e) => {
+                                        e.stopPropagation();
+                                        this.tableRowClick(record);
+                                    }}
+                                    type="primary"
+                                >
+                                    查看指导
+                                </Button>
+                            </div>
+                        );
+                    },
+                },
+                {
+                    title: "备注",
+                    dataIndex: "remarks",
+                    key: "remarks",
+                    render: (text) => {
+                        return (
+                            <Tooltip placement="topLeft" title={text}>
+                                <div style={{
+                                    maxWidth:'150px',
+                                    overflow:'hidden',
+                                    textOverflow: "ellipsis",
+                                    whiteSpace:'nowrap',
+                                }}>{text}</div>
+                            </Tooltip>
+                        )
+                    }
+                }
+            ],
+            dataSource:[],
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return "共" + total + "条数据";
+                },
+            },
+            pageNo:1,
+            listLoading:false,
+            categoryArr:[],
+        }
+        this.tableRowClick = this.tableRowClick.bind(this);
+        this.category = this.category.bind(this);
+        this.detailCloseDesc = this.detailCloseDesc.bind(this);
+        this.loadData = this.loadData.bind(this);
+    }
+
+    tableRowClick(record) {
+        this.setState({
+            rowData:record,
+            modalVisible: true,
+            basicState: true,
+            contactState: true,
+            modalName: record.userName
+        })
+    }
+
+    componentWillReceiveProps (nextProps){
+        if(nextProps.visible){
+            this.loadData(1,nextProps);
+            this.category();
+        }
+    }
+
+    loadData(pageNo = 1,nextProps=this.props) {
+        this.setState({
+            listLoading: true,
+            selectedRows: [],
+            selectedRowKeys: [],
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/customer/listChannelCustomer',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                type:nextProps.type,                     // 0营销员 1渠道专员 2营销总监 3营销经理 4释放 5未分配 6已分配 7已签单
+                aid:nextProps.aid
+            },
+            success: function (data) {
+                let theArr = [];
+                if (data.error.length > 0) {
+                    message.warning(data.error[0].message);
+                } else {
+                    if(data.data.list.length === 0 && pageNo !== 1){
+                        this.loadData(pageNo - 1)
+                    }else{
+                        for (let i = 0; i < data.data.list.length; i++) {
+                            let thisdata = data.data.list[i];
+                            let diqu =
+                                (thisdata.province == null ? "" : thisdata.province) +
+                                (thisdata.city == null ? "" : "-" + thisdata.city) +
+                                (thisdata.area == null ? "" : "-" + thisdata.area);
+                            thisdata.key = i;
+                            thisdata.id = thisdata.uid;
+                            thisdata.lastFollowTime = thisdata.lastFollowTime &&
+                                thisdata.lastFollowTime.split(" ")[0];
+                            thisdata.transferTime= thisdata.transferTime && thisdata.transferTime.split(" ")[0];
+                            thisdata.surplusFollowTime = thisdata.surplusFollowTime && thisdata.surplusFollowTime.split(" ")[0];
+                            thisdata.surplusSignTime = thisdata.surplusSignTime && thisdata.surplusSignTime.split(" ")[0];
+                            thisdata.locationProvince = diqu;
+                            theArr.push(thisdata);
+                        }
+                        this.state.pagination.current = data.data.pageNo;
+                        this.state.pagination.total = data.data.totalCount;
+                        this.setState({
+                            pageNo: data.data.pageNo,
+                            dataSource: theArr,
+                            pagination: this.state.pagination,
+                        })
+                    }
+                }
+            }.bind(this),
+        }).always(
+            function () {
+                this.setState({
+                    listLoading: false,
+                });
+            }.bind(this)
+        );
+    }
+
+    category() {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/Varieties/getSuperList",
+            data: {},
+            success: function (data) {
+                let thedata = data.data;
+                let theArr = [];
+                if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    thedata = {};
+                } else {
+                    thedata.map(function (item, index) {
+                        theArr.push({
+                            value: item.id,
+                            key: item.cname,
+                        });
+                    });
+                }
+                this.setState({
+                    categoryArr: theArr,
+                });
+            }.bind(this),
+        });
+    }
+
+    detailCloseDesc(){
+        this.setState({
+            rowData:'',
+            modalVisible: false,
+            basicState: false,
+            contactState: false,
+            modalName: '',
+        },()=>{
+            this.loadData(this.state.pageNo);
+        })
+    }
+
+    render() {
+        return (
+            <Modal
+                maskClosable={false}
+                className="customeDetails"
+                footer=""
+                title="详细列表"
+                width="1200px"
+                visible={this.props.visible}
+                onOk={this.props.onCancel}
+                onCancel={this.props.onCancel}
+            >
+                <Spin spinning={this.state.listLoading}>
+                    <Table
+                        size="middle"
+                        className={'intentionCustomerTable'}
+                        columns={this.state.columns}
+                        dataSource={this.state.dataSource}
+                        pagination={this.state.pagination}
+                        onRowClick={this.tableRowClick}
+                    />
+                </Spin>
+                <IntentionDetail
+                    categoryArr={this.state.categoryArr}
+                    detailApi='/api/admin/customer/findOrganizationCustomerDetail'
+                    IntentionData={this.state.rowData}
+                    modalVisible={this.state.modalVisible}
+                    name={this.state.modalName}
+                    closeDesc={this.detailCloseDesc}
+                    basicState={this.state.basicState}
+                    contactState={this.state.contactState}
+                    isGuidanceLv={true}
+                    isEditGuidanceLv={false}
+                />
+            </Modal>
+        );
+    }
+}
+
+export default StatisticalDetails;

+ 13 - 0
js/component/manageCenter/customer/content.jsx

@@ -306,6 +306,7 @@ class Content extends Component {
                     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}             //是否能跟进
@@ -323,6 +324,7 @@ class Content extends Component {
                     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}             //是否能跟进
@@ -340,6 +342,7 @@ class Content extends Component {
                     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}               //是否能跟进
@@ -357,6 +360,7 @@ class Content extends Component {
                     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}
@@ -368,6 +372,15 @@ class Content extends Component {
                     });
                 });
                 break;
+            //渠道统计-(渠道总监)
+            case 'channelStatistics':
+                require.ensure([], () => {
+                    const CompanyIntention = require('./NEW/intentionCustomer/channelStatistics').default;
+                    this.setState({
+                        component: <CompanyIntention/>
+                    });
+                 });
+                break;
             //单位意向客户
             case 'companyIntention':
                 require.ensure([], () => {

+ 64 - 0
js/component/manageCenter/index/content.jsx

@@ -6,6 +6,7 @@ import $ from 'jquery/src/ajax';
 import '../content.less';
 import './content.less';
 import LeftTab from './leftTab.jsx';
+import FollowDetail from "../customer/NEW/intentionCustomer/followDetail";
 
 
 const TabPane = Tabs.TabPane;
@@ -15,6 +16,7 @@ const MessageModal = React.createClass({
         return {
             newVisible: false,
             loading: false,
+            categoryArr:[],
             pagination: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -79,6 +81,24 @@ const MessageModal = React.createClass({
                         )
                     }
                 },
+                {
+                    title: "操作",
+                    dataIndex: "abc",
+                    key: "abc",
+                    render: (text, record) => {
+                        return (
+                            record.noticeType === 48 || record.noticeType === 49 ?
+                                <Button type="primary" onClick={()=>{
+                                    this.category();
+                                    record.id = record.uid;
+                                    this.setState({
+                                        followData: record,
+                                        visitModul: true,
+                                    });
+                                }}>立即跟进</Button> : null
+                        )
+                    }
+                }
                 //  {
                 //     title: '公司',
                 //     dataIndex: 'unitName',
@@ -92,6 +112,44 @@ const MessageModal = React.createClass({
             data: []
         };
     },
+    closeDesc(){
+        this.setState({
+            categoryArr:[],
+            followData:'',
+            visitModul:false
+        },()=>{
+            this.loadReaded(this.state.pagination.current);
+        })
+    },
+    category() {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/Varieties/getSuperList",
+            data: {},
+            success: function (data) {
+                let thedata = data.data;
+                let theArr = [];
+                if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    thedata = {};
+                } else {
+                    thedata.map(function (item, index) {
+                        theArr.push({
+                            value: item.id,
+                            key: item.cname,
+                        });
+                    });
+                }
+                this.setState({
+                    categoryArr: theArr,
+                });
+            }.bind(this),
+        });
+    },
     //主菜单请求
     mainMenu(){
     	this.setState({
@@ -424,6 +482,12 @@ const MessageModal = React.createClass({
                 我已阅读以上信息
               </Button>
             </Modal>
+              <FollowDetail
+                  categoryArr={this.state.categoryArr}
+                  followData={this.state.followData}
+                  visitModul={this.state.visitModul}
+                  closeDesc={this.closeDesc}
+              />
           </div>
         );
     }

+ 20 - 2
js/component/manageCenter/order/orderNew/billing.jsx

@@ -415,8 +415,26 @@ const MyService = Form.create()(
             title: "客户名称",
             dataIndex: "userName",
             key: "userName",
-            render: text => {
-              return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
+            render: (text,record) => {
+              return (
+                  <span>
+                    {
+                      record.totalAmount >= 10 ?
+                          <div style={{
+                            background:'#ef7207',
+                            color:'#FFF',
+                            padding: '1px 7px',
+                            borderRadius:'5px',
+                            fontSize:'12px',
+                            display: 'inline-block',
+                            marginRight:'10px'
+                          }}>
+                            大客户
+                          </div> : null
+                    }
+                    {text && text.length > 9 ? text.substr(0, 9) + "..." : text}
+                  </span>
+              );
             }
           },
           {

+ 74 - 45
js/component/manageCenter/topTab.jsx

@@ -1,11 +1,11 @@
 import React from 'react';
-import { Row, Col, Icon, Modal, Button, Spin, Select, Input, message, Badge, Table, Tabs, Tag } from 'antd';
+import { Row, Col, Icon, Modal, Button, Spin, Input, message, Badge, Table, Tabs, Tag } from 'antd';
 import { getProvince } from '../NewDicProvinceList.js';
-import { companySearch ,getActives} from '../tools.js';
+import { getActives} from '../tools.js';
 import './topTab.less';
-import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 import logo from '../../../image/acc-logo.png';
+import FollowDetail from "./customer/NEW/intentionCustomer/followDetail";
 
 const MessageModal = React.createClass({
     getInitialState() {
@@ -36,6 +36,7 @@ const MessageModal = React.createClass({
                     return '共' + total + '条数据';
                 }
             },
+            categoryArr:[],
             columns: [
                 {
                     title: '编号',
@@ -46,30 +47,6 @@ const MessageModal = React.createClass({
                     dataIndex: 'noticeType',
                     key: 'noticeType',
                     render: (text, record) => {
-//                      switch (text) {
-//                          case 1:
-//                              return <a href={globalConfig.context + "/admin/servicesManage/patent.html?rid=" + record.rid + "&uid=" + record.uid + "#comprehensive"}> {record.noticeTypeName} </a>;
-//                          case 3:
-//                              return <a href={globalConfig.context + "/admin/servicesManage/copyright.html?rid=" + record.rid + "&uid=" + record.uid + "#copyright"}> {record.noticeTypeName} </a>;
-//                          case 2:
-//                              return <a href={globalConfig.context + "/admin/servicesManage/highTech.html?rid=" + record.rid + "&uid=" + record.uid + "&year=" + record.year + "#highTechApply"}> {record.noticeTypeName} </a>;
-//                          case 4:
-//                              return <a href={globalConfig.context + "/admin/servicesManage/technology.html?rid=" + record.rid + "&uid=" + record.uid + "#applyManage"}> {record.noticeTypeName} </a>;
-//                          case 5:
-//                              return <a href={globalConfig.context + "/admin/userManage.html?id=" + record.uid + "&type=0" + (window.showUserList ? "#userList" : "#customerList")}> {record.noticeTypeName} </a>;
-//                          case 6:
-//                              return <a href={globalConfig.context + "/admin/userManage.html?id=" + record.uid + "&type=1" + (window.showOrgList ? "#orgList" : "#customerList")}> {record.noticeTypeName} </a >;
-//                          case 7:
-//                              return <a href={globalConfig.context + "/admin/servicesManage/contract.html?rid=" + record.rid + "&uid=" + record.uid + "#contract"}> {record.noticeTypeName} </a >;
-//                          case 8:
-//                              return <a href={globalConfig.context + "/admin/demand.html?rid=" + record.rid + "#techDemandUser"}> {record.noticeTypeName} </a >;
-//                          case 9:
-//                              return <a href={globalConfig.context + "/admin/demand.html?rid=" + record.rid + "&uid=" + record.uid + "#techDemandOrg"}> {record.noticeTypeName} </a >;
-//                          case 10:
-//                              return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "#orgTechAchievement"}> {record.noticeTypeName} </a >;
-//                          case 11:
-//                              return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "#userTechAchievement"}> {record.noticeTypeName} </a >;                           
-//                      }
 					return (<span>{record.noticeTypeName}</span>)
                     }
                 }, {
@@ -80,20 +57,57 @@ const MessageModal = React.createClass({
                     title: '内容',
                     dataIndex: 'content',
                     key: 'content',
+                }, {
+                    title: "操作",
+                    dataIndex: "abc",
+                    key: "abc",
+                    render: (text, record) => {
+                        return (
+                            record.noticeType === 48 || record.noticeType === 49 ?
+                                <Button type="primary" onClick={()=>{
+                                    this.category();
+                                    record.id = record.uid;
+                                    this.setState({
+                                        followData: record,
+                                        visitModul: true,
+                                    });
+                                }}>立即跟进</Button> : null
+                        )
+                    }
                 },
-                //  {
-                //     title: '公司',
-                //     dataIndex: 'unitName',
-                //     key: 'unitName',
-                // }, {
-                //     title: '业务员',
-                //     dataIndex: 'principle',
-                //     key: 'principle',
-                // }
             ],
             data: []
         };
     },
+    category() {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/Varieties/getSuperList",
+            data: {},
+            success: function (data) {
+                let thedata = data.data;
+                let theArr = [];
+                if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    thedata = {};
+                } else {
+                    thedata.map(function (item, index) {
+                        theArr.push({
+                            value: item.id,
+                            key: item.cname,
+                        });
+                    });
+                }
+                this.setState({
+                    categoryArr: theArr,
+                });
+            }.bind(this),
+        });
+    },
     loadReaded(pageNo) {
         this.state.data = [];
         this.setState({
@@ -217,13 +231,22 @@ const MessageModal = React.createClass({
         });
         this.props.closeDesc(false, true);
     },
+    closeDesc(){
+        this.setState({
+            categoryArr:[],
+            followData:'',
+            visitModul:false
+        },()=>{
+            this.loadReaded(this.state.pagination.current);
+        })
+    },
     render() {
         return (
             <div className="topTab-modal">
                 <Spin spinning={this.state.loading} className='spin-box'>
                     <Modal maskClosable={false} title="信息中心" visible={this.state.visible}
                         onOk={this.handleOk} onCancel={this.handleCancel}
-                        width='800px' footer=''
+                        width='1000px' footer=''
                     >
                         <Tabs defaultActiveKey="1">
                             <Tabs.TabPane tab="新信息" key="1">
@@ -243,6 +266,12 @@ const MessageModal = React.createClass({
                         </Tabs>
                     </Modal>
                 </Spin>
+                <FollowDetail
+                    categoryArr={this.state.categoryArr}
+                    followData={this.state.followData}
+                    visitModul={this.state.visitModul}
+                    closeDesc={this.closeDesc}
+                />
             </div>
         );
     }
@@ -260,7 +289,7 @@ const UserModal = React.createClass({
         this.setState({
             loading: true
         });
-        
+
         $.ajax({
             method: "get",
             dataType: "json",
@@ -333,13 +362,13 @@ const UserModal = React.createClass({
             loading: true
         });
         if(this.state.contactMobile){
-        	if(!(/^1[1-9][0-9]\d{4,8}$/.test(this.state.contactMobile))){ 
-			  message.warning("不是完整的11位手机号或者正确的手机号前七位"); 
+        	if(!(/^1[1-9][0-9]\d{4,8}$/.test(this.state.contactMobile))){
+			  message.warning("不是完整的11位手机号或者正确的手机号前七位");
 			  this.setState({
                     loading: false
                 });
 			  return false;
-			} 
+			}
         }
 //      if(this.state.mobile.length>11){
 //      	message.warning("登录账号不能超过11位");
@@ -465,7 +494,7 @@ const TopTab = React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/selectNavList",
             data: {
-            	
+
             },
             success:function(data){
             	if (!data.data) {
@@ -566,13 +595,13 @@ const TopTab = React.createClass({
                        {/*<Col style={{ display: window.showUserManage ? 'block' : 'none' }} className={this.props.active === 'userManage' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/userManage.html"}>用户管理</a></Col>*/}
                         {/*<Col style={{ display: window.showCustomer ? 'block' : 'none' }} className={this.props.active === 'myClient' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/customer.html" }>客户管理</a></Col>
                         <Col style={{ display: window.showServices ? 'block' : 'none' }} className={this.props.active === 'services' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/servicesManage/contract.html"}>科技服务管理</a></Col>
-                        <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/achievement.html"}>科技成果管理</a></Col>                       
+                        <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/achievement.html"}>科技成果管理</a></Col>
                         <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/demand.html"}>科技需求管理</a></Col>
                         <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/idea.html"}>科技思想管理</a></Col>
                         <Col style={{ display: window.showUserOrderList ? 'block' : 'none' }} className={this.props.active === 'userOrder' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/userOrder.html"}>用户订单管理</a></Col>
                         <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'system' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/set.html"}>系统设置</a></Col>
                    */}
-    				{this.state.htmlMenus} 
+    				{this.state.htmlMenus}
                     </Row>
                 </div>
                 <UserModal showDesc={this.state.userModalShow} closeDesc={this.closeUserModal} />
@@ -582,4 +611,4 @@ const TopTab = React.createClass({
     }
 });
 
-export default TopTab;
+export default TopTab;