import React from 'react'; import { Link } from 'react-router-dom'; import './index.less'; import Page from '@src/containers/Page'; import Block from '@src/components/Block'; import FilterLayout from '@src/layouts/FilterLayout'; // import ActionLayout from '@src/layouts/ActionLayout'; import TableLayout from '@src/layouts/TableLayout'; import { getMap, formatDate, formatMoney, bindSearch } from '@src/services/Tools'; import { asyncSMessage, asyncForm } from '@src/services/AsyncTools'; import { ProductTypeMain, RecordBuySource } from '../../../../Constant'; import { User } from '../../../stores/user'; const ProductTypeMainMap = getMap(ProductTypeMain, 'value', 'label'); const RecordBuySourceMap = getMap(RecordBuySource, 'value', 'label'); export default class extends Page { init() { this.itemList = [{ key: 'id', type: 'hidden', }, { key: 'transactionNo', type: 'input', required: true, name: '支付流水号', }]; this.filterF = null; this.filterForm = [{ key: 'userId', type: 'select', allowClear: true, name: '用户', select: [], number: true, placeholder: '请输入', }, { key: 'productType', type: 'select', allowClear: true, name: '种类', select: ProductTypeMain, }, { key: 'payMethod', type: 'select', allowClear: true, name: '购买方式', select: RecordBuySource, }, { key: 'orderId', type: 'input', allowClear: true, name: '订单id', }]; this.columns = [{ title: '订单号', dataIndex: 'id', }, { title: '下单时间', dataIndex: 'createTime', render: (text) => { return text ? formatDate(text, 'YYYY-MM-DD HH:mm:ss') : ''; }, }, { title: '用户姓名', dataIndex: 'user.nickname', }, { title: '种类', dataIndex: 'productTypes', render: (text) => { return (text || []).map(row => `${ProductTypeMainMap[row]}`).join(', '); }, }, { title: '支付金额', dataIndex: 'money', render: (text, record) => { return `${formatMoney(text)}${text !== record.originMoney ? `(${formatMoney(record.originMoney)})` : ''}`; }, }, { title: '支付方式', dataIndex: 'payMethod', render: (text) => { return RecordBuySourceMap[text] || ''; }, }, { title: '支付时间', dataIndex: 'payTime', render: (text) => { return text ? formatDate(text, 'YYYY-MM-DD HH:mm:ss') : ''; }, }, { title: '操作', dataIndex: 'handler', render: (text, record) => { return