代码同步 SPS=> SMS
This commit is contained in:
parent
fe32a0a845
commit
e7f99f757c
@ -648,6 +648,35 @@ params【字段属性】=值
|
|||||||
|
|
||||||
const rulesMethod = [];
|
const rulesMethod = [];
|
||||||
if (isRequire) {
|
if (isRequire) {
|
||||||
|
debugger
|
||||||
|
if (!errVerifyMsg) {
|
||||||
|
switch (col.controlType) {
|
||||||
|
case 25: errVerifyMsg = "请上传" + label
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
case 8:
|
||||||
|
case 9:
|
||||||
|
case 10:
|
||||||
|
case 11:
|
||||||
|
case 12:
|
||||||
|
case 14:
|
||||||
|
case 15:
|
||||||
|
case 17:
|
||||||
|
case 18:
|
||||||
|
case 19:
|
||||||
|
case 20:
|
||||||
|
case 21:
|
||||||
|
case 22:
|
||||||
|
case 23:
|
||||||
|
case 24: errVerifyMsg = "请选择" + label
|
||||||
|
break;
|
||||||
|
default:errVerifyMsg = "请输入" + label
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
rulesMethod.push({
|
rulesMethod.push({
|
||||||
required: !!isRequire,
|
required: !!isRequire,
|
||||||
message: errVerifyMsg ? errVerifyMsg : '请输入' + label,
|
message: errVerifyMsg ? errVerifyMsg : '请输入' + label,
|
||||||
|
|||||||
@ -155,9 +155,9 @@ class BS006ShowPrint extends React.Component {
|
|||||||
data ? <table className={styles.PrintFormLight}>
|
data ? <table className={styles.PrintFormLight}>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr className={styles.PrintFormLightTh}>
|
<tr className={styles.PrintFormLightTh}>
|
||||||
<td>问题等级</td>
|
|
||||||
<td>检查问题</td>
|
<td>检查问题</td>
|
||||||
<td>整改建议与措施</td>
|
<td>整改建议与措施</td>
|
||||||
|
<td>问题等级</td>
|
||||||
<td>隐患原因</td>
|
<td>隐患原因</td>
|
||||||
<td>隐患地点</td>
|
<td>隐患地点</td>
|
||||||
<td>附件</td>
|
<td>附件</td>
|
||||||
@ -172,8 +172,8 @@ class BS006ShowPrint extends React.Component {
|
|||||||
{data.Nav_ListRiskSubmitContent.map((item, i) => {
|
{data.Nav_ListRiskSubmitContent.map((item, i) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>{this.props.app.enums.BSQuestionLevelEnum.enums[item.QUESTION_LEVEL]}</td>
|
|
||||||
<td>{item.DESCREPTION}</td><td>{item.DEMAND}</td>
|
<td>{item.DESCREPTION}</td><td>{item.DEMAND}</td>
|
||||||
|
<td>{this.props.app.enums.BSQuestionLevelEnum.enums[item.QUESTION_LEVEL]}</td>
|
||||||
<td>
|
<td>
|
||||||
{
|
{
|
||||||
item.Nav_ListRiskQuestionReason && item.Nav_ListRiskQuestionReason.map((item2, i) => {
|
item.Nav_ListRiskQuestionReason && item.Nav_ListRiskQuestionReason.map((item2, i) => {
|
||||||
|
|||||||
@ -143,7 +143,6 @@ class BS042ShowPrint extends React.Component {
|
|||||||
this.state.DEALOPINION = val
|
this.state.DEALOPINION = val
|
||||||
}
|
}
|
||||||
sureCheck = (val) => {
|
sureCheck = (val) => {
|
||||||
debugger
|
|
||||||
var tmpData = this.props.data
|
var tmpData = this.props.data
|
||||||
if (val == 1 || val == 2) {
|
if (val == 1 || val == 2) {
|
||||||
//整改责任人 同意
|
//整改责任人 同意
|
||||||
@ -194,6 +193,33 @@ class BS042ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//新版验收人确认
|
||||||
|
CheckerCheckToActual = (val) => {
|
||||||
|
var tmpData = this.props.data
|
||||||
|
//验收人 同意
|
||||||
|
if (val == 20 && (this.state.DEALOPINION == undefined || this.state.DEALOPINION == null || this.state.DEALOPINION == '')) {
|
||||||
|
// message.success('请填写驳回意见!')
|
||||||
|
message.error('请填写驳回意见!')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.setState({
|
||||||
|
// data: tmpData,
|
||||||
|
isOKLoad: val == 20 ? false : true,
|
||||||
|
isRejectLoad: val == 20 ? true : false,
|
||||||
|
}, () => {
|
||||||
|
let json = initFilter(this.props.login.OrgId, this.props.data.id, null, null, null, this.props.data.TaskID, val, this.state.DEALOPINION);
|
||||||
|
this.props.dispatch({
|
||||||
|
type: 'app/getDataByPost',
|
||||||
|
payload: json,
|
||||||
|
url: 'BS/BSRiskSubmit/CheckerCheckToActual',
|
||||||
|
onComplete: (ret) => {
|
||||||
|
this.BtnClose()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
sureCheckActualDeal = () => {
|
sureCheckActualDeal = () => {
|
||||||
let json = initFilter(this.props.login.OrgId, this.props.data.id, null, null, null, this.props.data.TaskID);
|
let json = initFilter(this.props.login.OrgId, this.props.data.id, null, null, null, this.props.data.TaskID);
|
||||||
// extendRule(json, 'ID', 1, this.props.data.id);
|
// extendRule(json, 'ID', 1, this.props.data.id);
|
||||||
@ -221,6 +247,10 @@ class BS042ShowPrint extends React.Component {
|
|||||||
//整改落实人确定
|
//整改落实人确定
|
||||||
isActualDealCheck ? <td><Button type={'primary'} style={{ margin: "0 0 0 10px" }} icon={'save'} onClick={() => this.sureCheckActualDeal()} >确认</Button> </td> : null
|
isActualDealCheck ? <td><Button type={'primary'} style={{ margin: "0 0 0 10px" }} icon={'save'} onClick={() => this.sureCheckActualDeal()} >确认</Button> </td> : null
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
//验收人确定
|
||||||
|
isDealUserCheck ? <td><Button type={'primary'} style={{ margin: "0 0 0 10px" }} icon={'save'} onClick={() => this.CheckerCheckToActual(10)} >确认</Button> </td> : null
|
||||||
|
}
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -300,7 +330,7 @@ class BS042ShowPrint extends React.Component {
|
|||||||
</table> : null
|
</table> : null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{/* {
|
||||||
// 验收人验收
|
// 验收人验收
|
||||||
// (riskContentState == 15 || riskContentState == 17) ?
|
// (riskContentState == 15 || riskContentState == 17) ?
|
||||||
((isCheckerCheck || isDealUserCheck) && !isActualDealCheck) ?
|
((isCheckerCheck || isDealUserCheck) && !isActualDealCheck) ?
|
||||||
@ -316,13 +346,13 @@ class BS042ShowPrint extends React.Component {
|
|||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<td >
|
<td >
|
||||||
<Button className={styles.agreedUser} type={'primary'} icon={'check'} loading={this.state.isOKLoad} onClick={() => this.sureCheck(riskContentState == 15 ? 1 : 10)} >同意</Button> {/*10 : 1 */}
|
<Button className={styles.agreedUser} type={'primary'} icon={'check'} loading={this.state.isOKLoad} onClick={() => this.sureCheck(riskContentState == 15 ? 1 : 10)} >同意</Button>
|
||||||
<Button className={styles.rejectedUser} type={'primary'} icon={'close'} loading={this.state.isRejectLoad} onClick={() => this.sureCheck(riskContentState == 15 ? 2 : 20)} >驳回</Button> {/* 20 : 2 */}
|
<Button className={styles.rejectedUser} type={'primary'} icon={'close'} loading={this.state.isRejectLoad} onClick={() => this.sureCheck(riskContentState == 15 ? 2 : 20)} >驳回</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table> : null
|
</table> : null
|
||||||
}
|
} */}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -163,6 +163,7 @@ class BS044Check extends React.Component {
|
|||||||
<Descriptions.Item label="整改建议与措施" >{data.Nav_SubmitContent.DEMAND}</Descriptions.Item>
|
<Descriptions.Item label="整改建议与措施" >{data.Nav_SubmitContent.DEMAND}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改后情况描述">{data.DEALDESCRIBE}</Descriptions.Item>
|
<Descriptions.Item label="整改后情况描述">{data.DEALDESCRIBE}</Descriptions.Item>
|
||||||
<Descriptions.Item label="隐患地点">{data.Nav_SubmitContent.ADDRESS}</Descriptions.Item>
|
<Descriptions.Item label="隐患地点">{data.Nav_SubmitContent.ADDRESS}</Descriptions.Item>
|
||||||
|
{/* <hr></hr> */}
|
||||||
<Descriptions.Item label="附件(整改前)">{
|
<Descriptions.Item label="附件(整改前)">{
|
||||||
data.Nav_Files && data.Nav_Files.map((item, i) => {
|
data.Nav_Files && data.Nav_Files.map((item, i) => {
|
||||||
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
|
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
|
||||||
@ -174,6 +175,7 @@ class BS044Check extends React.Component {
|
|||||||
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
|
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
|
||||||
})
|
})
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
|
{/* <hr></hr> */}
|
||||||
<Descriptions.Item label="整改责任人签名">{data.Nav_SubmitContent.RiskContentState > 36 ? showUserSign(data.Nav_UserDeal, config.picServerHost) : null}</Descriptions.Item>
|
<Descriptions.Item label="整改责任人签名">{data.Nav_SubmitContent.RiskContentState > 36 ? showUserSign(data.Nav_UserDeal, config.picServerHost) : null}</Descriptions.Item>
|
||||||
<Descriptions.Item label="验收人签名">{data.Nav_SubmitContent.RiskContentState >= 38 ? showUserSign(data.Nav_UserCheck, config.picServerHost) : null}</Descriptions.Item>
|
<Descriptions.Item label="验收人签名">{data.Nav_SubmitContent.RiskContentState >= 38 ? showUserSign(data.Nav_UserCheck, config.picServerHost) : null}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
|||||||
99
src/components/CustomPages/BS/BS072ShowPrint.js
Normal file
99
src/components/CustomPages/BS/BS072ShowPrint.js
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||||
|
import React from 'react';
|
||||||
|
import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, initQueryFilter, ShowDateTime, ShowPrintClose, showFiles } from '../../../utils/common';
|
||||||
|
import ReactToPrint from 'react-to-print';
|
||||||
|
import { ExportToExcel } from '@woowalker/feui'
|
||||||
|
import XLSX from 'xlsx';
|
||||||
|
import { connect } from 'dva';
|
||||||
|
import moment from 'moment';
|
||||||
|
import { message } from 'antd/lib/index';
|
||||||
|
import styles from '../../../components/CustomPages/HI/StepForm.css';
|
||||||
|
import config from '../../../config.js';
|
||||||
|
import FormPage from '../../FormPage'
|
||||||
|
class BS072ShowPrint extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
data: null,
|
||||||
|
btndisplay: 'none',
|
||||||
|
isCheck: false, //是否待办 审批
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (this.props.data?.id)
|
||||||
|
this.loadData(this.props.data?.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(NextProps) {
|
||||||
|
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
|
||||||
|
this.loadData(NextProps.data?.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onTableBtnExport() {
|
||||||
|
let TableWrap = document.getElementById('table1');
|
||||||
|
let Table = TableWrap.getElementsByTagName('table1')[0];
|
||||||
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
|
XLSX.writeFile(wb, this.props.record.Nav_Department.NAME + '.xlsx')
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickApprove = (appVisible) => {
|
||||||
|
const newtmpData = {
|
||||||
|
data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'none' },
|
||||||
|
formCode: 'PF123',
|
||||||
|
}
|
||||||
|
this.setState({
|
||||||
|
tmpData: newtmpData,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
loadData = (id) => {
|
||||||
|
var isCheck = (this.props.data.tableKey != undefined && this.props.data.tableKey == '1') ? true : false
|
||||||
|
var orgId = this.props.login ? this.props.login.OrgId : '';
|
||||||
|
let json = initFilter(orgId);
|
||||||
|
extendRule(json, 'ID', 1, id);
|
||||||
|
extendInclude(json, 'Nav_RiskArea')
|
||||||
|
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File')
|
||||||
|
this.props.dispatch({
|
||||||
|
type: 'app/getDataByPost',
|
||||||
|
payload: json,
|
||||||
|
url: 'BS/RiskSubmitContent/Get',
|
||||||
|
onComplete: (ret) => {
|
||||||
|
if (ret) {
|
||||||
|
this.setState({
|
||||||
|
data: ret,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
render() {
|
||||||
|
const { data } = this.state;
|
||||||
|
return <div>
|
||||||
|
<div style={{ padding: '10px' }}>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><ReactToPrint trigger={() => <Button type={'default'} icon={'printer'} >打印</Button>} content={() => this.componentRef} /></td>
|
||||||
|
<td><ExportToExcel fileName='隐患上报明细' tableId={'tableId' + this.props.data.id} /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<FormPage {...this.state.tmpData} />
|
||||||
|
<div ref={el => (this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>
|
||||||
|
<h1 className={styles.showPrintHead}>隐患上报明细</h1>
|
||||||
|
{
|
||||||
|
data ? <div style={{ width: '95%' }}>
|
||||||
|
<Descriptions title='' size='middle' bordered>
|
||||||
|
<Descriptions.Item label="检查区域">{data.Nav_RiskArea.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="隐患地点">{data.ADDRESS}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="问题点描述">{data.DESCRIBE}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost)}</Descriptions.Item>
|
||||||
|
</Descriptions>
|
||||||
|
</div> : null
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default connect(({ login }) => ({ login }))(BS072ShowPrint)
|
||||||
153
src/components/CustomPages/BS/BS073ShowPrint.js
Normal file
153
src/components/CustomPages/BS/BS073ShowPrint.js
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||||
|
import React from 'react';
|
||||||
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, showApprove, guid, initQueryFilter, showFiles } from "../../../utils/common";
|
||||||
|
import ReactToPrint from "react-to-print";
|
||||||
|
import { ExportToExcel } from '@woowalker/feui'
|
||||||
|
import XLSX from 'xlsx';
|
||||||
|
import { connect } from 'dva';
|
||||||
|
import moment from 'moment';
|
||||||
|
import { message } from "antd/lib/index";
|
||||||
|
import styles from '../HI/StepForm.css';
|
||||||
|
import config from "../../../config.js";
|
||||||
|
import FormPage from '../../../components/FormPage'
|
||||||
|
|
||||||
|
// 隐患上报查看
|
||||||
|
class BS073ShowPrint extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
data: null,
|
||||||
|
listReason: '',
|
||||||
|
BtnAgreeDisplay: 'none',
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (this.props.data?.id)
|
||||||
|
this.loadData(this.props.data?.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(NextProps) {
|
||||||
|
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
|
||||||
|
this.loadData(NextProps.data?.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BtnClose = () => {
|
||||||
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
|
this.props.data.onCancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
loadData = () => {
|
||||||
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
extendRule(json, 'ID', 1, this.props.data.id);
|
||||||
|
extendInclude(json, 'Nav_Submit.Nav_CheckType');
|
||||||
|
extendInclude(json, 'Nav_Submit.Nav_CheckTypeLevel.Nav_Enums');
|
||||||
|
extendInclude(json, 'Nav_Submit.Nav_User');
|
||||||
|
extendInclude(json, 'Nav_Submit');
|
||||||
|
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File');
|
||||||
|
extendInclude(json, 'Nav_CheckProject');
|
||||||
|
extendInclude(json, 'Nav_CheckProjectCategory');
|
||||||
|
extendInclude(json, 'Nav_RiskArea');
|
||||||
|
extendInclude(json, 'Nav_ListRiskQuestionReason.Nav_RiskReason');
|
||||||
|
extendInclude(json, 'Nav_ListRiskQuestionReason');
|
||||||
|
extendInclude(json, 'Nav_DepartmentDeal');
|
||||||
|
extendInclude(json, 'Nav_UserDeal');
|
||||||
|
extendInclude(json, 'Nav_UserCheck');
|
||||||
|
extendIgnoreDataRule(json)
|
||||||
|
|
||||||
|
this.props.dispatch({
|
||||||
|
type: 'app/getDataByPost',
|
||||||
|
payload: json,
|
||||||
|
url: 'BS/RiskSubmitContent/Get',
|
||||||
|
onComplete: (ret) => {
|
||||||
|
if (ret) {
|
||||||
|
// 制表审核
|
||||||
|
// 检查结果审核
|
||||||
|
var listReason = ''
|
||||||
|
ret.Nav_ListRiskQuestionReason.forEach(element => {
|
||||||
|
listReason += ' ' + element.Nav_RiskReason.NAME
|
||||||
|
});
|
||||||
|
|
||||||
|
this.setState({ //设置setState全局变量
|
||||||
|
data: ret, //将ret对象赋值给data, data供页面调用
|
||||||
|
listReason: listReason
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickApprove = (appVisible) => {
|
||||||
|
const newtmpData = {
|
||||||
|
data: { id: this.props.data.id, isShow: true, key: guid(), PARAM2: this.props.data.PARAM2, appVisible: appVisible, BtnAgreeDisplay: 'none' },
|
||||||
|
formCode: "PF123",
|
||||||
|
}
|
||||||
|
this.setState({
|
||||||
|
tmpData: newtmpData,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onTableBtnExport() {
|
||||||
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
|
XLSX.writeFile(wb, "手动上报完善.xlsx")
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { data, listReason } = this.state;
|
||||||
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
|
return <div>
|
||||||
|
<div style={{ padding: '10px' }}>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button></td>
|
||||||
|
<td><ReactToPrint trigger={() => <Button type={'default'} icon={'printer'} >打印</Button>} content={() => this.componentRef} pageStyle={"#tableId" + this.props.data.id + " { padding:0 40px;} img{width :120px}"} /></td>
|
||||||
|
<td><ExportToExcel fileName='手动上报完善' tableId={'tableId' + this.props.data.id} /></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<FormPage {...this.state.tmpData} />
|
||||||
|
{/* 检查表制定 */}
|
||||||
|
<div ref={el => (this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>
|
||||||
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>手动上报-指定责任单位</h1>
|
||||||
|
{
|
||||||
|
data ? <div >
|
||||||
|
<Descriptions title="" size="middle" bordered>
|
||||||
|
<Descriptions.Item label="检查类型">{data.Nav_Submit?.Nav_CheckType?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="检查层级">{data.Nav_Submit?.Nav_CheckTypeLevel?.Nav_Enums?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="提交人">{data.Nav_Submit?.Nav_User?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="检查时间">{data.Nav_Submit.CHECKTIME}</Descriptions.Item>{/*CHECKTIME */}
|
||||||
|
<Descriptions.Item label="问题点描述" span={2}>{data.DESCRIBE}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="附件">{
|
||||||
|
showFiles(data?.Nav_Files, config.picServerHost)
|
||||||
|
}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="检查项目">{data.Nav_CheckProject?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="检查项目分类">{data.Nav_CheckProjectCategory?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="检查区域">{data.Nav_RiskArea?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="隐患地点">{data.ADDRESS}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="检查内容">{data.CHECKCONTENT}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="检查问题">{data.DESCREPTION}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="问题等级">{enums.BSQuestionLevelEnum.enums[data.QUESTION_LEVEL]}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="整改建议与措施">{data.DEMAND}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="系统整改期限">{data.LastDateSystem?.split(' ')[0]}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="整改期限">{data.LastDateUser?.split(' ')[0]}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="隐患原因">{listReason}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="整改实施单位">{data.Nav_DepartmentDeal?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="整改责任人">{data.Nav_UserDeal?.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="验收人">{data.Nav_UserCheck?.NAME}</Descriptions.Item>
|
||||||
|
|
||||||
|
</Descriptions>
|
||||||
|
</div> : null
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default connect(({ login, app }) => ({ login, app }))(BS073ShowPrint)
|
||||||
138
src/components/CustomPages/BS/BS074ShowPrint.js
Normal file
138
src/components/CustomPages/BS/BS074ShowPrint.js
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||||
|
import React from 'react';
|
||||||
|
import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, initQueryFilter, ShowDateTime, ShowPrintClose, showFiles } from '../../../utils/common';
|
||||||
|
import ReactToPrint from 'react-to-print';
|
||||||
|
import { ExportToExcel } from '@woowalker/feui'
|
||||||
|
import XLSX from 'xlsx';
|
||||||
|
import { connect } from 'dva';
|
||||||
|
import moment from 'moment';
|
||||||
|
import { message } from 'antd/lib/index';
|
||||||
|
import styles from '../../../components/CustomPages/HI/StepForm.css';
|
||||||
|
import config from '../../../config.js';
|
||||||
|
import FormPage from '../../FormPage'
|
||||||
|
class BS074ShowPrint extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
data: null,
|
||||||
|
btndisplay: 'none',
|
||||||
|
isCheck: false, //是否待办 审批
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (this.props.data?.id)
|
||||||
|
this.loadData(this.props.data?.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(NextProps) {
|
||||||
|
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
|
||||||
|
this.loadData(NextProps.data?.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onTableBtnExport() {
|
||||||
|
let TableWrap = document.getElementById('table1');
|
||||||
|
let Table = TableWrap.getElementsByTagName('table1')[0];
|
||||||
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
|
XLSX.writeFile(wb, this.props.record.Nav_Department.NAME + '.xlsx')
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickApprove = (appVisible) => {
|
||||||
|
const newtmpData = {
|
||||||
|
data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'none' },
|
||||||
|
formCode: 'PF123',
|
||||||
|
}
|
||||||
|
this.setState({
|
||||||
|
tmpData: newtmpData,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
loadData = (id) => {
|
||||||
|
var isCheck = (this.props.data.tableKey != undefined && this.props.data.tableKey == '1') ? true : false
|
||||||
|
var orgId = this.props.login ? this.props.login.OrgId : '';
|
||||||
|
let json = initFilter(orgId);
|
||||||
|
extendRule(json, 'ID', 1, id);
|
||||||
|
extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_RiskArea')
|
||||||
|
extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_DepartmentDeal')
|
||||||
|
extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_UserDeal')
|
||||||
|
extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_UserCheck')
|
||||||
|
extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_UserActualDeal')
|
||||||
|
this.props.dispatch({
|
||||||
|
type: 'app/getDataByPost',
|
||||||
|
payload: json,
|
||||||
|
url: 'BS/BSRiskSubmitNoticePerson/GetNoticePeson',
|
||||||
|
onComplete: (ret) => {
|
||||||
|
if (ret) {
|
||||||
|
this.setState({
|
||||||
|
data: ret,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
render() {
|
||||||
|
const { data } = this.state;
|
||||||
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
|
return <div>
|
||||||
|
<div style={{ padding: '10px' }}>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon='export'>审批详情</Button></td>
|
||||||
|
<td><ReactToPrint trigger={() => <Button type={'default'} icon={'printer'} >打印</Button>} content={() => this.componentRef} /></td>
|
||||||
|
<td><ExportToExcel fileName='隐患通知' tableId={'tableId' + this.props.data.id} /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<FormPage {...this.state.tmpData} />
|
||||||
|
<div ref={el => (this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>
|
||||||
|
<h1 className={styles.showPrintHead}>隐患通知</h1>
|
||||||
|
{
|
||||||
|
data ? <div style={{ width: '95%' }}>
|
||||||
|
<Descriptions title='' size='middle' bordered>
|
||||||
|
<Descriptions.Item label="编码">{data.CODE}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="隐患通知名称">{data.NAME}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="隐患等级">{enums.BSQuestionLevelEnum.enums[data.QUESTION_LEVEL]}</Descriptions.Item>
|
||||||
|
</Descriptions>
|
||||||
|
</div> : null
|
||||||
|
}
|
||||||
|
{
|
||||||
|
(data?.Nav_ListRiskSubmitContent && data?.Nav_ListRiskSubmitContent.length > 0) ?
|
||||||
|
<table className={styles.PrintFormLight}>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colSpan={9} className={styles.showPrintHead2}>隐患上报明细</td>
|
||||||
|
</tr>
|
||||||
|
<tr className={styles.PrintFormLightTh}>
|
||||||
|
<td>检查问题</td>
|
||||||
|
<td>整改建议与措施</td>
|
||||||
|
<td>检查区域</td>
|
||||||
|
<td>隐患地点</td>
|
||||||
|
<td>整改期限</td>
|
||||||
|
<td>整改实施单位</td>
|
||||||
|
<td>整改责任人</td>
|
||||||
|
<td>验收人</td>
|
||||||
|
<td>整改落实人</td>
|
||||||
|
</tr>
|
||||||
|
{data?.Nav_ListRiskSubmitContent?.map((item, i) => {
|
||||||
|
return <tr>
|
||||||
|
<td>{item.DESCREPTION} </td>
|
||||||
|
<td>{item.DEMAND} </td>
|
||||||
|
<td>{item.Nav_RiskArea.NAME} </td>
|
||||||
|
<td>{item.ADDRESS} </td>
|
||||||
|
<td>{item.LastDateUser} </td>
|
||||||
|
<td>{item.Nav_DepartmentDeal.NAME} </td>
|
||||||
|
<td>{item.Nav_UserDeal.NAME} </td>
|
||||||
|
<td>{item.Nav_UserCheck.NAME} </td>
|
||||||
|
<td>{item.Nav_UserActualDeal.NAME} </td>
|
||||||
|
</tr>
|
||||||
|
})}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default connect(({ login, app }) => ({ login, app }))(BS074ShowPrint)
|
||||||
@ -8,7 +8,6 @@ export default {
|
|||||||
params.record.SUBMIT_STATUS = params.customParams;
|
params.record.SUBMIT_STATUS = params.customParams;
|
||||||
},
|
},
|
||||||
onBeforeEdit: ({ isNew, setFieldValue, stateData, data, setFieldEditable, getFieldValue, dispatch, ListCheckRiskArea, setFieldValueByBatch, setFieldVisible }) => {
|
onBeforeEdit: ({ isNew, setFieldValue, stateData, data, setFieldEditable, getFieldValue, dispatch, ListCheckRiskArea, setFieldValueByBatch, setFieldVisible }) => {
|
||||||
debugger
|
|
||||||
// BS006.js
|
// BS006.js
|
||||||
if (stateData.SUBMIT_TYPE == undefined || stateData.SUBMIT_TYPE == 10 || (stateData.Nav_ListRiskSubmitContent.length > 0 && stateData.Nav_ListRiskSubmitContent[0].CHECK_PROJECT_ID != null)) {
|
if (stateData.SUBMIT_TYPE == undefined || stateData.SUBMIT_TYPE == 10 || (stateData.Nav_ListRiskSubmitContent.length > 0 && stateData.Nav_ListRiskSubmitContent[0].CHECK_PROJECT_ID != null)) {
|
||||||
//检查上报 隐藏 属性: 检查类型 检查层级 子表:检查项目 检查项目分类
|
//检查上报 隐藏 属性: 检查类型 检查层级 子表:检查项目 检查项目分类
|
||||||
|
|||||||
@ -308,7 +308,7 @@ export default {
|
|||||||
stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = null
|
stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = null
|
||||||
stateData.Nav_ListSafeCheckDetail[i].CHECK_MAIN_ID = null
|
stateData.Nav_ListSafeCheckDetail[i].CHECK_MAIN_ID = null
|
||||||
stateData.Nav_ListSafeCheckDetail[i].DEMANDS = ''
|
stateData.Nav_ListSafeCheckDetail[i].DEMANDS = ''
|
||||||
message.error("请选择检查问题描述!")
|
// message.error("请选择检查问题描述!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/files/edit/BS072.js
Normal file
10
src/files/edit/BS072.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { message } from 'antd'
|
||||||
|
import moment from 'moment';
|
||||||
|
import styles from '../../components/CustomPages/HI/StepForm.css';
|
||||||
|
import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, getSubTableData, auditOptionShow2 } from "../../utils/common";
|
||||||
|
export default {
|
||||||
|
onBeforeSaveHandleRecord(params) {
|
||||||
|
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||||
|
params.record.RiskContentState = params.customParams;//实际并不是这个值
|
||||||
|
},
|
||||||
|
}
|
||||||
10
src/files/edit/BS073.js
Normal file
10
src/files/edit/BS073.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { message } from 'antd'
|
||||||
|
import moment from 'moment';
|
||||||
|
import styles from '../../components/CustomPages/HI/StepForm.css';
|
||||||
|
import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, getSubTableData, auditOptionShow2 } from "../../utils/common";
|
||||||
|
export default {
|
||||||
|
onBeforeSaveHandleRecord(params) {
|
||||||
|
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||||
|
params.record.SUBMIT_STATUS = params.customParams;
|
||||||
|
}
|
||||||
|
}
|
||||||
10
src/files/edit/BS074.js
Normal file
10
src/files/edit/BS074.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { message } from 'antd'
|
||||||
|
import moment from 'moment';
|
||||||
|
import styles from '../../components/CustomPages/HI/StepForm.css';
|
||||||
|
import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, getSubTableData, auditOptionShow2 } from "../../utils/common";
|
||||||
|
export default {
|
||||||
|
onBeforeSaveHandleRecord(params) {
|
||||||
|
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||||
|
params.record.OPERATETYPE = params.customParams;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1704,6 +1704,9 @@ export default function (componentName, formId, formParam, data, formCode, formD
|
|||||||
BS064ShowPrint: <BS064ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
BS064ShowPrint: <BS064ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
BS069ShowPrint: <BS069ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
BS069ShowPrint: <BS069ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
BS070ShowPrint: <BS070ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
BS070ShowPrint: <BS070ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
BS072ShowPrint: <BS072ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
BS074ShowPrint: <BS074ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
BS073ShowPrint: <BS073ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
|
||||||
PreMeetingTask: <PreMeetingTask formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
PreMeetingTask: <PreMeetingTask formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
PreOperSchTask: <PreOperSchTask formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
PreOperSchTask: <PreOperSchTask formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
|||||||
@ -262,6 +262,9 @@ export default function (componentName, formId, formParam, data, formCode, formD
|
|||||||
BS032ShowPrint: <BS032ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
BS032ShowPrint: <BS032ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
BS064ShowPrint: <BS064ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
BS064ShowPrint: <BS064ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
BS070ShowPrint: <BS070ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
BS070ShowPrint: <BS070ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
BS073ShowPrint: <BS073ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
BS072ShowPrint: <BS072ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
BS074ShowPrint: <BS074ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
|
||||||
|
|
||||||
PFCommonApprove: <PFCommonApprove formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
PFCommonApprove: <PFCommonApprove formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user