From ce4a7bdb9dd94d02af9f98efe3584e3c493c3619 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Fri, 15 May 2026 10:16:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E8=AF=A6=E6=83=85=E4=B8=8E?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=20=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomPages/FM/FM202ShowPrint.js | 15 ++++++++++++--- src/components/CustomPages/FO/FO017ShowPrint.js | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/components/CustomPages/FM/FM202ShowPrint.js b/src/components/CustomPages/FM/FM202ShowPrint.js index 7635ec3..eecf52d 100644 --- a/src/components/CustomPages/FM/FM202ShowPrint.js +++ b/src/components/CustomPages/FM/FM202ShowPrint.js @@ -1,6 +1,6 @@ import { Button, Descriptions, Modal, Row, Col, Form, Input, Select, Table } from 'antd'; import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, GetFileModel, showFiles, approveView } from "../../../utils/common"; +import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, GetFileModel, showFiles } from "../../../utils/common"; import ReactToPrint from "react-to-print"; import stylesStep from '../HI/StepForm.css'; import config from "../../../config"; @@ -75,7 +75,7 @@ class FM202ShowPrint extends React.Component { } else { that.setState({ BtnAgreeDisplay: 'inline' }) } - approveView(this, false); + this.onClickApprove(false); //归档才显示打印和导出按钮 // if(ret.PRE_MEETING_STATUS==5){ // this.setState({ isFinished: 'inline' }) @@ -93,13 +93,22 @@ class FM202ShowPrint extends React.Component { XLSX.writeFile(wb, "随手拍列表.xlsx") } + onClickApprove = (appVisible) => { + const newtmpData = { + data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' }, + formCode: "PF123", + } + this.setState({ + tmpData: newtmpData, + }); + } render() { const { data } = this.state; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums; // let aaa = Math.random(); return
- {/* + {/* } content={() => this.componentRef} diff --git a/src/components/CustomPages/FO/FO017ShowPrint.js b/src/components/CustomPages/FO/FO017ShowPrint.js index bea29c8..d07d7de 100644 --- a/src/components/CustomPages/FO/FO017ShowPrint.js +++ b/src/components/CustomPages/FO/FO017ShowPrint.js @@ -1,6 +1,6 @@ import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd'; import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel, approveView } from "../../../utils/common"; +import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel } from "../../../utils/common"; import ReactToPrint from "react-to-print"; import styles from '../HI/StepForm.css'; import config from "../../../config"; @@ -81,7 +81,7 @@ class FO017ShowPrint extends React.Component { } else { that.setState({ BtnAgreeDisplay: 'inline' }) } - approveView(this, false); + this.onClickApprove(false); } } @@ -94,12 +94,21 @@ class FO017ShowPrint extends React.Component { const wb = XLSX.utils.table_to_book(Table); XLSX.writeFile(wb, "关键作业/许可作业工作票.xlsx") } + onClickApprove = (appVisible) => { + const newtmpData = { + data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' }, + formCode: "PF123", + } + this.setState({ + tmpData: newtmpData, + }); + } render() { const { data, } = this.state; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums; return
- + } content={() => this.componentRef}