|
@@ -10,7 +10,7 @@ import BatchImport from './batchImport';
|
|
|
import throttle from '../../throttle.js';
|
|
|
|
|
|
const AchievementDetail = React.createClass({
|
|
|
- getInitialState() {
|
|
|
+ getInitialState () {
|
|
|
return {
|
|
|
visible: false,
|
|
|
loading: false,
|
|
@@ -37,7 +37,7 @@ const AchievementDetail = React.createClass({
|
|
|
dataSource: [],
|
|
|
};
|
|
|
},
|
|
|
- loadLogs(id) {
|
|
|
+ loadLogs (id) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -78,7 +78,7 @@ const AchievementDetail = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- handleSubmit(e) {
|
|
|
+ handleSubmit (e) {
|
|
|
//keyword长度判断
|
|
|
if (this.state.orderStatus || this.state.comment || this.state.recordTime) {
|
|
|
if (this.state.orderStatus && this.state.comment && this.state.recordTime) {
|
|
@@ -101,10 +101,10 @@ const AchievementDetail = React.createClass({
|
|
|
status: this.state.orderStatus || this.props.data.status,
|
|
|
recordTimeFormattedDate: this.state.recordTime ? this.state.recordTime.format("YYYY-MM-DD HH:mm:ss") : undefined,
|
|
|
comment: this.state.comment,
|
|
|
- intentionMoney: this.state.intentionMoney * 10000,
|
|
|
- contractMoney: this.state.contractMoney * 10000,
|
|
|
- commission: this.state.commission * 10000,
|
|
|
- serviceMoney: this.state.serviceMoney * 10000,
|
|
|
+ paymentId: this.state.paymentId,
|
|
|
+ paymentType: this.state.paymentType,
|
|
|
+ paymentValue: this.state.paymentValue,
|
|
|
+ transferPrice: this.state.transferPrice,
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
this.setState({
|
|
@@ -118,32 +118,32 @@ const AchievementDetail = React.createClass({
|
|
|
};
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- handleCancel(e) {
|
|
|
+ handleCancel (e) {
|
|
|
this.setState({
|
|
|
visible: false,
|
|
|
});
|
|
|
this.props.closeDesc(false);
|
|
|
},
|
|
|
- handleOk(e) {
|
|
|
+ handleOk (e) {
|
|
|
this.setState({
|
|
|
visible: false,
|
|
|
});
|
|
|
this.props.closeDesc(false, true);
|
|
|
},
|
|
|
- componentWillReceiveProps(nextProps) {
|
|
|
+ componentWillReceiveProps (nextProps) {
|
|
|
if (!this.state.visible && nextProps.showDesc && nextProps.data) {
|
|
|
this.loadLogs(nextProps.data.id);
|
|
|
- this.state.intentionMoney = nextProps.data.intentionMoney;
|
|
|
- this.state.contractMoney = nextProps.data.contractMoney;
|
|
|
- this.state.commission = nextProps.data.commission;
|
|
|
- this.state.serviceMoney = nextProps.data.serviceMoney;
|
|
|
+ this.state.paymentId = nextProps.data.paymentId;
|
|
|
+ this.state.paymentType = nextProps.data.paymentType;
|
|
|
+ this.state.paymentValue = nextProps.data.paymentValue;
|
|
|
+ this.state.transferPrice = nextProps.data.transferPrice;
|
|
|
this.state.orderStatus = undefined;
|
|
|
this.state.comment = undefined;
|
|
|
this.state.recordTime = undefined;
|
|
|
};
|
|
|
this.state.visible = nextProps.showDesc;
|
|
|
},
|
|
|
- render() {
|
|
|
+ render () {
|
|
|
let theData = this.props.data;
|
|
|
if (theData) {
|
|
|
return (
|
|
@@ -186,35 +186,35 @@ const AchievementDetail = React.createClass({
|
|
|
<Col span={10}>{theData.createTimeFormattedDate}</Col>
|
|
|
</Row>
|
|
|
<Row>
|
|
|
- <Col span={2}>意向金:</Col>
|
|
|
+ <Col span={2}>订单金额:</Col>
|
|
|
<Col span={10}>
|
|
|
- <InputNumber
|
|
|
- value={this.state.intentionMoney}
|
|
|
- onChange={(e) => { this.setState({ intentionMoney: Math.round(e * 10000) / 10000 }) }} />
|
|
|
+ {theData.bargainingMode == 0 ? <div>
|
|
|
+ <span>价格面议</span>
|
|
|
+ </div> : <InputNumber
|
|
|
+ value={this.state.transferPrice}
|
|
|
+ onChange={(e) => { this.setState({ transferPrice: e }) }} />}
|
|
|
<span> 万元</span>
|
|
|
</Col>
|
|
|
- <Col span={2}>合同金:</Col>
|
|
|
+ <Col span={2}>支付金额:</Col>
|
|
|
<Col span={10}>
|
|
|
- <InputNumber
|
|
|
- value={this.state.contractMoney}
|
|
|
- onChange={(e) => { this.setState({ contractMoney: Math.round(e * 10000) / 10000 }) }} />
|
|
|
- <span> 万元</span>
|
|
|
+ <InputNumber style={{ width: '160px' }}
|
|
|
+ value={this.state.paymentValue}
|
|
|
+ onChange={(e) => { this.setState({ paymentValue: e }) }} />
|
|
|
+ <span> 元</span>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row>
|
|
|
- <Col span={2}>佣金:</Col>
|
|
|
- <Col span={10}>
|
|
|
- <InputNumber
|
|
|
- value={this.state.commission}
|
|
|
- onChange={(e) => { this.setState({ commission: Math.round(e * 10000) / 10000 }) }} />
|
|
|
- <span> 万元</span>
|
|
|
+ <Col span={2}>支付方式:</Col>
|
|
|
+ <Col span={8}>
|
|
|
+ <Input
|
|
|
+ value={this.state.paymentType}
|
|
|
+ onChange={(e) => { this.setState({ paymentType: e.target.value }) }} />
|
|
|
</Col>
|
|
|
- <Col span={2}>服务金:</Col>
|
|
|
- <Col span={10}>
|
|
|
- <InputNumber
|
|
|
- value={this.state.serviceMoney}
|
|
|
- onChange={(e) => { this.setState({ serviceMoney: Math.round(e * 10000) / 10000 }) }} />
|
|
|
- <span> 万元</span>
|
|
|
+ <Col span={2}></Col>
|
|
|
+ <Col span={2}>订单流水:</Col>
|
|
|
+ <Col span={8}>
|
|
|
+ <Input value={this.state.paymentId}
|
|
|
+ onChange={(e) => { this.setState({ paymentId: e.target.value }) }} />
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<p>订单状态流转记录</p>
|
|
@@ -238,9 +238,14 @@ const AchievementDetail = React.createClass({
|
|
|
</Col>
|
|
|
<Col span={2}>时间:</Col>
|
|
|
<Col span={10}>
|
|
|
- <DatePicker
|
|
|
- value={this.state.recordTime || null}
|
|
|
- onChange={(e) => { this.setState({ recordTime: e }); }} />
|
|
|
+ <DatePicker style={{ width: '150px' }}
|
|
|
+ showTime
|
|
|
+ format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ placeholder="选择支付时间"
|
|
|
+ value={this.state.recordTime ? moment(this.state.recordTime, "YYYY-MM-DD HH:mm:ss") : undefined}
|
|
|
+ onChange={(t, str) => {
|
|
|
+ this.setState({ recordTime: t });
|
|
|
+ }} />
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row>
|
|
@@ -267,7 +272,7 @@ const AchievementDetail = React.createClass({
|
|
|
});
|
|
|
|
|
|
const AchievementOrderList = React.createClass({
|
|
|
- loadData(pageNo, apiUrl) {
|
|
|
+ loadData (pageNo, apiUrl) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -280,8 +285,8 @@ const AchievementOrderList = React.createClass({
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: this.state.pagination.pageSize,
|
|
|
status: this.state.status,
|
|
|
- username: ((apiUrl || this.props['data-listApiUrl']).indexOf('org') != -1) ? null : this.state.searchName,
|
|
|
- unitName: ((apiUrl || this.props['data-listApiUrl']).indexOf('org') != -1) ? this.state.searchName : null
|
|
|
+ unitName: ((apiUrl || this.props['data-listApiUrl']).indexOf('org') != -1) ? null : this.state.searchName,
|
|
|
+ username: ((apiUrl || this.props['data-listApiUrl']).indexOf('org') != -1) ? this.state.searchName : null
|
|
|
},
|
|
|
success: function (data) {
|
|
|
let theArr = [];
|
|
@@ -299,10 +304,7 @@ const AchievementOrderList = React.createClass({
|
|
|
achievementId: thisdata.achievementId, //科技需求ID
|
|
|
createTime: thisdata.createTime,
|
|
|
status: thisdata.status, //线索单/意向单状态
|
|
|
- intentionMoney: thisdata.intentionMoney / 10000, //意向金
|
|
|
- contractMoney: thisdata.contractMoney / 10000, //合同金
|
|
|
- commission: thisdata.commission / 10000, //佣金
|
|
|
- serviceMoney: thisdata.serviceMoney / 10000, //服务金
|
|
|
+ paymentvalue: thisdata.paymentvalue,
|
|
|
name: thisdata.name, //成果名称,
|
|
|
achievementSerialNumber: thisdata.achievementSerialNumber, //科技成果编号
|
|
|
deletedSign: thisdata.deletedSign, //科技成果删除标记
|
|
@@ -310,6 +312,12 @@ const AchievementOrderList = React.createClass({
|
|
|
theName: thisdata.username || thisdata.unitName,
|
|
|
uid: thisdata.uid, //个人用户ID
|
|
|
createTimeFormattedDate: thisdata.createTimeFormattedDate, //接单时间
|
|
|
+ paymentId: thisdata.paymentId,
|
|
|
+ paymentTime: thisdata.paymentTime,
|
|
|
+ paymentTimeFormattedDate: thisdata.paymentTimeFormattedDate,
|
|
|
+ paymentType: thisdata.paymentType,
|
|
|
+ paymentValue: thisdata.paymentValue,
|
|
|
+ transferPrice: thisdata.transferPrice
|
|
|
});
|
|
|
};
|
|
|
this.state.pagination.current = data.data.pageNo;
|
|
@@ -326,7 +334,7 @@ const AchievementOrderList = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- handleSearch(e) {
|
|
|
+ handleSearch (e) {
|
|
|
if (this.props['data-detailApiUrl'].indexOf('org') != -1) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -381,10 +389,8 @@ const AchievementOrderList = React.createClass({
|
|
|
});
|
|
|
};
|
|
|
},
|
|
|
- getInitialState() {
|
|
|
+ getInitialState () {
|
|
|
return {
|
|
|
- selectedRowKeys: [],
|
|
|
- selectedRows: [],
|
|
|
searchData: [],
|
|
|
loading: false,
|
|
|
pagination: {
|
|
@@ -418,38 +424,13 @@ const AchievementOrderList = React.createClass({
|
|
|
key: 'theName',
|
|
|
}, {
|
|
|
title: '订单状态',
|
|
|
- dataIndex: 'auditStatus',
|
|
|
- key: 'auditStatus',
|
|
|
- render: (text, record) => {
|
|
|
- if (record.deletedSign == 1) {
|
|
|
- return "已删除"
|
|
|
- } else if (record.auditStatus != 3) {
|
|
|
- return "已下架"
|
|
|
- } else {
|
|
|
- return "正常"
|
|
|
- }
|
|
|
- }
|
|
|
- }, {
|
|
|
- title: '流程状态',
|
|
|
dataIndex: 'status',
|
|
|
key: 'status',
|
|
|
render: (text, record) => { return getOrderStatus(text); }
|
|
|
}, {
|
|
|
- title: '意向金(万元)',
|
|
|
- dataIndex: 'intentionMoney',
|
|
|
- key: 'intentionMoney',
|
|
|
- }, {
|
|
|
- title: '合同金(万元)',
|
|
|
- dataIndex: 'contractMoney',
|
|
|
- key: 'contractMoney',
|
|
|
- }, {
|
|
|
- title: '佣金(万元)',
|
|
|
- dataIndex: 'commission',
|
|
|
- key: 'commission',
|
|
|
- }, {
|
|
|
- title: '服务金(万元)',
|
|
|
- dataIndex: 'serviceMoney',
|
|
|
- key: 'serviceMoney',
|
|
|
+ title: '订单金额',
|
|
|
+ dataIndex: 'paymentValue',
|
|
|
+ key: 'paymentValue',
|
|
|
}, {
|
|
|
title: '接单时间',
|
|
|
dataIndex: 'createTimeFormattedDate',
|
|
@@ -459,7 +440,7 @@ const AchievementOrderList = React.createClass({
|
|
|
dataSource: [],
|
|
|
};
|
|
|
},
|
|
|
- componentWillMount() {
|
|
|
+ componentWillMount () {
|
|
|
this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
|
|
|
let theArr = [], typeArr = [];
|
|
|
orderStatusList.map(function (item) {
|
|
@@ -469,18 +450,9 @@ const AchievementOrderList = React.createClass({
|
|
|
});
|
|
|
this.state.demandTypeOption = typeArr;
|
|
|
this.state.orderStatusOption = theArr;
|
|
|
- // if (window.location.search) {
|
|
|
- // let theObj = getSearchUrl(window.location.search);
|
|
|
- // if (theObj.rid) {
|
|
|
- // theObj.id = theObj.rid;
|
|
|
- // if (theObj.rid != 'null') {
|
|
|
- // this.tableRowClick(theObj);
|
|
|
- // };
|
|
|
- // };
|
|
|
- // };
|
|
|
this.loadData();
|
|
|
},
|
|
|
- componentWillReceiveProps(nextProps) {
|
|
|
+ componentWillReceiveProps (nextProps) {
|
|
|
if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
|
|
|
this.state.selectedRowKeys = [];
|
|
|
this.state.selectedRows = [];
|
|
@@ -490,38 +462,28 @@ const AchievementOrderList = React.createClass({
|
|
|
this.loadData(null, nextProps['data-listApiUrl']);
|
|
|
};
|
|
|
},
|
|
|
- tableRowClick(record, index) {
|
|
|
+ tableRowClick (record, index) {
|
|
|
this.state.RowData = record;
|
|
|
this.setState({
|
|
|
showDesc: true
|
|
|
});
|
|
|
},
|
|
|
- closeDesc(e, s) {
|
|
|
+ closeDesc (e, s) {
|
|
|
this.state.showDesc = e;
|
|
|
if (s) {
|
|
|
this.loadData();
|
|
|
};
|
|
|
},
|
|
|
- search() {
|
|
|
+ search () {
|
|
|
this.loadData();
|
|
|
},
|
|
|
- reset() {
|
|
|
+ reset () {
|
|
|
this.state.uid = undefined;
|
|
|
this.state.searchName = undefined;
|
|
|
this.state.status = undefined;
|
|
|
this.loadData();
|
|
|
},
|
|
|
- render() {
|
|
|
- const rowSelection = {
|
|
|
- selectedRowKeys: this.state.selectedRowKeys,
|
|
|
- onChange: (selectedRowKeys, selectedRows) => {
|
|
|
- this.setState({
|
|
|
- selectedRows: selectedRows.splice(-1),
|
|
|
- selectedRowKeys: selectedRowKeys.splice(-1)
|
|
|
- });
|
|
|
- }
|
|
|
- };
|
|
|
- const hasSelected = this.state.selectedRowKeys.length > 0;
|
|
|
+ render () {
|
|
|
return (
|
|
|
<div className="user-content" >
|
|
|
<div className="content-title">
|
|
@@ -547,9 +509,8 @@ const AchievementOrderList = React.createClass({
|
|
|
</div>
|
|
|
<div className="patent-table">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
- <Table columns={this.state.columns}
|
|
|
+ <Table columns={this.state.columns} class="no-all-select"
|
|
|
dataSource={this.state.dataSource}
|
|
|
- //rowSelection={rowSelection}
|
|
|
pagination={this.state.pagination}
|
|
|
onRowClick={this.tableRowClick} />
|
|
|
</Spin>
|