import { message } from "antd/lib/index"; import { Layout,Descriptions, Tabs, Steps, Button, Popconfirm, Row, Col, Form, Input, Select, Table, Drawer ,Icon} from 'antd'; import React from 'react'; import { PlusOutlined } from '@ant-design/icons'; import ReactToPrint from "react-to-print"; import styles from '../HI/StepForm.css'; import config from "../../../config"; import XLSX from 'xlsx'; import { connect } from 'dva'; import moment from 'moment'; const { Header, Footer, Sider, Content } = Layout; const TabPane = Tabs.TabPane; const { TextArea } = Input; const { Step } = Steps; import { extend, extendRule, initFilter, initQueryFilter, getOnlyPropertyData, extendInclude, empty, getDataFieldValue, guid, initFilterGroup, extendGroupRule } from "../../../utils/common"; import FormPage from '../../../components/FormPage' class SelectUser extends React.Component { constructor(props) { super(props) this.state = { title: '选择人员', data: {}, userData: [], selectUserId: '', } }; componentDidMount() { if (this.props.data?.id) this.loadData(this.props.data?.id); } componentWillReceiveProps(NextProps) { if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) { this.loadData(NextProps.data?.id); } } BtnClose = () => { if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function') this.props.data.onCancel(); } selectChange = (e) => { // const jsonUser = initFilter(this.props.login.OrgId, '', '', 0, 1) // extendRule(jsonUser, "NAME", 1, e); // this.props.dispatch({ // type: 'app/getDataByPost', // url: 'FM/User/OrderEntities', // payload: jsonUser, // onlyData: false, // onComplete: (ret) => { // this.setState({ // userData: ret.Data // }); // } // }); this.setState({ selectUserId: e }) } onComplaint = (e) => { if (this.state.selectUserId === '') { message.error("请选择转办人"); return; } const json = initFilter(this.props.login.OrgId, this.props.data.id, '', 0, 1, this.state.selectUserId) this.props.dispatch({ type: 'app/getDataByPost', url: 'FM/FMNotificationTask/Complaint', payload: json, onlyData: false, onComplete: (re) => { if (re && re.IsSuccessful) { this.setState({ // userData: [], selectUserId: '', }); this.BtnClose(); message.success("转办成功"); } else { message.error("转办失败"); } } }) } loadData() { const jsonUser = initFilter(this.props.login.OrgId) jsonUser.Limit=1000; this.props.dispatch({ type: 'app/getDataByPost', url: 'FM/User/OrderPagedAuthority', payload: jsonUser, onlyData: false, onComplete: (ret) => { if (ret) { this.setState({ userData: ret.Data, }); } } }); } render() { const { userData } = this.state; const formItemLayout = { labelCol: { span: 3 }, wrapperCol: { span: 20 }, }; return (
) } } export default connect(({ login, app }) => ({ login, app }))(Form.create()(SelectUser))