From 228837ceade5fd1246342f983bb6de221e8c1971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <10755671+mei-rong-he@user.noreply.gitee.com> Date: Thu, 4 Jun 2026 15:38:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E4=BF=A1=E6=81=AF=E7=99=BB?= =?UTF-8?q?=E8=AE=B0=E8=A1=A8=E6=9F=A5=E7=9C=8B=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomPages/FO/FO055ShowPrint.js | 137 ++++++++++++++++++ src/utils/customConfig.js | 4 +- 2 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 src/components/CustomPages/FO/FO055ShowPrint.js diff --git a/src/components/CustomPages/FO/FO055ShowPrint.js b/src/components/CustomPages/FO/FO055ShowPrint.js new file mode 100644 index 0000000..0393743 --- /dev/null +++ b/src/components/CustomPages/FO/FO055ShowPrint.js @@ -0,0 +1,137 @@ +import { message } from "antd/lib/index"; +import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select,Modal, Table } from 'antd'; +import React from 'react'; +import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel, showUserSign, approveView } from "../../../utils/common"; +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'; +import FormPage from '../../../components/FormPage' +class FO055ShowPrint extends React.Component { + constructor(props) { + super(props); + this.state = { + data: null, + enumData: null, + BtnAgreeDisplay: 'none', + fileForm: { + title: "", + visible: false, + }, + }; + }; + + 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(); + } + + loadData = (dataId) => { + let json = initFilter(this.props.login.OrgId); + json.Parameter22 = this.props.data.ORG_ID_HV; + extendRule(json, 'ID', 1, dataId); + extendIgnoreDataRule(json) + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + url: 'FO/FOEnterpriseInformationRegistration/GetEdit', + onComplete: (ret) => { + if (ret) { + if (this.props.data && this.props.data.loadDataDeal) { + this.props.data.loadDataDeal(1); + } + this.setState({ data: ret }) + if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) { + this.setState({ BtnAgreeDisplay: 'none' }) + } else { + this.setState({ BtnAgreeDisplay: 'inline' }) + } + approveView(this, 'inline', false); + } + + } + }); + } + onTableBtnExport() { + let TableWrap = document.getElementById('tableId' + this.props.data.id); + let Table = TableWrap.getElementsByTagName('table')[0]; + const wb = XLSX.utils.table_to_book(Table); + XLSX.writeFile(wb, "企业信息登记表.xlsx") + } + + render() { + const { data } = this.state; + const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums; + return