Browse Source

客户系统管理开发

dengzhiguo 7 years ago
parent
commit
8d93b5800a

+ 16 - 0
js/admin/customer.js

@@ -0,0 +1,16 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import '../../css/base.less';
+
+import TopTab from '../component/manageCenter/topTab.jsx';
+import Footer from '../component/manageCenter/bottom.jsx';
+import Content from '../component/manageCenter/customer/content.jsx';
+
+ReactDOM.render(
+    <div className="wrap clearfix">
+        <TopTab active={'myClient'}/>
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 254 - 0
js/component/dataDic.js

@@ -1,6 +1,147 @@
 module.exports = {
     provinceArr:['安徽','北京','重庆','福建','甘肃','广东','广西','贵州','海南','河北','黑龙江','河南','香港','湖北','湖南','江苏','江西','吉林','辽宁','澳门','内蒙古','宁夏','青海','山东','上海','山西','陕西','四川','台湾','天津','新疆','西藏','云南','浙江','海外'],
     //
+   	cityArr:[{
+   		 value: "0",
+         key: "安徽"
+   	},
+   	{
+   		 value: "1",
+         key: "北京"
+   	},
+   	{
+   		 value: "2",
+         key: "重庆"
+   	},
+   	{
+   		 value: "3",
+         key: "福建"
+   	},
+   	{
+   		 value: "4",
+         key: "甘肃"
+   	},   
+   	{
+   		 value: "5",
+         key: "广东"
+   	},
+   	{
+   		 value: "6",
+         key: "广西"
+   	},
+   	{
+   		 value: "7",
+         key: "贵州"
+   	},
+   	{
+   		 value: "8",
+         key: "海南"
+   	},
+   	{
+   		 value: "9",
+         key: "河北"
+   	},
+   	{
+   		 value: "10",
+         key: "黑龙江"
+   	},
+   	{
+   		 value: "11",
+         key: "河南"
+   	},
+   	{
+   		 value: "12",
+         key: "香港"
+   	},
+   	{
+   		 value: "13",
+         key: "湖北"
+   	},
+   	{
+   		 value: "14",
+         key: "湖南"
+   	},
+   	{
+   		 value: "15",
+         key: "江苏"
+   	},
+   	{
+   		 value: "16",
+         key: "江西"
+   	},
+   	{
+   		 value: "17",
+         key: "辽宁"
+   	},
+   	{
+   		 value: "18",
+         key: "吉林"
+   	},
+   	{
+   		 value: "19",
+         key: "澳门"
+   	},
+   	{
+   		 value: "20",
+         key: "内蒙古"
+   	},
+   	{
+   		 value: "21",
+         key: "宁夏"   		
+   	},
+   	{
+   		 value: "22",
+         key: "青海"  
+   	},
+   	{
+   		 value: "23",
+         key: "山东"  
+   	},
+   	{
+   		 value: "24",
+         key: "上海" 
+   	},
+   	{
+   		 value: "25",
+         key: "山西" 
+   	},
+   	{
+   		 value: "26",
+         key: "陕西" 
+   	},
+   	{
+   		 value: "27",
+         key: "四川" 
+   	},
+   	{
+   		 value: "28",
+         key: "台湾" 
+   	},
+   	{
+   		 value: "29",
+         key: "天津" 
+   	},
+   	{
+   		 value: "30",
+         key: "新疆" 
+   	},
+   	{
+   		 value: "31",
+         key: "西藏" 
+   	},
+   	{
+   		 value: "32",
+         key: "云南"
+   	},
+   	{
+   		 value: "33",
+         key: "浙江"
+   	},
+   	{
+   		 value: "34",
+         key: "海外"
+   	}
+   	],	   	
     edulvlArr: ["博士研究生", "硕士研究生", "本科", "大专及以下"],
     eduLevelList: [{
             value: "0",
@@ -823,4 +964,117 @@ module.exports = {
             key: "是"
         }
     ],
+    //最新跟进
+    newFollow:[
+   		{
+            value: "0",
+            key: "已发项目介绍资料"
+        }, {
+            value: "1",
+            key: "已约面谈"
+        },
+        {
+            value: "2",
+            key: "已发合同计划书"
+        }, {
+            value: "3",
+            key: "已报价"
+        },
+        {
+            value: "4",
+            key: "已发合同"
+        },
+        {
+            value: "5",
+            key: "已签合同"
+        }, {
+            value: "6",
+            key: "面谈中"
+        },
+        {
+            value: "7",
+            key: "已面签"
+        },
+    ],
+     //客户状态
+    customerStatus:[
+        {
+            value: "0",
+            key: "新客户"
+        }, {
+            value: "1",
+            key: "意向客户"
+        },
+        {
+            value: "2",
+            key: "重点客户"
+        }, {
+            value: "3",
+            key: "面谈客户"
+        },{
+            value: "4",
+            key: "签单客户"
+        },{
+            value: "5",
+            key: "被拒绝客户"
+        }
+    ],    
+    //意向服务
+    intentionalService:[
+        {
+            value: "0",
+            key: "高企认定"
+        }, {
+            value: "1",
+            key: "软件著作权"
+        },
+        {
+            value: "2",
+            key: "发明专利"
+        },
+        {
+            value: "3",
+            key: "实用型新型专利"
+        }, {
+            value: "4",
+            key: "软件著作权"
+        },
+        {
+            value: "5",
+            key: "外观专利"
+        },
+         {
+            value: "6",
+            key: "科技需求"
+        }, {
+            value: "7",
+            key: "科技成果"
+        },
+        {
+            value: "8",
+            key: "科技项目"
+        }
+    ],
+    //客户类型
+    customerTyp:[
+        {
+            value: '0',
+            key: "个人客户"
+        }, {
+            value: '1',
+            key: "公司客户"
+        },
+       
+    ], 
+    //性别
+    sex:[
+        {
+            value: '0',
+            key: "男"
+        }, {
+            value: '1',
+            key: "女"
+        },
+       
+    ],  
 };

+ 179 - 0
js/component/manageCenter/customer/batchImport.jsx

@@ -0,0 +1,179 @@
+import React from 'react';
+import { Input, Modal, Button, message } from 'antd';
+import { achievementCategoryList } from '../../dataDic.js';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+
+const BatchImport = React.createClass({
+    getInitialState: function () {
+        return {
+            loading: false,
+            error: false
+        };
+    },
+    showModal () {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleOk (e) {
+        this.setState({
+            visible: false,
+        });
+    },
+    handleCancel (e) {
+        this.setState({
+            visible: false,
+        });
+    },
+    //数据反向转化
+    getDataCategory (e, row) {
+        switch (e) {
+            case "成果":
+                return 0;
+            case "技术":
+                return 1;
+            case "项目":
+                return 2;
+            default:
+                message.warning("第 " + row + " 行中没有对应的数据类型!");
+                this.state.error = true;
+                break;
+        }
+    },
+    getOwnerType (e, row) {
+        switch (e) {
+            case "个人":
+                return 0;
+            case "组织":
+                return 1;
+            default:
+                message.warning("第 " + row + " 行中没有对应的所有人类型!");
+                this.state.error = true;
+                break;
+        }
+    },
+    getCategory (e, row) {
+        let theType = null, _me = this;
+        if (e) {
+            achievementCategoryList.map(function (item) {
+                if (item.key == e) {
+                    theType = Number(item.value);
+                };
+            });
+            if (theType == null) {
+                message.warning("第 " + row + " 行中没有对应的成果类型!");
+                _me.state.error = true;
+            }
+            return theType;
+        };
+    },
+    getCooperationMode (e, row) {
+        switch (e) {
+            case "技术转让":
+                return 0;
+            case "授权生产":
+                return 1;
+            default:
+                message.warning("第 " + row + " 行中没有对应的合作方式!");
+                this.state.error = true;
+                break;
+        }
+    },
+    //提交
+    handleSubmit () {
+        let rowsArr = this.state.inputValue.split(/[\r\n]/g);
+        let columnArr = [], _me = this;
+        if (!rowsArr.length) {
+            return;
+        };
+        let columnLength = 12;//定义数据正常长度
+        for (let i = 0; i < rowsArr.length; i++) {
+            if (_me.state.error) {
+                this.state.error = false;
+                return;
+            };
+            let theArr = rowsArr[i].split(/\t/);
+            if (theArr.length == columnLength) {
+                columnArr.push({
+                    dataCategory: _me.getDataCategory(theArr[0], i + 1),
+                    name: theArr[1],
+                    keyword: theArr[2],
+                    category: _me.getCategory(theArr[3], i + 1),
+                    ownerName: theArr[4],
+                    ownerType: _me.getOwnerType(theArr[5], i + 1),
+                    ownerIdNumber: theArr[6],
+                    ownerMobile: theArr[7],
+                    ownerEmail: theArr[8],
+                    ownerPostalAddress: theArr[9],
+                    cooperationMode: _me.getCooperationMode(theArr[10], i + 1),
+                    introduction: theArr[11],
+                });
+            } else if (rowsArr[i].replace(/(^\s+)|(\s+$)/g, "").length) {
+                message.warning("第" + (i + 1) + "行数据长度错误!");
+                return;
+            };
+        };
+        // for (let i = 0; i < columnArr.length; i++) {
+        //     if (columnArr[i].dataCategory.toString().length > 1) { console.log((i + 1) + "行:" + "dataCategory") }
+        //     if (columnArr[i].name.toString().length > 31) { console.log((i + 1) + "行:" + "name") }
+        //     if (columnArr[i].category.toString().length > 1) { console.log((i + 1) + "行:" + "category") }
+        //     if (columnArr[i].ownerName.toString().length > 31) { console.log((i + 1) + "行:" + "ownerName") }
+        //     if (columnArr[i].ownerIdNumber.toString().length > 35) { console.log((i + 1) + "行:" + "ownerIdNumber") }
+        //     if (columnArr[i].ownerMobile.toString().length > 11) { console.log((i + 1) + "行:" + "ownerMobile") }
+        //     if (columnArr[i].ownerEmail.toString().length > 254) { console.log((i + 1) + "行:" + "ownerEmail") }
+        //     if (columnArr[i].ownerPostalAddress.toString().length > 254) { console.log((i + 1) + "行:" + "ownerPostalAddress") }
+        //     if (columnArr[i].cooperationMode.toString().length > 1) { console.log((i + 1) + "行:" + "cooperationMode") }
+        //     if (columnArr[i].introduction.toString().length > 298) { console.log((i + 1) + "行:" + "introduction") }
+        //     if (columnArr[i].keyword.toString().length > 44) { console.log((i + 1) + "行:" + "ownerType") }
+        //     if (columnArr[i].ownerType.toString().length > 1) { console.log((i + 1) + "行:" + "ownerType") }
+        // }
+        if (columnArr.length > 1000) {
+            message.warning("数据条数不能多于1000条!");
+            return;
+        };
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/achievement/importAchievement',
+            data: {
+                data: JSON.stringify(columnArr)
+            }
+        }).done(function (data) {
+            this.setState({
+                loading: false
+            });
+            if (!data.error.length) {
+                message.success('导入成功!');
+                this.props.closeDesc(false, true);
+                this.handleOk();
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    render () {
+        return (
+            <div>
+                <Button type="primary" onClick={this.showModal}>批量导入</Button>
+                <Modal
+                    title="批量导入"
+                    visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    width='1000px'
+                    footer={[
+                        <Button key="ok" className="set-submit" type="primary" loading={this.state.loading} onClick={this.handleSubmit}>保存</Button>,
+                        <Button key="clancel" className="set-submit" type="ghost" onClick={this.handleCancel}>取消</Button>
+                    ]} >
+                    <Input type="textarea" rows={12} onChange={(e) => { this.state.inputValue = e.target.value; }} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+export default BatchImport;

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

@@ -0,0 +1,61 @@
+import React, { Component } from 'react';
+import '../content.less';
+import LeftTab from './leftTab';
+import TechAchievement from './myClient';
+
+
+class Content extends Component {
+    constructor() {
+        super();
+        this.state = {
+            loading: false,
+            component: 'div'
+        };
+    }
+    componentWillMount() {
+        if (window.location.hash) {
+            this.getKey(window.location.hash.substr(1));
+        } else {
+            this.getKey("myClient");
+        };
+    }
+    getKey(key) {
+        switch (key) {          
+            case 'myClient':
+                require.ensure([], () => {
+                    const TechAchievement = require('./myClient').default;
+                    this.setState({
+                        component: TechAchievement,
+                        listApiUrl: '/api/admin/achievement/orgList',
+                        detailApiUrl: '/api/admin/customer/findCustomer'
+                    });
+                });
+                break;           
+            case 'publicCustomer':
+                require.ensure([], () => {
+                    const AchievementOrder = require('./publicCustomer').default;
+                    this.setState({
+                        component: AchievementOrder,
+                        listApiUrl: '/api/admin/portal/order/userAchievementOrderList',
+                        detailApiUrl: '/api/admin/achievement/userDetail'
+                    });
+                });
+                break;
+        };
+        window.location.hash = key;
+    }
+    render() {
+        return (
+            <div className="manage-content">
+                <LeftTab handlekey={this.getKey.bind(this)} />
+                <div className="content-right">
+                    <this.state.component
+                        data-listApiUrl={this.state.listApiUrl}
+                        data-detailApiUrl={this.state.detailApiUrl} />
+                </div>
+            </div>
+        )
+    }
+}
+
+export default Content;

+ 42 - 0
js/component/manageCenter/customer/leftTab.jsx

@@ -0,0 +1,42 @@
+import React from 'react';
+import { Menu, Icon } from 'antd';
+import '../leftTab.less';
+const SubMenu = Menu.SubMenu;
+const MenuItemGroup = Menu.ItemGroup;
+
+
+const LeftTab = React.createClass({
+    getInitialState() {
+        return {
+            current: 'myClient'
+        };
+    },
+    handleClick(e) {
+        this.props.handlekey(e.key);
+        this.setState({
+            current: e.key,
+        });
+    },
+    componentWillMount() {
+        if (window.location.hash) {
+            this.state.current = window.location.hash.substr(1);
+        };
+    },
+    render() {
+        return (
+            <Menu onClick={this.handleClick}
+                selectedKeys={[this.state.current]}
+                mode="vertical"
+                className="account-left" >
+                <Menu.Item key="myClient">
+                    我的客户
+                </Menu.Item>               
+                <Menu.Item key="publicCustomer">
+                    公共客户
+                </Menu.Item>            
+            </Menu>
+        );
+    },
+});
+
+export default LeftTab;

+ 351 - 0
js/component/manageCenter/customer/myClient.jsx

@@ -0,0 +1,351 @@
+import React from 'react';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './myClient.less';
+import TechAchievementDesc from './myClientDesc.jsx';
+import { achievementCategoryList, techAuditStatusList,cityArr,customerStatus } from '../../dataDic.js';
+import { beforeUploadFile, companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus,getcustomerTyp,getcityArr,getcustomerStatue,getCompanyIntention,getfllowSituation} from '../../tools.js';
+import BatchImport from './batchImport';
+
+const AchievementList = React.createClass({
+    loadData(pageNo, apiUrl) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,          
+            url:globalConfig.context + '/api/admin/customer/searchCustomerList',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,               
+                companyName: this.state.companyName, //名称
+				customerTyp: this.state.customerTyp, //客户类型
+              	province:this.state.province,//地区
+				customerStatue:this.state.customerStatue,//客户状态
+				customerName:this.state.customerName,//联系人姓名
+				adminName:this.state.adminName,//跟单人
+				
+				//releaseDateStartDate: this.state.releaseDate[0],
+                //releaseDateEndDate: this.state.releaseDate[1],			
+            },
+            success: function (data) {
+            	console.log(data)
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };                   
+                } else {                	
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];                       
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,                                                  
+                            companyName:thisdata.companyName,
+                            customerTyp:thisdata.customerTyp,
+                            province:thisdata.province,
+                            customerName:thisdata.customerName,
+                            telNum:thisdata.telNum,
+                            customerStatue:thisdata.customerStatue,
+                            companyIntention:thisdata.companyIntention,
+                            fllowSituation:thisdata.fllowSituation,
+                            adminName:thisdata.adminName                                                    
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };               
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },   
+    getInitialState() {
+        return {
+            searchMore: true,
+            searchType: 0,
+            validityPeriodDate: [],
+            releaseDate: [],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [               
+                {
+                    title: '公司名称',
+                    dataIndex: 'companyName',
+                    key: 'companyName',
+                }, {
+                    title: '客户类型',
+                    dataIndex: 'customerTyp',
+                    key: 'customerTyp',
+                    render: text => { return getcustomerTyp(text); }
+                }, {
+                    title: '地区',
+                    dataIndex: 'province',
+                    key: 'province',
+                    render: text => { return getcityArr(text); }
+                }, {
+                    title: '联系人姓名',
+                    dataIndex: 'customerName',
+                    key: 'customerName',                    
+                }, 
+                {
+                    title: '手机号',
+                    dataIndex: 'telNum',
+                    key:'telNum',                   
+                },
+                 {
+                    title: '客户状态',
+                    dataIndex: 'customerStatue',
+                    key: 'customerStatue',
+                    render: text => { return getcustomerStatue(text) }
+                },
+                {
+                    title: '意向服务',
+                    dataIndex: 'companyIntention',
+                    key: 'companyIntention',
+                    render: text => { return getCompanyIntention(text) }
+                },
+                 {
+                    title: '最新跟进',
+                    dataIndex: 'fllowSituation',
+                    key: 'fllowSituation',
+                    render: text => { return getfllowSituation(text) }
+                },
+                 {
+                    title: '跟单人',
+                    dataIndex: 'adminName',
+                    key: 'adminName',
+                }
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    componentWillMount() {
+        let theArr = [];
+        customerStatus.map(function (item) {
+            theArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        let auditArr = [];
+        cityArr.map(function (item) {
+            auditArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });       
+        this.state.customerStatuarr = theArr;
+        this.state.auditStatusOption = auditArr;
+        if (window.location.search) {
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.rid) {
+                theObj.id = theObj.rid;
+                if (theObj.rid != 'null') {
+                    this.tableRowClick(theObj);
+                };
+            };
+        };       
+        this.loadData();        
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true
+        });
+    },
+    delectRow() {
+        let deletedIds;
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds=rowItem.id
+            };            
+        };       
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "GET",
+            dataType: "json",
+            crossDomain: false,           
+            url: globalConfig.context + "/api/admin/customer/deleteCustomer",
+            data: {
+                id: deletedIds
+            }
+        }).done(function (data) {
+            if (!data.data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    addClick() {
+        this.state.RowData = {};
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {      
+        this.state.id = undefined;
+        this.state.companyName = undefined;
+        this.state.customerTyp = undefined;
+        this.state.province = undefined;
+        this.state.ownerType = undefined;
+        this.state.customerStatue = undefined;
+        this.state.auditStatus = undefined;
+        this.state.adminName = undefined;
+        this.state.customerName = undefined;  
+        this.state.releaseDate = [];
+        this.loadData(); 
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+        return (
+            <div className="user-content" >
+                <div className="content-title">                  
+                    <span>客户管理</span>
+                    <div className="patent-addNew clearfix">
+                        <Upload
+                            action={globalConfig.context + "/api/admin/achievement/uploadTemplate"}
+                            data={{ 'sign': 'achievement_template' }}
+                            beforeUpload={beforeUploadFile}
+                            showUploadList={false}
+                            onChange={(info) => {
+                                if (info.file.status !== 'uploading') {
+                                    console.log(info.file, info.fileList);
+                                }
+                                if (info.file.status === 'done') {
+                                    if (!info.file.response.error.length) {
+                                        message.success(`${info.file.name} 文件上传成功!`);
+                                    } else {
+                                        message.warning(info.file.response.error[0].message);
+                                        return;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button>上传批量导入模板</Button>
+                        </Upload>
+                        <Button onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }}>下载批量导入模板</Button>
+                        <Button type="primary" className="addButton" onClick={this.addClick}>新建客户<Icon type="plus" /></Button>
+                        <BatchImport closeDesc={this.closeDesc} />
+                    </div>
+                </div>
+                <div className="user-search">                    
+                    <Input placeholder="公司名称"
+                        value={this.state.companyName}
+                        onChange={(e) => { this.setState({ companyName: e.target.value }); }} /> 
+                    <Select placeholder="客户类型" style={{ width: 120 }}
+                            value={this.state.customerTyp }
+                            onChange={(e) => { this.setState({ customerTyp : e }) }}>
+                            <Select.Option value="0" >个人客户</Select.Option>
+                            <Select.Option value="1" >公司客户</Select.Option>
+                    </Select>                                        
+                    <Select placeholder="地区"
+                            style={{ width: 160 }}
+                            value={this.state.province}
+                            onChange={(e) => { this.setState({ province: e }) }}>
+                            {this.state.auditStatusOption}
+                    </Select>
+                    <Select placeholder="客户状态" style={{ width: 120 }}
+                            value={this.state.customerStatue}
+                            onChange={(e) => { this.setState({ customerStatue: e }) }}>                           
+                            {this.state.customerStatuarr}
+                    </Select>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        onClick={this.delectRow}>删除<Icon type="minus" /></Button>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                    	<Input placeholder="跟单人" style={{width:'140px',marginRight:'10px'}}
+		                    value={this.state.adminName}
+		                    onChange={(e) => { this.setState({ adminName: e.target.value }); }} />
+		                <Input placeholder="联系人姓名" style={{width:'140px',marginRight:'10px'}}
+		                    value={this.state.customerName}
+		                    onChange={(e) => { this.setState({ customerName: e.target.value }); }} />                                        	
+                        <span>发布时间 :</span>
+                        <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 }); }} />
+                            
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <TechAchievementDesc
+                    data={this.state.RowData}
+                    detailApiUrl={this.props['data-detailApiUrl']}
+                    achievementCategoryOption={this.state.achievementCategoryOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default AchievementList;

+ 133 - 0
js/component/manageCenter/customer/myClient.less

@@ -0,0 +1,133 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        color: #333;
+        font-size: 16px;
+        overflow: hidden;
+    }
+    .user-search {
+        margin-bottom: 10px;
+        >input {
+            width: 140px;
+        }
+        >input,
+        >button,
+        .ant-select {
+            margin-right: 10px;
+            margin-top: 10px;
+        }
+        .ant-switch {
+            margin-left: 10px;
+        }
+        .search-more {
+            margin: 10px 0;
+            >span {
+                margin-right: 10px
+            }
+        }
+    }
+}
+.avatar-uploader,
+.avatar-uploader-trigger,
+.avatar {
+    width: 150px;
+    height: 150px;
+}
+.modal-box-title{float: left;}
+.modal-box-detail{margin-left: 10px;vertical-align: top;float: left;margin-top: 0px;width: 160px!important;}
+.avatar-uploader-trigger {
+    display: table-cell;
+    vertical-align: middle;
+    font-size: 28px;
+    color: #999;
+}
+.avatar-uploader {
+    display: block;
+    padding: 1px;
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    img {
+        position: absolute;
+        top: -1px;
+        left: -1px;
+        height: 150px;
+    } //
+    float: left;
+    margin-right: 20px;
+}
+.patent-addNew {
+    float: right;
+    margin-left: 20px;
+    >* {
+        float: left;
+        margin-right: 20px;
+    }
+    .addButton {
+        background: #ea0862;
+        color: #fff;
+        border: none;
+        border-radius: 4px;
+        padding: 4px 10px;
+    }
+    .addButton:hover {
+        background: #ea0862;
+    }
+}
+
+#demand-form {
+    .half-item {
+        float: left;
+        width: 50%;
+        margin-bottom: 10px;
+    }
+    .item-title {
+        line-height: 30px;
+        font-size: 14px;
+        color: #666;
+    }
+    .form-title {
+        font-size: 16px;
+        color: #333;
+    }
+    .keyWord-tips {
+        >button {
+            vertical-align: middle;
+        }
+    }
+    .set-submit {
+        margin-right: 20px;
+    }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete {
+            display: none
+        }
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
+}
+
+.demand-order-content {
+    .ant-row {
+        margin-bottom: 20px;
+    }
+    .ant-input-number-handler-wrap {
+        display: none
+    }
+}
+.ant-table-thead {
+    .ant-table-selection-column {
+        .ant-checkbox-wrapper {
+            display: none;
+        }
+    }
+}

File diff suppressed because it is too large
+ 1886 - 0
js/component/manageCenter/customer/myClientDesc.jsx


+ 527 - 0
js/component/manageCenter/customer/publicCustomer.jsx

@@ -0,0 +1,527 @@
+import React from 'react';
+import { AutoComplete, Icon, Button, Input, InputNumber, Select, Spin, Table, message, Modal, Row, Col, DatePicker } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './myClient.less';
+import { orderStatusList } from '../../dataDic.js';
+import { befoFile, getSearchUrl, getOrderStatus, companySearch } from '../../tools.js';
+import BatchImport from './batchImport';
+import throttle from '../../throttle.js';
+
+const AchievementDetail = React.createClass({
+    getInitialState () {
+        return {
+            visible: false,
+            loading: false,
+            columns: [
+                {
+                    title: '状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: text => { return getOrderStatus(text) }
+                }, {
+                    title: '操作时间',
+                    dataIndex: 'recordTimeFormattedDate',
+                    key: 'recordTimeFormattedDate',
+                }, {
+                    title: '管理员',
+                    dataIndex: 'operator',
+                    key: 'operator',
+                }, {
+                    title: '备注',
+                    dataIndex: 'comment',
+                    key: 'comment',
+                }
+            ],
+            dataSource: [],
+        };
+    },
+    loadLogs (id) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/portal/order/achievementOrderLog",
+            data: {
+                achievementOrderId: id
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            recordTime: thisdata.recordTime,
+                            status: thisdata.status,
+                            comment: thisdata.comment,
+                            operator: thisdata.operator,
+                            recordTimeFormattedDate: thisdata.recordTimeFormattedDate
+                        });
+                    };
+                };
+                this.setState({
+                    dataSource: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    handleSubmit (e) {
+        //keyword长度判断
+        if (this.state.orderStatus || this.state.comment || this.state.recordTime) {
+            if (this.state.orderStatus && this.state.comment && this.state.recordTime) {
+            } else {
+                message.warning('请填写完整的状态流转记录!');
+                return;
+            };
+        };
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/portal/order/updateAchievementOrder',
+            data: {
+                id: this.props.data.id,
+                achievementId: this.props.data.achievementId,
+                status: this.state.orderStatus || this.props.data.status,
+                recordTimeFormattedDate: this.state.recordTime ? this.state.recordTime.format("YYYY-MM-DD HH:mm:ss") : undefined,
+                comment: this.state.comment,
+                paymentId: this.state.paymentId,
+                paymentType: this.state.paymentType,
+                paymentValue: this.state.paymentValue,
+                transferPrice: this.state.transferPrice,
+            }
+        }).done(function (data) {
+            this.setState({
+                loading: false
+            });
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.handleOk();
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    handleCancel (e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk (e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    componentWillReceiveProps (nextProps) {
+        if (!this.state.visible && nextProps.showDesc && nextProps.data) {
+            this.loadLogs(nextProps.data.id);
+            this.state.paymentId = nextProps.data.paymentId;
+            this.state.paymentType = nextProps.data.paymentType;
+            this.state.paymentValue = nextProps.data.paymentValue;
+            this.state.transferPrice = nextProps.data.transferPrice;
+            this.state.orderStatus = undefined;
+            this.state.comment = undefined;
+            this.state.recordTime = undefined;
+        };
+        this.state.visible = nextProps.showDesc;
+    },
+    render () {
+        let theData = this.props.data;
+        if (theData) {
+            return (
+                <div className="patent-desc">
+                    <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='800px'
+                        footer={null}
+                        title="订单详情"
+                        className="demand-order-content">
+                        <Spin spinning={this.state.loading}>
+                            <Row>
+                                <Col span={2}>订单编号:</Col>
+                                <Col span={10}>{theData.serialNumber}</Col>
+                                <Col span={2}>订单状态:</Col>
+                                <Col span={10}>{getOrderStatus(theData.status)}</Col>
+                            </Row>
+                            <Row>
+                                <Col span={2}>成果编号:</Col>
+                                <Col span={10}>{theData.achievementSerialNumber}</Col>
+                                <Col span={2}>成果名称:</Col>
+                                <Col span={10}>{theData.name}</Col>
+                            </Row>
+                            <Row>
+                                <Col span={2}>成果状态:</Col>
+                                <Col span={10}>{(() => {
+                                    if (theData.deletedSign == 1) {
+                                        return "已删除"
+                                    } else if (theData.auditStatus != 3) {
+                                        return "已下架"
+                                    } else {
+                                        return "正常"
+                                    }
+                                })()}</Col>
+                                <Col span={3}>订单所有人:</Col>
+                                <Col span={9}>{theData.theName}</Col>
+                            </Row>
+                            <Row>
+                                <Col span={2}>接单时间:</Col>
+                                <Col span={10}>{theData.createTimeFormattedDate}</Col>
+                            </Row>
+                            <Row>
+                                <Col span={2}>订单金额:</Col>
+                                <Col span={10}>
+                                    {theData.bargainingMode == 0 ? <div>
+                                        <span>价格面议</span>
+                                    </div> : <InputNumber
+                                            value={this.state.transferPrice}
+                                            onChange={(e) => { this.setState({ transferPrice: e }) }} />}
+                                    <span> 万元</span>
+                                </Col>
+                                <Col span={2}>支付金额:</Col>
+                                <Col span={10}>
+                                    <InputNumber style={{ width: '160px' }}
+                                        value={this.state.paymentValue}
+                                        onChange={(e) => { this.setState({ paymentValue: e }) }} />
+                                    <span> 元</span>
+                                </Col>
+                            </Row>
+                            <Row>
+                                <Col span={2}>支付方式:</Col>
+                                <Col span={8}>
+                                    <Input
+                                        value={this.state.paymentType}
+                                        onChange={(e) => { this.setState({ paymentType: e.target.value }) }} />
+                                </Col>
+                                <Col span={2}></Col>
+                                <Col span={2}>订单流水:</Col>
+                                <Col span={8}>
+                                    <Input value={this.state.paymentId}
+                                        onChange={(e) => { this.setState({ paymentId: e.target.value }) }} />
+                                </Col>
+                            </Row>
+                            <p>订单状态流转记录</p>
+                            <Table columns={this.state.columns}
+                                dataSource={this.state.dataSource}
+                                pagination={false} />
+                            <Row style={{ marginTop: '20px' }}>
+                                <Col span={2}>状态:</Col>
+                                <Col span={10}>
+                                    <Select style={{ width: 160 }}
+                                        value={this.state.orderStatus}
+                                        onChange={(e) => { this.setState({ orderStatus: e }); }}>
+                                        {(() => {
+                                            let theArr = [];
+                                            orderStatusList.map(function (item, i) {
+                                                theArr.push(<Select.Option key={item.value}>{item.key}</Select.Option>)
+                                            });
+                                            return theArr;
+                                        })()}
+                                    </Select>
+                                </Col>
+                                <Col span={2}>时间:</Col>
+                                <Col span={10}>
+                                    <DatePicker style={{ width: '150px' }}
+                                        showTime
+                                        format="YYYY-MM-DD HH:mm:ss"
+                                        placeholder="选择支付时间"
+                                        value={this.state.recordTime ? moment(this.state.recordTime, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                        onChange={(t, str) => {
+                                            this.setState({ recordTime: t });
+                                        }} />
+                                </Col>
+                            </Row>
+                            <Row>
+                                <Col span={2}>备注:</Col>
+                                <Col span={20}>
+                                    <Input value={this.state.comment} onChange={(e) => { this.setState({ comment: e.target.value }); }} />
+                                </Col>
+                            </Row>
+                            <Row>
+                                <Col span={2}></Col>
+                                <Col span={20}>
+                                    <Button style={{ marginRight: '20px' }} type="primary" onClick={this.handleSubmit}>保存</Button>
+                                    <Button className="set-submit" type="ghost" onClick={this.handleCancel}>取消</Button>
+                                </Col>
+                            </Row>
+                        </Spin>
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+const AchievementOrderList = React.createClass({
+    loadData (pageNo, apiUrl) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + (apiUrl || this.props['data-listApiUrl']),
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                status: this.state.status,
+                unitName: ((apiUrl || this.props['data-listApiUrl']).indexOf('org') != -1) ? null : this.state.searchName,
+                username: ((apiUrl || this.props['data-listApiUrl']).indexOf('org') != -1) ? this.state.searchName : null
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,  //线索单/意向单ID
+                            serialNumber: thisdata.serialNumber,  //线索单/意向单编号
+                            achievementId: thisdata.achievementId, //科技需求ID
+                            createTime: thisdata.createTime,
+                            status: thisdata.status, 	//线索单/意向单状态
+                            paymentvalue: thisdata.paymentvalue,
+                            name: thisdata.name, //成果名称,
+                            achievementSerialNumber: thisdata.achievementSerialNumber, //科技成果编号
+                            deletedSign: thisdata.deletedSign, 	//科技成果删除标记
+                            auditStatus: thisdata.auditStatus, 	//科技成果审核状态 	//个人用户名称
+                            theName: thisdata.username || thisdata.unitName,
+                            uid: thisdata.uid,	//个人用户ID
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,	//接单时间
+                            paymentId: thisdata.paymentId,
+                            paymentTime: thisdata.paymentTime,
+                            paymentTimeFormattedDate: thisdata.paymentTimeFormattedDate,
+                            paymentType: thisdata.paymentType,
+                            paymentValue: thisdata.paymentValue,
+                            transferPrice: thisdata.transferPrice
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    handleSearch (e) {
+        if (this.props['data-detailApiUrl'].indexOf('org') != -1) {
+            $.ajax({
+                method: "get",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/achievement/orgOwner",
+                data: { name: e },
+                success: function (data) {
+                    let theArr = [];
+                    let theObj = {};
+                    if (!data.data) {
+                        if (data.error && data.error.length) {
+                            message.warning(data.error[0].message);
+                        };
+                    } else if (!$.isEmptyObject(data.data)) {
+                        data.data.map(function (item) {
+                            theArr.push(item.unitName);
+                            theObj[item.unitName] = item.uid;
+                        });
+                    };
+                    this.setState({
+                        searchData: theArr,
+                        dataSourceObj: theObj
+                    });
+                }.bind(this),
+            });
+        } else {
+            $.ajax({
+                method: "get",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/achievement/userOwner",
+                data: { name: e },
+                success: function (data) {
+                    let theArr = [];
+                    let theObj = {};
+                    if (!data.data) {
+                        if (data.error && data.error.length) {
+                            message.warning(data.error[0].message);
+                        };
+                    } else if (!$.isEmptyObject(data.data)) {
+                        for (let item in data.data) {
+                            theArr.push(data.data[item]);
+                            theObj[data.data[item]] = item;
+                        };
+                    };
+                    this.setState({
+                        dataSource: theArr,
+                        dataSourceObj: theObj
+                    });
+                }.bind(this),
+            });
+        };
+    },
+    getInitialState () {
+        return {
+            searchData: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '成果名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '成果编号',
+                    dataIndex: 'achievementSerialNumber',
+                    key: 'achievementSerialNumber',
+                }, {
+                    title: '订单所有人',
+                    dataIndex: 'theName',
+                    key: 'theName',
+                }, {
+                    title: '订单状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text, record) => { return getOrderStatus(text); }
+                }, {
+                    title: '订单金额',
+                    dataIndex: 'paymentValue',
+                    key: 'paymentValue',
+                }, {
+                    title: '接单时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
+                }
+            ],
+            dataSource: [],
+        };
+    },
+    componentWillMount () {
+        this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
+        let theArr = [], typeArr = [];
+        orderStatusList.map(function (item) {
+            theArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        this.state.demandTypeOption = typeArr;
+        this.state.orderStatusOption = theArr;
+        this.loadData();
+    },
+    componentWillReceiveProps (nextProps) {
+        if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
+            this.state.selectedRowKeys = [];
+            this.state.selectedRows = [];
+            this.state.status = undefined;
+            this.state.searchName = undefined;
+            this.state.searchData = [];
+            this.loadData(null, nextProps['data-listApiUrl']);
+        };
+    },
+    tableRowClick (record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc (e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    search () {
+        this.loadData();
+    },
+    reset () {
+        this.state.uid = undefined;
+        this.state.searchName = undefined;
+        this.state.status = undefined;
+        this.loadData();
+    },
+    render () {
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    {this.props['data-listApiUrl'].indexOf('org') == -1 ? <span>个人成果订单管理</span> : <span>组织成果订单管理</span>}
+                </div>
+                <div className="user-search">
+                    <Select placeholder="选择状态" style={{ width: 160 }}
+                        value={this.state.status}
+                        onChange={(e) => { this.setState({ status: e }) }}>
+                        {this.state.orderStatusOption}
+                    </Select>
+                    <AutoComplete
+                        dataSource={this.state.searchData}
+                        style={{ width: 200 }}
+                        value={this.state.searchName}
+                        onSearch={this.state.therottleSearch}
+                        placeholder="输入订单所有人"
+                        onChange={(e) => {
+                            this.setState({ searchName: e });
+                        }} />
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns} class="no-all-select"
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <AchievementDetail
+                    data={this.state.RowData}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default AchievementOrderList;

+ 3 - 2
js/component/manageCenter/demand/techDemandDesc.jsx

@@ -158,7 +158,8 @@ const DemandDetailShow = Form.create()(React.createClass({
                 id: id
             },
             success: function (data) {
-                let thisData = data.data;
+            	
+                let thisData = data.data;              
                 if (!thisData) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
@@ -553,7 +554,7 @@ const DemandDetailShow = Form.create()(React.createClass({
                     <FormItem
                         labelCol={{ span: 3 }}
                         wrapperCol={{ span: 18 }}
-                        label="行业类别" >
+                        label="行业类别111" >
                         <span>{getIndustryCategory(theData.industryCategoryA, theData.industryCategoryB)}</span>
                     </FormItem>
                     <div className="clearfix">

+ 9 - 8
js/component/manageCenter/topTab.jsx

@@ -70,7 +70,7 @@ const MessageModal = React.createClass({
                             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 <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "#userTechAchievement"}> {record.noticeTypeName} </a >;                           
                         }
                     }
                 }, {
@@ -493,13 +493,14 @@ const TopTab = React.createClass({
                 </div>
                 <div className="acc-top-tab">
                     <Row>
-                        <Col style={{ display: window.showUserManage ? 'block' : 'none' }} className={this.props.active === 'userManage' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/userManage.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.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.showSystem ? '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>
+                        <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.showSystem ? 'block' : 'none' }} className={this.props.active === 'myClient' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/customer.html"}>客户管理</a></Col>
+                        <Col style={{ display: window.showServices ? 'block' : 'none' }} className={this.props.active === 'services' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/servicesManage/contract.html"}>科技服务管理</a></Col>
+                        <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/achievement.html"}>科技成果管理</a></Col>                       
+                        <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/demand.html"}>科技需求管理</a></Col>
+                        <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/idea.html"}>科技思想管理</a></Col>
+                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'userOrder' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/userOrder.html"}>用户订单管理</a></Col>
+                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'system' ? 'active' : ''} span={2}><a href={globalConfig.context + "/admin/set.html"}>系统设置</a></Col>
                     </Row>
                 </div>
                 <UserModal showDesc={this.state.userModalShow} closeDesc={this.closeUserModal} />

+ 80 - 3
js/component/tools.js

@@ -30,7 +30,13 @@ import {
     activityForm,
     activityType,
     boutique,
-    hot
+    hot,
+    customerTyp,
+    cityArr,
+    customerStatus,
+    intentionalService,
+    newFollow,
+    sex
 } from './dataDic.js';
 module.exports = {
     splitUrl: function (string, i, url) {
@@ -650,6 +656,77 @@ module.exports = {
             return theType;
         }
     },
-
-
+    
+	//客户类型
+	 getcustomerTyp: function (e) {
+         if (e) {
+            let theType = '';
+            customerTyp.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+	//省份
+	getcityArr: function (e) {
+         if (e) {
+            let theType = '';
+            cityArr.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    //客户状态
+	getcustomerStatue: function (e) {
+         if (e) {
+            let theType = '';
+            customerStatus.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    //意向服务
+	getCompanyIntention: function (e) {
+         if (e) {
+            let theType = '';
+            intentionalService.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+     //最新跟进
+	getfllowSituation: function (e) {
+         if (e) {
+            let theType = '';
+            newFollow.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+     //性别
+	getsex: function (e) {
+         if (e) {
+            let theType = '';
+            sex.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
 }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.46",
+  "version": "1.0.45",
   "description": "",
   "main": "index.js",
   "scripts": {

+ 6 - 0
webpack.config.js

@@ -178,6 +178,12 @@ module.exports = (function () {
             template: './template/template.html',
             chunks: ['admin/achievement', 'vendors']
         }),
+        new HtmlWebpackPlugin({
+            title: '管理员-用户管理',
+            filename: 'admin/customer.html',
+            template: './template/template.html',
+            chunks: ['admin/customer', 'vendors']
+        }),
         //admin-set
         new HtmlWebpackPlugin({
             title: '管理员-用户管理',

+ 5 - 0
webpack/entry.config.js

@@ -30,6 +30,7 @@ module.exports = {
     //admin/demand
     'admin/demand': './js/admin/demand.js',
     'admin/achievement': './js/admin/achievement.js',
+    'admin/customer': './js/admin/customer.js',
     //admin/userOrder
     'admin/userOrder': './js/admin/userOrder.js',
     //portal  门户
@@ -109,6 +110,10 @@ module.exports = {
       'webpack/hot/only-dev-server',
       './js/admin/achievement.js'
     ],
+     'admin/customer': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './js/admin/customer.js'
+    ],
     'admin/set': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/admin/set.js'