From cc837d08eb70b57e01cdfd693ea78f590b1243e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Thu, 1 Feb 2024 17:20:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A5=E7=A6=BB=E6=A8=A1=E5=9D=97=E7=95=8C?= =?UTF-8?q?=E9=9D=A2PE,PT,PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomPages/PE/PE005ShowPrint.js | 191 ------- .../CustomPages/PE/PE007ShowPrint.js | 215 -------- .../CustomPages/PE/PE009ShowPrint.js | 224 -------- .../CustomPages/PE/PE019ShowPrint.js | 191 ------- .../CustomPages/PE/PE021ShowPrint.js | 223 -------- .../CustomPages/PE/PE022ShowPrint.js | 217 -------- .../CustomPages/PE/PE027ShowPrint.js | 184 ------- .../CustomPages/PE/PE029ShowPrint.js | 252 --------- .../CustomPages/PE/PE029ShowPrintNew.js | 418 --------------- .../CustomPages/PE/PE030ShowPrint.js | 383 -------------- .../CustomPages/PR/PR003ShowPrint.js | 154 ------ .../CustomPages/PR/PR007ShowPrint.js | 148 ------ .../CustomPages/PR/PR009ShowPrint.js | 147 ------ .../CustomPages/PR/PR011ShowPrint.js | 160 ------ .../CustomPages/PR/PR013ShowPrint.js | 151 ------ .../CustomPages/PR/PR015ShowPrint.js | 195 ------- .../CustomPages/PR/PR019ShowPrint.js | 165 ------ .../CustomPages/PR/PR023ShowPrint.js | 186 ------- .../CustomPages/PR/PR026ShowPrint.js | 178 ------- .../CustomPages/PR/PR028ShowPrint.js | 177 ------- .../CustomPages/PR/PR046ShowPrint.js | 224 -------- .../CustomPages/PR/PR048ShowPrint.js | 301 ----------- .../CustomPages/PR/PR050ShowPrint.js | 206 -------- .../CustomPages/PR/PR052ShowPrint.js | 168 ------ .../CustomPages/PR/PR056ShowPrint.js | 182 ------- .../CustomPages/PR/PR058ShowPrint.js | 269 ---------- .../CustomPages/PR/PR060ShowPrint.js | 298 ----------- .../CustomPages/PR/PR062ShowPrint.js | 329 ------------ .../CustomPages/PR/PR064ShowPrint.js | 277 ---------- .../CustomPages/PR/PR066ShowPrint.js | 154 ------ .../CustomPages/PR/PR068ShowPrint.js | 154 ------ .../CustomPages/PT/PT013ShowPrint.js | 155 ------ .../CustomPages/PT/PT014ShowPrint.js | 259 ---------- .../CustomPages/PT/PT014ShowPrintOld.js | 480 ------------------ .../CustomPages/PT/PT017ShowPrint.js | 215 -------- .../CustomPages/PT/PT020ShowPrint.js | 230 --------- .../CustomPages/PT/PT024ShowPrint.js | 224 -------- src/components/CustomPages/PT/PT027Import.js | 205 -------- .../CustomPages/PT/PT029ShowPrint.js | 427 ---------------- .../CustomPages/PT/PT036ShowPrint.js | 292 ----------- .../CustomPages/PT/PT040ShowPrint.js | 220 -------- src/utils/customConfig.js | 207 -------- 42 files changed, 9635 deletions(-) delete mode 100644 src/components/CustomPages/PE/PE005ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE007ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE009ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE019ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE021ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE022ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE027ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE029ShowPrint.js delete mode 100644 src/components/CustomPages/PE/PE029ShowPrintNew.js delete mode 100644 src/components/CustomPages/PE/PE030ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR003ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR007ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR009ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR011ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR013ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR015ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR019ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR023ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR026ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR028ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR046ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR048ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR050ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR052ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR056ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR058ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR060ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR062ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR064ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR066ShowPrint.js delete mode 100644 src/components/CustomPages/PR/PR068ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT013ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT014ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT014ShowPrintOld.js delete mode 100644 src/components/CustomPages/PT/PT017ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT020ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT024ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT027Import.js delete mode 100644 src/components/CustomPages/PT/PT029ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT036ShowPrint.js delete mode 100644 src/components/CustomPages/PT/PT040ShowPrint.js diff --git a/src/components/CustomPages/PE/PE005ShowPrint.js b/src/components/CustomPages/PE/PE005ShowPrint.js deleted file mode 100644 index db7121b..0000000 --- a/src/components/CustomPages/PE/PE005ShowPrint.js +++ /dev/null @@ -1,191 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE005ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PECorrectivePreventive/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

纠正与预防措施通知单

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
:null - } - { - data ? - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - }) - } -
序号生产单元模块名称纠正内容不符合性质整改期限责任部门评估人员
- {i+1} - - { - item.Nav_ProductionUnit?.NAME - } - - { - item.Nav_StandardName?.NAME - } - - {item.CONTENTS} - - {enums.PEConformityPropertyEnum.enums[item?.CONFORM_PROPERTY]} - - {moment(item.RECTIFICATION_TIME).format('YYYY-MM-DD')} - - { - item.Nav_Department?.NAME - } - - { - item.Nav_User?.NAME - } -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE005ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE007ShowPrint.js b/src/components/CustomPages/PE/PE007ShowPrint.js deleted file mode 100644 index 3af034f..0000000 --- a/src/components/CustomPages/PE/PE007ShowPrint.js +++ /dev/null @@ -1,215 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE007ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventiveProcess/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PECorrectivePreventiveProcess/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

纠正与预防措施处理单

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
:null - } - { - data ? - - - - - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - - - - }) - } -
序号生产单元模块名称需纠正内容整改期限原因分析纠正与预防措施落实情况未落实说明落实人员纠正时间附件
- {i+1} - - { - item.Nav_ProductionUnit?.NAME - } - - { - item.Nav_StandardName?.NAME - } - - {item.CONTENTS} - - {moment(item.RECTIFICATION_TIME).format('YYYY-MM-DD')} - - { - item.REASON - } - - { - item.CORRECTIVE_PREVENTIVE - } - - {enums.PESituationEnum.enums[item?.SITUATION]} - - { - item.NOT_CARRY_OUT - } - - { - item.Nav_User?.NAME - } - - {item.CORRECT_TIME?moment(item.CORRECT_TIME).format('YYYY-MM-DD'):null} - - { - item.Nav_Files && item.Nav_Files.map((t, i) => { - return {t.Nav_ImgFile.FILE_NAME}

- }) - } -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE007ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE009ShowPrint.js b/src/components/CustomPages/PE/PE009ShowPrint.js deleted file mode 100644 index 3a73a7d..0000000 --- a/src/components/CustomPages/PE/PE009ShowPrint.js +++ /dev/null @@ -1,224 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE009ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventiveProcess/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PECorrectivePreventiveEvaluation/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

纠正与预防措施评估表

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
:null - } - { - data ? - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - }) - } -
序号需纠正内容纠正与预防措施落实情况未落实说明评估结果附件
- {i+1} - - {item.CONTENTS} - - { - item.CORRECTIVE_PREVENTIVE - } - - {enums.PESituationEnum.enums[item?.SITUATION]} - - { - item.NOT_CARRY_OUT - } - - {enums.PEEvaluateResultEnum.enums[item?.EVALUATE_RESULT]} - - { - item.Nav_Files && item.Nav_Files.map((t, i) => { - return {t.Nav_ImgFile.FILE_NAME}

- }) - } -
:null - } - { - data ? -
- - { - data.Nav_MeasureConsider && data.Nav_MeasureConsider.map((item, i) => { - if (i == (data.Nav_MeasureConsider.length - 1)) { - return item.Nav_Consider.NAME - } else { - return item.Nav_Consider.NAME + ',' - } - }) - } - {data.COMMENTS} - -
:null - } - { - data ? -
- - -
{ - data.Nav_Details && data.Nav_Details.map((item, i) => { - if (item.DEAL_STATUS == 1) { - if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null) - return {item.Nav_User?.NAME} - else - return - } - }) - }
-
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE009ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE019ShowPrint.js b/src/components/CustomPages/PE/PE019ShowPrint.js deleted file mode 100644 index 4703af8..0000000 --- a/src/components/CustomPages/PE/PE019ShowPrint.js +++ /dev/null @@ -1,191 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE019ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PESafetyMonitorPlan/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyMonitorPlan/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

年度安全绩效监测计划

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.YEAR} - {data.MONITOR_PROGRAM} - {data.MONITOR_RANGE} - {data.RESOURCES} - -
:null - } - { - data ? - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - }) - } -
序号监测项目监测内容监测标准监测频率监测方法与技术监测部门负责人员
- {i+1} - - {item.Nav_Project?.NAME} - - {item.CONTENTS} - - { - item.STANDARD - } - - {enums.PTAssessmentCycleEnums.enums[item?.ASSESSMENT_CYCLE]} - - { - item.METHOD - } - - {item.Nav_Department?.NAME} - - {item.Nav_User?.NAME} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE019ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE021ShowPrint.js b/src/components/CustomPages/PE/PE021ShowPrint.js deleted file mode 100644 index f8e2380..0000000 --- a/src/components/CustomPages/PE/PE021ShowPrint.js +++ /dev/null @@ -1,223 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE021ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PESafetyMonitorRecord/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyMonitorRecord/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

安全绩效监测记录表

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - { - data.Nav_MonitorUser && data.Nav_MonitorUser.map((item, i) => { - if (i == (data.Nav_MonitorUser.length - 1)) { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME - } else { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME + ',' - } - }) - } - -
:null - } - { - data ? - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - }) - } -
序号监测项目监测内容监测标准监测方法与技术监测实况结果论述附件
- {i+1} - - {item.Nav_Project?.NAME} - - {item.CONTENTS} - - { - item.STANDARD - } - - { - item.METHOD - } - - {item.MONITOR_LIVE} - - {enums.PTResultDiscussEnums.enums[item?.RESULT_DISCUSS]} - - { - item.Nav_Files && item.Nav_Files.map((t, i) => { - return {t.Nav_ImgFile.FILE_NAME}

- }) - } -
:null - } - { - data ? -
- - { - data.Nav_MonitorUser && data.Nav_MonitorUser.map((item, i) => { - if (item.DEAL_STATUS == 1) { - if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null) - return {item.Nav_User.NAME} - else - return - } - }) - } - -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE021ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE022ShowPrint.js b/src/components/CustomPages/PE/PE022ShowPrint.js deleted file mode 100644 index afd1710..0000000 --- a/src/components/CustomPages/PE/PE022ShowPrint.js +++ /dev/null @@ -1,217 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE022ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PESafetyMonitorPlan/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyMonitorPlan/GetRecordEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

年度安全绩效监测记录

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.YEAR} - {data.MONITOR_PROGRAM} - {data.MONITOR_RANGE} - {data.RESOURCES} - -
:null - } - { - data ? - - - - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - - - }) - } -
序号监测项目监测内容监测标准监测频率监测方法与技术监测部门负责人员监测实况结果论述监测人员
- {i+1} - - {item.Nav_Project?.NAME} - - {item.CONTENTS} - - { - item.STANDARD - } - - {enums.PTAssessmentCycleEnums.enums[item?.ASSESSMENT_CYCLE]} - - { - item.METHOD - } - - {item.Nav_Department?.NAME} - - {item.Nav_User?.NAME} - - {item.MONITOR_LIVE} - - {enums.PTResultDiscussEnums.enums[item?.RESULT_DISCUSS]} - - { - item.Nav_MonitorUser && item.Nav_MonitorUser.map((item2, i) => { - if (i == (item.Nav_MonitorUser.length - 1)) { - if (item2.DEAL_STATUS == 0) - return - else - return item2.Nav_User.NAME - } else { - if (item2.DEAL_STATUS == 0) - return - else - return item2.Nav_User.NAME + ' ' - } - }) - } -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE022ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE027ShowPrint.js b/src/components/CustomPages/PE/PE027ShowPrint.js deleted file mode 100644 index e57b5af..0000000 --- a/src/components/CustomPages/PE/PE027ShowPrint.js +++ /dev/null @@ -1,184 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE027ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PESafetyMonitorRecord/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyEvaluationPlan/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

安全标准化内部评价计划录入表

