Browse Source

需求管理客户端完成

yee 7 years ago
parent
commit
8e4c1bc701

+ 8 - 1
entry.js

@@ -21,7 +21,9 @@ module.exports = {
     'admin/servicesManage/copyright': './js/admin/servicesManage/copyright.js',
     'admin/servicesManage/highTech': './js/admin/servicesManage/highTech.js',
     'admin/servicesManage/highTechInfo': './js/admin/servicesManage/highTechInfo.js',
-    'admin/servicesManage/technology': './js/admin/servicesManage/technology.js'
+    'admin/servicesManage/technology': './js/admin/servicesManage/technology.js',
+    //admin/demand
+    'admin/demand': './js/admin/demand.js',
   },
   watch: {
     'user/index': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
@@ -70,10 +72,15 @@ module.exports = {
       'webpack/hot/only-dev-server',
       './js/admin/userManage.js'
     ],
+    'admin/demand': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './js/admin/demand.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'
     ],
+    //admin-servicesManage
     'admin/servicesManage/contract': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/admin/servicesManage/contract.js'

+ 16 - 0
js/admin/demand.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/demand/content.jsx';
+
+ReactDOM.render(
+    <div className="wrap clearfix">
+        <TopTab active={'demand'}/>
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 788 - 0
js/component/DicIndustryList.js

@@ -0,0 +1,788 @@
+module.exports = {
+    IndustryObject: [{
+        value: 464,
+        label: "教育休闲",
+        children: [{
+            value: 542,
+            label: "其他教育休闲"
+        }, {
+            value: 541,
+            label: "休闲娱乐"
+        }, {
+            value: 540,
+            label: "玩具"
+        }, {
+            value: 539,
+            label: "体育"
+        }, {
+            value: 538,
+            label: "办公文教"
+        }, {
+            value: 258,
+            label: "乐器"
+        }, {
+            value: 127,
+            label: "工艺美术"
+        }]
+    }, {
+        value: 463,
+        label: "包装印刷",
+        children: [{
+            value: 560,
+            label: "包装"
+        }, {
+            value: 534,
+            label: "包装袋、箱"
+        }, {
+            value: 533,
+            label: "印刷"
+        }, {
+            value: 436,
+            label: "标签、标牌"
+        }, {
+            value: 435,
+            label: "器皿、容器"
+        }, {
+            value: 355,
+            label: "造纸"
+        }, {
+            value: 354,
+            label: "纸类包装"
+        }, {
+            value: 353,
+            label: "纸浆"
+        }, {
+            value: 181,
+            label: "包装材料"
+        }, {
+            value: 180,
+            label: "其他包装印刷"
+        }, {
+            value: 179,
+            label: "记录媒介复制"
+        }, {
+            value: 176,
+            label: "装订"
+        }]
+    }, {
+        value: 462,
+        label: "电气自动化",
+        children: [{
+            value: 555,
+            label: "电气电工"
+        }, {
+            value: 550,
+            label: "电池充电器"
+        }, {
+            value: 549,
+            label: "其他电气自动化"
+        }, {
+            value: 373,
+            label: "人工智能"
+        }, {
+            value: 372,
+            label: "自动化元件"
+        }, {
+            value: 371,
+            label: "自动化应用"
+        }, {
+            value: 370,
+            label: "控制系统"
+        }, {
+            value: 241,
+            label: "电力绝缘"
+        }, {
+            value: 238,
+            label: "电力"
+        }, {
+            value: 237,
+            label: "电线、电缆"
+        }, {
+            value: 236,
+            label: "发电机"
+        }, {
+            value: 235,
+            label: "电动机"
+        }, {
+            value: 234,
+            label: "变压器、稳压器"
+        }, {
+            value: 233,
+            label: "开关、插座、插头"
+        }]
+    }, {
+        value: 461,
+        label: "采矿冶金",
+        children: [{
+            value: 572,
+            label: "金属合金冶炼铸造"
+        }, {
+            value: 571,
+            label: "非金属开采冶炼"
+        }, {
+            value: 570,
+            label: "黑色金属开采冶炼"
+        }, {
+            value: 569,
+            label: "有色金属开采冶炼"
+        }, {
+            value: 552,
+            label: "其他采矿冶金"
+        }, {
+            value: 512,
+            label: "石油天然气开采提炼"
+        }, {
+            value: 511,
+            label: "煤炭开采冶炼"
+        }, {
+            value: 192,
+            label: "矿业设备"
+        }]
+    }, {
+        value: 460,
+        label: "航空航天",
+        children: [{
+            value: 567,
+            label: "飞行器"
+        }, {
+            value: 545,
+            label: "其他航空航天"
+        }, {
+            value: 510,
+            label: "卫星导航"
+        }, {
+            value: 509,
+            label: "卫星通信"
+        }, {
+            value: 508,
+            label: "航空运行保障系统"
+        }, {
+            value: 507,
+            label: "空中管理系统"
+        }, {
+            value: 506,
+            label: "民用飞机"
+        }]
+    }, {
+        value: 459,
+        label: "海洋开发",
+        children: [{
+            value: 561,
+            label: "海底勘探"
+        }, {
+            value: 546,
+            label: "其他海洋开发"
+        }, {
+            value: 505,
+            label: "海洋船舶"
+        }, {
+            value: 504,
+            label: "渔业捕捞"
+        }, {
+            value: 503,
+            label: "海洋渔业资源保护与监测"
+        }, {
+            value: 502,
+            label: "海洋能源利用"
+        }, {
+            value: 501,
+            label: "海底矿产利用"
+        }, {
+            value: 500,
+            label: "海水养殖"
+        }, {
+            value: 497,
+            label: "海水淡化"
+        }]
+    }, {
+        value: 458,
+        label: "农林牧业",
+        children: [{
+            value: 579,
+            label: "农副产品深加工"
+        }, {
+            value: 554,
+            label: "养殖"
+        }, {
+            value: 553,
+            label: "种植"
+        }, {
+            value: 496,
+            label: "其他农业牧业"
+        }, {
+            value: 495,
+            label: "农副产品贮藏与保鲜"
+        }, {
+            value: 494,
+            label: "农机用具"
+        }, {
+            value: 493,
+            label: "饲料、肥料及添加剂"
+        }, {
+            value: 492,
+            label: "病虫害防治"
+        }, {
+            value: 491,
+            label: "家畜良种胚胎育种"
+        }, {
+            value: 489,
+            label: "动植物新品培育"
+        }]
+    }, {
+        value: 457,
+        label: "医药与医疗",
+        children: [{
+            value: 547,
+            label: "其他医药与医疗"
+        }, {
+            value: 488,
+            label: "生物化工"
+        }, {
+            value: 487,
+            label: "医疗器械"
+        }, {
+            value: 486,
+            label: "新剂型及制剂"
+        }, {
+            value: 485,
+            label: "化学药物"
+        }, {
+            value: 484,
+            label: "中药、天然药物"
+        }, {
+            value: 483,
+            label: "生物医药"
+        }]
+    }, {
+        value: 456,
+        label: "电子信息",
+        children: [{
+            value: 472,
+            label: "其他电子信息"
+        }, {
+            value: 471,
+            label: "智能交通"
+        }, {
+            value: 470,
+            label: "信息安全"
+        }, {
+            value: 469,
+            label: "广播电视"
+        }, {
+            value: 468,
+            label: "通信"
+        }, {
+            value: 467,
+            label: "硬件/数码"
+        }, {
+            value: 466,
+            label: "微电子"
+        }, {
+            value: 465,
+            label: "软件"
+        }, {
+            value: 291,
+            label: "网络"
+        }, {
+            value: 286,
+            label: "电子元器件"
+        }]
+    }, {
+        value: 375,
+        label: "新型材料",
+        children: [{
+            value: 473,
+            label: "金属材料"
+        }, {
+            value: 382,
+            label: "其他新材料技术"
+        }, {
+            value: 381,
+            label: "纳米及超细材料"
+        }, {
+            value: 378,
+            label: "无机非金属材料"
+        }, {
+            value: 377,
+            label: "高分子材料"
+        }, {
+            value: 376,
+            label: "生物医用材料"
+        }]
+    }, {
+        value: 31,
+        label: "仪器仪表",
+        children: [{
+            value: 566,
+            label: "实验仪器"
+        }, {
+            value: 565,
+            label: "分析仪器"
+        }, {
+            value: 564,
+            label: "检测仪器"
+        }, {
+            value: 563,
+            label: "压力仪表"
+        }, {
+            value: 562,
+            label: "温度仪表"
+        }, {
+            value: 527,
+            label: "其他仪器仪表"
+        }, {
+            value: 526,
+            label: "光学仪器"
+        }, {
+            value: 525,
+            label: "计时仪器"
+        }]
+    }, {
+        value: 26,
+        label: "橡胶塑料",
+        children: [{
+            value: 578,
+            label: "塑料原料与制品"
+        }, {
+            value: 577,
+            label: "橡胶原料与制品"
+        }, {
+            value: 207,
+            label: "其他橡胶塑料"
+        }, {
+            value: 206,
+            label: "橡塑加工与制造"
+        }, {
+            value: 205,
+            label: "合成材料及其助剂"
+        }]
+    }, {
+        value: 25,
+        label: "交通运输",
+        children: [{
+            value: 576,
+            label: "物流仓储"
+        }, {
+            value: 575,
+            label: "公路运输"
+        }, {
+            value: 442,
+            label: "电梯、缆车"
+        }, {
+            value: 441,
+            label: "摩托车"
+        }, {
+            value: 440,
+            label: "自行车"
+        }, {
+            value: 363,
+            label: "装卸搬运"
+        }, {
+            value: 362,
+            label: "管道运输"
+        }, {
+            value: 361,
+            label: "水路运输"
+        }, {
+            value: 360,
+            label: "铁路运输"
+        }, {
+            value: 200,
+            label: "其他交通运输"
+        }, {
+            value: 198,
+            label: "公路管理与养护"
+        }, {
+            value: 197,
+            label: "城市公共交通系统"
+        }, {
+            value: 195,
+            label: "航空运输"
+        }, {
+            value: 194,
+            label: "汽车"
+        }]
+    }, {
+        value: 20,
+        label: "安全防护",
+        children: [{
+            value: 556,
+            label: "防盗预警"
+        }, {
+            value: 432,
+            label: "交通安全"
+        }, {
+            value: 430,
+            label: "防身"
+        }, {
+            value: 174,
+            label: "其他安全防护"
+        }, {
+            value: 173,
+            label: "作业安防"
+        }, {
+            value: 172,
+            label: "救生"
+        }, {
+            value: 171,
+            label: "运动防护"
+        }, {
+            value: 170,
+            label: "军用安防"
+        }, {
+            value: 169,
+            label: "消防"
+        }, {
+            value: 168,
+            label: "监控"
+        }]
+    }, {
+        value: 19,
+        label: "环保和资源",
+        children: [{
+            value: 557,
+            label: "噪声污染治理"
+        }, {
+            value: 548,
+            label: "其他环保和资源"
+        }, {
+            value: 544,
+            label: "节能环保"
+        }, {
+            value: 482,
+            label: "生态保护"
+        }, {
+            value: 481,
+            label: "环境监测"
+        }, {
+            value: 480,
+            label: "固体废弃物污染处理"
+        }, {
+            value: 348,
+            label: "清洁生产与循环经济"
+        }, {
+            value: 167,
+            label: "资源利用与开发"
+        }, {
+            value: 163,
+            label: "大气污染防治"
+        }, {
+            value: 161,
+            label: "水污染治理"
+        }]
+    }, {
+        value: 18,
+        label: "机械",
+        children: [{
+            value: 523,
+            label: "光机电一体化"
+        }, {
+            value: 428,
+            label: "模具"
+        }, {
+            value: 427,
+            label: "机械检测"
+        }, {
+            value: 426,
+            label: "机械清洗清理"
+        }, {
+            value: 425,
+            label: "机械制冷"
+        }, {
+            value: 424,
+            label: "铸造/热处理"
+        }, {
+            value: 423,
+            label: "雕刻切割"
+        }, {
+            value: 422,
+            label: "机械干燥"
+        }, {
+            value: 421,
+            label: "机械分离"
+        }, {
+            value: 420,
+            label: "机械过滤"
+        }, {
+            value: 419,
+            label: "减速机/变速机"
+        }, {
+            value: 418,
+            label: "泵"
+        }, {
+            value: 417,
+            label: "阀门"
+        }, {
+            value: 346,
+            label: "机械输送"
+        }, {
+            value: 345,
+            label: "电焊"
+        }, {
+            value: 344,
+            label: "机械粉碎"
+        }, {
+            value: 341,
+            label: "发动机"
+        }, {
+            value: 340,
+            label: "机床"
+        }, {
+            value: 339,
+            label: "内燃机"
+        }, {
+            value: 300,
+            label: "液压机"
+        }, {
+            value: 160,
+            label: "其他机械"
+        }, {
+            value: 159,
+            label: "通用零部件"
+        }]
+    }, {
+        value: 17,
+        label: "新能源",
+        children: [{
+            value: 543,
+            label: "风能"
+        }, {
+            value: 479,
+            label: "其他新能源"
+        }, {
+            value: 478,
+            label: "能量转换与储存"
+        }, {
+            value: 477,
+            label: "核能及氢能"
+        }, {
+            value: 476,
+            label: "潮汐能"
+        }, {
+            value: 475,
+            label: "生物质能"
+        }, {
+            value: 474,
+            label: "地热能"
+        }, {
+            value: 416,
+            label: "太阳能 "
+        }]
+    }, {
+        value: 15,
+        label: "化学化工",
+        children: [{
+            value: 522,
+            label: "化工生产"
+        }, {
+            value: 521,
+            label: "日用化学"
+        }, {
+            value: 520,
+            label: "合成化学"
+        }, {
+            value: 519,
+            label: "涂料、颜料、油墨"
+        }, {
+            value: 518,
+            label: "农药"
+        }, {
+            value: 517,
+            label: "肥料"
+        }, {
+            value: 516,
+            label: "基础化学"
+        }, {
+            value: 515,
+            label: "精炼石油"
+        }, {
+            value: 413,
+            label: "专用化学"
+        }, {
+            value: 140,
+            label: "其他化学化工"
+        }, {
+            value: 580,
+            label: "盐湖化工"
+        }]
+    }, {
+        value: 7,
+        label: "轻工纺织",
+        children: [{
+            value: 559,
+            label: "皮革"
+        }, {
+            value: 558,
+            label: "纺织"
+        }, {
+            value: 551,
+            label: "其他轻工纺织"
+        }, {
+            value: 532,
+            label: "毛皮"
+        }, {
+            value: 529,
+            label: "编织物"
+        }, {
+            value: 528,
+            label: "棉及化纤印染精加工"
+        }, {
+            value: 86,
+            label: "服装服饰"
+        }, {
+            value: 85,
+            label: "制鞋"
+        }]
+    }, {
+        value: 5,
+        label: "家居用品",
+        children: [{
+            value: 574,
+            label: "护理用品"
+        }, {
+            value: 573,
+            label: "卫浴"
+        }, {
+            value: 402,
+            label: "餐具"
+        }, {
+            value: 401,
+            label: "厨具"
+        }, {
+            value: 308,
+            label: "日常用品"
+        }, {
+            value: 307,
+            label: "家用电器"
+        }, {
+            value: 73,
+            label: "其他家居用品"
+        }, {
+            value: 72,
+            label: "家居照明"
+        }, {
+            value: 68,
+            label: "家具"
+        }, {
+            value: 67,
+            label: "家居清洁"
+        }, {
+            value: 63,
+            label: "家居饰品"
+        }]
+    }, {
+        value: 4,
+        label: "建筑建材",
+        children: [{
+            value: 400,
+            label: "建筑电气"
+        }, {
+            value: 399,
+            label: "采暖空调"
+        }, {
+            value: 398,
+            label: "建筑照明"
+        }, {
+            value: 397,
+            label: "建筑通风"
+        }, {
+            value: 396,
+            label: "建筑给排水"
+        }, {
+            value: 305,
+            label: "建筑装潢"
+        }, {
+            value: 304,
+            label: "建筑材料"
+        }, {
+            value: 65,
+            label: "其他建筑建材"
+        }, {
+            value: 62,
+            label: "建筑施工"
+        }, {
+            value: 61,
+            label: "管件、管材"
+        }, {
+            value: 58,
+            label: "建筑装饰"
+        }, {
+            value: 57,
+            label: "建筑结构"
+        }]
+    }, {
+        value: 2,
+        label: "食品饮料",
+        children: [{
+            value: 568,
+            label: "方便食品"
+        }, {
+            value: 537,
+            label: "茶类"
+        }, {
+            value: 535,
+            label: "焙烤类"
+        }, {
+            value: 393,
+            label: "果蔬类"
+        }, {
+            value: 392,
+            label: "水产类"
+        }, {
+            value: 391,
+            label: "肉类"
+        }, {
+            value: 390,
+            label: "粗粮"
+        }, {
+            value: 389,
+            label: "调味及发酵"
+        }, {
+            value: 388,
+            label: "食用油"
+        }, {
+            value: 387,
+            label: "酒类酿造"
+        }, {
+            value: 302,
+            label: "甜品类"
+        }, {
+            value: 99,
+            label: "乳品"
+        }, {
+            value: 50,
+            label: "其他食品饮料"
+        }, {
+            value: 49,
+            label: "食品添加剂"
+        }, {
+            value: 48,
+            label: "食品加工"
+        }, {
+            value: 46,
+            label: "饮料类"
+        }]
+    }, {
+        value: 589,
+        label: "钒钛产业",
+        children: [{
+            value: "590",
+            label: "钒钛资源"
+        }, {
+            value: "591",
+            label: "钒钛冶金"
+        }, {
+            value: "592",
+            label: "钒钛化工"
+        }, {
+            value: "593",
+            label: "钒钛钢"
+        }, {
+            value: "594",
+            label: "钒钛新材料"
+        }, {
+            value: "595",
+            label: "其他"
+        }]
+    }]
+}

+ 21 - 110
js/component/account/services/contract/contract.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch, Modal } from 'antd';
-import { provinceArr, contractStateList, contractTypeList } from '../../../dataDic.js';
-import { getTime, companySearch, getContractState, getContractType, getInUrgentTime, getSearchUrl } from '../../../tools.js';
+import { contractStateList, contractTypeList } from '../../../dataDic.js';
+import { getTime, companySearch, getContractState, getContractType, getSearchUrl } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import ContractAdd from './contractAdd.jsx';
@@ -20,46 +20,45 @@ const Contract = React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/contract/list",
+            url: globalConfig.context + "/api/user/contract/list",
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                province: this.state.province,
-                uid: this.state.unitId,
                 type: this.state.contractType,
                 status: this.state.contractState,
