隐患库添加弹窗

This commit is contained in:
wyw 2024-04-09 10:38:02 +08:00
parent 906f2673aa
commit 7458d2fac5
2 changed files with 61 additions and 3 deletions

View File

@ -32,7 +32,12 @@ class BS044ShowPrint extends React.Component {
loadData = () => {
let json = initFilter(this.props.login.OrgId);
extendRule(json, 'ID', 1, this.props.data.id);
if (this.props.data.SUBMIT_CONTENT_ID) {
//隐患库 查看整改单 只取 SUBMIT_CONTENT_ID ID传值是框架需求所传值无实际意义
extendRule(json, 'RISK_SUBMIT_CONTENT_ID', 1, this.props.data.SUBMIT_CONTENT_ID);
} else {
extendRule(json, 'ID', 1, this.props.data.id);
}
extendInclude(json, 'Nav_UserDeal.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_UserCheck.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
@ -157,7 +162,7 @@ class BS044ShowPrint extends React.Component {
}</Descriptions.Item>
{
data.Nav_ApplyDetail == null ? null :
<Descriptions.Item label="延期整改信息">{
<Descriptions.Item label="延期整改信息" span={2} >{
'延期理由:' + data.Nav_ApplyDetail.REASON + ' 原整改期限:' + data.Nav_ApplyDetail.LastDate + (data.Nav_ApplyDetail.TEMPDEMAND != null ? (" 临时整改建议与措施:" + data.Nav_ApplyDetail.TEMPDEMAND) : '')
}</Descriptions.Item>
}

View File

@ -1,4 +1,4 @@
import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import { Button, Icon,Modal, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendIgnoreDataRule, extendInclude, setDataFieldValue, showApprove, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
@ -18,6 +18,13 @@ class BS064ShowPrint extends React.Component {
this.state = {
data: null,
BtnAgreeDisplay: 'none',
//弹窗参数
detailForm: {
isShow: false,
formCode:"BS044_SHOWPRINT",
title: "隐患整改单",
ID:''
},
};
};
@ -62,6 +69,37 @@ class BS064ShowPrint extends React.Component {
XLSX.writeFile(wb, "隐患上报表.xlsx")
}
//显示详情弹窗
showDetailModal = (SUBMIT_CONTENT_ID) => {
const newtmpData = {
data: {
id: SUBMIT_CONTENT_ID,//必须动态参数 这个会影响页面去后台操作数据 '00000000-0000-0000-0000-000000000000' 或者 ''都不行
SUBMIT_CONTENT_ID: SUBMIT_CONTENT_ID,
},
formCode: "BS044_SHOWPRINT",
};
this.setState({ tmpData: newtmpData }, () => {
var detailForm = {
isShow: true,
title: "隐患整改单",
};
this.setState({
detailForm: detailForm,
});
});
};
//详情弹窗关闭(隐藏)
detailFormClose = () => {
var detailForm = {
isShow: false,
};
this.setState({
detailForm: detailForm,
});
};
render() {
const { data } = this.state;
return <div>
@ -90,6 +128,7 @@ class BS064ShowPrint extends React.Component {
<td>隐患地点</td>
<td>整改完成时间归档时间</td>
<td>整改人</td>
<td>操作</td>
</tr>
{
data?.map((item, i) => {
@ -102,12 +141,26 @@ class BS064ShowPrint extends React.Component {
<td>{item.ADDRESS}</td>
<td>{item.FINISH_TIME}</td>
<td>{item.ACTURE_USERNAME}</td>
<td><div onClick={() => this.showDetailModal(item.SUBMIT_CONTENT_ID)}><Icon type="eye" style={{ color: "#005b9b", cursor: "pointer" }} /></div></td>
</tr>
})
}
</tbody>
</table>
</div>
<br />
<div style={{ display: "inline-block" }}>
<Modal
visible={this.state.detailForm.isShow}
title={this.state.detailForm.title}
maskClosable={false}
closeModal={this.detailFormClose}
onCancel={this.detailFormClose}
footer={null}
width="95%">
<FormPage {...this.state.tmpData} />
</Modal>
</div>
</div>
}