- { - data ? -
- - {data.YEAR} - {data?.Nav_ProductionUnit?.NAME} - {/* {enums.PTProductionUnitEnum.enums[data?.PRODUCTION_UNIT]} */} - {moment(data.START_TIME).format('YYYY-MM-DD')} - {moment(data.END_TIME).format('YYYY-MM-DD')} - -
:null - } - { - data ? - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - }) - } - - - - }) - } -
序号评价要素评价人员评价方法评价技术
- {i+1} - - {item.Nav_StandardName?.NAME} - - { - item.Nav_EvaluationUser && item.Nav_EvaluationUser.map((item2, i) => { - return - }) - } - - { - item.Nav_EvaluationMethod && item.Nav_EvaluationMethod.map((item2, i) => { - return
- { - item.EVALUATION_TECHNOLOGY - } -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE027ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE029ShowPrint.js b/src/components/CustomPages/PE/PE029ShowPrint.js deleted file mode 100644 index d178688..0000000 --- a/src/components/CustomPages/PE/PE029ShowPrint.js +++ /dev/null @@ -1,252 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE029ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PESafetyEvaluationRecord/IdentityUpdateNew', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyEvaluationRecord/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

安全标准化内部评价记录表

- { - data ? -
- - {moment(data.Nav_EvaluationPlan?.START_TIME).format('YYYY-MM-DD')} - {moment(data.Nav_EvaluationPlan?.END_TIME).format('YYYY-MM-DD')} - { - data.Nav_IngoreUser && data.Nav_IngoreUser.map((item, i) => { - if (i == (data.Nav_IngoreUser.length - 1)) { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME - } else { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME + ',' - } - }) - } - -
:null - } - { - data ? - - - - - - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - - - - }) - } - - - }) - } -
序号生产单元一级类目二级类目三级类目考评项目考评内容评分办法标准分实得分评价结论不符合说明评价方法
- {i+1} - - {item.Nav_ProductionUnit?.NAME} - - {item.Nav_Primary?.NAME} - - {item.Nav_Second?.NAME} - - {item.Nav_Three?.NAME} - - {enums.PEEvaluationItemEnum.enums[item?.EVALUATION_ITEM]} - - { - item.CONTENTS - } - - {item.DESCRIPTION} - - { - item.STANDARDIZED_SCORE - } - - {item.RESULT_SCORE} - - {enums.PEEvaluationResultEnum.enums[item?.EVALUATION_RESULT]} - - {item.NON_CONFORMANCE} - - { - item.Nav_EvaluationMethod && item.Nav_EvaluationMethod.map((item2, i) => { - return
:null - } - { - data && data.STAND_TOTAL && data.RESULT_TOTAL ? -
- - {data.STAND_TOTAL} - {data.RESULT_TOTAL} - {data.STAND_TOTAL===0?0:(data.RESULT_TOTAL/data.STAND_TOTAL*100).toFixed(2)} - -
:null - } - { - data ? -
- - { - data.Nav_IngoreUser && data.Nav_IngoreUser.map((item, i) => { - if (item.DEAL_STATUS == 1) { - if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null) - return {item.Nav_User.NAME} - else - return - } - }) - } - -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE029ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE029ShowPrintNew.js b/src/components/CustomPages/PE/PE029ShowPrintNew.js deleted file mode 100644 index 0863081..0000000 --- a/src/components/CustomPages/PE/PE029ShowPrintNew.js +++ /dev/null @@ -1,418 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' - -class PE029ShowPrintNew extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - searchTodayVisible: false, //弹窗显示 - tmpData: [], - searchColumns :[ - { - title: '序号', - dataIndex: 'ROW_NO', - key: 'ROW_NO', - }, - { - title: '生产单元', - dataIndex: 'Nav_ProductionUnit.NAME', - key: 'Nav_ProductionUnit.NAME', - }, - { - title: '一级类目', - dataIndex: 'Nav_Primary.NAME', - key: 'Nav_Primary.NAME' - }, - { - title: '二级类目', - dataIndex: 'Nav_Second.NAME', - key: 'Nav_Second.NAME' - }, - { - title: '三级类目', - dataIndex: 'Nav_Three.NAME', - key: 'Nav_Three.NAME', - }, - { - title: '考评项目', - dataIndex: 'EVALUATION_ITEM', - key: 'EVALUATION_ITEM', - render: (text, record) => ( - {this.props.app.enums.PEEvaluationItemEnum.enums[record?.EVALUATION_ITEM]} - ) - }, - { - width: "350px", - title: '考评内容', - dataIndex: 'CONTENTS', - key: 'CONTENTS', - }, - { - title: '扣分分值', - dataIndex: 'NON_STANDARDIZED_SCORE', - key: 'NON_STANDARDIZED_SCORE', - }, - { - title: '不符合说明', - dataIndex: 'NON_CONFORMANCE', - key: 'NON_CONFORMANCE', - }, - // { - // title: '标准分', - // dataIndex: 'STANDARDIZED_SCORE', - // key: 'STANDARDIZED_SCORE', - // }, - // { - // title: '实得分', - // dataIndex: 'RESULT_SCORE', - // key: 'RESULT_SCORE', - // }, - // { - // title: '评价结论', - // dataIndex: 'EVALUATION_RESULT', - // key: 'EVALUATION_RESULT', - // render: (text, record) => ( - // {this.props.app.enums.PEEvaluationResultEnum.enums[record?.EVALUATION_RESULT]} - // ) - // }, - { - title: '评价方法', - dataIndex: 'Nav_EvaluationMethod', - key: 'Nav_EvaluationMethod', - render: (text, record) => ( - { - record.Nav_EvaluationMethod && record.Nav_EvaluationMethod?.map((item, i) => { - return - }) - } - ) - },] - }; - }; - - componentDidMount() { - if (this.props.data?.id) - this.loadData(this.props.data?.id); - else - this.loadData(null); - } - - componentWillReceiveProps(NextProps) { - if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) { - this.loadData(NextProps.data?.id); - } - } - loadList = () => { - let that=this; - let json = initFilter(that.props.login.OrgId); - // extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyEvaluationRecord/FullGet', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PESafetyMonitorRecord/IdentityUpdateNew', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyEvaluationRecord/FullGet', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - showModal = () => { - if(this.state.data && this.state.data?.Nav_Details) - { - let temp=this.state.data?.Nav_Details?.filter(t=>t.NON_CONFORMANCE != "" && t.NON_CONFORMANCE!=null); - let tmpData = temp.map((item, i) => { - item['ROW_NO'] = i + 1; - return item; - }); - let aa={"CONTENTS":"合计扣分:","NON_STANDARDIZED_SCORE":this.state.data.NON_STANDARDIZED_SCORE} - tmpData.push(aa) - this.setState({ - searchTodayVisible: true, //弹窗显示 - tmpData:tmpData - }); - } - else - { - message.error("请先等待数据加载"); - } - } - closeModal = () => { - let newtmpData = { ...this.state.tmpData } - this.setState({ - searchTodayVisible: false, - tmpData: [],//newtmpData - }) - } - onTableBtnExport() { - // const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

安全标准化内部评价记录表

- - -
- {/* */} - - - - - { - data ? -
- - {data.Nav_EvaluationPlan?.START_TIME} - {data.Nav_EvaluationPlan?.END_TIME} - { - data.Nav_IngoreUser && data.Nav_IngoreUser.map((item, i) => { - if (i == (data.Nav_IngoreUser.length - 1)) { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME - } else { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME + ',' - } - }) - } - -
:null - } - { - data ?
- - - - - - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - - - - }) - } - - - }) - } -
序号生产单元一级类目二级类目三级类目考评项目考评内容评分办法标准分实得分评价结论不符合说明评价方法
- {i+1} - - {item.Nav_ProductionUnit?.NAME} - - {item.Nav_Primary?.NAME} - - {item.Nav_Second?.NAME} - - {item.Nav_Three?.NAME} - - {enums.PEEvaluationItemEnum.enums[item?.EVALUATION_ITEM]} - - { - item.CONTENTS - } - - {item.DESCRIPTION} - - { - item.STANDARDIZED_SCORE - } - - {item.RESULT_SCORE} - - {enums.PEEvaluationResultEnum.enums[item?.EVALUATION_RESULT]} - - { - item.NON_CONFORMANCE - } - - { - item.Nav_EvaluationMethod && item.Nav_EvaluationMethod.map((item2, i) => { - return
:null - } - { - data && data.STAND_TOTAL && data.RESULT_TOTAL ? -
- - {data.STAND_TOTAL} - {data.RESULT_TOTAL} - {data.STAND_TOTAL===0?0:(data.RESULT_TOTAL/data.STAND_TOTAL*100).toFixed(2)} - -
:null - } - { - data ? -
- - { - data.Nav_IngoreUser && data.Nav_IngoreUser.map((item, i) => { - if (item.DEAL_STATUS == 1) { - if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null) - return {item.Nav_User.NAME} - else - return - } - }) - } - -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE029ShowPrintNew) \ No newline at end of file diff --git a/src/components/CustomPages/PE/PE030ShowPrint.js b/src/components/CustomPages/PE/PE030ShowPrint.js deleted file mode 100644 index 799bc8c..0000000 --- a/src/components/CustomPages/PE/PE030ShowPrint.js +++ /dev/null @@ -1,383 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PE030ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - searchTodayVisible: false, //弹窗显示 - tmpData: [], - searchColumns :[ - { - title: '序号', - dataIndex: 'ROW_NO', - key: 'ROW_NO', - }, - { - title: '生产单元', - dataIndex: 'Nav_ProductionUnit.NAME', - key: 'Nav_ProductionUnit.NAME', - }, - { - title: '一级类目', - dataIndex: 'Nav_Primary.NAME', - key: 'Nav_Primary.NAME' - }, - { - title: '二级类目', - dataIndex: 'Nav_Second.NAME', - key: 'Nav_Second.NAME' - }, - { - title: '三级类目', - dataIndex: 'Nav_Three.NAME', - key: 'Nav_Three.NAME', - }, - { - title: '考评项目', - dataIndex: 'EVALUATION_ITEM', - key: 'EVALUATION_ITEM', - render: (text, record) => ( - {this.props.app.enums.PEEvaluationItemEnum.enums[record?.EVALUATION_ITEM]} - ) - }, - { - width: "350px", - title: '考评内容', - dataIndex: 'CONTENTS', - key: 'CONTENTS', - }, - { - title: '扣分分值', - dataIndex: 'NON_STANDARDIZED_SCORE', - key: 'NON_STANDARDIZED_SCORE', - }, - { - title: '不符合说明', - dataIndex: 'NON_CONFORMANCE', - key: 'NON_CONFORMANCE', - }, - // { - // title: '标准分', - // dataIndex: 'STANDARDIZED_SCORE', - // key: 'STANDARDIZED_SCORE', - // }, - // { - // title: '实得分', - // dataIndex: 'RESULT_SCORE', - // key: 'RESULT_SCORE', - // }, - // { - // title: '评价结论', - // dataIndex: 'EVALUATION_RESULT', - // key: 'EVALUATION_RESULT', - // render: (text, record) => ( - // {this.props.app.enums.PEEvaluationResultEnum.enums[record?.EVALUATION_RESULT]} - // ) - // }, - { - title: '评价方法', - dataIndex: 'Nav_EvaluationMethod', - key: 'Nav_EvaluationMethod', - render: (text, record) => ( - { - record.Nav_EvaluationMethod && record.Nav_EvaluationMethod?.map((item, i) => { - return - }) - } - ) - },] - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PESafetyEvaluationRecord/IdentityUpdateNew', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, null); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PE/PESafetyEvaluationRecord/FullGet', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - showModal = () => { - if(this.state.data && this.state.data?.Nav_Details) - { - let temp=this.state.data?.Nav_Details?.filter(t=>t.NON_CONFORMANCE != "" && t.NON_CONFORMANCE!=null); - let tmpData = temp.map((item, i) => { - item['ROW_NO'] = i + 1; - return item; - }); - let aa={"CONTENTS":"合计扣分:","NON_STANDARDIZED_SCORE":this.state.data.NON_STANDARDIZED_SCORE} - tmpData.push(aa) - this.setState({ - searchTodayVisible: true, //弹窗显示 - tmpData:tmpData - }); - } - else - { - message.error("请先等待数据加载"); - } - } - closeModal = () => { - let newtmpData = { ...this.state.tmpData } - this.setState({ - searchTodayVisible: false, - tmpData: [],//newtmpData - }) - } - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

安全标准化自评表

- - -
- {/* */} - - - - { - data ? -
- - {data.Nav_EvaluationPlan?.START_TIME} - {data.Nav_EvaluationPlan?.END_TIME} - { - data.Nav_IngoreUser && data.Nav_IngoreUser.map((item, i) => { - if (i == (data.Nav_IngoreUser.length - 1)) { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME - } else { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME + ',' - } - }) - } - -
:null - } - { - data ?
- - - - - - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - - - - }) - } - - - }) - } -
序号生产单元一级类目二级类目三级类目考评项目考评内容评分办法标准分实得分评价结论不符合说明评价方法
- {i+1} - - {item.Nav_ProductionUnit?.NAME} - - {item.Nav_Primary?.NAME} - - {item.Nav_Second?.NAME} - - {item.Nav_Three?.NAME} - - {enums.PEEvaluationItemEnum.enums[item?.EVALUATION_ITEM]} - - { - item.CONTENTS - } - - {item.DESCRIPTION} - - { - item.STANDARDIZED_SCORE - } - - {item.RESULT_SCORE} - - {enums.PEEvaluationResultEnum.enums[item?.EVALUATION_RESULT]} - - { - item.NON_CONFORMANCE - } - - { - item.Nav_EvaluationMethod && item.Nav_EvaluationMethod.map((item2, i) => { - return
:null - } - { - data && data.STAND_TOTAL && data.RESULT_TOTAL ? -
- - {data.STAND_TOTAL} - {data.RESULT_TOTAL} - {data.STAND_TOTAL===0?0:(data.RESULT_TOTAL/data.STAND_TOTAL*100).toFixed(2)} - -
:null - } - { - data ? -
- - { - data.Nav_IngoreUser && data.Nav_IngoreUser.map((item, i) => { - if (item.DEAL_STATUS == 1) { - if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null) - return {item.Nav_User.NAME} - else - return - } - }) - } - -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PE030ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR003ShowPrint.js b/src/components/CustomPages/PR/PR003ShowPrint.js deleted file mode 100644 index 7019b89..0000000 --- a/src/components/CustomPages/PR/PR003ShowPrint.js +++ /dev/null @@ -1,154 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR003ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/PRDesignDocumentReview/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

内部设计文件审核表

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.NAME} - {data.POTENTIAL_RISK} - {enums.PRDesignLevelEnum.enums[data.DESIGN_LEVEL]} - -
{ - data.Nav_Requirements && data.Nav_Requirements.map((item, i) => { - return - }) - }
- -
{ - data.Nav_Files && data.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - }
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR003ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR007ShowPrint.js b/src/components/CustomPages/PR/PR007ShowPrint.js deleted file mode 100644 index ddfcdd9..0000000 --- a/src/components/CustomPages/PR/PR007ShowPrint.js +++ /dev/null @@ -1,148 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR007ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_User'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/LandslideRollstoneMonitor/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

滑坡滚石监控处理记录表

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_User ? data.Nav_User.NAME : ''} - {enums.PRMonitorStatusEnum.enums[data.MONITOR_STATUS]} - {data.PLACE} - {data.DESCRIPTION} - {enums.DisableStatusEnum.enums[data.IS_DEAL]} - {enums.DisableStatusEnum.enums[data.IS_HELP]} - {data.REASON} - {data.MEASURES} - {enums.DisableStatusEnum.enums[data.IS_RELIABLE]} - {data.OPINION} - -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR007ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR009ShowPrint.js b/src/components/CustomPages/PR/PR009ShowPrint.js deleted file mode 100644 index e28e947..0000000 --- a/src/components/CustomPages/PR/PR009ShowPrint.js +++ /dev/null @@ -1,147 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR009ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_User'); - extendInclude(json, 'Nav_Department'); - extendInclude(json, 'Nav_Monitor'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/ExternalAssistanceApplication/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