+                contractId: this.state.contractId,
                 startDateFormattedDate: this.state.startDateFormattedDate,
                 endDateFormattedDate: this.state.endDateFormattedDate,
             },
             success: function (data) {
-                if (data.error.length || !data.data || !data.data.list) {
-                    message.warning(data.error[0].message);
+                let theArr = [];
+                if (!data.data && !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
                     return;
                 };
                 for (let i = 0; i < data.data.list.length; i++) {
                     let thisdata = data.data.list[i];
-                    this.state.data.push({
+                    theArr.push({
                         key: i,
-                        completeDate: thisdata.completeDate,
-                        completeDateFormattedDate: thisdata.completeDateFormattedDate,
-                        contacts: thisdata.contacts,
-                        depict: thisdata.depict,
-                        founder: thisdata.founder,
                         id: thisdata.id,
-                        province: thisdata.province,
+                        uid: thisdata.uid,
+                        contacts: thisdata.contacts,
                         serialNumber: thisdata.serialNumber,
+                        type: thisdata.type,
                         signDate: thisdata.signDate,
-                        signDateFormattedDate: thisdata.signDateFormattedDate,
+                        depict: thisdata.depict,
                         status: thisdata.status,
-                        type: thisdata.type,
-                        uid: thisdata.uid,
-                        unitName: thisdata.unitName,
+                        completeDate: thisdata.completeDate,
+                        signDateFormattedDate: thisdata.signDateFormattedDate,
+                        completeDateFormattedDate: thisdata.completeDateFormattedDate,
                     });
                 };
                 this.state.pagination.defaultCurrent = data.data.pageNo;
                 this.state.pagination.total = data.data.totalCount;
                 this.setState({
-                    dataSource: this.state.data,
+                    dataSource: theArr,
                     pagination: this.state.pagination
                 });
             }.bind(this),
@@ -69,67 +68,6 @@ const Contract = React.createClass({
             });
         }.bind(this));
     },
