diff --git a/src/components/CustomPages/HM/HM042ShowPrint.js b/src/components/CustomPages/HM/HM042ShowPrint.js index 44a4d63..06baa27 100644 --- a/src/components/CustomPages/HM/HM042ShowPrint.js +++ b/src/components/CustomPages/HM/HM042ShowPrint.js @@ -87,7 +87,7 @@ class HM042ShowPrint extends React.Component { removeDuplicateUser(arr) { let obj = {}; arr = arr.reduce((newArr, next) => { - obj[next.USER_ID] ? "" : (obj[next.USER_ID] = true && newArr.push(next)); + obj[next.CHARGE_USER_ID] ? "" : (obj[next.CHARGE_USER_ID] = true && newArr.push(next)); return newArr; }, []); return arr; @@ -129,10 +129,10 @@ class HM042ShowPrint extends React.Component { ID: this.props.data.id, }, onComplete: (result) => { - if (result != null && this.props.data.TaskID != null) { - if (result) { - this.setState({ isAudit: 'inline' }) - } + if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) { + this.setState({ isAudit: 'none' }) + } else { + this.setState({ isAudit: 'inline' }) } } }) @@ -143,10 +143,10 @@ class HM042ShowPrint extends React.Component { ID: this.props.data.id, }, onComplete: (result) => { - if (result != null && this.props.data.TaskID != null) { - if (result) { - this.setState({ BtnSignDisplay: 'inline' }) - } + if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) { + this.setState({ BtnSignDisplay: 'none' }) + } else { + this.setState({ BtnSignDisplay: 'inline' }) } } }) diff --git a/src/routes/Home.js b/src/routes/Home.js index 59db2d0..efc22e7 100644 --- a/src/routes/Home.js +++ b/src/routes/Home.js @@ -629,7 +629,7 @@ class Home extends React.Component { TaskID: TaskID, onCancel: this.handleCancel, taskCode: taskCode, - tableKey: this.state.tableKey, + tableKey: this.state.overDataKey, homeReload: true, }, formCode: formCode,