滑坡滚石处理外部协助申请表

- { - data ? -
- - {moment(data.CREATE_TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.REASON} - {data.DESCRIPTION} - {data.UNIT} - {data.NAME} - {data.PHONE} - -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR009ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR011ShowPrint.js b/src/components/CustomPages/PR/PR011ShowPrint.js deleted file mode 100644 index ffb9124..0000000 --- a/src/components/CustomPages/PR/PR011ShowPrint.js +++ /dev/null @@ -1,160 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR011ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Acceptances'); - extendInclude(json, 'Nav_Acceptances.Nav_ImgFile'); - extendInclude(json, 'Nav_Acceptances.Nav_ImgFile.Nav_File'); - extendInclude(json, 'Nav_Files'); - extendInclude(json, 'Nav_Files.Nav_ImgFile'); - extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/ExternalAcceptanceRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

滑坡滚石处理外部验收记录表

- { - data ? -
- - {moment(data.START_TIME).format('YYYY-MM-DD')} - {moment(data.END_TIME).format('YYYY-MM-DD')} - {data.UNIT} - {data.DESCRIPTION} - {data.RECTIFICATION_RECORD} - {enums.DisableStatusEnum.enums[data.IS_RELIABLE]} - -
{ - data.Nav_Acceptances && data.Nav_Acceptances.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - }
- -
{ - data.Nav_Files && data.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - }
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR011ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR013ShowPrint.js b/src/components/CustomPages/PR/PR013ShowPrint.js deleted file mode 100644 index a6fc472..0000000 --- a/src/components/CustomPages/PR/PR013ShowPrint.js +++ /dev/null @@ -1,151 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR013ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Department'); - extendInclude(json, 'Nav_User'); - extendInclude(json, 'Nav_Files'); - extendInclude(json, 'Nav_Files.Nav_ImgFile'); - extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/MapProcessRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

测绘处理记录

- { - data ? -
- - {moment(data.TIME).format('YYYY-MM-DD')} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.DESCRIPTION} - -
{ - data.Nav_Files && data.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - }
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR013ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR015ShowPrint.js b/src/components/CustomPages/PR/PR015ShowPrint.js deleted file mode 100644 index afa1e86..0000000 --- a/src/components/CustomPages/PR/PR015ShowPrint.js +++ /dev/null @@ -1,195 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR015ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Users'); - extendInclude(json, 'Nav_Users.Nav_User'); - extendInclude(json, 'Nav_Details'); - extendInclude(json, 'Nav_Files'); - extendInclude(json, 'Nav_Files.Nav_ImgFile'); - extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/SurveyRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

测量记录表

- { - data ? -
- - {moment(data.TIME).format('YYYY-MM-DD')} - {data.PLACE} - -
{ - data.Nav_Users && data.Nav_Users.map((item, i) => { - return - }) - }
-
-
:null - } - { - data ? - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - }) - } -
序号测量类型测量参数设计/规范值测量/计算值
- {i+1} - - {item.TYPE} - - {item.PARAMETER} - - {item.VALUE} - - {item.ACTUAL_VALUE} -
:null - } - { - data ? -
- - -
{ - data.Nav_Files && data.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - }
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR015ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR019ShowPrint.js b/src/components/CustomPages/PR/PR019ShowPrint.js deleted file mode 100644 index 6c3e283..0000000 --- a/src/components/CustomPages/PR/PR019ShowPrint.js +++ /dev/null @@ -1,165 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR019ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_OperationStep'); - extendInclude(json, 'Nav_User'); - extendInclude(json, 'Nav_Users.Nav_User'); - extendInclude(json, 'Nav_Files'); - extendInclude(json, 'Nav_Files.Nav_ImgFile'); - extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/ProductionOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

生产运行记录表

- { - data ? -
- - {data.Nav_OperationStep ? data.Nav_OperationStep.NAME : ''} - {moment(data.TIME).format('YYYY-MM-DD')} - {data.PLACE} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
{ - data.Nav_Users && data.Nav_Users.map((item, i) => { - if (i == (data.Nav_Users.length - 1)) { - return item.Nav_User?.NAME - } - else - { - return item.Nav_User?.NAME + ' ' - } - }) - }
- {data.DESCRIPTION} - -
{ - data.Nav_Files && data.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - }
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR019ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR023ShowPrint.js b/src/components/CustomPages/PR/PR023ShowPrint.js deleted file mode 100644 index 79b0ea7..0000000 --- a/src/components/CustomPages/PR/PR023ShowPrint.js +++ /dev/null @@ -1,186 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR023ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Department'); - extendInclude(json, 'Nav_User'); - extendInclude(json, 'Nav_Types'); - extendInclude(json, 'Nav_Types.Nav_Type'); - extendInclude(json, 'Nav_Tasks'); - extendInclude(json, 'Nav_Tasks.Nav_Task'); - extendInclude(json, 'Nav_Tasks.Nav_User'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/ChangeIdentifyEvaluation/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

变化识别评估表

- { - data ? -
- - {data.CODE} - {moment(data.TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
{ - data.Nav_Types && data.Nav_Types.map((item, i) => { - if (i == (data.Nav_Types.length - 1)) { - return item.Nav_Type?.NAME - } - else - { - return item.Nav_Type?.NAME + ' ' - } - }) - }
- {data.DESCRIPTION} - {data.RISK} - -
-
:null - } - { - data ? - - - - - - { - data.Nav_Tasks && data.Nav_Tasks.map((item,i)=>{ - return - - - - - }) - } -
序号变化后执行任务落实人员
- {i+1} - - {item.Nav_Task.NAME} - - {item.Nav_User.NAME} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR023ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR026ShowPrint.js b/src/components/CustomPages/PR/PR026ShowPrint.js deleted file mode 100644 index 2970c5a..0000000 --- a/src/components/CustomPages/PR/PR026ShowPrint.js +++ /dev/null @@ -1,178 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR026ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/PRChangeTaskImplement/GetUserEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

变化管理任务落实表

- { - data ? -
- - {data.CODE} - {moment(data.TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
{ - data.Nav_Types && data.Nav_Types.map((item, i) => { - if (i == (data.Nav_Types.length - 1)) { - return item.Nav_Type?.NAME - } - else - { - return item.Nav_Type?.NAME + ' ' - } - }) - }
- {data.DESCRIPTION} - -
{ - data.Nav_Task?.NAME - }
- {enums.PRPerformStatusEnum.enums[data.PERFORM_STATUS]} - -
{ - data.Nav_Users && data.Nav_Users.map((item, i) => { - if (i == (data.Nav_Users.length - 1)) { - return item.Nav_User?.NAME - } - else - { - return item.Nav_User?.NAME + ' ' - } - }) - }
- {data.PERFORM_DESCRIPTION} - {data.REASON} - -
{ - data.Nav_Files && data.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - }
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR026ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR028ShowPrint.js b/src/components/CustomPages/PR/PR028ShowPrint.js deleted file mode 100644 index 22512fd..0000000 --- a/src/components/CustomPages/PR/PR028ShowPrint.js +++ /dev/null @@ -1,177 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR028ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/PRChangeAcceptance/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

变化管理验收表

- { - data ? -
- - {data.CODE} - {moment(data.TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
{ - data.Nav_Types && data.Nav_Types.map((item, i) => { - if (i == (data.Nav_Types.length - 1)) { - return item.Nav_Type?.NAME - } - else - { - return item.Nav_Type?.NAME + ' ' - } - }) - }
- {data.DESCRIPTION} -
-
:null - } - { - data ? - - - - - - { - data.Nav_Tasks && data.Nav_Tasks.map((item,i)=>{ - return - - - - - }) - } -
序号变化后验收内容验收意见
- {i+1} - - {item.Nav_Task.NAME} - - {enums.PRAcceptanceOpinionEnum.enums[item.ACCEPTANCE_OPINION]} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR028ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR046ShowPrint.js b/src/components/CustomPages/PR/PR046ShowPrint.js deleted file mode 100644 index e46210d..0000000 --- a/src/components/CustomPages/PR/PR046ShowPrint.js +++ /dev/null @@ -1,224 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR046ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PR/PRDrugOutboundRecord/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - // let that=this; - let json = initFilter(this.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_User'); - extendInclude(json, 'Nav_Department'); - extendInclude(json, 'Nav_Details'); - extendInclude(json, 'Nav_Details.Nav_Drug'); - extendInclude(json, 'Nav_Details.Nav_Type'); - extendInclude(json, 'Nav_Details.Nav_Specify'); - extendInclude(json, 'Nav_Details.Nav_Place'); - extendInclude(json, 'Nav_Details.Nav_Users.Nav_User'); - extendInclude(json, 'Nav_Details.Nav_Accepts.Nav_User'); - extendIgnoreDataRule(json) - this.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/DrugOutboundRecord/Get', - onComplete: (ret) => { - if (ret) { - if(this.props.data && this.props.data.loadDataDeal) - { - this.props.data.loadDataDeal(1); - } - ret.Nav_Details.forEach(item=>{ - item.Nav_Users.sort((x, y) => (x.ROW_NO > y.ROW_NO ? 1 : -1)); - item.Nav_Accepts.sort((x, y) => (x.ROW_NO > y.ROW_NO ? 1 : -1)); - }) - this.setState({ data: ret }); - if (this.props.data.tableKey==="2" ||this.props.data.tableKey===undefined) { - this.setState({ BtnAgreeDisplay: 'none' }) - }else{ - this.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

药品(剂)出库记录表

- { - data ? -
- - {moment(data.TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - -
:null - } - { - data ? - - - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - - }) - } -
序号药品(剂)名称规格出库数量单位搬运时间搬运人员搬运部门送达地点接收人员
- {i+1} - - {item.Nav_Drug.NAME} - - {item.Nav_Specify.NAME} - - {item.QTY} - - {item.UNIT} - - {moment(item.CARRY_TIME).format('YYYY-MM-DD')} - - { - item?.Nav_Users && item?.Nav_Users?.map((item2, i) => { - if (i == (item?.Nav_Users.length - 1)) { - return item2?.Nav_User?.NAME - } - else - { - return item2?.Nav_User?.NAME + ' ' - } - }) - } - - {item.DEPARTMENT} - - {item.Nav_Place.NAME} - - { - item?.Nav_Accepts && item?.Nav_Accepts?.map((item2, i) => { - if (i == (item?.Nav_Accepts.length - 1)) { - return item2?.Nav_User?.NAME - } - else - { - return item2?.Nav_User?.NAME + ' ' - } - }) - } -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR046ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR048ShowPrint.js b/src/components/CustomPages/PR/PR048ShowPrint.js deleted file mode 100644 index 3b9517c..0000000 --- a/src/components/CustomPages/PR/PR048ShowPrint.js +++ /dev/null @@ -1,301 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR048ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PR/PRDrugCarryRecord/IdentityUpdateNew', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Confirms'); - extendInclude(json, 'Nav_Confirms.Nav_Type'); - extendInclude(json, 'Nav_Details'); - extendInclude(json, 'Nav_Details.Nav_Drug'); - extendInclude(json, 'Nav_Details.Nav_Type'); - extendInclude(json, 'Nav_Details.Nav_Specify'); - extendInclude(json, 'Nav_Details.Nav_Place'); - extendInclude(json, 'Nav_Details.Nav_Users'); - extendInclude(json, 'Nav_Details.Nav_Users.Nav_User.Nav_UserSignFiles.Nav_ImgFile.Nav_File'); - extendInclude(json, 'Nav_Details.Nav_Accepts'); - extendInclude(json, 'Nav_Details.Nav_Accepts.Nav_User.Nav_UserSignFiles.Nav_ImgFile.Nav_File'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/DrugCarryRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - ret.Nav_Details.forEach(item=>{ - item.Nav_Users.sort((x, y) => (x.ROW_NO > y.ROW_NO ? 1 : -1)); - item.Nav_Accepts.sort((x, y) => (x.ROW_NO > y.ROW_NO ? 1 : -1)); - }) - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

药品(剂)搬运记录表

- { - data ? - - - - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - - }) - } -
序号药品(剂)名称规格搬运数量单位搬运时间搬运人员搬运部门送达地点接收人员
- {i+1} - - {item.Nav_Drug.NAME} - - {item.Nav_Specify.NAME} - - {item.QTY} - - {item.UNIT} - - {moment(item.CARRY_TIME).format('YYYY-MM-DD')} - - { - item.Nav_Users && item.Nav_Users.map((item2, i) => { - if (i == (item.Nav_Users.length - 1)) { - if (item2.DEAL_STATUS == 0) - return - else - return item2.Nav_User.NAME - } else { - if (item2.DEAL_STATUS == 0) - return - else - return item2.Nav_User.NAME + ' ' - } - }) - } - - {item.DEPARTMENT} - - {item.Nav_Place.NAME} - - { - item.Nav_Accepts && item.Nav_Accepts.map((item2, i) => { - if (i == (item.Nav_Accepts.length - 1)) { - // if (item2.DEAL_STATUS == 0) - // return - // else - return item2.Nav_User?.NAME - } - else - { - // if (item2.DEAL_STATUS == 0) - // return - // else - return item2.Nav_User.NAME + ' ' - } - }) - } -
:null - } - { - data ? - - - - - - - { - data.Nav_Confirms && data.Nav_Confirms.map((item,i)=>{ - return - - - - - - }) - } -
序号药品(剂)类型搬运安全确认项目是否确认
- {i+1} - - {item.Nav_Type.NAME} - - {item.NAME} - - {item.IS_CONFIRM == true?"是":"否"} -
:null - } - - { - data ? - - - - - {/* */} - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - {/* */} - - }) - } -
序号药品(剂)名称搬运人员签名接收人员签名
- {i+1} - - {item.Nav_Drug.NAME} - - { - item.Nav_Users.map((item2, i) => { - if (item2.DEAL_STATUS === 1) { - if (item2.Nav_User !== null && item2.Nav_User.Nav_UserSignFiles[0] !== null) - return {item2.Nav_User?.NAME} - else - return - } - }) - } - - { - item.Nav_Accepts.map((item2, i) => { - if (item2.DEAL_STATUS === 1) { - if (item2.Nav_User !== null && item2.Nav_User.Nav_UserSignFiles[0] !== null) - return {item2.Nav_User?.NAME} - else - return - } - }) - } -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR048ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR050ShowPrint.js b/src/components/CustomPages/PR/PR050ShowPrint.js deleted file mode 100644 index 882d5ac..0000000 --- a/src/components/CustomPages/PR/PR050ShowPrint.js +++ /dev/null @@ -1,206 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR050ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PR/PRDrugUseRecord/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Department'); - extendInclude(json, 'Nav_Users.Nav_User.Nav_UserSignFiles.Nav_ImgFile.Nav_File'); - extendInclude(json, 'Nav_Drug'); - extendInclude(json, 'Nav_Type'); - extendInclude(json, 'Nav_Specify'); - extendInclude(json, 'Nav_Confirms'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/DrugUseRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

药品(剂)使用记录表

- { - data ? -
- - {moment(data.TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - { - data.Nav_Users && data.Nav_Users.map((item, i) => { - if (i == (data.Nav_Users.length - 1)) { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME - } else { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME + ' ' - } - }) - } - {data.Nav_Drug ? data.Nav_Drug.NAME : ''} - {data.Nav_Specify ? data.Nav_Specify.NAME : ''} - {data.QTY} - {data.UNIT} - -
:null - } - { - data ? - - - - - - { - data.Nav_Confirms && data.Nav_Confirms.map((item,i)=>{ - return - - - - - }) - } -
序号使用安全确认项目是否确认
- {i+1} - - {item.NAME} - - {item.IS_CONFIRM == true?"是":"否"} -
:null - } - { - data ? -
- - -
{ - data.Nav_Users && data.Nav_Users.map((item, i) => { - if (item.DEAL_STATUS == 1) { - if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null) - return {item.Nav_User?.NAME} - else - return - } - }) - }
-
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR050ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR052ShowPrint.js b/src/components/CustomPages/PR/PR052ShowPrint.js deleted file mode 100644 index 2a64d82..0000000 --- a/src/components/CustomPages/PR/PR052ShowPrint.js +++ /dev/null @@ -1,168 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR052ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/PRDrugUseRecordPrint/GetUserEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

药品(剂)使用记录表

- { - data ? -
- - {moment(data.TIME).format('YYYY-MM-DD')} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.Nav_Drug ? data.Nav_Drug.NAME : ''} - {data.Nav_Type ? data.Nav_Type.NAME : ''} - {data.Nav_Specify ? data.Nav_Specify.NAME : ''} - {data.QTY} - {data.UNIT} - -
:null - } - { - data ? - - - - - - { - data.Nav_Confirms && data.Nav_Confirms.map((item,i)=>{ - return - - - - - }) - } -
序号使用安全确认项目是否确认
- {i+1} - - {item.NAME} - - {item.IS_CONFIRM == true?"是":"否"} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR052ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR056ShowPrint.js b/src/components/CustomPages/PR/PR056ShowPrint.js deleted file mode 100644 index 69908f7..0000000 --- a/src/components/CustomPages/PR/PR056ShowPrint.js +++ /dev/null @@ -1,182 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR056ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Details'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/ExperimentalOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

实验运行记录表

- { - data ? -
- - {data.CODE} - {data.SAMPLE} - {data.PURPOSE} - {data.REQUIREMENTS} - {moment(data.TIME).format('YYYY-MM-DD')} - -
:null - } - { - data ? - - - - - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - - - - - }) - } -
序号产品编号产品名称重量产率品位金属量
- {i+1} - - {item.CODE} - - {item.NAME} - - {item.WEIGHT} - - {item.RATE} - - {item.GRADE} - - {item.METAL} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR056ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR058ShowPrint.js b/src/components/CustomPages/PR/PR058ShowPrint.js deleted file mode 100644 index 1e8bcef..0000000 --- a/src/components/CustomPages/PR/PR058ShowPrint.js +++ /dev/null @@ -1,269 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR058ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Pres'); - extendInclude(json, 'Nav_Dets'); - extendInclude(json, 'Nav_Ores'); - extendInclude(json, 'Nav_Sams'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/LaboratoryOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

化验运行记录

- { - data ? - - - - - - - - - - { - data.Nav_Pres && data.Nav_Pres.map((item,i)=>{ - return - - - - - - - - - }) - } -
序号系列原矿/精原%粗精/湿精%尾矿%回收率%富集比
- {i+1} - - {item.NO} - - {item.UNDRESS_ORE} - - {item.COARSE_FINE} - - {item.TAILING} - - {item.RECOVERY_RATE} - - {item.ENRICHMENT} -
:null - } - { - data ? - - - - - - - - - - { - data.Nav_Dets && data.Nav_Dets.map((item,i)=>{ - return - - - - - - - - - }) - } -
序号系列原矿/精原%粗精/湿精%尾矿%回收率%富集比
- {i+1} - - {item.NO} - - {item.UNDRESS_ORE} - - {item.COARSE_FINE} - - {item.TAILING} - - {item.RECOVERY_RATE} - - {item.ENRICHMENT} -
:null - } - { - data ? - - - - - - - { - data.Nav_Ores && data.Nav_Ores.map((item,i)=>{ - return - - - - - - }) - } -
序号PH浓度细度
- {i+1} - - {item.PH} - - {item.STRINGNESS} - - {item.FINENESS} -
:null - } - { - data ? - - - - - - - { - data.Nav_Sams && data.Nav_Sams.map((item,i)=>{ - return - - - - - - }) - } -
序号批号WO3%H2O%
- {i+1} - - {item.BATCH_NO} - - {item.WO3} - - {item.H2O} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR058ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR060ShowPrint.js b/src/components/CustomPages/PR/PR060ShowPrint.js deleted file mode 100644 index 3fed06f..0000000 --- a/src/components/CustomPages/PR/PR060ShowPrint.js +++ /dev/null @@ -1,298 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR060ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Deals'); - extendInclude(json, 'Nav_Drugs'); - extendInclude(json, 'Nav_Machs'); - extendInclude(json, 'Nav_Inves'); - extendInclude(json, 'Nav_Tungs'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/DutyOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

选矿一部值班运行记录

- { - data ? - - - - - - - { - data.Nav_Deals && data.Nav_Deals.map((item,i)=>{ - return - - - - - - }) - } -
序号系列运行时间矿量
- {i+1} - - {item.NO} - - {item.HOUR} - - {item.COUNT} -
:null - } - { - data ? - - - - - - - { - data.Nav_Drugs && data.Nav_Drugs.map((item,i)=>{ - return - - - - - - }) - } -
序号药剂名称用量单耗
- {i+1} - - {item.NO} - - {item.QTY} - - {item.ACERAGE} -
:null - } - { - data ? - - - - - - - { - data.Nav_Machs && data.Nav_Machs.map((item,i)=>{ - return - - - - - - }) - } -
序号本班压力本班放浆桶数本班加温数
- {i+1} - - {item.PRESS} - - {item.QTY} - - {item.HEAT_QTY} -
:null - } - { - data ? - - - - - - - - - { - data.Nav_Inves && data.Nav_Inves.map((item,i)=>{ - return - - - - - - - - }) - } -
序号接班库存量本班入库量本班使用量交班库存量交班时高水池水位
- {i+1} - - {item.ACCEPT_QTY} - - {item.INPUT_QTY} - - {item.USE_QTY} - - {item.SEND_QTY} - - {item.HEIGHT} -
:null - } - { - data ? - - - - - - - - - - - { - data.Nav_Tungs && data.Nav_Tungs.map((item,i)=>{ - return - - - - - - - - - - }) - } -
序号系列原矿品位%精矿品位%尾矿品位%回收率%富集比备注
- {i+1} - - {item.NO} - - {item.UNDRESS_ORE} - - {item.COARSE_FINE} - - {item.TAILING} - - {item.RECOVERY_RATE} - - {item.ENRICHMENT} - - {item.REMARK} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR060ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR062ShowPrint.js b/src/components/CustomPages/PR/PR062ShowPrint.js deleted file mode 100644 index 87b715e..0000000 --- a/src/components/CustomPages/PR/PR062ShowPrint.js +++ /dev/null @@ -1,329 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR062ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Seris'); - extendInclude(json, 'Nav_Drugs'); - extendInclude(json, 'Nav_Meas'); - extendInclude(json, 'Nav_Targs'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/TungpreOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

钨预选运行记录

- { - data ? - - - - - - - - - - - - - - - - - - - - - - - - - { - data.Nav_Seris && data.Nav_Seris.map((item,i)=>{ - return - - - - - - - - - - - - - - - - - - - - - - - - }) - } -
序号系列时间浓度细度含量纯碱标定开启度纯碱标定流量抑制剂标定开启度抑制剂标定流量皂化标定开启度皂化标定粗选流量皂化标定扫选1流量泡沫层值粗选泡沫层值扫选1泡沫层值扫选2泵频率粗选泵频率扫选1泵频率扫选2气压粗选气压扫选1气压扫选2
- {i+1} - - {item.NO} - - {item.TIME} - - {item.STRONG} - - {item.DETAIL} - - {item.RATE} - - {item.SODA_START} - - {item.SODA_TRAFFIC} - - {item.INHI_START} - - {item.INHI_TRAFFIC} - - {item.SAPO_START} - - {item.SAPO_TRAFFIC} - - {item.SAPO_SCAVENG} - - {item.BUBBLE_ROUGH} - - {item.BUBBLE_SCAVENG1} - - {item.BUBBLE_SCAVENG2} - - {item.PUMP_ROUGH} - - {item.PUMP_SCAVENG1} - - {item.PUMP_SCAVENG2} - - {item.AIRPRESS_ROUGH} - - {item.AIRPRESS_SCAVENG1} - - {item.AIRPRESS_SCAVENG2} -
:null - } - { - data ? - - - - - - - { - data.Nav_Drugs && data.Nav_Drugs.map((item,i)=>{ - return - - - - - - }) - } -
序号药剂名称用量单耗
- {i+1} - - {item.NO} - - {item.QTY} - - {item.ACERAGE} -
:null - } - { - data ? - - - - - - { - data.Nav_Meas && data.Nav_Meas.map((item,i)=>{ - return - - - - - }) - } -
序号时间温度
- {i+1} - - {item.TIME} - - {item.TEMP} -
:null - } - { - data ? - - - - - - - - - - - { - data.Nav_Targs && data.Nav_Targs.map((item,i)=>{ - return - - - - - - - - - - }) - } -
序号系列原矿品位%精矿品位%尾矿品位%理论收率%富集比备注
- {i+1} - - {item.NO} - - {item.UNDRESS_ORE} - - {item.COARSE_FINE} - - {item.TAILING} - - {item.RECOVERY_RATE} - - {item.ENRICHMENT} - - {item.REMARK} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR062ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR064ShowPrint.js b/src/components/CustomPages/PR/PR064ShowPrint.js deleted file mode 100644 index d77ed63..0000000 --- a/src/components/CustomPages/PR/PR064ShowPrint.js +++ /dev/null @@ -1,277 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR064ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Seris'); - extendInclude(json, 'Nav_Drugs'); - extendInclude(json, 'Nav_Airs'); - extendInclude(json, 'Nav_Deals'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/ControlroomOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

控制室运行记录

- { - data ? - - - - - - - - - - - - - - - - { - data.Nav_Seris && data.Nav_Seris.map((item,i)=>{ - return - - - - - - - - - - - - - - - }) - } -
序号系列时间纯碱标定开启度纯碱标定流量抑制剂标定开启度抑制剂标定流量皂化标定开启度皂化标定粗选流量皂化标定扫选1流量泡沫层值粗选泡沫层值扫选1泡沫层值扫选2
- {i+1} - - {item.NO} - - {item.TIME} - - {item.SODA_START} - - {item.SODA_TRAFFIC} - - {item.INHI_START} - - {item.INHI_TRAFFIC} - - {item.SAPO_START} - - {item.SAPO_TRAFFIC} - - {item.SAPO_SCAVENG} - - {item.BUBBLE_ROUGH} - - {item.BUBBLE_SCAVENG1} - - {item.BUBBLE_SCAVENG2} -
:null - } - { - data ? - - - - - - - { - data.Nav_Drugs && data.Nav_Drugs.map((item,i)=>{ - return - - - - - - }) - } -
序号药剂名称用量单耗
- {i+1} - - {item.NO} - - {item.QTY} - - {item.ACERAGE} -
:null - } - { - data ? - - - - - - { - data.Nav_Airs && data.Nav_Airs.map((item,i)=>{ - return - - - - - }) - } -
序号时间压力(兆帕)
- {i+1} - - {item.TIME} - - {item.PRESS} -
:null - } - { - data ? - - - - - - - { - data.Nav_Deals && data.Nav_Deals.map((item,i)=>{ - return - - - - - - }) - } -
序号系列运行时间矿量
- {i+1} - - {item.NO} - - {item.HOUR} - - {item.COUNT} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR064ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR066ShowPrint.js b/src/components/CustomPages/PR/PR066ShowPrint.js deleted file mode 100644 index b6470ed..0000000 --- a/src/components/CustomPages/PR/PR066ShowPrint.js +++ /dev/null @@ -1,154 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR066ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Details'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/SandpumpOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

尾砂泵运行记录

- { - data ? - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - }) - } -
序号事项时间及工作情况描述
- {i+1} - - {item.NAME} - - {item.DESCRIPTION} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR066ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PR/PR068ShowPrint.js b/src/components/CustomPages/PR/PR068ShowPrint.js deleted file mode 100644 index edaadab..0000000 --- a/src/components/CustomPages/PR/PR068ShowPrint.js +++ /dev/null @@ -1,154 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import stylesStep from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PR068ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PE/PECorrectivePreventive/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Details'); - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PR/ThousandpumpOperationRecord/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

万吨砂泵运行记录

- { - data ? - - - - - - { - data.Nav_Details && data.Nav_Details.map((item,i)=>{ - return - - - - - }) - } -
序号事项时间及工作情况描述
- {i+1} - - {item.NAME} - - {item.DESCRIPTION} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PR068ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT013ShowPrint.js b/src/components/CustomPages/PT/PT013ShowPrint.js deleted file mode 100644 index 24f1774..0000000 --- a/src/components/CustomPages/PT/PT013ShowPrint.js +++ /dev/null @@ -1,155 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PT013ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTIndicatorFormulationDepartment/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - // extendInclude(json, 'Nav_User') - // extendInclude(json, 'Nav_User.Nav_Person') - // extendInclude(json, 'Nav_User.Nav_Person.Nav_Post') - // extendInclude(json, 'Nav_Department') - // extendInclude(json, 'Nav_Department.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_Department') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_DetailContent') - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/PTSafetyPolicySurvey/GetCollectEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

生产方针调查表

- { - data ? -
- - {data.CREATE_TIME} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.YEAR} - {data.COMPLETE_DATE} - { - data.Nav_Collects && data.Nav_Collects.map((item, i) => { - return - }) - } - -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PT013ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT014ShowPrint.js b/src/components/CustomPages/PT/PT014ShowPrint.js deleted file mode 100644 index 064dc3e..0000000 --- a/src/components/CustomPages/PT/PT014ShowPrint.js +++ /dev/null @@ -1,259 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table,Progress } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../FormPage' -import stylesStep from '../HI/StepForm.css'; -class PT014ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - display:'none', - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - const { data } = this.props - const json = initFilter(this.props.login.OrgId) - extendRule(json, 'ID', 1, data.id) - extendRule(json, 'TASK_ID', 1, data.TaskID) - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTSafetyPolicySurvey/IdentityUpdate', - payload: json, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - // extendInclude(json, 'Nav_User') - // extendInclude(json, 'Nav_User.Nav_Person') - // extendInclude(json, 'Nav_User.Nav_Person.Nav_Post') - // extendInclude(json, 'Nav_Department') - // extendInclude(json, 'Nav_Department.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_Department') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_DetailContent') - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/PTSafetyPolicySurvey/GetCollectEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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, - }); - } - onClickCollect =(id,guidId,otherSuggestions) =>{ - const json = initFilter(this.props.login.OrgId, guidId,'',0,1,otherSuggestions) - extendRule(json, 'ID', 1, id) - // extendRule(json, 'OTHER_SUGGESTIONS', 1, otherSuggestions) - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTSafetyPolicySurvey/GetCollectEdit', - payload: json, - onComplete: (ret) => { - if (ret) { - this.setState({ - data: ret, - display:'block' - }) - } - } - }) - } - render() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

生产方针征集表

- { - data ? -
- - {data.CREATE_TIME} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.YEAR} - {data.COMPLETE_DATE} - { - data.Nav_Collects && data.Nav_Collects.map((item, i) => { - return - }) - } - {data.Nav_Guidelines?.NAME} - - {data.ALL_USER_COUNT} - {data.USER_COUNT} - {data.USER_RATE}% - -
:null - } - - {/* { - data ? - - - - - - { - data.IntentionalGuids && data.IntentionalGuids.map((item,i)=>{ - return - - - - - }) - } -
序号意向方针满意度
- {i+1} - - { - item.GUIDELINES_NAME - } - - this.onClickCollect(this.state.data.ID,item.GUIDELINES_ID,item.GUIDELINES_NAME)} /> -
:null - } */} - {/* display:this.state.display */} - - - - {/* */} - - - - - - - { - data?.Nav_Feedbacks && data.Nav_Feedbacks?.map((item,i)=>{ - return - - {/* */} - - - - - - - - }) - } -
序号意向方针填写人填写人部门填写时间是否满意其他意见
- {i+1} - - { - item.Nav_Guidelines?.NAME - } - - { - item.Nav_User?.NAME - } - - { - item.Nav_Department?.NAME - } - - { - item.CREATE_TIME - } - - { - item.IS_AGREE==1?"是":"否" - } - - { - item.OTHER_SUGGESTIONS - } -
- -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PT014ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT014ShowPrintOld.js b/src/components/CustomPages/PT/PT014ShowPrintOld.js deleted file mode 100644 index 8ef4a38..0000000 --- a/src/components/CustomPages/PT/PT014ShowPrintOld.js +++ /dev/null @@ -1,480 +0,0 @@ -import React from 'react' -import { connect } from 'dva' -import { Button, Row, Col, Form, Input, Select, Transfer, message, Upload, Icon, Modal, DatePicker,Progress } from 'antd' -import { - extend, - extendRule, - initFilter, - getOnlyPropertyData, - extendIgnoreDataRule, - extendInclude, - setDataFieldValue, - getPropertyData, - guid -} from '../../../utils/common' -import moment from 'moment' -import DropDownPagination from '../../common/DropDownPaginationEx' -import config from '../../../config' -import classNames from 'classnames' -import stylesStep from '../HI/StepForm.css'; -import styles from '../../../baseComponents/Component.css' -import storage from '../../../utils/storage' -import FormPage from '../../FormPage'; -import MultiSelectPagination from "../../common/MultiSelectPagination"; -import FoTeamActivity from '../FO/FoTeamActivity' -const Option = Select.Option -const { TextArea } = Input - -class PT014ShowPrintOld extends React.Component { - constructor(props) { - super(props) - this.state = { - data: { - // PASSWORD: 'E10ADC3949BA59ABBE56E057F20F883E', // 默认密码为123456 - }, - btns: [], - display:'none', - BtnAgreeDisplay: 'none', - } - - }; - - componentDidMount() { - this.props.form.resetFields() - this.loadData() - }; - - componentWillReceiveProps(NextProps) { - if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) { - this.props.form.resetFields() - this.loadData(NextProps.data?.id); - } - } - - loadData = () => { - const { data, formId, login} = this.props - const { id } = data || {} - - - if (id) { - let that=this; - const json = initFilter(that.props.login.OrgId) - extendRule(json, 'ID', 1, id) - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTSafetyPolicySurvey/GetCollectEdit', - payload: json, - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - that.setState({ - data: ret, - }) - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }) - } - else { - this.props.form.resetFields() - - this.setState({ - data: { - ...this.state.data, - ORG_ID: this.props.login.OrgId, - ID: guid(), - }, - }) - const { form, } = this.props - const { setFieldsValue } = form - if (this.props.login.OrgCode) { - setFieldsValue({ - CODE: (this.props.login.OrgCode), - }) - } - } - // if (formId) { - // const btnJson = initFilter(this.props.login.OrgId, '', 'NUM', 0) - // extendRule(btnJson, 'PAGE_CUSTOM_FORM_ID', 1, formId) - // this.props.dispatch({ - // type: 'FMUserEdit/getBtnList', - // payload: btnJson, - // onComplete: (ret) => { - // if (ret) { - // this.setState({ - // btns: ret, - // }) - // } - // } - // }) - // } - - - }; - - handleOk = () => { - const { form, dispatch, data } = this.props - const { validateFieldsAndScroll } = form - validateFieldsAndScroll((errors, values) => { - if (errors) return - const json = initFilter(this.props.login.OrgId) - extendRule(json, 'ID', 1, data.id) - extendRule(json, 'TASK_ID', 1, data.TaskID) - dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTSafetyPolicySurvey/IdentityUpdate', - payload: json, - onComplete: (ret) => { - if (ret) { - if (ret) { - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - message.success('执行成功') - } - } - }) - }) - }; - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - onClickCollect =(id,guidId) =>{ - const json = initFilter(this.props.login.OrgId, guidId) - extendRule(json, 'ID', 1, id) - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTSafetyPolicySurvey/GetCollectEdit', - payload: json, - onComplete: (ret) => { - if (ret) { - this.setState({ - data: ret, - display:'block' - }) - } - } - }) - } - render() { - const { form } = this.props - const { getFieldDecorator } = form - - const formItemLayout = { - labelCol: { span: 8 }, - wrapperCol: { span: 18 }, - } - const onSelectDepartment = ({ data, record }) => { - - if (data && data.length > 0) { - this.setState({ - data: { - ...this.state.data, - DEPARTMENT_ID: data[0], - Nav_Department: { NAME: record.NAME } - } - }) - } - else { - this.setState({ - data: { - ...this.state.data, - Nav_Department: { NAME: null }, - DEPARTMENT_ID: null, - } - }) - }; - } - const onSelectUser = ({ data, record }) => { - if (data && data.length > 0) { - this.setState({ - data: { - ...this.state.data, - USER_ID: data[0], - Nav_User: { NAME: record.NAME } - } - }) - } - else { - this.setState({ - data: { - ...this.state.data, - Nav_User: { NAME: null }, - USER_ID: null, - } - }) - }; - } - const onSelectCollect = (value) => { - var tmpData = { ...this.state.data } - setDataFieldValue(tmpData, 'Nav_Collects', value) - this.setState({ - data: tmpData, - }); - } - // const onSelectCollect = ({ data, record }) => { - // if (data && data.length > 0) { - // this.setState({ - // data: { - // ...this.state.data, - // COLLECT_ID: data[0], - // Nav_Collect: { NAME: record.NAME } - // } - // }) - // } - // else { - // this.setState({ - // data: { - // ...this.state.data, - // Nav_Collect: { NAME: null }, - // COLLECT_ID: null, - // } - // }) - // }; - // } - - const onChange = (field, value,) => { - const data = { ...this.state.data }; - data[field] = value; - this.setState({ - data: data, - }); - } - - return ( - -
-
-
- -
-
- - - - - - {getFieldDecorator('CREATE_TIME', { - validateTrigger: 'onBlur', - initialValue: this.state.data.CREATE_TIME, - rules: [{ message: '请输入发起时间' }], - })()} - - - - - {getFieldDecorator('YEAR', { - validateTrigger: 'onBlur', - initialValue: this.state.data.YEAR, - rules: [{ message: '请输入年度' }], - })()} - - - - - {getFieldDecorator('Nav_Department.NAME', { - validateTrigger: 'onBlur', - initialValue: this.state.data.Nav_Department?.NAME, - rules: [{ message: '请输入发起部门' }], - })()} - - - - - {getFieldDecorator('Nav_User.NAME', { - validateTrigger: 'onBlur', - initialValue: this.state.data.Nav_User?.NAME, - rules: [{ message: '请输入发起人员' }], - })()} - - - - - { onChange('COMPLETE_DATE', dateString, 0) }} - /> - - - {/* - - {getFieldDecorator('COMPLETE_DATE', { - validateTrigger: 'onBlur', - initialValue: this.state.data.COMPLETE_DATE, - rules: [{ message: '请输入征集截至时间' }], - })()} - - */} - {/* - - {getFieldDecorator('Nav_Collect.NAME', { - validateTrigger: 'onBlur', - initialValue: this.state.data.Nav_Collect?.NAME, - rules: [{ message: '请输入征集要求' }], - })()} - - */} - - - { - params.OrderType = 1 - params.OrgId = this.state.data ? this.state.data.ORG_ID : this.props.login.OrgId - }} /> - - - - - - {/* - { - this.state.data ? - - - - - { - this.state.data?.Nav_Ranges && this.state.data?.Nav_Ranges.map((item,i)=>{ - return - - - - }) - } -
序号发布范围
- {i+1} - - {item.Nav_Department?.NAME} -
:null - } -
*/} - - { - this.state.data ? - - - - - - { - this.state.data.IntentionalGuids && this.state.data.IntentionalGuids.map((item,i)=>{ - return - - - - - }) - } -
序号意向方针比例
- {i+1} - - { - item.GUIDELINES_NAME - } - - this.onClickCollect(this.state.data.ID,item.GUIDELINES_ID)} /> -
:null - } -
-

- - - - - - - - - - - { - this.state.data.Nav_Feedbacks && this.state.data.Nav_Feedbacks.map((item,i)=>{ - return - - - - - - - - }) - } -
序号填写人填写人部门意向方针其他意见填写时间
- {i+1} - - { - item.Nav_User?.NAME - } - - { - item.Nav_Department?.NAME - } - - { - item.Nav_Guidelines?.NAME - } - - { - item.OTHER_SUGGESTIONS - } - - { - item.CREATE_TIME - } -
-
-
- ) - } -} - -export default connect(({ login, FMBase, custom }) => ({ login, FMBase, custom }))(Form.create()(PT014ShowPrintOld)) diff --git a/src/components/CustomPages/PT/PT017ShowPrint.js b/src/components/CustomPages/PT/PT017ShowPrint.js deleted file mode 100644 index aa6ecf6..0000000 --- a/src/components/CustomPages/PT/PT017ShowPrint.js +++ /dev/null @@ -1,215 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PT017ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'HM/HMJobtaskIdentify/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_User') - extendInclude(json, 'Nav_Department') - extendInclude(json, 'Nav_Formulates') - extendInclude(json, 'Nav_Formulates.Nav_Formulate') - extendInclude(json, 'Nav_PlanResources') - extendInclude(json, 'Nav_PlanResources.Nav_Resources') - extendInclude(json, 'Nav_Files') - extendInclude(json, 'Nav_Files.Nav_ImgFile') - extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File') - extendInclude(json, 'Nav_PlanFiles') - extendInclude(json, 'Nav_PlanFiles.Nav_ImgFile') - extendInclude(json, 'Nav_PlanFiles.Nav_ImgFile.Nav_File') - extendInclude(json, 'Nav_Goals') - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/IndicatorFormulation/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - 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") - } - - 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() { - const { data } = this.state; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

安全生产目标与指标制定表

- { - data ? -
- - {data.NAME} - {data.YEAR} - {/* .substring(0, 10) */} - {data.SET_TIME} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - - { - data.Nav_Formulates && data.Nav_Formulates.map((item, i) => { - return - }) - } - - {data.IS_DEMAND == true?"是":"否"} - {data.IS_TARGET == true?"是":"否"} - - { - data.Nav_Files && data.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - } - {data.IS_PLAN == true?"是":"否"} - - { - data.Nav_PlanResources && data.Nav_PlanResources.map((item, i) => { - return - }) - } - - - { - data.Nav_PlanFiles && data.Nav_PlanFiles.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) - } - {/* {data.REASON} - {data.PROFILE} - {data.VERSION==0?"":data.VERSION} */} - -
:null - } - {/* { - data ? -
- - {data.REASON} - {data.PROFILE} - {data.VERSION==0?"":data.VERSION} - -
:null - } */} - { - data ? - - - - - { - data.Nav_Goals && data.Nav_Goals.map((item,i)=>{ - return - - - - }) - } -
序号安全生产目标与指标
- {i+1} - - {item.NAME} -
:null - } - -
-
- } - -} - -export default connect(({ login }) => ({ login }))(PT017ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT020ShowPrint.js b/src/components/CustomPages/PT/PT020ShowPrint.js deleted file mode 100644 index 2bf3898..0000000 --- a/src/components/CustomPages/PT/PT020ShowPrint.js +++ /dev/null @@ -1,230 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -import { IFComponent } from '@woowalker/feui'; -class PT020ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - let url='PT/PTIndicatorFormulationDepartment/IdentityUpdate' - if(this.props.login.OrgId === 'd9871ba8-0eec-9e4a-bb87-7d5a540d8913')//b043b28b-bbc3-c452-6052-4fba1457abfa - { - url='PT/PTIndicatorFormulationDepartment/IdentityUpdateYL' - } - this.props.dispatch({ - type: 'app/getDataByPost', - url: url, - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - // extendInclude(json, 'Nav_User') - // extendInclude(json, 'Nav_User.Nav_Person') - // extendInclude(json, 'Nav_User.Nav_Person.Nav_Post') - // extendInclude(json, 'Nav_Department') - // extendInclude(json, 'Nav_Department.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_Department') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_DetailContent') - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/PTIndicatorFormulationDepartment/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

安全生产目标与指标分解表

- { - data ? -
- - {data.SET_TIME} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data.YEAR} - -
:null - } - {/* { - data ? -
- - {data.REASON} - {data.PROFILE} - {data.VERSION==0?"":data.VERSION} - -
:null - } */} - { - data && data.DEPARTMENT_TYPE!==2 && data.Nav_DepartmentDetail.length > 0 ? - - - - - - - { - data?.Nav_DepartmentDetail && data?.Nav_DepartmentDetail.map((item,i)=>{ - return - - - - - }) - } - - - }) - } -
序号部门名称部门负责人安全生产目标与指标
- {i+1} - - {item?.Nav_Department.NAME} - - {item?.Nav_Department?.Nav_User?.NAME} - - { - item?.Nav_DetailContent && item?.Nav_DetailContent.map((item2, i) => { - return
:null - } - { - data && data.Nav_TeamDetail.length > 0 ? - - - - - - - { - data.Nav_TeamDetail && data.Nav_TeamDetail.map((item,i)=>{ - return - - - - - }) - } - - - - }) - } -
序号岗位人员安全生产目标与指标
- {i+1} - - {item.Nav_User.Nav_Person.Nav_Post?.NAME} - - {item.Nav_User.NAME } - - { - item.Nav_DetailContent && item.Nav_DetailContent.map((item2, i) => { - return
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PT020ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT024ShowPrint.js b/src/components/CustomPages/PT/PT024ShowPrint.js deleted file mode 100644 index b3b078c..0000000 --- a/src/components/CustomPages/PT/PT024ShowPrint.js +++ /dev/null @@ -1,224 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -class PT024ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - tmpData: {}, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTAssessmentPlanAudit/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - // extendInclude(json, 'Nav_User') - // extendInclude(json, 'Nav_User.Nav_Person') - // extendInclude(json, 'Nav_User.Nav_Person.Nav_Post') - // extendInclude(json, 'Nav_Department') - // extendInclude(json, 'Nav_Department.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_Department') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_DetailContent') - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/PTAssessmentPlanAudit/GetEdit', - onComplete: (ret) => { - if (ret) { - // if(ret.DEPARTMENT_TYPE !== 3) - // { - // ret.Nav_Details=ret.Nav_Details.filter(t=>t.DEPARTMENT_ID ===this.props.login.departmentId) - // } - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

考核方案审核表

- { - data ? -
- - {data.SET_TIME} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {data.Nav_User ? data.Nav_User.NAME : ''} - {data?.YEAR} - {data?.NAME} - {enums.FMDepartmentType.enums[data?.DEPARTMENT_TYPE]} - -
:null - } - {/* { - data ? -
- - {data.REASON} - {data.PROFILE} - {data.VERSION==0?"":data.VERSION} - -
:null - } */} - { - data ? - - - - - - - - - - - { - data?.Nav_Details && data?.Nav_Details.map((item,i)=>{ - - return - - - - - - {item2?.NAME} - }) - } - - {item2.SCORE} - }) - } - - {item2.METHOD} - }) - } - - - - }) - } -
序号部门名称被考核人员考核年度考核周期安全生产指标考核项目分数考核认定评分办法
- {i+1} - - {item?.Nav_Department?.NAME} - - {item?.Nav_User?.NAME} - - {item?.YEAR} - - {enums.PTAssessmentCycleEnums.enums[item?.ASSESSMENT_CYCLE]} - - { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
:null - } - - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PT024ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT027Import.js b/src/components/CustomPages/PT/PT027Import.js deleted file mode 100644 index 99caffe..0000000 --- a/src/components/CustomPages/PT/PT027Import.js +++ /dev/null @@ -1,205 +0,0 @@ -import React from 'react'; -import { connect } from 'dva'; -import { Button, Icon, Upload, Form } from 'antd'; -import config from "../../../config.js"; -import storage from '../../../utils/storage'; -import XLSX from 'xlsx'; -import { initFilter, extendRule, downLoad, extendInclude, setDataFieldValue, guid, initQueryFilter, showFiles, showApprove, showUserSign, showUsersSign } from "../../../utils/common"; - -class PT027Import extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - Msg: '', - isMsgShow: false, - url: props.data.url, - fileName: props.data.fileName, - isOk: true - } - } - - getRequestHeaders = () => { - // 请求参数 - const addHeader = 'Bearer ' + storage('lacal').getItem('accessToken').val - const userId = storage('lacal').getItem('userid').val - const user = storage('lacal').getItem('loginUserVerify').val - const RootOrgId = storage('lacal').getItem('RootOrgId').val - const orgId = storage('lacal').getItem('webOrgId').val - const Tenant = storage('lacal').getItem('Tenant').val - const headers = { - // 'Content-Type': type === 'post' ? 'application/json' : 'application/x-www-form-urlencoded', - Authorization: addHeader, - userid: userId, - username: user ? user.username : '', - RootOrgId, - orgId, - Tenant: Tenant - } - return headers - } - - fillImportData = (ret) => { - if (!ret) { - this.setState({ - data: [], - selectedRowKeys: [], - messages: '', - }) - return; - } - if (ret.ErrorMessage) { - this.setState({ - messages: ('错误:' + ret.ErrorMessage) - }); - } - let messages = ''; - if (ret.Data && ret.Data.MessageList && ret.Data.MessageList.length) { - var tmps = []; - ret.Data.MessageList.forEach((n, i) => { - tmps.push(n); - }); - messages = tmps.join('\n'); - } - const selectedRowKeys = []; - if (ret.Data && ret.Data.Data) { - ret.Data.Data.forEach((n, i) => { - selectedRowKeys.push(n.ID); - }); - } - this.setState({ - data: (ret.Data && ret.Data.Data ? ret.Data.Data : []), - selectedRowKeys, - messages - }); - } - - onTableBtnExport() { - let json = initFilter(this.props.login.OrgId); - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTAssessmentPlanAudit/GetAssessmentData', - payload: json, - onlyData: false, - onComplete: (ret) => { - if (!ret || ret.Data.length == 0) { - message.warning("没有数据无需导出!"); - return; - } - else{ - //excel的表头 - const tHeader = ["层级", "被考核部门","被考核岗位","被考核人员","考核人员","安全生产指标考核项目","考核周期","分数","考核认定评分办法"]; - // 字段和table表格中对应 - const fitlerVal = ["departType", "departName","postName","userName","chargeName","targetItem","type","score","method"]; - const res = ret.Data.map((v) => fitlerVal.map((j) => v[j])); - const jsonWorkSheet = XLSX.utils.json_to_sheet(res,tHeader); - jsonWorkSheet.A1.v='层级'; - jsonWorkSheet.B1.v='被考核部门'; - jsonWorkSheet.C1.v='被考核岗位'; - jsonWorkSheet.D1.v='被考核人员'; - jsonWorkSheet.E1.v='考核人员'; - jsonWorkSheet.F1.v='安全生产指标考核项目'; - jsonWorkSheet.G1.v='考核周期'; - jsonWorkSheet.H1.v='分数'; - jsonWorkSheet.I1.v='考核认定评分办法'; - const sheetName = "目标与指标监测数据库"; - const workBook = { - SheetNames: [sheetName], - Sheets: { - [sheetName]: jsonWorkSheet, - } - }; - return XLSX.writeFile(workBook, "目标与指标监测数据库.xlsx"); - } - } - }) - } - - - //渲染页面 - render() { - const { data, Msg, isMsgShow, url, urlDown, isOk, fileName } = this.state; - const that = this; - const uploadProps = { - name: 'file', - action: config.serviceHost(url), - data: { OrgId: this.props.login.OrgId },//, ImportConfigCode: configCode, delFlag: delFlag - fileList: this.state.updateLoadFileList, - accept: '.xls,.xlsx', - headers: this.getRequestHeaders(), - onChange(info) { - var Msg = '' - var isOk = true - if (info.file.status === 'done') { - if (info.file.response.IsSuccessful) { - Msg = "【" + info.file.name + '】' + info.file.response.Data.Data - // message.info(`${info.file.name} 导入并保存成功`); - } else { - //失败 - Msg = info.file.response.ErrorMessage - isOk = false - // message.error(`${info.file.response.ErrorMessage} `); - } - } else if (info.file.status === 'error') { - isOk = false - if (info.file.response && info.file.response.ErrorMessage) { - Msg = "【" + info.file.name + '】导入错误,详情:' + info.file.response.ErrorMessage - // message.error(`${info.file.name} 导入错误,详情:${info.file.response.ErrorMessage}`); - } - else { - Msg = "【" + info.file.name + '】导入错误' - // message.error(`${info.file.name} 导入错误`); - } - } - - that.setState({ - updateLoadFileList: info.fileList, - data: info, - Msg: '导入说明:' + Msg, - isMsgShow: true, - isOk: isOk - }); - }, - }; - - return
-
-
- - - - - - { - isMsgShow ? ( - isOk ? - - - : - - - - ) - : null - } -
- - - - - -
- {Msg} -
- {Msg} -
-
-
-
- } -} -export default connect(({ login, app }) => ({ login, app }))(PT027Import) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT029ShowPrint.js b/src/components/CustomPages/PT/PT029ShowPrint.js deleted file mode 100644 index 65c4327..0000000 --- a/src/components/CustomPages/PT/PT029ShowPrint.js +++ /dev/null @@ -1,427 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../../components/FormPage' -import { T } from 'antd/lib/upload/utils'; -class PT029ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - BtnChargeAgreeDisplay:'none', - tmpData: {}, - isExsit:0, - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTMonitorAssessment/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - onTableBtnChargeAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTMonitorAssessment/ChargeAgree', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('已阅成功!'); - this.setState({ BtnChargeAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendIgnoreDataRule(json) - // extendInclude(json, 'Nav_User') - // extendInclude(json, 'Nav_User.Nav_Person') - // extendInclude(json, 'Nav_User.Nav_Person.Nav_Post') - // extendInclude(json, 'Nav_Department') - // extendInclude(json, 'Nav_Department.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_Department') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_DetailContent') - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/PTMonitorAssessment/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - let isExsit=ret?.Nav_Details.filter(t=>t.USER_ID!=null && t.USER_ID == this.props.login.userId).length; - that.setState({ data: ret,isExsit: isExsit}); - if (ret.STATUS === 10) { - that.setState({ BtnAgreeDisplay: 'inline', BtnChargeAgreeDisplay: 'none' }) - } - if(ret.STATUS === 20) - { - that.setState({ BtnAgreeDisplay: 'none',BtnChargeAgreeDisplay: 'none' }) - } - if(ret.STATUS === 30) - { - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none',BtnChargeAgreeDisplay: 'none' }) - } - else - { - that.setState({ BtnAgreeDisplay: 'none',BtnChargeAgreeDisplay: 'inline' }) - } - - } - // if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - // that.setState({ BtnAgreeDisplay: 'none' }) - // }else{ - // that.setState({ BtnAgreeDisplay: 'inline' }) - // } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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() { - const { data ,isExsit} = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - - -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

监测与考核记录表

- { - data ? -
- - {data.SET_TIME} - {data.Nav_Department ? data.Nav_Department.NAME : ''} - {/* {data.Nav_User ? data.Nav_User.NAME : ''} */} - { - data.Nav_MonitorUser && data.Nav_MonitorUser.map((item, i) => { - if (i == (data.Nav_MonitorUser.length - 1)) { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME - } else { - if (item.DEAL_STATUS == 0) - return - else - return item.Nav_User.NAME + ',' - } - }) - } - {data?.YEAR} - {/* {data?.NAME} */} - {enums.PTAssessmentCycleEnums.enums[data?.ASSESSMENT_CYCLE]} - -
:null - } - { - data ? - - - - - - - - - - - - - { - data?.Nav_Details && data?.Nav_Details.map((item,i)=>{ - if(data.STATUS === 30 && data.Nav_Department.USER_ID!=this.props.login.userId ) - { - if(isExsit>0) - { - if(item.USER_ID ===this.props.login.userId) - { - return - - - - - {item2?.NAME} - }) - } - - {item2.SCORE} - }) - } - - {item2.METHOD} - }) - } - - {item2.CONTENT} - }) - } - - {item2.MEASURES} - }) - } - - {item2.RESULT_SCORE} - }) - } - - - } - } - else - { - return - - - - - {item2?.NAME} - }) - } - - {item2.SCORE} - }) - } - - {item2.METHOD} - }) - } - - {item2.CONTENT} - }) - } - - {item2.MEASURES} - }) - } - - {item2.RESULT_SCORE} - }) - } - - - } - } - else - { - return - - - - - {item2?.NAME} - }) - } - - {item2.SCORE} - }) - } - - {item2.METHOD} - }) - } - - {item2.CONTENT} - }) - } - - {item2.MEASURES} - }) - } - - {item2.RESULT_SCORE} - }) - } - - - } - }) - } -
序号部门名称被考核人员岗位安全生产指标考核项目分数考核认定评分办法考核检查情况改进措施得分
- {i+1} - - {item?.Nav_Department?.NAME} - - {item?.Nav_User?.NAME} - - {/* {item.Nav_User.Nav_Person.Nav_Post.NAME} */} - - { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- {i+1} - - {item?.Nav_Department?.NAME} - - {item?.Nav_User?.NAME} - - {/* {item.Nav_User.Nav_Person.Nav_Post.NAME} */} - - { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- {i+1} - - {item?.Nav_Department?.NAME} - - {item?.Nav_User?.NAME} - - {/* {item.Nav_User.Nav_Person.Nav_Post.NAME} */} - - { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
- { - item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => { - return
:null - } - { - data ? -
- - -
{ - data.Nav_MonitorUser && data.Nav_MonitorUser.map((item, i) => { - if (item.DEAL_STATUS == 1) { - if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null) - return {item.Nav_User?.NAME} - else - return - } - }) - }
-
-
-
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PT029ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT036ShowPrint.js b/src/components/CustomPages/PT/PT036ShowPrint.js deleted file mode 100644 index b79548a..0000000 --- a/src/components/CustomPages/PT/PT036ShowPrint.js +++ /dev/null @@ -1,292 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../FormPage' -class PT036ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - BtnChargeAgreeDisplay:'none', - tmpData: {}, - isModalVisible6: false, - detailContens:[] - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTAnnualMonotorSummary/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - onTableBtnChargeAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTMonitorAssessment/ChargeAgree', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('已阅成功!'); - this.setState({ BtnChargeAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_Details') - extendIgnoreDataRule(json) - // extendInclude(json, 'Nav_Details.Nav_User') - // extendInclude(json, 'Nav_Details.Nav_User.Nav_Person') - // extendInclude(json, 'Nav_Details.Nav_User.Nav_Person.Nav_Post') - // extendInclude(json, 'Nav_Details.Nav_Department') - // extendInclude(json, 'Nav_Details.Nav_Contents') - // extendInclude(json, 'Nav_Department.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_Department') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_User') - // extendInclude(json, 'Nav_DepartmentDetail.Nav_DetailContent') - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/PTAnnualMonotorSummary/GetEdit', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - // if (ret.STATUS === 20) { - // that.setState({ BtnAgreeDisplay: 'inline' }) - // }else{ - // that.setState({ BtnAgreeDisplay: 'none' }) - // } - // if(ret.STATUS === 30) - // { - // that.setState({ BtnChargeAgreeDisplay: 'inline' }) - // } - // else - // { - // that.setState({ BtnChargeAgreeDisplay: 'none' }) - // } - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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, - }); - } - closModal = () => { - this.setState({ - isModalVisible: false, - }); - }; - showModal = (id,quarter) => { - let temp=this.state.data.Nav_Details.filter(t=>t.ID === id); - this.setState({ - isModalVisible: true, - detailContens:temp[0]?.Nav_Contents.filter(t=>t.QUARTER_TYPE === quarter) - }); - }; - render() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
- - } - content={() => this.componentRef} - /> - - - {/* */} -
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

年度监测汇总表

- { - data ? -
- - {data.YEAR} - {data.SET_TIME} - -
:null - } - { - data ? - - - - - - - - - - - - { - data?.Nav_Details && data?.Nav_Details.map((item,i)=>{ - return - - - - - - - - - - - }) - } -
序号部门名称被考核人员岗位第一季度得分第二季度得分第三季度得分第四季度得分年度平均分
- {i+1} - - {item?.Nav_Department?.NAME} - - {item?.Nav_User?.NAME} - - {item?.Nav_User?.Nav_Person?.Nav_Post?.NAME} - - this.showModal(item.ID,10)}>{item?.FIRST_SCORE} - - this.showModal(item.ID,20)}>{item?.SECOND_SCORE} - - this.showModal(item.ID,30)}>{item?.THIRD_SCORE} - - this.showModal(item.ID,40)}>{item?.FOURTH_SCORE} - - {item?.YEAR_SCORE} -
:null - } - -
-
- - { - data ? - - - - - - - - - - { - this.state.detailContens && this.state.detailContens.map((item,i)=>{ - return - - - - - - - - - }) - } -
序号安全生产指标考核项目分数考核认定评分办法考核检查情况改进措施得分
- {i+1} - - {item?.NAME} - - {item.SCORE} - - {item.METHOD} - - {item.CONTENT} - - {item.MEASURES} - - {item.RESULT_SCORE} -
:null - } -
-
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PT036ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/PT/PT040ShowPrint.js b/src/components/CustomPages/PT/PT040ShowPrint.js deleted file mode 100644 index 9c79d6f..0000000 --- a/src/components/CustomPages/PT/PT040ShowPrint.js +++ /dev/null @@ -1,220 +0,0 @@ -import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd'; -import React from 'react'; -import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; -import ReactToPrint from "react-to-print"; -import styles from '../HI/StepForm.css'; -import config from "../../../config"; -import XLSX from 'xlsx'; -import { connect } from 'dva'; -import moment from 'moment'; -import { message } from "antd/lib/index"; -import FormPage from '../../FormPage' -class PT040ShowPrint extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - BtnAgreeDisplay: 'none', - BtnChargeAgreeDisplay:'none', - tmpData: {}, - isModalVisible6: false, - detailContens:[] - }; - }; - - 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); - } - } - - onTableBtnAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTAnnualMonotorSummary/IdentityUpdate', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('确认成功!'); - this.setState({ BtnAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - onTableBtnChargeAgree() { - this.props.dispatch({ - type: 'app/getDataByPost', - url: 'PT/PTMonitorAssessment/ChargeAgree', - payload: { - ID: this.props.data.id, - TaskID: this.props.data.TaskID, - }, - onComplete: (ret) => { - if (ret) { - message.success('已阅成功!'); - this.setState({ BtnChargeAgreeDisplay: 'none' }) - this.BtnClose(); - } - } - }) - } - BtnClose = () => { - if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') - this.props.data.onCancel(); - } - - loadData = (dataId) => { - let that=this; - let json = initFilter(that.props.login.OrgId); - extendRule(json, 'ID', 1, dataId); - extendInclude(json, 'Nav_MonitorAssessment') - extendInclude(json, 'Nav_Contents') - extendInclude(json, 'Nav_Department') - extendInclude(json, 'Nav_User') - extendIgnoreDataRule(json) - that.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'PT/MonitorAssessmentDetail/Get', - onComplete: (ret) => { - if (ret) { - if(that.props.data && that.props.data.loadDataDeal) - { - that.props.data.loadDataDeal(1); - } - that.setState({ data: ret }); - // if (ret.STATUS === 20) { - // that.setState({ BtnAgreeDisplay: 'inline' }) - // }else{ - // that.setState({ BtnAgreeDisplay: 'none' }) - // } - // if(ret.STATUS === 30) - // { - // that.setState({ BtnChargeAgreeDisplay: 'inline' }) - // } - // else - // { - // that.setState({ BtnChargeAgreeDisplay: 'none' }) - // } - if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { - that.setState({ BtnAgreeDisplay: 'none' }) - }else{ - that.setState({ BtnAgreeDisplay: 'inline' }) - } - this.onClickApprove(false); - //归档才显示打印和导出按钮 - // if(ret.PRE_MEETING_STATUS==5){ - // this.setState({ isFinished: 'inline' }) - // } - } - else - { message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');} - } - }); - } - - onTableBtnExport() { - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - 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") - } - - 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, - }); - } - closModal = () => { - this.setState({ - isModalVisible: false, - }); - }; - showModal = (id,quarter) => { - let temp=this.state.data.Nav_Details.filter(t=>t.ID === id); - this.setState({ - isModalVisible: true, - detailContens:temp[0]?.Nav_Contents.filter(t=>t.QUARTER_TYPE === quarter) - }); - }; - render() { - const { data } = this.state; - const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; - // let aaa = Math.random(); - return
-
(this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> -

监测与考核得分明细

- { - data ? -
- - {data.Nav_MonitorAssessment.YEAR} - {data.Nav_MonitorAssessment.SET_TIME} - {enums.PTAssessmentCycleEnums.enums[data.Nav_MonitorAssessment.ASSESSMENT_CYCLE]} - {data.Nav_Department?.NAME} - {data.Nav_User?.NAME} - -
:null - } - { - data ? - - - - - - - - - - { - data?.Nav_Contents && data?.Nav_Contents.map((item,i)=>{ - return - - - - - - - - - }) - } -
序号安全生产指标考核项目分数考核认定评分办法考核检查情况改进措施得分
- {i+1} - - {item.NAME} - - {item.SCORE} - - {item.METHOD} - - {item.CONTENT} - - {item.MEASURES} - - {item.RESULT_SCORE} -
:null - } - -
-
- } - -} - -export default connect(({ login,app }) => ({ login,app }))(PT040ShowPrint) \ No newline at end of file diff --git a/src/utils/customConfig.js b/src/utils/customConfig.js index ed880d1..d2e2cd7 100644 --- a/src/utils/customConfig.js +++ b/src/utils/customConfig.js @@ -1133,10 +1133,6 @@ const SC022Import = Loadable({ loader: () => import('../components/CustomPages/SC/SC022Import'), loading: () =>
}) -const PT027Import = Loadable({ - loader: () => import('../components/CustomPages/PT/PT027Import'), - loading: () =>
-}) const SC030ShowPrint = Loadable({ loader: () => import('../components/CustomPages/SC/SC030ShowPrint'), loading: () =>
@@ -1245,14 +1241,6 @@ const OG020Edit = Loadable({ loader: () => import('../components/CustomPages/OG/OG020Edit'), loading: () =>
}) -const PT014ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT014ShowPrint'), - loading: () =>
-}) -const PT017ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT017ShowPrint'), - loading: () =>
-}) const TI008ShowPrint = Loadable({ loader: () => import('../components/CustomPages/TI/TI008ShowPrint'), loading: () =>
@@ -1342,74 +1330,6 @@ const AE018ShowPrint = Loadable({ loading: () =>
}) -const PT020ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT020ShowPrint'), - loading: () =>
-}) - -const PT024ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT024ShowPrint'), - loading: () =>
-}) - -const PT029ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT029ShowPrint'), - loading: () =>
-}) - -const PT013ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT013ShowPrint'), - loading: () =>
-}) -const PT036ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT036ShowPrint'), - loading: () =>
-}) -const PT040ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PT/PT040ShowPrint'), - loading: () =>
-}) -const PE005ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE005ShowPrint'), - loading: () =>
-}) -const PE007ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE007ShowPrint'), - loading: () =>
-}) -const PE009ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE009ShowPrint'), - loading: () =>
-}) -const PE019ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE019ShowPrint'), - loading: () =>
-}) -const PE021ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE021ShowPrint'), - loading: () =>
-}) -const PE022ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE022ShowPrint'), - loading: () =>
-}) -const PE027ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE027ShowPrint'), - loading: () =>
-}) -const PE029ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE029ShowPrint'), - loading: () =>
-}) -const PE029ShowPrintNew = Loadable({ - loader: () => import('../components/CustomPages/PE/PE029ShowPrintNew'), - loading: () =>
-}) - -const PE030ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PE/PE030ShowPrint'), - loading: () =>
-}) const SC046ShowPrint = Loadable({ loader: () => import('../components/CustomPages/SC/SC046ShowPrint'), loading: () =>
@@ -1418,10 +1338,6 @@ const SC052ShowPrint = Loadable({ loader: () => import('../components/CustomPages/SC/SC052ShowPrint'), loading: () =>
}) -const PR003ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR003ShowPrint'), - loading: () =>
-}) const CM018ShowPrint = Loadable({ loader: () => import('../components/CustomPages/CM/CM018ShowPrint'), loading: () =>
@@ -1466,88 +1382,6 @@ const CM036ShowPrint = Loadable({ loader: () => import('../components/CustomPages/CM/CM036ShowPrint'), loading: () =>
}) - - -const PR007ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR007ShowPrint'), - loading: () =>
-}) -const PR009ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR009ShowPrint'), - loading: () =>
-}) -const PR011ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR011ShowPrint'), - loading: () =>
-}) -const PR013ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR013ShowPrint'), - loading: () =>
-}) -const PR015ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR015ShowPrint'), - loading: () =>
-}) -const PR019ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR019ShowPrint'), - loading: () =>
-}) -const PR023ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR023ShowPrint'), - loading: () =>
-}) -const PR026ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR026ShowPrint'), - loading: () =>
-}) -const PR028ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR028ShowPrint'), - loading: () =>
-}) -const PR046ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR046ShowPrint'), - loading: () =>
-}) -const PR048ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR048ShowPrint'), - loading: () =>
-}) -const PR050ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR050ShowPrint'), - loading: () =>
-}) -const PR052ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR052ShowPrint'), - loading: () =>
-}) -const PR056ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR056ShowPrint'), - loading: () =>
-}) -const PR058ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR058ShowPrint'), - loading: () =>
-}) -const PR060ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR060ShowPrint'), - loading: () =>
-}) -const PR062ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR062ShowPrint'), - loading: () =>
-}) -const PR064ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR064ShowPrint'), - loading: () =>
-}) -const PR066ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR066ShowPrint'), - loading: () =>
-}) -const PR068ShowPrint = Loadable({ - loader: () => import('../components/CustomPages/PR/PR068ShowPrint'), - loading: () =>
-}) const DM019ShowPrint = Loadable({ loader: () => import('../components/CustomPages/DM/DM019ShowPrint'), loading: () =>
@@ -1987,7 +1821,6 @@ export default function (componentName, formId, formParam, data, formCode, formD BS026ShowPrint: , SC028ShowPrint: , SC022Import: , - PT027Import: , SC030ShowPrint: , SC030View: , SC030ShowPrintPer: , @@ -2053,8 +1886,6 @@ export default function (componentName, formId, formParam, data, formCode, formD OG018Check: , OG020Edit: , - PT014ShowPrint: , - PT017ShowPrint: , TI008ShowPrint: , TI008ShowPrints: , TI010ShowPrint: , @@ -2069,20 +1900,6 @@ export default function (componentName, formId, formParam, data, formCode, formD AE019ShowPrint: , AE018ShowPrint: , - PT020ShowPrint: , - PT024ShowPrint: , - PT029ShowPrint: , - PT013ShowPrint: , - PT036ShowPrint: , - PT040ShowPrint: , - PE005ShowPrint: , - PE007ShowPrint: , - PE009ShowPrint: , - PE019ShowPrint: , - PE021ShowPrint: , - PE022ShowPrint: , - PE027ShowPrint: , - OH003ShowPrint: , OH005ShowPrint: , OH006ShowPrint: , @@ -2093,12 +1910,8 @@ export default function (componentName, formId, formParam, data, formCode, formD OH028ShowPrint: , OH034ShowPrint: , - PE029ShowPrint: , - PE029ShowPrintNew: , - PE030ShowPrint: , SC046ShowPrint: , SC052ShowPrint: , - PR003ShowPrint: , CM018ShowPrint: , CM023ShowPrint: , @@ -2112,26 +1925,6 @@ export default function (componentName, formId, formParam, data, formCode, formD CM036Edit: , CM036ShowPrint: , - PR007ShowPrint: , - PR009ShowPrint: , - PR011ShowPrint: , - PR013ShowPrint: , - PR015ShowPrint: , - PR019ShowPrint: , - PR023ShowPrint: , - PR026ShowPrint: , - PR028ShowPrint: , - PR046ShowPrint: , - PR048ShowPrint: , - PR050ShowPrint: , - PR052ShowPrint: , - PR056ShowPrint: , - PR058ShowPrint: , - PR060ShowPrint: , - PR062ShowPrint: , - PR064ShowPrint: , - PR066ShowPrint: , - PR068ShowPrint: , DM019ShowPrint: , DM021ShowPrint: , DM012ShowPrint: ,