审批详情查看 demo 使支持 总部查看子公司页面后再查看审批详情

This commit is contained in:
wyw 2026-05-13 15:30:31 +08:00
parent 85a59a75ba
commit 75ca2b7cb7
2 changed files with 6 additions and 24 deletions

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter, extendOrder } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter, extendOrder, approveView } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css'; import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
@ -77,7 +77,7 @@ class SE009ShowPrint extends React.Component {
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
ret.Nav_DepTrainPlanDetail.sort((a, b) => { return a.MOON - b.MOON }); ret.Nav_DepTrainPlanDetail.sort((a, b) => { return a.MOON - b.MOON });
this.onClickApprove(false); approveView(this, false);
this.setState({ data: ret }) this.setState({ data: ret })
} }
} }
@ -99,15 +99,6 @@ class SE009ShowPrint extends React.Component {
} }
return ret.join('、'); return ret.join('、');
} }
onClickApprove = (appVisible) => {
const newtmpData = {
data: { id: this.props.data.id, isShow: true, key: guid(), appVisible: appVisible, BtnAgreeDisplay: 'inline' },
formCode: "PF123",
}
this.setState({
tmpData: newtmpData,
});
}
returnModel(level) { returnModel(level) {
let str = ''; let str = '';
if (level == undefined) { if (level == undefined) {
@ -131,7 +122,7 @@ class SE009ShowPrint extends React.Component {
const { data } = this.state; const { data } = this.state;
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<Button onClick={() => this.onClickApprove(true)} icon="export">审批详情</Button> <Button onClick={() => approveView(this)} icon="export">审批详情</Button>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>} trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd'; import { Button, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel, approveView } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css'; import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
@ -54,7 +54,7 @@ class SE011ShowPrint extends React.Component {
if (this.props.data && this.props.data.loadDataDeal) { if (this.props.data && this.props.data.loadDataDeal) {
this.props.data.loadDataDeal(1); this.props.data.loadDataDeal(1);
} }
this.onClickApprove(false); approveView(this, false);
ret.Nav_YearTrainPlanDetail.sort((a, b) => { return a.MOON - b.MOON }); ret.Nav_YearTrainPlanDetail.sort((a, b) => { return a.MOON - b.MOON });
if (ret.STATUS == 30 && this.props.data.tableKey == "1") { if (ret.STATUS == 30 && this.props.data.tableKey == "1") {
this.setState({ confirmBtn: 'inline' }) this.setState({ confirmBtn: 'inline' })
@ -93,15 +93,6 @@ class SE011ShowPrint extends React.Component {
} }
return ret.join('、'); return ret.join('、');
} }
onClickApprove = (appVisible) => {
const newtmpData = {
data: { id: this.props.data.id, isShow: true, key: guid(), appVisible: appVisible, BtnAgreeDisplay: 'inline' },
formCode: "PF123",
}
this.setState({
tmpData: newtmpData,
});
}
returnModel(level) { returnModel(level) {
let str = ''; let str = '';
if (level == undefined) { if (level == undefined) {
@ -142,7 +133,7 @@ class SE011ShowPrint extends React.Component {
const { data } = this.state; const { data } = this.state;
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<Button onClick={() => this.onClickApprove(true)} icon="export">审批详情</Button> <Button onClick={() => approveView(this)} icon="export">审批详情</Button>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>} trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}