From 85fca70896009507e5251b5a7d0c410fecf344e4 Mon Sep 17 00:00:00 2001 From: wjn Date: Tue, 25 Jun 2024 12:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomPages/HM/HM042ShowPrint.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/CustomPages/HM/HM042ShowPrint.js b/src/components/CustomPages/HM/HM042ShowPrint.js index 06baa27..9beceb8 100644 --- a/src/components/CustomPages/HM/HM042ShowPrint.js +++ b/src/components/CustomPages/HM/HM042ShowPrint.js @@ -117,9 +117,6 @@ class HM042ShowPrint extends React.Component { if (ret.STATUS >= 4) { this.state.isFinished = "inline"; } - if (ret.STATUS == 2 && this.props.data.TaskID != null && ret.DEPUTY_GROUP_LEADER_OPINION == 0 && ret.GROUP_LEADER_OPINION == 0) { - this.state.isAudit = "inline"; - } this.setState({ data: ret }) if (ret.ID) { this.props.dispatch({ @@ -131,7 +128,7 @@ class HM042ShowPrint extends React.Component { onComplete: (result) => { if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) { this.setState({ isAudit: 'none' }) - } else { + } else if (ret.STATUS == 2 && this.props.data.TaskID != null && ret.DEPUTY_GROUP_LEADER_OPINION == 0 && ret.GROUP_LEADER_OPINION == 0){ this.setState({ isAudit: 'inline' }) } } @@ -143,11 +140,16 @@ class HM042ShowPrint extends React.Component { ID: this.props.data.id, }, onComplete: (result) => { - if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) { - this.setState({ BtnSignDisplay: 'none' }) - } else { - this.setState({ BtnSignDisplay: 'inline' }) + if (result != null && this.props.data.TaskID != null) { + if (result) { + if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) { + this.setState({ BtnSignDisplay: 'none' }) + } else { + this.setState({ BtnSignDisplay: 'inline' }) + } + } } + } }) }