liting2017 6 years ago
parent
commit
0709f4b7e1

+ 2 - 0
js/admin/index/content.jsx

@@ -8,6 +8,7 @@ import BusinessCategory from '@/administration/business/businessCategory';
 import BusinessProject from '@/administration/business/businessProject';
 import News from '@/administration/news/newsList';
 import Policy from '@/administration/policy/policyList';
+import Order from '@/administration/Order/order'
 
 import {hashHistory,Route,Router} from 'react-router';
 import {Layout} from 'antd';
@@ -30,6 +31,7 @@ export default class ContentRouter extends React.Component {
             <Route path="/businessProject" component={BusinessProject} />
             <Route path="/news" component={News} />
             <Route path="/policy" component={Policy} />
+            <Route path="/order" component={Order} />
         </Router>
       </Content>
     )

+ 1 - 1
js/admin/index/leftMenu.jsx

@@ -12,7 +12,7 @@ const LeftTab = React.createClass({
 			openKeys: [ 'sub1' ],
 			current: 'index',
 			switch: false,
-			rootSubmenuKeys :['sub1', 'sub2','sub3','sub4','sub5']
+			rootSubmenuKeys :['sub1', 'sub2','sub3','sub4','sub5','sub6']
 		};
 	},
 	menuClick(e) {

+ 9 - 0
js/admin/menu.jsx

@@ -43,6 +43,15 @@ module.exports = {
           { name: '政策管理', url: 'policy' },
           { name: '新闻管理', url: 'news' },
         ]
+      },
+      {
+        name: '订单管理',
+        url: 'sub6',
+        icon: 'copy',
+        children: [
+          { name: '咨询单管理', url: 'order' },
+         
+        ]
       }
     ]
 }

+ 4 - 2
js/component/account/index/content.jsx

@@ -13,8 +13,9 @@ import ServiceList from '@/account/index/serviceList';
 import ConsultList from '@/account/index/consultList';
 import DemandList from '@/account/demand/techDemand';
 import Achievement from '@/account/achievement/techAchievement';
-import BusinessProject from '@/account/business/businessProject'
-import Follow from "@/account/index/follow"
+import BusinessProject from '@/account/business/businessProject';
+import Follow from "@/account/index/follow";
+import Order from '@/account/order/order';
 
 import {hashHistory,Route,Router} from 'react-router';
 import {Layout} from 'antd';
@@ -41,6 +42,7 @@ export default class ContentRouter extends React.Component {
             <Route path="/achievement" component={Achievement} />
             <Route path="/expert" component={Expert} />
             <Route path="/businessProject" component={BusinessProject} />
+            <Route path="/order" component={Order} />
         </Router>
       </Content>
     )

+ 3 - 5
js/component/account/index/follow.jsx

