Compare commits
2 Commits
5fbf2b7b71
...
cc688c1910
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc688c1910 | ||
|
|
ce4a7bdb9d |
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions, Modal, Row, Col, Form, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Modal, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||||
import React from 'react';
|
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 ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -75,7 +75,7 @@ class FM202ShowPrint extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
that.setState({ BtnAgreeDisplay: 'inline' })
|
that.setState({ BtnAgreeDisplay: 'inline' })
|
||||||
}
|
}
|
||||||
approveView(this, false);
|
this.onClickApprove(false);
|
||||||
//归档才显示打印和导出按钮
|
//归档才显示打印和导出按钮
|
||||||
// if(ret.PRE_MEETING_STATUS==5){
|
// if(ret.PRE_MEETING_STATUS==5){
|
||||||
// this.setState({ isFinished: 'inline' })
|
// this.setState({ isFinished: 'inline' })
|
||||||
@ -93,13 +93,22 @@ class FM202ShowPrint extends React.Component {
|
|||||||
XLSX.writeFile(wb, "随手拍列表.xlsx")
|
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() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
{/* <Button onClick={() => approveView(this)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
|
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.IS_PUBLISH === 5 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
|
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.IS_PUBLISH === 5 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
||||||
import React from 'react';
|
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 ReactToPrint from "react-to-print";
|
||||||
import styles from '../HI/StepForm.css';
|
import styles from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -81,7 +81,7 @@ class FO017ShowPrint extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
that.setState({ BtnAgreeDisplay: 'inline' })
|
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);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
XLSX.writeFile(wb, "关键作业/许可作业工作票.xlsx")
|
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() {
|
render() {
|
||||||
const { data, } = this.state;
|
const { data, } = this.state;
|
||||||
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
return <div>
|
return <div>
|
||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
<Button onClick={() => approveView(this)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
|
<Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px' }}>打印</Button>}
|
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px' }}>打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user