-    getAuthorList() {
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/contract/principal",
-            success: function (data) {
-                if (!data.data) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };
-                    return;
-                };
-                let _me = this, theArr = [];
-                for (var item in data.data) {
-                    theArr.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
-                    )
-                };
-                this.setState({
-                    authorOption: theArr
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-    },
-    getCompanyList() {
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/getUnitNames",
-            success: function (data) {
-                if (data.error.length || !data.data) {
-                    return;
-                };
-                let _me = this, theArr = [];
-                for (var item in data.data) {
-                    theArr.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
-                    )
-                };
-                this.setState({
-                    companyOption: theArr
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-    },
     getStateList() {
         this.setState({
             loading: true
@@ -229,12 +167,7 @@ const Contract = React.createClass({
         };
     },
     componentWillMount() {
-        let _me = this, pArr = [], tArr = [], sArr = [];
-        provinceArr.map(function (item) {
-            pArr.push(
-                <Select.Option value={item} key={item}>{item}</Select.Option>
-            )
-        });
+        let _me = this, tArr = [], sArr = [];
         contractTypeList.map(function (item) {
             tArr.push(
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
@@ -246,13 +179,10 @@ const Contract = React.createClass({
             )
         });
         this.setState({
-            provinceOption: pArr,
             typeOption: tArr,
             stateOption: sArr
         });
         this.loadData();
-        this.getAuthorList();
-        this.getCompanyList();
         this.getStateList();
         // if (window.location.search) {
         //     let theArr = getSearchUrl(window.location.search);
@@ -308,10 +238,9 @@ const Contract = React.createClass({
         this.loadData();
     },
     reset() {
-        this.state.province = undefined;
-        this.state.unitId = undefined;
         this.state.contractState = undefined;
         this.state.contractType = undefined;
+        this.state.contractId = undefined;
         this.state.startDateFormattedDate = [];
         this.state.endDateFormattedDate = [];
         this.loadData();
@@ -324,8 +253,7 @@ const Contract = React.createClass({
                     <div className="content-title">
                         <span>合同申请管理</span>
                         <ContractAdd
-                            companyOption={this.state.companyOption}
-                            authorOption={this.state.authorOption}
+                            contactsOption={this.state.contactsOption}
                             typeOption={this.state.typeOption}
                             data={this.state.RowData}
                             onClick={this.addClick}
@@ -333,22 +261,6 @@ const Contract = React.createClass({
                             closeAdd={this.closeAdd} />
                     </div>
                     <div className="foster-query">
-                        <Select placeholder="选择省份"
-                            style={{ width: 100 }}
-                            value={this.state.province}
-                            showSearch
-                            filterOption={companySearch}
-                            onChange={(e) => { this.setState({ province: e }) }}>
-                            {this.state.provinceOption}
-                        </Select>
-                        <Select placeholder="选择公司"
-                            style={{ width: 200 }}
-                            value={this.state.unitId}
-                            showSearch
-                            filterOption={companySearch}
-                            onChange={(e) => { this.setState({ unitId: e }) }}>
-                            {this.state.companyOption}
-                        </Select>
                         <Select placeholder="选择一个合同类型"
                             style={{ width: 200 }}
                             value={this.state.contractType}
@@ -391,7 +303,6 @@ const Contract = React.createClass({
                     </div>
                     <ContractDetail
                         data={this.state.RowData}
-                        authorOption={this.state.authorOption}
                         statusOption={this.state.statusOption}
                         showDesc={this.state.showDesc}
                         closeDesc={this.closeDesc} />

+ 4 - 43
js/component/account/services/contract/contractAdd.jsx

@@ -199,7 +199,7 @@ const ContractAddFrom = Form.create()(React.createClass({
                         )}
                 </FormItem>
                 <div className="clearfix">
-                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                    <span style={{ float: "left", lineHeight: '32px', marginRight:'20px' }}>
                         <Checkbox checked={this.state.highTechCheck} onChange={(e) => {
                             this.setState({ highTechCheck: e.target.checked });
                         }}></Checkbox>
@@ -219,7 +219,7 @@ const ContractAddFrom = Form.create()(React.createClass({
                     </FormItem>
                 </div>
                 <div className="clearfix">
-                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                    <span style={{ float: "left", lineHeight: '32px', marginRight:'20px' }}>
                         <Checkbox checked={this.state.patentCheck} onChange={(e) => {
                             this.setState({ patentCheck: e.target.checked });
                         }}></Checkbox>
@@ -235,7 +235,7 @@ const ContractAddFrom = Form.create()(React.createClass({
                     </FormItem>
                 </div>
                 <div className="clearfix">
-                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                    <span style={{ float: "left", lineHeight: '32px', marginRight:'20px' }}>
                         <Checkbox checked={this.state.copyrightCheck} onChange={(e) => {
                             this.setState({ copyrightCheck: e.target.checked });
                         }}></Checkbox>
@@ -251,7 +251,7 @@ const ContractAddFrom = Form.create()(React.createClass({
                     </FormItem>
                 </div>
                 <div className="clearfix">
-                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                    <span style={{ float: "left", lineHeight: '32px', marginRight:'20px' }}>
                         <Checkbox checked={this.state.techProjectCheck} onChange={(e) => {
                             this.setState({ techProjectCheck: e.target.checked });
                         }}></Checkbox>
@@ -266,43 +266,6 @@ const ContractAddFrom = Form.create()(React.createClass({
                             )}
                     </FormItem>
                 </div>
-                <div className="clearfix">
-                    <FormItem className="half-item"
-                        {...formItemLayout}
-                        label={"审核人"} >
-                        {getFieldDecorator('principals')(
-                            <Select
-                                placeholder="请选择审核人"
-                                notFoundContent="未找到"
-                                style={{ width: 260 }}
-                                showSearch
-                                multiple
-                                filterOption={companySearch} >
-                                {this.props.authorOption}
-                            </Select>
-                        )}
-                    </FormItem>
-                    <FormItem className="half-item"
-                        {...formItemLayout}
-                        label="处理时间"
-                    >
-                        {getFieldDecorator('recordTime')(
-                            <DatePicker />
-                        )}
-                    </FormItem>
-                </div>
-                <FormItem
-                    labelCol={{ span: 3 }}
-                    wrapperCol={{ span: 19 }}
-                    label="备注" >
-                    {getFieldDecorator('comment', {
-                        initialValue: theData.comment
-                    })(
-                        <Input type="textarea"
-                            placeholder="多行输入"
-                            rows={2} />
-                        )}
-                </FormItem>
                 <FormItem style={{ paddingLeft: '40px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                     <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
@@ -361,8 +324,6 @@ const ContractAdd = React.createClass({
                             visible={this.state.visible}
                             data={this.state.data}
                             okClick={() => { this.props.closeAdd(false, true) }}
-                            companyOption={this.props.companyOption}
-                            authorOption={this.props.authorOption}
                             typeOption={this.props.typeOption} />
                     </Modal>
                 </Spin>

+ 22 - 0
js/component/dataDic.js

@@ -614,5 +614,27 @@ module.exports = {
             value: "4",
             key: "作废"
         }
+    ],
+    //需求类型
+    demandTypeList:[
+        {
+            value: "0",
+            key: "技术购买型需求"
+        }, {
+            value: "1",
+            key: "技术设备类需求"
+        }, {
+            value: "2",
+            key: "技术方案型需求"
+        }, {
+            value: "3",
+            key: "技术攻关型需求"
+        }, {
+            value: "4",
+            key: "技术咨询型需求"
+        }, {
+            value: "5",
+            key: "技术人才型需求"
+        }
     ]
 };

+ 62 - 0
js/component/manageCenter/demand/content.jsx

@@ -0,0 +1,62 @@
+import React, { Component } from 'react';
+import '../content.less';
+import LeftTab from './leftTab';
+import TechDemand from './techDemand';
+
+
+class Content extends Component {
+    constructor() {
+        super();
+        this.state = {
+            loading: false,
+            component: 'div',
+            apiUrl: 'orgList'
+        };
+    }
+    componentWillMount() {
+        if (window.location.hash) {
+            this.getKey(window.location.hash.substr(1));
+        } else {
+            this.getKey("techDemandOrg");
+        };
+    }
+    getKey(key) {
+        switch (key) {
+            case 'techDemandOrg':
+                require.ensure([], () => {
+                    const TechDemand = require('./techDemand').default;
+                    this.setState({
+                        component: TechDemand,
+                        listApiUrl: '/api/admin/demand/orgList',
+                        detailApiUrl:'/api/admin/demand/orgDemandDetail'
+                    });
+                });
+                break;
+            case 'techDemandUser':
+                require.ensure([], () => {
+                    const TechDemand = require('./techDemand').default;
+                    this.setState({
+                        component: TechDemand,
+                        listApiUrl: '/api/admin/demand/userList',
+                        detailApiUrl:'/api/admin/demand/userDemandDetail'
+                    });
+                });
+                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;

+ 43 - 0
js/component/manageCenter/demand/leftTab.jsx

@@ -0,0 +1,43 @@
+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: 'techDemand'
+        };
+    },
+    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="techDemandOrg">
+                    组织科技需求列表
+                </Menu.Item>
+                <Menu.Item key="techDemandUser">
+                    个人科技需求列表
+                </Menu.Item>
+            </Menu>
+        );
+    },
+});
+
+export default LeftTab;

+ 455 - 0
js/component/manageCenter/demand/techDemand.jsx

@@ -0,0 +1,455 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './techDemand.less';
+import TechDemandDesc from './techDemandDesc.jsx';
+import { provinceArr, demandTypeList } from '../../dataDic.js';
+import { companySearch, getDemandType } from '../../tools.js';
+
+const DemandList = React.createClass({
+    loadData(pageNo, apiUrl) {
+        this.state.data = [];
+        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,
+                province: this.state.province,
+                serialNumber: this.state.serialNumber,
+                name: this.state.name,
+                keyword: this.state.keyword,
+                infoSources: this.state.infoSources ? Number(this.state.infoSources) : undefined,
+                demandType: this.state.demandType ? Number(this.state.demandType) : undefined,
+                //username: this.state.username,
+                status: this.state.status ? Number(this.state.status) : undefined,
+                release: this.state.release ? Number(this.state.release) : undefined,
+                validityPeriodStartDate: this.state.validityPeriodDate[0],
+                validityPeriodEndDate: this.state.validityPeriodDate[1],
+                releaseDateStartDate: this.state.releaseDate[0],
+                releaseDateEndDate: this.state.releaseDate[1],
+            },
+            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,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            infoSources: thisdata.infoSources,
+                            username: thisdata.username,
+                            demandType: thisdata.demandType,
+                            validityPeriod: thisdata.validityPeriod,
+                            employerName: thisdata.employerName,
+                            employerId:thisdata.employerId,
+                            province: thisdata.province,
+                            status: thisdata.status,
+                            releaseStatus: thisdata.releaseStatus,
+                            releaseDate: thisdata.releaseDate,
+                            principalId: thisdata.principalId,
+                            validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate
+                        });
+                    };
+                }
+                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,
+            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: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '需求名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '需求类型',
+                    dataIndex: 'demandType',
+                    key: 'demandType',
+                    render: text => { return getDemandType(text); }
+                }, {
+                    title: '信息来源',
+                    dataIndex: 'infoSources',
+                    key: 'infoSources',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>平台采集</span>;
+                            case "1":
+                                return <span>客户发布</span>
+                        }
+                    }
+                }, {
+                    title: '雇主名称',
+                    dataIndex: 'username',
+                    key: 'username',
+                }, {
+                    title: '需求状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>进行中</span>;
+                            case "1":
+                                return <span>未解决</span>;
+                            case "1":
+                                return <span>已解决</span>;
+                        }
+                    }
+                }, {
+                    title: '是否发布',
+                    dataIndex: 'release',
+                    key: 'release',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>未发布</span>;
+                            case "1":
+                                return <span>发布</span>
+                        }
+                    }
+                }, {
+                    title: '有效期限',
+                    dataIndex: 'validityPeriodFormattedDate',
+                    key: 'validityPeriodFormattedDate',
+                }, {
+                    title: '发布时间',
+                    dataIndex: 'releaseDateFormattedDate',
+                    key: 'releaseDateFormattedDate',
+                }, {
+                    title: '管理员',
+                    dataIndex: 'principalId',
+                    key: 'principalId',
+                }
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    getCompanyList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/unitNames",
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    data.data.map(function (item) {
+                        theArr.push(
+                            <Select.Option value={item.uid} key={item.uid}>{item.unitName}</Select.Option>
+                        )
+                    });
+                };
+                this.setState({
+                    companyOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getUserList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/userNames",
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    data.data.map(function (item) {
+                        theArr.push(
+                            <Select.Option value={item.uid} key={item.uid}>{item.username}</Select.Option>
+                        )
+                    });
+                };
+                this.setState({
+                    userOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    componentWillMount() {
+        let pArr = [], dArr = [];
+        provinceArr.map(function (item) {
+            pArr.push(
+                <Select.Option value={item} key={item}>{item}</Select.Option>
+            )
+        });
+        demandTypeList.map(function (item) {
+            dArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        this.state.provinceOption = pArr;
+        this.state.demandTypeOption = dArr;
+        this.loadData();
+        this.getCompanyList();
+        this.getUserList();
+        // if (window.location.search) {
+        //     let theArr(window.location.search);
+        //     if (theObj.id != 'null' && theObj.type != 'null') {
+        //         this.tableRowClick(theObj);
+        //     };
+        // };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
+            this.loadData(null, nextProps['data-listApiUrl']);
+            this.state.selectedRowKeys = [];
+            this.state.selectedRows = [];
+        };
+    },
+    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.push(rowItem.id)
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/delete",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (!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.province = undefined;
+        this.state.serialNumber = undefined;
+        this.state.name = undefined;
+        this.state.keyword = undefined;
+        this.state.infoSources = undefined;
+        this.state.demandType = undefined;
+        this.state.username = undefined;
+        this.state.status = undefined;
+        this.state.release = undefined;
+        this.state.validityPeriodDate = [];
+        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,
+                    selectedRowKeys: selectedRowKeys
+                });
+            }
+        };
+        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">
+                        <Button type="primary" onClick={this.addClick}>新增需求<Icon type="plus" /></Button>
+                    </div>
+                </div>
+                <div className="user-search">
+                    <Select placeholder="选择省份"
+                        style={{ width: 100 }}
+                        value={this.state.province}
+                        showSearch
+                        filterOption={companySearch}
+                        onChange={(e) => { this.setState({ province: e }) }}>
+                        {this.state.provinceOption}
+                    </Select>
+                    <Input placeholder="需求编号"
+                        value={this.state.serialNumber}
+                        onChange={(e) => { this.setState({ serialNumber: e.target.value }); }} />
+                    <Input placeholder="需求名称"
+                        value={this.state.name}
+                        onChange={(e) => { this.setState({ name: e.target.value }); }} />
+                    <Input placeholder="关键字"
+                        value={this.state.keyword}
+                        onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
+                    <Select placeholder="选择信息来源" style={{ width: 120 }}
+                        value={this.state.infoSources}
+                        onChange={(e) => { this.setState({ infoSources: e }) }}>
+                        <Select.Option value="0" >平台采集</Select.Option>
+                        <Select.Option value="1" >客户发布</Select.Option>
+                    </Select>
+                    <Select placeholder="选择需求类型"
+                        style={{ width: 120 }}
+                        value={this.state.demandType}
+                        onChange={(e) => { this.setState({ demandType: e }) }}>
+                        {this.state.demandTypeOption}
+                    </Select>
+                    <Select placeholder="选择需求状态" style={{ width: 120 }}
+                        value={this.state.status}
+                        onChange={(e) => { this.setState({ status: e }) }}>
+                        <Select.Option value="0" >进行中</Select.Option>
+                        <Select.Option value="1" >未解决</Select.Option>
+                        <Select.Option value="2" >已解决</Select.Option>
+                    </Select>
+                    <Select placeholder="选择是否发布" style={{ width: 120 }}
+                        value={this.state.release}
+                        onChange={(e) => { this.setState({ release: e }) }}>
+                        <Select.Option value="0" >未发布</Select.Option>
+                        <Select.Option value="1" >已发布</Select.Option>
+                    </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' } : {}}>
+                        <p>
+                            <span>有效期限 :</span>
+                            <RangePicker
+                                value={[this.state.validityPeriodDate[0] ? moment(this.state.validityPeriodDate[0]) : null,
+                                this.state.validityPeriodDate[1] ? moment(this.state.validityPeriodDate[1]) : null]}
+                                onChange={(data, dataString) => { this.setState({ validityPeriodDate: dataString }); }} />
+                            <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 }); }} />
+                        </p>
+                    </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>
+                <TechDemandDesc
+                    data={this.state.RowData}
+                    detailApiUrl={this.props['data-detailApiUrl']}
+                    companyOption={this.state.companyOption}
+                    userOption={this.state.userOption}
+                    demandTypeOption={this.state.demandTypeOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default DemandList;

+ 82 - 0
js/component/manageCenter/demand/techDemand.less

@@ -0,0 +1,82 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        color: #333;
+        font-size: 16px;
+    }
+    .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;
+            >p {
+                span {
+                    margin-right: 10px
+                }
+            }
+        }
+    }
+}
+
+.patent-addNew {
+    float: right;
+    margin-left: 20px;
+    button {
+        background: #ea0862;
+        color: #fff;
+        border: none;
+        border-radius: 4px;
+        padding: 6px 10px;
+        margin-left: 20px;
+    }
+    button:hover {
+        background: #ea0862;
+    }
+}
+
+#demand-form {
+    .half-item {
+        float: left;
+        width: 50%;
+        height: 36px;
+        margin-bottom: 20px;
+    }
+    .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;
+    } 
+    
+    //antd
+    .ant-radio-wrapper {
+        vertical-align: top;
+        .ant-radio {
+            height: 32px;
+            line-height: 32px;
+        }
+    }
+}

+ 792 - 0
js/component/manageCenter/demand/techDemandDesc.jsx

@@ -0,0 +1,792 @@
+import React from 'react';
+import { Icon, Tooltip, Modal, message, Spin, Upload, Input, InputNumber, Select, DatePicker, Button, Radio, Form, Cascader, Tag } from 'antd';
+import moment from 'moment';
+import './techDemand.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { IndustryObject } from '../../DicIndustryList.js';
+import { beforeUploadFile, splitUrl, companySearch } from '../../tools.js';
+
+const KeyWordTagGroup = React.createClass({
+    getInitialState() {
+        return {
+            tags: [],
+            inputVisible: false,
+            inputValue: ''
+        };
+    },
+    handleClose(removedTag) {
+        const tags = this.state.tags.filter(tag => tag !== removedTag);
+        this.props.tagsArr(tags);
+        this.setState({ tags });
+    },
+    showInput() {
+        this.setState({ inputVisible: true }, () => this.input.focus());
+    },
+    handleInputChange(e) {
+        this.setState({ inputValue: e.target.value });
+    },
+    handleInputConfirm() {
+        const state = this.state;
+        const inputValue = state.inputValue;
+        let tags = state.tags;
+        if (inputValue && tags.indexOf(inputValue) === -1) {
+            tags = [...tags, inputValue];
+        }
+        this.props.tagsArr(tags);
+        this.setState({
+            tags,
+            inputVisible: false,
+            inputValue: '',
+        });
+    },
+    componentWillMount() {
+        this.state.tags = this.props.keyWordArr;
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.keyWordArr != nextProps.keyWordArr) {
+            this.state.tags = nextProps.keyWordArr;
+        };
+    },
+    render() {
+        const { tags, inputVisible, inputValue } = this.state;
+        return (
+            <div className="keyWord-tips">
+                {tags.map((tag, index) => {
+                    const isLongTag = tag.length > 10;
+                    const tagElem = (
+                        <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
+                            {isLongTag ? `${tag.slice(0, 10)}...` : tag}
+                        </Tag>
+                    );
+                    return isLongTag ? <Tooltip title={tag}>{tagElem}</Tooltip> : tagElem;
+                })}
+                {inputVisible && (
+                    <Input
+                        ref={input => this.input = input}
+                        type="text"
+                        style={{ width: 78 }}
+                        value={inputValue}
+                        onChange={this.handleInputChange}
+                        onBlur={this.handleInputConfirm}
+                        onPressEnter={this.handleInputConfirm}
+                    />
+                )}
+                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
+            </div>
+        );
+    }
+});
+
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: [],
+        }
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl;
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/admin/demand/uploadPicture"}
+                    data={{ 'sign': 'demand_picture', 'uid': this.props.uid }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 5 ? null : uploadButton}
+                </Upload>
+                <Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const DemandDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            textFileList: [],
+            videoFileList: [],
+            pictureUrl: [],
+            tags: []
+        };
+    },
+    loadData(id, detailApiUrl) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + detailApiUrl,
+            data: {
+                id: id
+            },
+            success: function (data) {
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                };
+                let d = new Date()
+                if (thisData && thisData.dateOfBirthMonth && thisData.dateOfBirthYear) {
+                    d.setMonth(thisData.dateOfBirthMonth - 1);
+                    d.setYear(parseInt(thisData.dateOfBirthYear));
+                };
+                this.setState({
+                    data: thisData,
+                    tags: thisData.keyword ? thisData.keyword.split(",") : [],
+                    pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getSalesmanList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/salesman",
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    return;
+                };
+                let _me = this, theArr = [];
+                for (var item in data.data) {
+                    theArr.push(
+                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    salesmanOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid
+            },
+            success: function (data) {
+                let theOption = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                };
+                for (let item in data.data) {
+                    let theData = data.data[item];
+                    theOption.push(
+                        <Select.Option value={item} key={theData}>{theData}</Select.Option>
+                    );
+                };
+                this.setState({
+                    contactsOption: theOption
+                });
+            }.bind(this),
+        });
+    },
+    getTagsArr(e) {
+        this.setState({ tags: e });
+    },
+    getPictureUrl(e) {
+        this.setState({ pictureUrl: e });
+    },
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            //keyword长度判断
+            if (this.state.tags.length < 3) {
+                message.warning('关键词数量不能小于3个!');
+            };
+            //url转化
+            let thePictureUrl = [];
+            if (this.state.pictureUrl.length) {
+                let picArr = [];
+                this.state.pictureUrl.map(function (item) {
+                    picArr.push(item.response.data);
+                });
+                thePictureUrl = picArr.join(",");
+            };
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: this.props.data.id ? globalConfig.context + '/api/admin/demand/update' : globalConfig.context + '/api/admin/demand/apply',
+                    data: {
+                        id: this.props.data.id,
+                        dataCategory: this.props.detailApiUrl.indexOf('org') >= 0 ? 1 : 0,
+                        serialNumber: this.props.data.serialNumber,
+                        name: values.name,
+                        keyword: this.state.tags ? this.state.tags.join(",") : [],
+                        infoSources: values.infoSources,
+                        industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
+                        industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
+                        demandType: values.demandType,
+                        problemDes: values.problemDes,
+                        technicalRequirements: values.technicalRequirements,
+                        pictureUrl: thePictureUrl,
+                        textFileUrl: this.state.textFileUrl,
+                        videoUrl: values.videoUrl,
+                        fixedBudget: values.fixedBudget,
+                        fixedCycle: values.fixedCycle,
+                        peopleNumber: values.peopleNumber,
+                        fixedScheme: values.fixedScheme,
+                        costEscrow: values.costEscrow,
+                        budgetCost: values.budgetCost,
+                        employerId: values.employerId || this.state.data.employerId,
+                        releaseStatus: values.releaseStatus,
+                        principalId: values.principalId,
+                        validityPeriodFormattedDate: values.validityPeriod ? values.validityPeriod.format('YYYY-MM-DD') : undefined,
+                        //
+                        contacts: values.contacts,
+                        status: this.state.status
+                    }
+                }).done(function (data) {
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.setState({
+                            visible: false
+                        });
+                        this.props.handleOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+    },
+    componentWillMount() {
+        this.getSalesmanList();
+        if (this.props.data.id) {
+            this.loadData(this.props.data.id, this.props.detailApiUrl);
+            if (this.props.data.employerId && this.props.detailApiUrl.indexOf('org') >= 0) {
+                this.getContactsList(this.props.data.employerId)
+            };
+        } else {
+            this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.videoFileList = [];
+            if (nextProps.data.id) {
+                this.loadData(nextProps.data.id, nextProps.detailApiUrl);
+                if (nextProps.data.employerId && nextProps.detailApiUrl.indexOf('org') >= 0) {
+                    this.getContactsList(nextProps.data.employerId)
+                };
+            } else {
+                this.state.data = {};
+                this.state.tags = [];
+                this.state.pictureUrl = [];
+                this.props.form.resetFields();
+            };
+        };
+    },
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+        };
+        return (
+            <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="编号" >
+                        <span>{theData.serialNumber}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="需求名称" >
+                        {getFieldDecorator('name', {
+                            rules: [{ required: true, message: '此项为必填项!' }],
+                            initialValue: theData.name
+                        })(
+                            <Input />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item" style={{ display: theData.username ? 'block' : 'none' }}
+                        {...formItemLayout}
+                        label="雇主名称" >
+                        <span>{theData.username}</span>
+                    </FormItem>
+                    <FormItem className="half-item" style={{ display: theData.username ? 'none' : 'block' }}
+                        {...formItemLayout}
+                        label="雇主名称" >
+                        {getFieldDecorator('employerId', {
+                            initialValue: theData.employerId
+                        })(
+                            <Select
+                                placeholder="请选择"
+                                notFoundContent="未找到"
+                                style={{ width: 260 }}
+                                showSearch
+                                filterOption={companySearch}
+                                onSelect={(e, n) => {
+                                    theData.uid = e;
+                                    if (this.props.detailApiUrl.indexOf('org') >= 0) {
+                                        this.getContactsList(e);
+                                    };
+                                }}>
+                                {this.props.detailApiUrl.indexOf('org') >= 0 ? this.props.companyOption : this.props.userOption}
+                            </Select>
+                            )}
+                    </FormItem>
+                    {this.props.detailApiUrl.indexOf('org') >= 0 ? <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="联系人" >
+                        {getFieldDecorator('contacts', {
+                            initialValue: theData.contacts
+                        })(
+                            <Select style={{ width: 260 }}
+                                placeholder="请选择联系人"
+                                notFoundContent="未获取到联系人列表"
+                                showSearch
+                                filterOption={companySearch}>
+                                {this.state.contactsOption}
+                            </Select>
+                            )}
+                    </FormItem> : <div></div>}
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="负责人" >
+                        {getFieldDecorator('principalId', {
+                            rules: [{ required: true, message: '此项为必填项!' }],
+                            initialValue: theData.principalId
+                        })(
+                            <Select style={{ width: 260 }}
+                                placeholder="请选择负责人"
+                                notFoundContent="未获取到负责人列表"
+                                showSearch
+                                filterOption={companySearch}>
+                                {this.state.salesmanOption}
+                            </Select>
+                            )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="是否发布" >
+                        {getFieldDecorator('releaseStatus', {
+                            initialValue: theData.releaseStatus
+                        })(
+                            <Radio.Group>
+                                <Radio value="0">未发布</Radio>
+                                <Radio value="1">发布</Radio>
+                            </Radio.Group>
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="发布时间" >
+                        <span>{theData.releaseDateFormattedDate}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="需求状态" >
+                        {(() => {
+                            if (theData.status > 1) {
+                                return <Radio.Group
+                                    value={this.state.status}
+                                    onChange={(e) => { this.setState({ status: e }); }}>
+                                    <Radio value="2">未解决</Radio>
+                                    <Radio value="3">已解决</Radio>
+                                </Radio.Group>
+                            } else {
+                                switch (theData.status) {
+                                    case "0":
+                                        return <span>草稿</span>;
+                                    case "1":
+                                        return <span>进行中</span>;
+                                };
+                            };
+                        })()}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="需求创建时间" >
+                        <span>{theData.createTimeFormattedDate}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="信息来源" >
+                        {getFieldDecorator('infoSources', {
+                            rules: [{ required: true, message: '此项为必填项!' }],
+                            initialValue: theData.infoSources
+                        })(
+                            <Radio.Group>
+                                <Radio value="0">平台采集</Radio>
+                                <Radio value="1">客户发布</Radio>
+                            </Radio.Group>
+                            )}
+                    </FormItem>
+                </div>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 20 }}
+                    label="关键词" >
+                    <KeyWordTagGroup
+                        keyWordArr={this.state.tags}
+                        tagsArr={this.getTagsArr}
+                        visible={this.props.visible} />
+                </FormItem>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 18 }}
+                    label="行业类别" >
+                    {getFieldDecorator('industryCategory', {
+                        rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
+                        initialValue: [theData.industryCategoryA, theData.industryCategoryB]
+                    })(
+                        <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="请选择一个行业" />
+                        )}
+                </FormItem>
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="需求类型" >
+                        {getFieldDecorator('demandType', {
+                            rules: [{ required: true, message: '此项为必填项!' }],
+                            initialValue: theData.demandType
+                        })(
+                            <Select style={{ width: 160 }} placeholder="请选择需求类型">
+                                {this.props.demandTypeOption}
+                            </Select>
+                            )}
+                    </FormItem>
+                </div>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 18 }}
+                    label="问题说明" >
+                    {getFieldDecorator('problemDes', {
+                        rules: [{ required: true, message: '此项为必填项!' }],
+                        initialValue: theData.problemDes
+                    })(
+                        <Input type="textarea" rows={4} />
+                        )}
+                </FormItem>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 18 }}
+                    label="技术指标要求" >
+                    {getFieldDecorator('technicalRequirements', {
+                        initialValue: theData.technicalRequirements
+                    })(
+                        <Input type="textarea" rows={2} />
+                        )}
+                </FormItem>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 18 }}
+                    label="需求文件(图片)" >
+                    <PicturesWall
+                        uid={theData.uid}
+                        fileList={this.getPictureUrl}
+                        pictureUrl={this.state.pictureUrl}
+                        visible={this.props.visible} />
+                </FormItem>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 6 }}
+                    label="需求文件(文本)" >
+                    <Upload
+                        name="ratepay"
+                        action={globalConfig.context + "/api/admin/demand/uploadTextFile"}
+                        data={{ 'sign': 'demand_text_file', 'uid': theData.uid }}
+                        beforeUpload={beforeUploadFile}
+                        fileList={this.state.textFileList}
+                        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;
+                                };
+                                this.state.textFileUrl = info.file.response.data;
+                            } else if (info.file.status === 'error') {
+                                message.error(`${info.file.name} 文件上传失败。`);
+                            };
+                            this.setState({ textFileList: info.fileList.slice(-1) });
+                        }} >
+                        <Button><Icon type="upload" /> 上传需求文本文件 </Button>
+                    </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.textFileUrl ?
+                        <span className="download-file">
+                            <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>需求文件(文本文件)</a>
+                        </span>
+                        : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                </FormItem>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 18 }}
+                    label="需求文件(视频地址)" >
+                    {getFieldDecorator('videoUrl', {
+                        initialValue: theData.videoUrl
+                    })(
+                        <Input />
+                        )}
+                </FormItem>
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="固定周期" >
+                        {getFieldDecorator('fixedCycle', {
+                            initialValue: theData.fixedCycle
+                        })(
+                            <Input />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="固定人数" >
+                        {getFieldDecorator('peopleNumber', {
+                            initialValue: theData.peopleNumber
+                        })(
+                            <InputNumber />
+                            )}
+                        <span style={{ marginLeft: '20px' }}>人</span>
+                    </FormItem>
+                </div>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 18 }}
+                    label="固定方案" >
+                    {getFieldDecorator('fixedScheme', {
+                        initialValue: theData.fixedScheme
+                    })(
+                        <Input type="textarea" rows={2} />
+                        )}
+                </FormItem>
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="预算费用" >
+                        {getFieldDecorator('budgetCost', {
+                            initialValue: theData.budgetCost
+                        })(
+                            <InputNumber />
+                            )}
+                        <span style={{ marginLeft: '20px' }}>万元</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="费用托管" >
+                        {getFieldDecorator('costEscrow', {
+                            initialValue: theData.costEscrow
+                        })(
+                            <Radio.Group>
+                                <Radio value={0}>否</Radio>
+                                <Radio value={1}>是</Radio>
+                            </Radio.Group>
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="有效期限" >
+                        {getFieldDecorator('validityPeriod', {
+                            initialValue: theData.validityPeriod ? moment(theData.validityPeriod) : null
+                        })(
+                            <DatePicker />
+                            )}
+                    </FormItem>
+                </div>
+                <div className="clearfix" style={{ display: 'none' }}>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主客户ID" >
+                        {getFieldDecorator('employerId', {
+                            initialValue: theData.employerName
+                        })(
+                            <Input />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主地址" >
+                        {getFieldDecorator('employerAddress', {
+                            initialValue: theData.employerAddress
+                        })(
+                            <Input />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主联系人名称" >
+                        {getFieldDecorator('employerContacts', {
+                            initialValue: theData.employerContacts
+                        })(
+                            <Input />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主联系人电话" >
+                        {getFieldDecorator('employerContactsMobile', {
+                            initialValue: theData.employerContactsMobile
+                        })(
+                            <Input />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主联系人邮箱" >
+                        {getFieldDecorator('employerContactsMailbox', {
+                            initialValue: theData.employerContactsMailbox
+                        })(
+                            <Input />
+                            )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主地址" >
+                        <span>{theData.employerAddress}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主联系人名称" >
+                        <span>{theData.employerContacts}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主联系人电话" >
+                        <span>{theData.employerContactsMobile}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="雇主联系人邮箱" >
+                        <span>{theData.employerContactsMailbox}</span>
+                    </FormItem>
+                </div>
+                <FormItem wrapperCol={{ span: 12, offset: 3 }}>
+                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                    <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
+                </FormItem>
+            </Form >
+        )
+    }
+}));
+
+const DemandDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false
+        };
+    },
+    showModal() {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.visible = nextProps.showDesc;
+    },
+    render() {
+        if (this.props.data) {
+            return (
+                <div className="patent-desc">
+                    <Modal title="用户需求详情" visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='1000px'
+                        footer=''
+                        className="admin-desc-content">
+                        <DemandDetailForm
+                            data={this.props.data}
+                            detailApiUrl={this.props.detailApiUrl}
+                            companyOption={this.props.companyOption}
+                            userOption={this.props.userOption}
+                            demandTypeOption={this.props.demandTypeOption}
+                            closeDesc={this.handleCancel}
+                            visible={this.state.visible}
+                            handleOk={this.handleOk} />
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+export default DemandDetail;

+ 0 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/innovationAbility.jsx

@@ -9,7 +9,6 @@ const Base = React.createClass({
     getInitialState() {
         return {
             loading: false,
-            tags: []
         };
     },
     loadData() {
@@ -48,7 +47,6 @@ const Base = React.createClass({
         this.loadData()
     },
     submit() {
-        let theTags = this.state.tags.join(",");
         this.setState({
             loading: true
         })

+ 1 - 1
js/component/manageCenter/topTab.jsx

@@ -461,7 +461,7 @@ const TopTab = React.createClass({
                         <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="">科技成果管理</a></Col>
-                        <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href="">科技需求管理</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="">科技思想管理</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>
                     </Row>

+ 15 - 2
js/component/tools.js

@@ -20,7 +20,8 @@ import {
     companyType,
     industryList,
     contractTypeList,
-    contractStateList
+    contractStateList,
+    demandTypeList
 } from './dataDic.js';
 import { provinceList } from './DicProvinceList.js';
 import { techFieldList } from './DicTechFieldList.js'
@@ -121,7 +122,7 @@ module.exports = {
     splitUrl: function (string, i, url) {
         let theList = [];
         let theArr = [];
-        if (string) {
+        if (string && string.length) {
             theArr = string.split(i);
             theArr.map(function (item, i) {
                 theList.push({
@@ -648,5 +649,17 @@ module.exports = {
             });
             return theType;
         }
+    },
+    //获取需求类型
+    getDemandType: function (e) {
+        if (e) {
+            let theType = '';
+            demandTypeList.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
     }
 }

+ 7 - 0
webpack.config.js

@@ -134,6 +134,13 @@ module.exports = (function () {
             template: './template/template.html',
             chunks: ['admin/servicesManage/technology', 'vendors']
         }),
+        //admin-demand
+        new HtmlWebpackPlugin({
+            title: '管理员-用户管理',
+            filename: 'admin/demand.html',
+            template: './template/template.html',
+            chunks: ['admin/demand', 'vendors']
+        }),
         //admin-set
         new HtmlWebpackPlugin({
             title: '管理员-用户管理',