|
@@ -1,8 +1,8 @@
|
|
import React from 'react';
|
|
import React from 'react';
|
|
-import { Button, Table, Select, Input, DatePicker, Space, Modal, message , Spin } from 'antd';
|
|
|
|
|
|
+import { Button, Table, Select, Input, DatePicker, Space, Modal, message, Spin } from 'antd';
|
|
import 'moment/locale/zh-cn';
|
|
import 'moment/locale/zh-cn';
|
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
-import { $Axios, format } from '../../common/publish';
|
|
|
|
|
|
+import { $Axios, format, $payTxt } from '../../common/publish';
|
|
import '../Finance-orderQuery/Finance-orderQuery.scss'
|
|
import '../Finance-orderQuery/Finance-orderQuery.scss'
|
|
import select_data from '../../common/ssq';
|
|
import select_data from '../../common/ssq';
|
|
const { Column, ColumnGroup } = Table;
|
|
const { Column, ColumnGroup } = Table;
|
|
@@ -133,12 +133,21 @@ export default class FinanceoRderQuery extends React.Component {
|
|
spinning: true,
|
|
spinning: true,
|
|
keys: 1,
|
|
keys: 1,
|
|
keye: 2,
|
|
keye: 2,
|
|
- tklodings: false
|
|
|
|
|
|
+ tklodings: false,
|
|
|
|
+ tablesW : '',
|
|
|
|
+ tablesH : ''
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
|
|
+ let tables = document.getElementById('tables');
|
|
|
|
+ if (tables) { //此处在加一层判断,更加严密,如果box存在的情况下获取
|
|
|
|
+ this.setState({
|
|
|
|
+ tablesW : tables.offsetWidth,
|
|
|
|
+ tablesH : tables.offsetHeight
|
|
|
|
+ })
|
|
|
|
+ }
|
|
this.initData();
|
|
this.initData();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -206,10 +215,10 @@ export default class FinanceoRderQuery extends React.Component {
|
|
|
|
|
|
endTime = (value, dateString) => {
|
|
endTime = (value, dateString) => {
|
|
if (dateString !== '') {
|
|
if (dateString !== '') {
|
|
- dateString = new Date(value).formats('yyyy-MM-dd 00:00:00')
|
|
|
|
- let time = new Date(dateString).getTime() / 1000;
|
|
|
|
|
|
+ dateString = new Date(value).formats('yyyy-MM-dd 00:00:00'); //格式化时间
|
|
|
|
+ let time = new Date(dateString).getTime() / 1000; //格式化时间戳为秒
|
|
this.setState({
|
|
this.setState({
|
|
- endTime: time
|
|
|
|
|
|
+ endTime: Number(time) + 86400 //加24小时
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
this.setState({
|
|
this.setState({
|
|
@@ -296,7 +305,7 @@ export default class FinanceoRderQuery extends React.Component {
|
|
benbiPrice: item.benbiPrice, //订单支付本币抵扣的现金价格
|
|
benbiPrice: item.benbiPrice, //订单支付本币抵扣的现金价格
|
|
spareAmount: item.spareAmount, //分账金额
|
|
spareAmount: item.spareAmount, //分账金额
|
|
refundAmount: item.refundAmount,//退款金额
|
|
refundAmount: item.refundAmount,//退款金额
|
|
- payType: that_.payTypeList(item.payType),//支付方式:1支付宝2微信5微包
|
|
|
|
|
|
+ payType: $payTxt(item.payType),//支付方式:1支付宝2微信5微包
|
|
orderStatus: that_.orderStatus(item.orderStatus),//订单状态:1:未付款2:已付待入账3:已付已入账4:支付失败
|
|
orderStatus: that_.orderStatus(item.orderStatus),//订单状态:1:未付款2:已付待入账3:已付已入账4:支付失败
|
|
createTime: item.createTime == '' ? '--' : format(Number(item.createTime)), //:创建时间
|
|
createTime: item.createTime == '' ? '--' : format(Number(item.createTime)), //:创建时间
|
|
finishTime: item.finishTime == '' ? '--' : format(Number(item.finishTime)) //:完成时间
|
|
finishTime: item.finishTime == '' ? '--' : format(Number(item.finishTime)) //:完成时间
|
|
@@ -315,17 +324,6 @@ export default class FinanceoRderQuery extends React.Component {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- payTypeList(e) {
|
|
|
|
- let txt;
|
|
|
|
- if (e == 1) {
|
|
|
|
- txt = '支付宝'
|
|
|
|
- } else if (e == 2) {
|
|
|
|
- txt = '微信'
|
|
|
|
- } else if (e == 5) {
|
|
|
|
- txt = '余额'
|
|
|
|
- }
|
|
|
|
- return txt
|
|
|
|
- }
|
|
|
|
|
|
|
|
orderStatus(e) {
|
|
orderStatus(e) {
|
|
let txt;
|
|
let txt;
|
|
@@ -344,7 +342,7 @@ export default class FinanceoRderQuery extends React.Component {
|
|
}
|
|
}
|
|
|
|
|
|
render() {
|
|
render() {
|
|
- const { data, columns, headTxt, keys, keye, select_data, timeType, paginationProps, isModalVisible, columns_tk, payOrderInfo, orderSplitInfo, orderNo, lodings, tklodings } = this.state;
|
|
|
|
|
|
+ const { data, columns, headTxt, keys, keye, select_data, timeType, paginationProps, isModalVisible, columns_tk, payOrderInfo, orderSplitInfo, orderNo, lodings, tklodings, tablesW, tablesH } = this.state;
|
|
const { Option } = Select;
|
|
const { Option } = Select;
|
|
return (
|
|
return (
|
|
<div className='wrap_table'>
|
|
<div className='wrap_table'>
|
|
@@ -363,18 +361,21 @@ export default class FinanceoRderQuery extends React.Component {
|
|
<div style={{ width: '200px', display: 'inline-block', marginLeft: '20px' }}><Input id='orderNo' placeholder="请输入订单号" /></div>
|
|
<div style={{ width: '200px', display: 'inline-block', marginLeft: '20px' }}><Input id='orderNo' placeholder="请输入订单号" /></div>
|
|
</div>
|
|
</div>
|
|
<div className='btm_div'>
|
|
<div className='btm_div'>
|
|
- <div style={{ display: 'inline-block', }}> 发起人 : </div>
|
|
|
|
|
|
+ <div style={{ display: 'inline-block', }}> 付款人 : </div>
|
|
<div style={{ width: '200px', display: 'inline-block', marginLeft: '20px', marginRight: '20px' }}><Input id='userName' placeholder="请输入用户名" /></div>
|
|
<div style={{ width: '200px', display: 'inline-block', marginLeft: '20px', marginRight: '20px' }}><Input id='userName' placeholder="请输入用户名" /></div>
|
|
<div style={{ display: 'inline-block', }}> 支付方式 : </div>
|
|
<div style={{ display: 'inline-block', }}> 支付方式 : </div>
|
|
<Select size='default' placeholder="请选择" onChange={this.handleChange_2.bind(this)} style={{ width: 200, marginRight: '20px' }}>
|
|
<Select size='default' placeholder="请选择" onChange={this.handleChange_2.bind(this)} style={{ width: 200, marginRight: '20px' }}>
|
|
<Option key={1} value={2}>微信</Option>
|
|
<Option key={1} value={2}>微信</Option>
|
|
<Option key={2} value={1}>支付宝</Option>
|
|
<Option key={2} value={1}>支付宝</Option>
|
|
<Option key={3} value={5}>钱包余额</Option>
|
|
<Option key={3} value={5}>钱包余额</Option>
|
|
|
|
+ <Option key={4} value={3}>联盟币</Option>
|
|
|
|
+ <Option key={5} value={4}>积分币</Option>
|
|
|
|
+ <Option key={6} value={6}>微包银行卡</Option>
|
|
</Select>
|
|
</Select>
|
|
<Select size='default' placeholder="请选择时间类型" onChange={this.handleChange_3.bind(this)} style={{ width: 200, marginRight: '20px' }}>
|
|
<Select size='default' placeholder="请选择时间类型" onChange={this.handleChange_3.bind(this)} style={{ width: 200, marginRight: '20px' }}>
|
|
<Option key={0} value={0}>不限时间类型</Option>
|
|
<Option key={0} value={0}>不限时间类型</Option>
|
|
- <Option key={1} value={1}>完成时间</Option>
|
|
|
|
- <Option key={2} value={2}>下单时间</Option>
|
|
|
|
|
|
+ <Option key={1} value={2}>完成时间</Option>
|
|
|
|
+ <Option key={2} value={1}>下单时间</Option>
|
|
</Select>
|
|
</Select>
|
|
<Space direction="vertical">
|
|
<Space direction="vertical">
|
|
<DatePicker key={keys} onChange={this.starTime} locale={locale} disabled={timeType == null ? true : false || timeType == 0 ? true : false} placeholder='请选择开始时间' />
|
|
<DatePicker key={keys} onChange={this.starTime} locale={locale} disabled={timeType == null ? true : false || timeType == 0 ? true : false} placeholder='请选择开始时间' />
|
|
@@ -394,12 +395,13 @@ export default class FinanceoRderQuery extends React.Component {
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div className='tables'>
|
|
|
|
|
|
+ <div className='tables' id='tables'>
|
|
<Table
|
|
<Table
|
|
columns={columns}
|
|
columns={columns}
|
|
dataSource={data}
|
|
dataSource={data}
|
|
pagination={paginationProps}
|
|
pagination={paginationProps}
|
|
loading={lodings}
|
|
loading={lodings}
|
|
|
|
+ locale={{ emptyText: '暂无数据' }}
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<Modal title="订单金额流向"
|
|
<Modal title="订单金额流向"
|
|
@@ -425,25 +427,26 @@ export default class FinanceoRderQuery extends React.Component {
|
|
<Spin tip="加载中请稍后..."></Spin>
|
|
<Spin tip="加载中请稍后..."></Spin>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
- {
|
|
|
|
|
|
+ {
|
|
tklodings == true && <div>
|
|
tklodings == true && <div>
|
|
- <div>
|
|
|
|
- <p style={{ fontSize: '16px', fontWeight: '600' }}>订单信息</p>
|
|
|
|
- <p>商户订单号 : {orderNo}</p>
|
|
|
|
- <p>订单金额 : {payOrderInfo.totalAmount}</p>
|
|
|
|
- <p>支付金额 : {payOrderInfo.cash}</p>
|
|
|
|
- <p>本金金额 : {payOrderInfo.stbPrice}</p>
|
|
|
|
- <p>积分币金额 : {payOrderInfo.benbiPrice}</p>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <p style={{ fontSize: '16px', fontWeight: '600' }}>订单金额流向信息</p>
|
|
|
|
- <Table
|
|
|
|
- columns={columns_tk}
|
|
|
|
- dataSource={orderSplitInfo}
|
|
|
|
- />
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <p style={{ fontSize: '16px', fontWeight: '600' }}>订单信息</p>
|
|
|
|
+ <p>商户订单号 : {orderNo}</p>
|
|
|
|
+ <p>订单金额 : {payOrderInfo.totalAmount}</p>
|
|
|
|
+ <p>支付金额 : {payOrderInfo.cash}</p>
|
|
|
|
+ <p>本金金额 : {payOrderInfo.stbPrice}</p>
|
|
|
|
+ <p>积分币金额 : {payOrderInfo.benbiPrice}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <p style={{ fontSize: '16px', fontWeight: '600' }}>订单金额流向信息</p>
|
|
|
|
+ <Table
|
|
|
|
+ columns={columns_tk}
|
|
|
|
+ dataSource={orderSplitInfo}
|
|
|
|
+ locale={{ emptyText: '暂无数据' }}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
</Modal>
|
|
</Modal>
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|