@@ -84,11 +84,9 @@ class Collection extends Component {
             <div className="title" >
                 我的关注
             </div>
-            {/* <div>
-                <Radio.Group className="btnGroup" value={this.state.nub} onChange={this.tabFun.bind(this)}>
-                    <Radio.Button value="1">智者</Radio.Button>
-                </Radio.Group>
-            </div> */}
+            <div>
+                <p style={{fontSize:16,marginBottom:15}}>智者,您困惑中的指明灯</p>
+            </div> 
             <div className="imgList">
                 <Spin spinning={this.state.loading}>
                     {dataList.length?<Row>

+ 22 - 4
js/component/account/menu.jsx

@@ -6,8 +6,8 @@ module.exports = {
         icon: 'home',
         children: [
           { name: '常用功能', url: 'normal' },
-          // { name: '我的收藏', url: 'collection' },
-          // { name: '我的关注', url: 'follow' },
+          { name: '我的收藏', url: 'collection' },
+          { name: '我的关注', url: 'follow' },
           // { name: '科技订单', url: 'techList' },
           // { name: '服务订单', url: 'serviceList' },
           // { name: '咨询订单', url: 'consultList' },
@@ -43,6 +43,15 @@ module.exports = {
           icon: 'wallet',
           children: [ { name: '业务项目管理', url: 'businessProject' }, ]
         },
+        {
+          name: '订单管理',
+          url: 'sub6',
+          icon: 'copy',
+          children: [
+            { name: '我的订单', url: 'order' },
+           
+          ]
+        }
     ],
     menuInit:[
       {
@@ -51,8 +60,8 @@ module.exports = {
         icon: 'home',
         children: [
           { name: '常用功能', url: 'normal' },
-          // { name: '我的收藏', url: 'collection' },
-          // { name: '我的关注', url: 'follow' },
+          { name: '我的收藏', url: 'collection' },
+          { name: '我的关注', url: 'follow' },
           // { name: '科技订单', url: 'techList' },
           // { name: '服务订单', url: 'serviceList' },
           // { name: '咨询订单', url: 'consultList' }
@@ -87,5 +96,14 @@ module.exports = {
           icon: 'wallet',
           children: [ { name: '业务项目管理', url: 'businessProject' }, ]
         },
+        {
+          name: '订单管理',
+          url: 'sub6',
+          icon: 'copy',
+          children: [
+            { name: '咨询单管理', url: 'order' },
+           
+          ]
+        }
     ],
 }

+ 460 - 0
js/component/account/order/order.jsx

@@ -0,0 +1,460 @@
+/* 
+	update:2018/07/16
+	author:liting
+*/
+
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import { Form, Button, Input, Select, Spin, Table, message, Modal, Tooltip, Switch, DatePicker } from 'antd';
+import { orderType } from '@/dataDic';
+import { getOrderType } from '@/tools.js';
+import moment  from 'moment';
+//主体
+const Order = Form.create()(
+	React.createClass({
+		loadData(pageNo) {
+			this.state.data = [];
+			this.setState({
+				loading: true,
+				page: pageNo
+			});
+			$.ajax({
+				method: 'get',
+				dataType: 'json',
+				crossDomain: false,
+				url: globalConfig.context + '/portal/service/jtProject/list',
+				data: {
+					pageNo: pageNo || 1,
+					pageSize: this.state.pagination.pageSize,
+					number: this.state.numberSearch,
+					type: this.state.typeSearch,
+					entryName: this.state.entryNameSearch,
+					companyName: this.state.companyNameSearch,
+					start: this.state.releaseDate[0],
+					end: 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,
+								name: thisdata.name,
+								number: thisdata.number,
+								createTime: thisdata.createTime ? new Date(thisdata.createTime).toLocaleString() : ''
+							});
+						}
+						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,
+				selectedRowKeys: [],
+				selectedRows: [],
+				loading: false,
+				releaseDate: [],
+				pagination: {
+					defaultCurrent: 1,
+					defaultPageSize: 10,
+					showQuickJumper: true,
+					pageSize: 10,
+					onChange: function(page) {
+						this.loadData(page);
+						this.setState({
+							selectedRowKeys: []
+						});
+					}.bind(this),
+					showTotal: function(total) {
+						return '共' + total + '条数据';
+					}
+				},
+				columns: [
+					{
+						title: '订单编号',
+						dataIndex: 'name',
+						key: 'bname'
+					},
+					{
+						title: '订单类型',
+						dataIndex: 'cname',
+						key: 'cname',
+						render: (text) => {
+							return getOrderType(text);
+						}
+					},
+					{
+						title: '订单日期',
+						dataIndex: 'superName',
+						key: 'superName'
+					},
+					{
+						title: '订单金额',
+						dataIndex: 'price',
+						key: 'price'
+					},
+					{
+						title: '公司名称',
+						dataIndex: 'offset',
+						key: 'offset',
+						render: (text) => {
+							return (
+								<Tooltip title={text}>
+									{text && text.length > 6 ? text.substr(0, 6) + '...' : text}
+								</Tooltip>
+							);
+						}
+					},
+					{
+						title: '项目名称',
+						dataIndex: 'memberPrice',
+						key: 'memberPrice',
+						render: (text) => {
+							return (
+								<Tooltip title={text}>
+									{text && text.length > 6 ? text.substr(0, 6) + '...' : text}
+								</Tooltip>
+							);
+						}
+					},
+					{
+						title: '联系人',
+						dataIndex: 'activityFlag',
+						key: 'activityFlag'
+					},
+					{
+						title: '联系方式',
+						dataIndex: 'activityFlag1',
+						key: 'activityFlag1'
+					},
+					{
+						title: '买方',
+						dataIndex: 'activityFlag12',
+						key: 'activityFlag12',
+						render: (text) => {
+							return (
+								<Tooltip title={text}>
+									{text && text.length > 6 ? text.substr(0, 6) + '...' : text}
+								</Tooltip>
+							);
+						}
+					},
+					{
+						title: '卖方',
+						dataIndex: 'activityFlag123',
+						key: 'activityFlag123',
+						render: (text) => {
+							return (
+								<Tooltip title={text}>
+									{text && text.length > 6 ? text.substr(0, 6) + '...' : text}
+								</Tooltip>
+							);
+						}
+					}
+
+				],
+				dataSource: []
+			};
+		},
+		componentWillMount() {
+			this.loadData();
+		},
+		detailes(recard) {
+			this.setState({
+				loading: true
+			});
+			$.ajax({
+				method: 'get',
+				dataType: 'json',
+				crossDomain: false,
+				url: globalConfig.context + '/api/user/jtBusiness/project/detail',
+				data: {
+					id: recard.id
+				},
+				success: function(data) {
+					let thisData = data.data;
+					if (!thisData) {
+						if (data.error && data.error.length) {
+							message.warning(data.error[0].message);
+						}
+						thisData = {};
+					}
+					this.setState({
+						id: thisData.id,
+						data: thisData,
+						createTime: thisData.createTime ? new Date(thisData.createTime).toLocaleString() : ''
+					});
+				}.bind(this)
+			}).always(
+				function() {
+					this.setState({
+						loading: false
+					});
+				}.bind(this)
+			);
+		},
+		//项目列表整行点击
+		tableRowClick(record, index) {
+			this.state.RowData = record;
+			this.setState({
+				editvisible: true
+			});
+			this.detailes(record);
+		},
+		edithandleCancel(e) {
+			this.setState({
+				editvisible: false
+			});
+		},
+		search() {
+			this.loadData();
+		},
+		//搜索部分的清零
+		reset() {
+			this.state.numberSearch = '';
+			this.state.typeSearch = undefined;
+			this.state.companyNameSearch = '';
+			this.state.entryNameSearch = '';
+			this.state.releaseDate = [];
+			this.state.searchMore=true;
+			this.loadData();
+		},
+		searchSwitch() {
+			this.setState({
+				searchMore: !this.state.searchMore
+			});
+		},
+		render() {
+			const FormItem = Form.Item;
+			const rowSelection = {
+				selectedRowKeys: this.state.selectedRowKeys,
+				onChange: (selectedRowKeys, selectedRows) => {
+					this.setState({
+						selectedRows: selectedRows.slice(-1),
+						selectedRowKeys: selectedRowKeys.slice(-1)
+					});
+				}
+			};
+			const { RangePicker } = DatePicker;
+			const theData = this.state.data || {};
+			return (
+				<div className="user-content">
+					<div className="content-title">
+						<span>我的订单</span>
+					</div>
+					<div className="user-search">
+						<Input
+							placeholder="订单编号"
+							style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
+							value={this.state.numberSearch}
+							onChange={(e) => {
+								this.setState({ numberSearch: e.target.value });
+							}}
+						/>
+						<Select
+							placeholder="订单类型"
+							style={{ width: '200px', marginRight: '10px' }}
+							value={this.state.typeSearch}
+							onChange={(e) => {
+								this.setState({ typeSearch: e });
+							}}
+						>
+							{orderType.map(function(item) {
+								return <Select.Option key={item.value}>{item.key}</Select.Option>;
+							})}
+						</Select>
+						<Input
+							placeholder="公司名称"
+							style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
+							value={this.state.companyNameSearch}
+							onChange={(e) => {
+								this.setState({ companyNameSearch: e.target.value });
+							}}
+						/>
+						<Input
+							placeholder="项目名称"
+							style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
+							value={this.state.entryNameSearch}
+							onChange={(e) => {
+								this.setState({ entryNameSearch: e.target.value });
+							}}
+						/>
+						<Input
+							style={{ width: 140, marginRight: 10 }}
+							value={this.state.employerNameSearch}
+							onChange={(e) => {
+								this.setState({ employerNameSearch: e.target.value });
+							}}
+							placeholder="客户名称"
+						/>
+						<Button type="primary" onClick={this.search} style={{ marginRight: '10px' }}>
+							搜索
+						</Button>
+						<Button onClick={this.reset} style={{ marginRight: '10px' }}>
+							重置
+						</Button>
+						<span>
+							更多搜索<Switch  checked={!this.state.searchMore} onChange={this.searchSwitch} />
+						</span>
+						<div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+							<span style={{ marginRight: 10 }}>发布时间 :</span>
+							<RangePicker
+								value={[
+									this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+									this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null
+								]}
+								onChange={(data, dataString) => {
+									this.setState({ releaseDate: dataString });
+								}}
+							/>
+						</div>
+					</div>
+					<div className="patent-table">
+						<Spin spinning={this.state.loading}>
+							<Table
+								columns={this.state.columns}
+								dataSource={this.state.dataSource}
+								rowSelection={rowSelection}
+								pagination={this.state.pagination}
+								onRowClick={this.tableRowClick}
+							/>
+						</Spin>
+					</div>
+					<div className="patent-desc">
+						<Modal
+							className="customeDetails"
+							title="订单详情"
+							width="1000px"
+							visible={this.state.editvisible}
+							onOk={this.edithandleCancel}
+							onCancel={this.edithandleCancel}
+							footer=""
+						>
+							<Form layout="horizontal" onSubmit={this.edithandleSubmit} id="demand-form">
+								<Spin spinning={this.state.loading}>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单编号"
+										>
+											<span>{theData.name}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单类型"
+										>
+											<span>{getOrderType(theData.type)}</span>
+										</FormItem>
+									</div>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单日期"
+										>
+											<span>{this.state.createTime}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单金额"
+										>
+											<span>{theData.isHot ? theData.isHot + '万元' : ''}</span>
+										</FormItem>
+									</div>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="项目名称"
+										>
+											<span>{theData.name}</span>
+										</FormItem>
+									</div>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="买方名称"
+										>
+											<span>{theData.memberPrice1}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="卖方名称"
+										>
+											<span>{theData.activityFlag1}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="买方联系人"
+										>
+											<span>{theData.activityPrice}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="卖方联系人"
+										>
+											<span>{theData.offset}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="买方联系方式"
+										>
+											<span>{theData.memberPrice}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="卖方联系方式"
+										>
+											<span>{theData.activityFlag}</span>
+										</FormItem>
+									</div>
+								</Spin>
+							</Form>
+						</Modal>
+					</div>
+				</div>
+			);
+		}
+	})
+);
+
+export default Order;

+ 92 - 45
js/component/account/setAccount/unit.jsx

@@ -9,17 +9,9 @@ import {
 	Radio,
 	Icon,
 	Button,
-	AutoComplete,
-	Cascader,
-	layout,
 	Input,
 	Select,
-	Tabs,
 	Spin,
-	Popconfirm,
-	Popover,
-	Table,
-	Switch,
 	message,
 	DatePicker,
 	Modal,
@@ -27,46 +19,16 @@ import {
 	Form,
 	Row,
 	Col,
-	TimePicker,
 	InputNumber
 } from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import moment from 'moment';
 import './unit.less';
-import { citySelect, provinceList, areaSelect } from '@/NewDicProvinceList';
 import {
 	socialAttribute,
 	industry,
-	newFollow,
-	auditStatusL,
-	lvl,
-	currentMember,
-	cityArr,
-	statuslist,
-	customerStatus,
-	intentionalService,
-	sex
 } from '@/dataDic.js';
 import {
-	getCompanyIntention,
 	splitUrl,
-	getIndustry,
-	getStatuslist,
-	getAuditStatus,
-	getContactType,
-	getSocialAttribute,
-	getfllowSituation,
-	beforeUploadFile,
-	getWhether,
-	getcityArr,
-	getcustomerStatue,
-	getfllowSituationOn,
-	getCertification,
-	getcustomerTyp,
-	getLvl,
-	getCurrentMember,
-	getprovince
 } from '@/tools.js';
 const FormItem = Form.Item;
 //图片组件
@@ -126,20 +88,75 @@ const PicturesWall = React.createClass({
 		);
 	}
 });
-
+const PicturesWallMore = 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 style={{ display: 'inline-block' }}>
+				<Upload
+					action={globalConfig.context + '/api/user/uploadHonerPicture'}
+					data={{ sign: 'honor_picture' }}
+					listType="picture-card"
+					fileList={fileList}
+					onPreview={this.handlePreview}
+					onChange={this.handleChange}
+				>
+					{fileList.length >= 8 ? null : uploadButton}
+				</Upload>
+				<Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+					<img alt="example" style={{ width: '100%' }} src={previewImage} />
+				</Modal>
+			</div>
+		);
+	}
+});
 const Unit = React.createClass({
 	getInitialState() {
 		return {
 			loading: false,
 			orgCodeUrl: [],
 			companyLogoUrl: [],
-			ProvinceCity:[]
+			ProvinceCity:[],
+			qualiUrl:[]
 		};
 	},
 	loadInformation(record) {
 		this.setState({
 			loading:true
-
 		})
 		$.ajax({
 			method: 'get',
@@ -170,6 +187,9 @@ const Unit = React.createClass({
 					companyLogoUrl: thisData.companyLogoUrl
 						? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload')
 						: [],
+					qualiUrl: thisData.honorPicture
+					? splitUrl(thisData.honorPicture, ',', globalConfig.avatarHost + '/upload')
+					: [],
 					dataInformation: thisData,
 					//ProvinceCity: ProvinceCityArr[0] != null ? ProvinceCityArr : undefined,
 					industry: String(thisData.industry) == 'null' ? undefined : String(thisData.industry),
@@ -208,6 +228,11 @@ const Unit = React.createClass({
 			companyLogoUrl: e
 		});
 	},
+	getQualiUrl(e) {
+		this.setState({
+			qualiUrl: e
+		});
+	},
 	//基本信息提交
 	newSubmit(e) {
 		if(!this.state.identifyName){
@@ -251,7 +276,16 @@ const Unit = React.createClass({
 			});
 			thecompanyLogoUrl = picArr.join(',');
 		}
-
+		let thequaliUrl = [];
+		if (this.state.qualiUrl.length) {
+			let picArr = [];
+			this.state.qualiUrl.map(function(item) {
+				if (item.response && item.response.data && item.response.data.length) {
+					picArr.push(item.response.data);
+				}
+			});
+			thequaliUrl = picArr.join(',');
+		}
 		this.setState({
 			loading: true
 		});
@@ -267,9 +301,6 @@ const Unit = React.createClass({
 				introduction: this.state.introduction,
 				unitName: this.state.unitName,
 				industry: this.state.industry,
-				// locationProvince: this.state.ProvinceCity[0], //省-
-				// locationCity: this.state.ProvinceCity[1], //市
-				// locationArea: this.state.ProvinceCity[2], //区
 				postalAddress: this.state.postalAddress,
 				fixedTel: this.state.fixedTel,
 				contactsFax: this.state.contactsFax,
@@ -286,6 +317,7 @@ const Unit = React.createClass({
 				businessScope: this.state.businessScope,
 				introduction: this.state.introduction,
 				companyLogoUrl: thecompanyLogoUrl != 0 ? thecompanyLogoUrl : '',
+				honorPicture: thequaliUrl != 0 ? thequaliUrl : '',
 				orgCodeUrl: theorgCodeUrl != 0 ? theorgCodeUrl : '',
 				auditStatus: this.state.auditStatus,
 				authentication:this.state.authentication,
@@ -616,6 +648,21 @@ const Unit = React.createClass({
 									/>
 								</FormItem>
 							</div>
+							<div className="clearfix">
+							<FormItem
+									labelCol={{ span: 2 }}
+									wrapperCol={{ span: 18 }}
+									style={{ marginTop: 15 }}
+									label="荣誉资质"
+								>
+									<PicturesWallMore
+										pictureSign="PIC"
+										fileList={this.getQualiUrl}
+										pictureUrl={this.state.qualiUrl}
+									/>
+									<p>图片建议:图片要清晰。</p>
+								</FormItem>
+							</div>
 							<Row style={{ marginBottom: 20 ,marginTop:10}}>
 								<Col offset={2} span={4}>
 									<Button size="large" className="set-submit" type="primary" onClick={this.subFun} >

+ 4 - 1
js/component/administration/news/newDetails.jsx

@@ -10,7 +10,7 @@ import {
 } from 'antd';
 import {getProvince} from '@/NewDicProvinceList';
 import '../policy/policy.less';
-import {getReleaseStateList,getNewPosition,splitUrl} from '@/tools';
+import {getReleaseStateList,getNewPosition,splitUrl,getNewType} from '@/tools';
 const NewDetail = Form.create()(React.createClass({
     getInitialState() {
         return {
@@ -169,6 +169,9 @@ const NewDetail = Form.create()(React.createClass({
                         <FormItem className="half-item" {...formItemLayout} label="新闻标题">
 							<span>{theData.title}</span>
 						</FormItem>
+                        <FormItem className="half-item" {...formItemLayout} label="新闻类型">
+							<span>{getNewType(theData.type)}</span>
+						</FormItem>
 						<FormItem className="half-item" {...formItemLayout} label="热门">
 							<span>{theData.hot=='0'&&'否'}{theData.hot=='1'&&'是'}</span>
 						</FormItem>

+ 18 - 2
js/component/administration/news/newForm.jsx

@@ -12,7 +12,8 @@ import {
 	Form,
 	Checkbox,
 	Cascader,
-    Row,
+	Row,
+	Select,
     Col
 } from 'antd';
 import {  splitUrl} from '@/tools.js';
@@ -163,7 +164,7 @@ const NewDetailForm = Form.create()(React.createClass({
                     url: this.props.data.id ? globalConfig.context + '/api/admin/news/updateNews' : globalConfig.context + '/api/admin/news/apply',
                     data: {
 						id: this.props.data.id,
-						type:0,
+						type:values.type,
 						title: values.title,
                         author: values.author,
                         titleImg: thePictureUrl,
@@ -205,6 +206,7 @@ const NewDetailForm = Form.create()(React.createClass({
 			this.state.data = {};
 			this.state.edit='<p><br></p>';
 			this.state.pictureUrl = [];
+			this.state.Province=undefined;
 			this.setState({
 				publishPages:['web_index','app_policy_index']
 			})
@@ -219,6 +221,7 @@ const NewDetailForm = Form.create()(React.createClass({
             } else {
 				this.state.visible=true;
 				this.state.data = {};
+				this.state.Province=undefined;
 				this.state.edit='<p><br></p>';
 				this.state.pictureUrl = [];
 				this.state.theData={};
@@ -241,6 +244,7 @@ const NewDetailForm = Form.create()(React.createClass({
 			<div className='login'>
 			<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
 				<Spin spinning={this.state.loading}>
+					
 					<div className="clearfix">
 						<FormItem className="half-item" {...formItemLayout} label="标题">
 							{getFieldDecorator('title', {
@@ -248,6 +252,18 @@ const NewDetailForm = Form.create()(React.createClass({
 								initialValue: theData.title
 							})(<Input placeholder="请输入您的新闻标题" />)}
 						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="技淘观点">
+							{getFieldDecorator('type', {
+								rules: [ { required: true, message: '此项为必填项!' } ],
+								initialValue: theData.type!=undefined?String(theData.type):theData.type
+							})(
+								<Select placeholder="技淘观点">
+									<Select.Option value="0" >普通新闻</Select.Option>
+									<Select.Option value="98" >技淘百科</Select.Option>
+									<Select.Option value="99" >技淘观点</Select.Option>
+                    			</Select>
+							)}
+						</FormItem>
 					</div>
 					<div className="clearfix">
 					    <FormItem className="half-item" {...formItemLayout} label="热门">

+ 9 - 0
js/component/administration/news/newsList.jsx

@@ -27,6 +27,7 @@ const DemandList = React.createClass({
                 startCreateTime: this.state.releaseDate[0],
                 endCreateTime: this.state.releaseDate[1],
                 auditStatus:this.state.auditStatusSearch,
+                type:this.state.typeSearch
             },
             success: function (data) {
                 let theArr = [];
@@ -260,6 +261,7 @@ const DemandList = React.createClass({
     },
     reset() {
         this.state.nameSearch = '';
+        this.state.typeSearch=undefined;
         this.state.releaseDate = [];
         this.state.dataCategorySearch = undefined;
         this.state.auditStatusSearch = undefined;
@@ -303,6 +305,13 @@ const DemandList = React.createClass({
                         <Select.Option value="3" >发布失败</Select.Option>
                         <Select.Option value="4" >已撤销</Select.Option>
                     </Select>
+                    <Select placeholder="技淘观点" style={{ width: 120 }}
+                        value={this.state.typeSearch}
+                        onChange={(e) => { this.setState({ typeSearch: e }) }}>
+                        <Select.Option value="0" >普通新闻</Select.Option>
+                        <Select.Option value="98" >技淘百科</Select.Option>
+                        <Select.Option value="99" >技淘观点</Select.Option>
+                    </Select>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
                     <Button type="danger" disabled={!hasSelect}  onClick={(e)=>{this.delectRow()}}>删除</Button>

+ 455 - 0
js/component/administration/order/order.jsx

@@ -0,0 +1,455 @@
+/* 
+	update:2018/07/16
+	author:liting
+*/
+
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import { Form, Button, Input, Select, Spin, Table, message, Modal, Tooltip, Switch, DatePicker } from 'antd';
+import { orderType } from '@/dataDic';
+import { getOrderType } from '@/tools.js';
+import moment  from 'moment';
+//主体
+const Order = Form.create()(
+	React.createClass({
+		loadData(pageNo) {
+			this.state.data = [];
+			this.setState({
+				loading: true,
+				page: pageNo
+			});
+			$.ajax({
+				method: 'get',
+				dataType: 'json',
+				crossDomain: false,
+				url: globalConfig.context + '/portal/service/jtProject/list',
+				data: {
+					pageNo: pageNo || 1,
+					pageSize: this.state.pagination.pageSize,
+					number: this.state.numberSearch,
+					type: this.state.typeSearch,
+					entryName: this.state.entryNameSearch,
+					companyName: this.state.companyNameSearch,
+					start: this.state.releaseDate[0],
+					end: 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,
+								name: thisdata.name,
+								number: thisdata.number,
+								createTime: thisdata.createTime ? new Date(thisdata.createTime).toLocaleString() : ''
+							});
+						}
+						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,
+				selectedRowKeys: [],
+				selectedRows: [],
+				loading: false,
+				releaseDate: [],
+				pagination: {
+					defaultCurrent: 1,
+					defaultPageSize: 10,
+					showQuickJumper: true,
+					pageSize: 10,
+					onChange: function(page) {
+						this.loadData(page);
+						this.setState({
+							selectedRowKeys: []
+						});
+					}.bind(this),
+					showTotal: function(total) {
+						return '共' + total + '条数据';
+					}
+				},
+				columns: [
+					{
+						title: '订单编号',
+						dataIndex: 'name',
+						key: 'bname'
+					},
+					{
+						title: '订单类型',
+						dataIndex: 'cname',
+						key: 'cname',
+						render: (text) => {
+							return getOrderType(text);
+						}
+					},
+					{
+						title: '订单日期',
+						dataIndex: 'superName',
+						key: 'superName'
+					},
+					{
+						title: '订单金额',
+						dataIndex: 'price',
+						key: 'price'
+					},
+					{
+						title: '公司名称',
+						dataIndex: 'offset',
+						key: 'offset',
+						render: (text) => {
+							return (
+								<Tooltip title={text}>
+									{text && text.length > 6 ? text.substr(0, 6) + '...' : text}
+								</Tooltip>
+							);
+						}
+					},
+					{
+						title: '项目名称',
+						dataIndex: 'memberPrice',
+						key: 'memberPrice',
+						render: (text) => {
+							return (
+								<Tooltip title={text}>
+									{text && text.length > 6 ? text.substr(0, 6) + '...' : text}
+								</Tooltip>
+							);
+						}
+					},
+					{
+						title: '订单进度',
+						dataIndex: 'activityPrice',
+						key: 'activityPrice',
+						render: (text) => {
+							return getOrderType(text);
+						}
+					},
+					{
+						title: '联系人',
+						dataIndex: 'activityFlag',
+						key: 'activityFlag'
+					},
+					{
+						title: '联系方式',
+						dataIndex: 'activityFlag1',
+						key: 'activityFlag1'
+					},
+					{
+						title: '买方',
+						dataIndex: 'activityFlag12',
+						key: 'activityFlag12',
+						render: (text) => {
+							return (
+								<Tooltip title={text}>
+									{text && text.length > 6 ? text.substr(0, 6) + '...' : text}
+								</Tooltip>
+							);
+						}
+					}
+				],
+				dataSource: []
+			};
+		},
+		componentWillMount() {
+			this.loadData();
+		},
+		detailes(recard) {
+			this.setState({
+				loading: true
+			});
+			$.ajax({
+				method: 'get',
+				dataType: 'json',
+				crossDomain: false,
+				url: globalConfig.context + '/api/user/jtBusiness/project/detail',
+				data: {
+					id: recard.id
+				},
+				success: function(data) {
+					let thisData = data.data;
+					if (!thisData) {
+						if (data.error && data.error.length) {
+							message.warning(data.error[0].message);
+						}
+						thisData = {};
+					}
+					this.setState({
+						id: thisData.id,
+						data: thisData,
+						createTime: thisData.createTime ? new Date(thisData.createTime).toLocaleString() : ''
+					});
+				}.bind(this)
+			}).always(
+				function() {
+					this.setState({
+						loading: false
+					});
+				}.bind(this)
+			);
+		},
+		//项目列表整行点击
+		tableRowClick(record, index) {
+			this.state.RowData = record;
+			this.setState({
+				editvisible: true
+			});
+			this.detailes(record);
+		},
+		edithandleCancel(e) {
+			this.setState({
+				editvisible: false
+			});
+		},
+		search() {
+			this.loadData();
+		},
+		//搜索部分的清零
+		reset() {
+			this.state.numberSearch = '';
+			this.state.typeSearch = undefined;
+			this.state.companyNameSearch = '';
+			this.state.entryNameSearch = '';
+			this.state.releaseDate = [];
+			this.state.searchMore=true;
+			this.loadData();
+		},
+		searchSwitch() {
+			this.setState({
+				searchMore: !this.state.searchMore
+			});
+		},
+		render() {
+			const FormItem = Form.Item;
+			const rowSelection = {
+				selectedRowKeys: this.state.selectedRowKeys,
+				onChange: (selectedRowKeys, selectedRows) => {
+					this.setState({
+						selectedRows: selectedRows.slice(-1),
+						selectedRowKeys: selectedRowKeys.slice(-1)
+					});
+				}
+			};
+			const { RangePicker } = DatePicker;
+			const theData = this.state.data || {};
+			return (
+				<div className="user-content">
+					<div className="content-title">
+						<span>咨询单管理</span>
+					</div>
+					<div className="user-search">
+						<Input
+							placeholder="订单编号"
+							style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
+							value={this.state.numberSearch}
+							onChange={(e) => {
+								this.setState({ numberSearch: e.target.value });
+							}}
+						/>
+						<Select
+							placeholder="订单类型"
+							style={{ width: '200px', marginRight: '10px' }}
+							value={this.state.typeSearch}
+							onChange={(e) => {
+								this.setState({ typeSearch: e });
+							}}
+						>
+							{orderType.map(function(item) {
+								return <Select.Option key={item.value}>{item.key}</Select.Option>;
+							})}
+						</Select>
+						<Input
+							placeholder="公司名称"
+							style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
+							value={this.state.companyNameSearch}
+							onChange={(e) => {
+								this.setState({ companyNameSearch: e.target.value });
+							}}
+						/>
+						<Input
+							placeholder="项目名称"
+							style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
+							value={this.state.entryNameSearch}
+							onChange={(e) => {
+								this.setState({ entryNameSearch: e.target.value });
+							}}
+						/>
+						<Input
+							style={{ width: 140, marginRight: 10 }}
+							value={this.state.employerNameSearch}
+							onChange={(e) => {
+								this.setState({ employerNameSearch: e.target.value });
+							}}
+							placeholder="客户名称"
+						/>
+						<Button type="primary" onClick={this.search} style={{ marginRight: '10px' }}>
+							搜索
+						</Button>
+						<Button onClick={this.reset} style={{ marginRight: '10px' }}>
+							重置
+						</Button>
+						<span>
+							更多搜索<Switch  checked={!this.state.searchMore} onChange={this.searchSwitch} />
+						</span>
+						<div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+							<span style={{ marginRight: 10 }}>发布时间 :</span>
+							<RangePicker
+								value={[
+									this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+									this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null
+								]}
+								onChange={(data, dataString) => {
+									this.setState({ releaseDate: dataString });
+								}}
+							/>
+						</div>
+					</div>
+					<div className="patent-table">
+						<Spin spinning={this.state.loading}>
+							<Table
+								columns={this.state.columns}
+								dataSource={this.state.dataSource}
+								rowSelection={rowSelection}
+								pagination={this.state.pagination}
+								onRowClick={this.tableRowClick}
+							/>
+						</Spin>
+					</div>
+					<div className="patent-desc">
+						<Modal
+							className="customeDetails"
+							title="订单详情"
+							width="1000px"
+							visible={this.state.editvisible}
+							onOk={this.edithandleCancel}
+							onCancel={this.edithandleCancel}
+							footer=""
+						>
+							<Form layout="horizontal" onSubmit={this.edithandleSubmit} id="demand-form">
+								<Spin spinning={this.state.loading}>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单编号"
+										>
+											<span>{theData.name}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单类型"
+										>
+											<span>{getOrderType(theData.type)}</span>
+										</FormItem>
+									</div>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单日期"
+										>
+											<span>{this.state.createTime}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="订单金额"
+										>
+											<span>{theData.isHot ? theData.isHot + '万元' : ''}</span>
+										</FormItem>
+									</div>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="项目名称"
+										>
+											<span>{theData.name}</span>
+										</FormItem>
+									</div>
+									<div className="clearfix">
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="买方名称"
+										>
+											<span>{theData.memberPrice1}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="卖方名称"
+										>
+											<span>{theData.activityFlag1}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="买方联系人"
+										>
+											<span>{theData.activityPrice}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="卖方联系人"
+										>
+											<span>{theData.offset}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="买方联系方式"
+										>
+											<span>{theData.memberPrice}</span>
+										</FormItem>
+										<FormItem
+											className="half-item"
+											labelCol={{ span: 8 }}
+											wrapperCol={{ span: 12 }}
+											label="卖方联系方式"
+										>
+											<span>{theData.activityFlag}</span>
+										</FormItem>
+									</div>
+								</Spin>
+							</Form>
+						</Modal>
+					</div>
+				</div>
+			);
+		}
+	})
+);
+
+export default Order;

+ 17 - 13
js/component/dataDic.js

@@ -1883,25 +1883,16 @@ module.exports = {
     orderType:[
     	 {
 	        value: "0",
-	        key: "科技服务"
+	        key: "知识产权申请"
 	    }, {
 	        value: "1",
-	        key: "科技成果"
+	        key: "知识产权赚钱"
 	    }, {
 	        value: "2",
-	        key: "科技需求"
+	        key: "知识产权交易"
 	    }, {
 	        value: "3",
-	        key: "专家邀约"
-	    }, {
-	        value: "4",
-	        key: "活动报名"
-	    }, {
-	        value: "5",
-	        key: "会员升级"
-	    }, {
-	        value: "6",
-	        key: "咨询师"
+	        key: "知识产权维权"
 	    }
     ],
     //订单阶段		
@@ -2292,5 +2283,18 @@ module.exports = {
 	        value: "4",
 	        key: "合作开发"
 	    }
+    ],
+    //新闻类型
+    newType:[
+        {
+	        value: "0",
+	        key: "普通新闻"
+	    },{
+	        value: "98",
+	        key: "技淘百科"
+	    }, {
+	        value: "99",
+	        key: "技淘观点"
+        }
     ]
 };

+ 17 - 4
js/component/tools.js

@@ -1,6 +1,5 @@
-import { message,Timeline,Select  } from 'antd';
+import { message,Select  } from 'antd';
 import React from 'react';
-import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import {
     patentTypeList,
@@ -80,7 +79,8 @@ import {
     achievementType,
     transaction,
     newsPosition,
-    policyPosition
+    policyPosition,
+    newType
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
@@ -1460,7 +1460,7 @@ module.exports = {
         }
      },
      //成果交易形式;
-     getTransaction:function(e){
+    getTransaction:function(e){
         if (e||e==0) {
             let str=e.toString();
             let theType = '';
@@ -1471,5 +1471,18 @@ module.exports = {
             });
             return theType;
         }
+     },
+     //新闻类型
+     getNewType:function(e){
+        if (e||e==0) {
+            let str=e.toString();
+            let theType = '';
+            newType.map(function (item) {
+                if (item.value == str) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
      }
 }