|
@@ -1,5 +1,5 @@
|
|
|
import React from 'react';
|
|
|
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
|
|
|
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
|
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import moment from 'moment';
|
|
@@ -35,7 +35,10 @@ const DemandList = React.createClass({
|
|
|
validityPeriodEndDate: this.state.validityPeriodDate[1],
|
|
|
releaseDateStartDate: this.state.releaseDate[0],
|
|
|
releaseDateEndDate: this.state.releaseDate[1],
|
|
|
- auditStatus: this.state.auditStatus
|
|
|
+ auditStatus: this.state.auditStatus,
|
|
|
+ employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
|
|
|
+ username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
|
|
|
+ unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
let theArr = [];
|
|
@@ -87,6 +90,7 @@ const DemandList = React.createClass({
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
searchMore: true,
|
|
|
+ searchType: 0,
|
|
|
validityPeriodDate: [],
|
|
|
releaseDate: [],
|
|
|
selectedRowKeys: [],
|
|
@@ -276,9 +280,21 @@ const DemandList = React.createClass({
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
|
|
|
- this.loadData(null, nextProps['data-listApiUrl']);
|
|
|
this.state.selectedRowKeys = [];
|
|
|
this.state.selectedRows = [];
|
|
|
+ this.state.serialNumber = undefined;
|
|
|
+ this.state.name = undefined;
|
|
|
+ this.state.keyword = undefined;
|
|
|
+ this.state.infoSources = undefined;
|
|
|
+ this.state.demandType = undefined;
|
|
|
+ this.state.searchName = undefined;
|
|
|
+ this.state.searchType = 0;
|
|
|
+ this.state.status = undefined;
|
|
|
+ this.state.releaseStatus = undefined;
|
|
|
+ this.state.auditStatus = undefined;
|
|
|
+ this.state.validityPeriodDate = [];
|
|
|
+ this.state.releaseDate = [];
|
|
|
+ this.loadData(null, nextProps['data-listApiUrl']);
|
|
|
};
|
|
|
},
|
|
|
tableRowClick(record, index) {
|
|
@@ -340,7 +356,8 @@ const DemandList = React.createClass({
|
|
|
this.state.keyword = undefined;
|
|
|
this.state.infoSources = undefined;
|
|
|
this.state.demandType = undefined;
|
|
|
- this.state.username = undefined;
|
|
|
+ this.state.searchName = undefined;
|
|
|
+ this.state.searchType = 0;
|
|
|
this.state.status = undefined;
|
|
|
this.state.releaseStatus = undefined;
|
|
|
this.state.auditStatus = undefined;
|
|
@@ -407,36 +424,15 @@ const DemandList = React.createClass({
|
|
|
<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.Option value="2" >批量导入</Select.Option>
|
|
|
- <Select.Option value="3" >三方对接</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: 160 }}
|
|
|
- value={this.state.auditStatus}
|
|
|
- onChange={(e) => { this.setState({ auditStatus: e }) }}>
|
|
|
- <Select.Option value="0" >未提交审核(草稿)</Select.Option>
|
|
|
- <Select.Option value="1" >提交审核</Select.Option>
|
|
|
- <Select.Option value="2" >审核中</Select.Option>
|
|
|
- <Select.Option value="3" >审核通过</Select.Option>
|
|
|
- <Select.Option value="4" >审核未通过</Select.Option>
|
|
|
- </Select>
|
|
|
+ <Input placeholder="雇主名称"
|
|
|
+ value={this.state.searchName}
|
|
|
+ onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
|
|
|
+ <Radio.Group value={this.state.searchType} onChange={(e) => {
|
|
|
+ this.setState({ searchType: e.target.value })
|
|
|
+ }}>
|
|
|
+ <Radio value={0}>认证用户</Radio>
|
|
|
+ <Radio value={1}>非认证用户</Radio>
|
|
|
+ </Radio.Group>
|
|
|
<Button type="primary" onClick={this.search}>搜索</Button>
|
|
|
<Button onClick={this.reset}>重置</Button>
|
|
|
<Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
|
|
@@ -444,6 +440,36 @@ const DemandList = React.createClass({
|
|
|
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' } : {}}>
|
|
|
+ <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.Option value="2" >批量导入</Select.Option>
|
|
|
+ <Select.Option value="3" >三方对接</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: 160 }}
|
|
|
+ value={this.state.auditStatus}
|
|
|
+ onChange={(e) => { this.setState({ auditStatus: e }) }}>
|
|
|
+ <Select.Option value="0" >未提交审核(草稿)</Select.Option>
|
|
|
+ <Select.Option value="1" >提交审核</Select.Option>
|
|
|
+ <Select.Option value="2" >审核中</Select.Option>
|
|
|
+ <Select.Option value="3" >审核通过</Select.Option>
|
|
|
+ <Select.Option value="4" >审核未通过</Select.Option>
|
|
|
+ </Select>
|
|
|
<Select placeholder="选择是否发布" style={{ width: 120 }}
|
|
|
value={this.state.releaseStatus}
|
|
|
onChange={(e) => { this.setState({ releaseStatus: e }) }}>
|