import React, { Component } from 'react'; import st from 'styled-components'; import { connect } from 'dva'; import { Input, DatePicker, Alert } from 'antd'; import { withRouter } from 'dva/router'; import moment from 'moment'; import { getYffSubsidyInfo } from '../../../../services/api'; import columnFun from './columns'; import tablePage from '../../../../utils/hoc/tablePage'; const { RangePicker } = DatePicker; @connect(state => ({ global: state.global })) @tablePage() @withRouter export default class Issued extends Component { constructor(props, context) { super(props, context); this.state = { params: null, perTypeList: [], // 人员类别 agesRange: [], //年龄范围 statisticsData: null,//统计数据 updateIssued: false }; } componentDidMount() { //获取搜索结果统计数据 getYffSubsidyInfo({ subsidyType: '2' }).then(res => { this.setState({ statisticsData: res.data }) }) } componentWillReceiveProps(nextProps) { if (this.state.updateIssued !== nextProps.updateIssued) { this.setState({ updateIssued: nextProps.updateIssued },()=>{ if(this.state.updateIssued){ this.props.updateTable() } }) } } // 表格渲染 __renderOrderList = () => { const columns = columnFun.call(this); const { PageTable, isInit } = this.props; if (!isInit) return; return ( `总共 ${total} 条` }} /> ); }; render() { const { SearchForm, Form } = this.props; const { getFieldDecorator, setFieldsValue } = this.props.form; const { statisticsData } = this.state return (
本页面可查看已发放的记录,若需要查询企业钱包交易的电子回单,请访问企业钱包-收支明细页面查询。
} type="warning" showIcon style={{ marginBottom: '15px' }} /> { values.subsidyType = '2' // const { date } = values; // if (date.length == 2) { // values.startTime = moment(date[0]).format('YYYY-MM-DD'); // values.endTime = moment(date[1]).format('YYYY-MM-DD'); // } else { // values.startTime = ''; // values.endTime = ''; // } // Reflect.deleteProperty(values, 'date'); return values; }} >
{getFieldDecorator('batchName', { initialValue: '' })( )} {getFieldDecorator('subsidyObject', { initialValue: [] })( )} {/* {getFieldDecorator('date', { initialValue: [] })( )} */}
{ statisticsData &&
搜索结果统计:待发放总笔数:{statisticsData.grantCount} | 待发放总金额(元):{statisticsData.grantAmount}
} {/* 表格 */} {this.__renderOrderList()} ); } } const Yellow = st.span` color: orange `;