Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe_web
This commit is contained in:
commit
a8dcb0ed65
@ -22,7 +22,7 @@ import TableModal from '../../components/Table/TableModal';
|
||||
import CombinationModal from '../../components/Combination/CombinationModal'
|
||||
import { get, set } from 'lodash'
|
||||
const TabPane = Tabs.TabPane;
|
||||
|
||||
let clickQuery = "";
|
||||
class EditBaseComponent extends ComponentBase {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@ -573,7 +573,8 @@ setRowFieldTooltip = (editCode, params) => {
|
||||
const cols = detailColumnConfig ? detailColumnConfig.columns : [];
|
||||
Object.keys(params).forEach((n) => {
|
||||
const temps = cols.filter(t => t.field === n);
|
||||
if (temps && temps.length) {debugger
|
||||
if (temps && temps.length) {
|
||||
debugger
|
||||
var temp = temps[0].label;
|
||||
temps[0].label = <Tooltip title={params[n]}>
|
||||
<span>{temp}</span>
|
||||
@ -2880,6 +2881,7 @@ params【字段属性】=值
|
||||
}
|
||||
type:0-行按钮 1-按钮 2-右侧按钮
|
||||
*/
|
||||
|
||||
getRenderBtn(params) {
|
||||
const { editCode, editConfig, record, btnConfig, type, parentId, parentRecord } = params ? params : {};
|
||||
const isRow = record;
|
||||
@ -2937,8 +2939,13 @@ params【字段属性】=值
|
||||
if (!content && btnParam) {
|
||||
const that = this;
|
||||
const clickKey = btnConfig.code ? btnConfig.code : btnConfig.id;
|
||||
|
||||
const regClick = async function () {
|
||||
const ids = getIds();
|
||||
if (btnConfig.customParams.indexOf('reset') > -1) {
|
||||
clickQuery = guid();
|
||||
}
|
||||
|
||||
let isError = false;
|
||||
if (!ids && !isRow && btnConfig.checkSelected) {
|
||||
message.error('请选择记录');
|
||||
@ -3028,8 +3035,7 @@ params【字段属性】=值
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
tempData.clearQuery = clickQuery;
|
||||
btnParam.content = <FormPage formCode={btnConfig.formCode} data={tempData} />;
|
||||
btnParam.click = () => { return regClick() };
|
||||
showData.close = () => {
|
||||
|
||||
@ -1646,6 +1646,7 @@ class EditComponent extends EditBaseComponent {
|
||||
saveHeadRecord: (values, onComplete) => { return this.saveHeadRecord(values, onComplete); },
|
||||
saveRowRecord: (params) => { this.saveRowRecord(params); },
|
||||
getSelectedRecords: () => { return this.getEditSelectedRecord({ editCode, parentId }); },
|
||||
getSelectedKeys: () => { return this.getEditSelectedKeys({ editCode, parentId }); },
|
||||
btnCustomParams: getCustomParams(btnCustomParams),
|
||||
pageTableCustomParams: getCustomParams(editConfig.customParams),
|
||||
});
|
||||
@ -1724,6 +1725,7 @@ class EditComponent extends EditBaseComponent {
|
||||
this.addOtherLog({ formCode, formId, title, data, extData });
|
||||
},
|
||||
editCode: editConfig.editCode,
|
||||
getSelectedKeys: () => { return this.getEditSelectedKeys({ editCode, parentId }); },
|
||||
getSelectedRecords: () => { return this.getEditSelectedRecord({ editCode, parentId }); },
|
||||
emptyEditSelectedKeys: () => { return this.emptyEditSelectedKeys({ editCode, parentId }); },
|
||||
data: this.props.data,
|
||||
@ -1775,6 +1777,7 @@ class EditComponent extends EditBaseComponent {
|
||||
formId: (editConfig.formId ? editConfig.formId : (editConfig.formData ? editConfig.formData.ID : this.props.formId)),
|
||||
formCode: editConfig.formCode ? editConfig.formCode : (editConfig.formData ? editConfig.formData.CODE : this.props.formCode),
|
||||
getSelectedRecords: () => { return this.getEditSelectedRecord({ editCode, parentId }); },
|
||||
getSelectedKeys: () => { return this.getEditSelectedKeys({ editCode, parentId }); },
|
||||
data: this.props.data,
|
||||
stateData: this.state.data,
|
||||
btnCustomParams: getCustomParams(btnCustomParams),
|
||||
|
||||
@ -24,7 +24,7 @@ class BI009FormRunAnalysis extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
tableTitle :"宁化行洛坑钨矿有限公司-",
|
||||
tableTitle :"",
|
||||
selectStartTime: moment(this.getStartDate(), "YYYY-MM-DD 00:00:00"),
|
||||
selectEndTime: moment(this.getEndDate(), "YYYY-MM-DD 23:59:59"),
|
||||
visible: false,
|
||||
@ -268,33 +268,33 @@ class BI009FormRunAnalysis extends React.Component {
|
||||
|
||||
//加载数据赋值
|
||||
loadData = () => {
|
||||
this.getCompany();
|
||||
// this.getCompany();
|
||||
this.getCount();
|
||||
this.workTicket();
|
||||
this.workTicket2();
|
||||
this.mainJobPie2();
|
||||
this.getBaseInfoData();
|
||||
};
|
||||
getCompany = ()=>
|
||||
{
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, "PARENT_ID", 1, null);
|
||||
extendRule(json, "DEPARTMENT_TYPE", 1, 3);
|
||||
extendRule(json, "ENABLE_STATUS", 1, 0);
|
||||
this.props.dispatch({
|
||||
type: "app/getDataByPost",
|
||||
url: "FM/Department/Get",
|
||||
payload: json,
|
||||
onlyData: false,
|
||||
onComplete: (ret) => {
|
||||
if (ret && ret.Data) {
|
||||
this.setState({
|
||||
tableTitle : ret.Data.NAME+"-"
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
// getCompany = ()=>
|
||||
// {
|
||||
// let json = initFilter(this.props.login.OrgId);
|
||||
// extendRule(json, "PARENT_ID", 1, null);
|
||||
// extendRule(json, "DEPARTMENT_TYPE", 1, 3);
|
||||
// extendRule(json, "ENABLE_STATUS", 1, 0);
|
||||
// this.props.dispatch({
|
||||
// type: "app/getDataByPost",
|
||||
// url: "FM/Department/Get",
|
||||
// payload: json,
|
||||
// onlyData: false,
|
||||
// onComplete: (ret) => {
|
||||
// if (ret && ret.Data) {
|
||||
// this.setState({
|
||||
// tableTitle : ret.Data.NAME+"-"
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// };
|
||||
getDiffDay(date_1, date_2) {
|
||||
// 计算两个日期之间的差值
|
||||
let totalDays, diffDate;
|
||||
@ -1608,7 +1608,8 @@ class BI009FormRunAnalysis extends React.Component {
|
||||
}}
|
||||
>
|
||||
|
||||
{this.state.tableTitle}作业现场管理统计分析
|
||||
{/* {this.state.tableTitle} */}
|
||||
作业现场管理统计分析
|
||||
</h1>
|
||||
<br></br>
|
||||
<Row>
|
||||
|
||||
@ -720,6 +720,18 @@ class UserEditPage extends React.Component {
|
||||
</Select>)}
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label={'出生日期'}
|
||||
{...formItemLayout}
|
||||
>
|
||||
<DatePicker
|
||||
value={moment(this.state.data.BORN_DATE)}
|
||||
placeholder={'请输入出生日期'}
|
||||
onChange={(value, dateString) => { onChange('BORN_DATE', dateString, 0) }}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label={'入职时间'}
|
||||
|
||||
@ -108,7 +108,7 @@ class FO035ShowPrint extends React.Component {
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
{/* <Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item> */}
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
|
||||
@ -109,7 +109,7 @@ class FO037ShowPrint extends React.Component {
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
{/* <Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item> */}
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
|
||||
@ -3,7 +3,7 @@ import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table }
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import styles from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
@ -14,7 +14,11 @@ class FO041ShowPrint extends React.Component {
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
BtnAgreeDisplay: 'none'
|
||||
BtnAgreeDisplay: 'none',
|
||||
fileForm: {
|
||||
title: "",
|
||||
visible: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@ -107,7 +111,7 @@ class FO041ShowPrint extends React.Component {
|
||||
{
|
||||
data?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions size="middle" bordered className={styles.description}>
|
||||
<Descriptions.Item label="公司">{data.Nav_Company?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="发起时间">{data.CREATE_TIME}</Descriptions.Item>
|
||||
@ -122,7 +126,43 @@ class FO041ShowPrint extends React.Component {
|
||||
<Descriptions.Item label="值班开始时间">{data.JOB_START_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="值班结束时间">{data.JOB_END_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="班次">{data.Nav_Class?.NAME}</Descriptions.Item>
|
||||
|
||||
</Descriptions>
|
||||
|
||||
<Descriptions size="middle" bordered className={styles.description}>
|
||||
<Descriptions.Item label="交接班地点">{data.PLACE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交班人">{
|
||||
data.Nav_Users && data.Nav_Users.map((item, i) => {
|
||||
return item.Nav_User?.NAME + ' '
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="接班人">{
|
||||
data.Nav_AfterUsers && data.Nav_AfterUsers.map((item, i) => {
|
||||
return item.Nav_AfterUser?.NAME + ' '
|
||||
})
|
||||
|
||||
}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
<Descriptions size="middle" bordered className={styles.description}>
|
||||
<Descriptions.Item label="交班人签字">{
|
||||
data.Nav_Users && data.Nav_Users.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
}
|
||||
})
|
||||
|
||||
}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="接班人签字">{
|
||||
data.Nav_AfterUsers && data.Nav_AfterUsers.map((item, i) => {
|
||||
if (item.AFTER_USER_DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_AfterUser, config.picServerHost)
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
{
|
||||
data && data.Nav_Details?
|
||||
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
|
||||
@ -156,7 +196,7 @@ class FO041ShowPrint extends React.Component {
|
||||
<td>
|
||||
{
|
||||
item?.Nav_DetailAreas && item?.Nav_DetailAreas.map((item2, i) => {
|
||||
return <tr> {item2?.Nav_Area?.NAME}</tr>
|
||||
return item2?.Nav_Area?.NAME +';'
|
||||
})
|
||||
}
|
||||
</td>
|
||||
@ -176,7 +216,7 @@ class FO041ShowPrint extends React.Component {
|
||||
{item.Nav_User?.NAME}
|
||||
</td>
|
||||
<td>
|
||||
{item.USER_DEAL_STATUS == 1?showUserSign(item.Nav_User, config.picServerHost):item.Nav_User?.NAME}
|
||||
{item.USER_DEAL_STATUS == 1?showUserSign(item.Nav_User, config.picServerHost):null}
|
||||
</td>
|
||||
<td>
|
||||
{item.ITEM}
|
||||
@ -187,34 +227,7 @@ class FO041ShowPrint extends React.Component {
|
||||
</tbody>
|
||||
</table> : null
|
||||
}
|
||||
<Descriptions.Item label="交接班地点">{data.PLACE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交班人">{
|
||||
data.Nav_PreUsers && data.Nav_PreUsers.map((item, i) => {
|
||||
return item.Nav_PreUser?.NAME + ' '
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交班人签字">{
|
||||
data.Nav_PreUsers && data.Nav_PreUsers.map((item, i) => {
|
||||
if (item.PRE_USER_DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_PreUser, config.picServerHost)
|
||||
}
|
||||
})
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="接班人">{
|
||||
data.Nav_AfterUsers && data.Nav_AfterUsers.map((item, i) => {
|
||||
return item.Nav_AfterUser?.NAME + ' '
|
||||
})
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="接班人签字">{
|
||||
data.Nav_AfterUsers && data.Nav_AfterUsers.map((item, i) => {
|
||||
if (item.AFTER_USER_DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_AfterUser, config.picServerHost)
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</div>:null
|
||||
}
|
||||
</div>
|
||||
|
||||
@ -3,18 +3,23 @@ import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table }
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import styles from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
import FormPage from '../../../components/FormPage'
|
||||
class FO043ShowPrint extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
BtnAgreeDisplay: 'none'
|
||||
BtnAgreeDisplay: 'none',
|
||||
fileForm: {
|
||||
title: "",
|
||||
visible: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@ -33,14 +38,14 @@ class FO043ShowPrint extends React.Component {
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOLeaderWellRecord/PersonalAgree',
|
||||
url: 'FO/FOFireJob/IdentityUpdate',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
message.success('提交成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
@ -60,7 +65,7 @@ class FO043ShowPrint extends React.Component {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'FO/FOLeaderWellRecord/GetEdit',
|
||||
url: 'FO/FOFireJob/GetEdit',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
if(this.props.data && this.props.data.loadDataDeal)
|
||||
@ -73,75 +78,212 @@ class FO043ShowPrint extends React.Component {
|
||||
}else{
|
||||
this.setState({ BtnAgreeDisplay: 'inline' })
|
||||
}
|
||||
this.onClickApprove(false);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
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")
|
||||
XLSX.writeFile(wb, "动火作业工作票.xlsx")
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data } = this.state;
|
||||
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||
return <div>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
|
||||
<ReactToPrint
|
||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>}
|
||||
content={() => this.componentRef}
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >审阅</Button>
|
||||
</div>
|
||||
|
||||
|
||||
{/* */}
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id} className="printDIV">
|
||||
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>领导带班下井记录</h1>
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>动火作业工作票</h1>
|
||||
{
|
||||
data ?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (i == (data.Nav_Person.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User?.NAME}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME
|
||||
} else {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User?.NAME + ' '}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME + ' '
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人签字">{
|
||||
(data.Nav_User && data.Nav_User.FILE_PATH)?
|
||||
showUserSign(data.Nav_User, config.picServerHost):null
|
||||
<Descriptions size="middle" bordered className={styles.description}>
|
||||
<Descriptions.Item label="公司">{data.Nav_Company?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="发起时间">{data.CREATE_TIME}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="发起部门">{data.Nav_ApplyDepartment?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="发起人">{data.Nav_ApplyUser?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="工作票编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="作业名称">{data.Nav_OperationStep?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="审批层级">{enums.HMOperationTaskAuditEnum.enums[data.AUDIT_LEVEL]}</Descriptions.Item>
|
||||
<Descriptions.Item label="作业风险等级">{enums.SKEvaluateLevelEnum.enums[data.EVALUATE_LEVEL]}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火部门">{data.Nav_FireDepartment?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火部门负责人">{data.Nav_FireUser?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="安全生产管理人员">{data.Nav_SafeUser?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火区域">{data.Nav_Area?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火地点">{data.JOB_CONTENT}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火方式">{data.Nav_Type?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火具体事项">{data.JOB_CONTENT}</Descriptions.Item>
|
||||
<Descriptions.Item label="作业监护人">{data.Nav_MonitorUser?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火计划开始时间">{data.JOB_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火计划结束时间">{data.JOB_END_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="存在的风险">{ data.Nav_Risks && data.Nav_Risks.map((item, i) => {
|
||||
return item.RISK_NAME + ' '
|
||||
})}</Descriptions.Item>
|
||||
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="动火作业现场条件验收情况">{data.COMPLETED_CONDITION}</Descriptions.Item>
|
||||
<Descriptions.Item label="是否可以动火">{enums.FOYesOrNoEnum.enums[data.IS_FIRE]}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火实际开始时间">{data.ACT_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="附件"> {showFiles(data.Nav_FireFiles, config.picServerHost, this)}</Descriptions.Item>
|
||||
<Descriptions.Item label="矿调度室人员">{data.Nav_DispatchUser?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火部门负责人签名">{
|
||||
|
||||
data.USER_DEAL_STATUS == 1?
|
||||
showUserSign(data.Nav_FireUser, config.picServerHost)
|
||||
:null
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人签字">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
}
|
||||
})
|
||||
<Descriptions.Item label="安全管理人员签名">{
|
||||
|
||||
data.SAFE_DEAL_STATUS == 1?
|
||||
showUserSign(data.Nav_SafeUser, config.picServerHost)
|
||||
:null
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="矿调度人员签名">{
|
||||
|
||||
data.DISPATCH_DEAL_STATUS == 1?
|
||||
showUserSign(data.Nav_DispatchUser, config.picServerHost)
|
||||
:null
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火作业完工验收情况">{
|
||||
data.COMPLETED_CONTENT
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="是否可以撤离">{
|
||||
enums.FOYesOrNoEnum.enums[data.IS_LEAVE]
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火实际结束时间">{
|
||||
data.ACT_END_DATE
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="离开现场时间">{
|
||||
data.LEAVE_DATE
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="附件">{
|
||||
showFiles(data.Nav_MonitorFiles, config.picServerHost, this)
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火部门负责人签字">{
|
||||
data.USER_DEAL_FINISH_STATUS == 1?
|
||||
showUserSign(data.Nav_FireUser, config.picServerHost)
|
||||
:null
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="安全生产管理人员签字">{
|
||||
data.SAFE_DEAL_FINISH_STATUS == 1?
|
||||
showUserSign(data.Nav_SafeUser, config.picServerHost)
|
||||
:null
|
||||
}</Descriptions.Item>
|
||||
|
||||
</Descriptions>
|
||||
<FormPage {...this.state.tmpData} />
|
||||
{
|
||||
data && data.Nav_Users?
|
||||
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td width="100px" className={styles.fontBold}>序号</td>
|
||||
<td className={styles.fontBold}>作业人员类别</td>
|
||||
<td className={styles.fontBold}>姓名</td>
|
||||
<td className={styles.fontBold}>证书编号</td>
|
||||
<td className={styles.fontBold}>附件</td>
|
||||
{/* <td className={styles.fontBold}>签名</td> */}
|
||||
</tr>
|
||||
{
|
||||
data.Nav_Users && data.Nav_Users.map((item, i) => {
|
||||
return <tr>
|
||||
<td width="100px">
|
||||
{i + 1}
|
||||
</td>
|
||||
<td>
|
||||
{item.Nav_UserType?.NAME}
|
||||
</td>
|
||||
<td>
|
||||
{item.Nav_User?.NAME}
|
||||
</td>
|
||||
<td>
|
||||
{item.CERTIFICATE_CODE}
|
||||
</td>
|
||||
<td>
|
||||
{showFiles(item.Nav_UserFiles, config.picServerHost, this)}
|
||||
</td>
|
||||
{/* <td>
|
||||
{ item.DEAL_STATUS == 1?
|
||||
showUserSign(item.Nav_User, config.picServerHost):null
|
||||
}
|
||||
</td> */}
|
||||
</tr>
|
||||
})
|
||||
}
|
||||
</tbody>
|
||||
</table> : null
|
||||
}
|
||||
{
|
||||
data && data.Nav_Details?
|
||||
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td width="100px" className={styles.fontBold}>序号</td>
|
||||
<td className={styles.fontBold}>作业阶段</td>
|
||||
<td className={styles.fontBold}>作业流程及安全措施</td>
|
||||
<td className={styles.fontBold}>是否确认</td>
|
||||
<td className={styles.fontBold}>附件</td>
|
||||
</tr>
|
||||
{
|
||||
data.Nav_Details && data.Nav_Details.map((item, i) => {
|
||||
return <tr>
|
||||
<td width="100px">
|
||||
{i + 1}
|
||||
</td>
|
||||
<td>
|
||||
{enums.FOJobStepEnum.enums[item.JOB_STEP]}
|
||||
</td>
|
||||
<td>
|
||||
{item.CONTENT}
|
||||
</td>
|
||||
<td>
|
||||
{item.IS_CONFIRM_NEW ? "是" : "否"}
|
||||
{/* {enums.FOYesOrNoEnum.enums[item.IS_CONFIRM]} */}
|
||||
</td>
|
||||
<td>
|
||||
{showFiles(item.Nav_DetailFiles, config.picServerHost, this)}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
})
|
||||
}
|
||||
</tbody>
|
||||
</table> : null
|
||||
}
|
||||
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
@ -149,4 +291,4 @@ class FO043ShowPrint extends React.Component {
|
||||
}
|
||||
|
||||
}
|
||||
export default connect(({ login }) => ({ login }))(FO043ShowPrint)
|
||||
export default connect(({ login,app }) => ({ login,app }))(FO043ShowPrint)
|
||||
@ -3,18 +3,23 @@ import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table }
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import styles from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
import FormPage from '../../../components/FormPage'
|
||||
class FO045ShowPrint extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
BtnAgreeDisplay: 'none'
|
||||
BtnAgreeDisplay: 'none',
|
||||
fileForm: {
|
||||
title: "",
|
||||
visible: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@ -33,14 +38,14 @@ class FO045ShowPrint extends React.Component {
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOLeaderWellRecord/PersonalAgree',
|
||||
url: 'FO/FOFireJobWb/IdentityUpdate',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
message.success('提交成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
@ -60,7 +65,7 @@ class FO045ShowPrint extends React.Component {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'FO/FOLeaderWellRecord/GetEdit',
|
||||
url: 'FO/FOFireJobWb/GetEdit',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
if(this.props.data && this.props.data.loadDataDeal)
|
||||
@ -73,75 +78,204 @@ class FO045ShowPrint extends React.Component {
|
||||
}else{
|
||||
this.setState({ BtnAgreeDisplay: 'inline' })
|
||||
}
|
||||
this.onClickApprove(false);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
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")
|
||||
XLSX.writeFile(wb, "动火作业工作票(外包).xlsx")
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data } = this.state;
|
||||
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||
return <div>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
|
||||
<ReactToPrint
|
||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>}
|
||||
content={() => this.componentRef}
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >审阅</Button>
|
||||
</div>
|
||||
|
||||
|
||||
{/* */}
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id} className="printDIV">
|
||||
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>领导带班下井记录</h1>
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>动火作业工作票(外包)</h1>
|
||||
{
|
||||
data ?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (i == (data.Nav_Person.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User?.NAME}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME
|
||||
} else {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User?.NAME + ' '}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME + ' '
|
||||
}
|
||||
})
|
||||
<Descriptions size="middle" bordered className={styles.description}>
|
||||
<Descriptions.Item label="公司">{data.Nav_Company?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="发起时间">{data.CREATE_TIME}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="发起部门">{data.Nav_ApplyDepartment?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="发起人">{data.Nav_ApplyUser?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="工作票编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="作业名称">{data.Nav_OperationStep?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="审批层级">{enums.HMOperationTaskAuditEnum.enums[data.AUDIT_LEVEL]}</Descriptions.Item>
|
||||
<Descriptions.Item label="作业风险等级">{enums.SKEvaluateLevelEnum.enums[data.EVALUATE_LEVEL]}</Descriptions.Item>
|
||||
<Descriptions.Item label="施工单位">{data.Nav_Related?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="施工单位负责人">{data.USER_NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="负责人电话">{data.USER_PHONE}</Descriptions.Item>
|
||||
<Descriptions.Item label="安全生产管理人员">{data.SAFE_USER_NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="安全员电话">{data.SAFE_USER_PHONE}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火区域">{data.Nav_Area?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火地点">{data.JOB_CONTENT}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火方式">{data.Nav_Type?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火具体事项">{data.JOB_CONTENT}</Descriptions.Item>
|
||||
<Descriptions.Item label="作业监护人">{data.Nav_MonitorUser?.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火计划开始时间">{data.JOB_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火计划结束时间">{data.JOB_END_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="存在的风险">{ data.Nav_Risks && data.Nav_Risks.map((item, i) => {
|
||||
return item.RISK_NAME + ' '
|
||||
})}</Descriptions.Item>
|
||||
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="动火作业现场条件验收情况">{data.COMPLETED_CONDITION}</Descriptions.Item>
|
||||
<Descriptions.Item label="是否可以动火">{enums.FOYesOrNoEnum.enums[data.IS_FIRE]}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火实际开始时间">{data.ACT_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="附件"> {showFiles(data.Nav_FireFiles, config.picServerHost, this)}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="动火部门负责人签名">{
|
||||
data.USER_DEAL_STATUS == 1 && data.Nav_FireUser[0] && data.Nav_FireUser[0].Nav_ImgFile?
|
||||
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_FireUser[0].Nav_ImgFile.FILE_PATH} />
|
||||
:null
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人签字">{
|
||||
(data.Nav_User && data.Nav_User.FILE_PATH)?
|
||||
showUserSign(data.Nav_User, config.picServerHost):null
|
||||
<Descriptions.Item label="安全管理人员签名">{
|
||||
|
||||
data.SAFE_DEAL_STATUS == 1 && data.Nav_SafeUser[0] && data.Nav_SafeUser[0].Nav_ImgFile?
|
||||
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_SafeUser[0].Nav_ImgFile.FILE_PATH} />
|
||||
:null
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人签字">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
}
|
||||
})
|
||||
<Descriptions.Item label="动火作业完工验收情况">{
|
||||
data.COMPLETED_CONTENT
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="是否可以撤离">{
|
||||
enums.FOYesOrNoEnum.enums[data.IS_LEAVE]
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火实际结束时间">{
|
||||
data.ACT_END_DATE
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="离开现场时间">{
|
||||
data.LEAVE_DATE
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="附件">{
|
||||
showFiles(data.Nav_MonitorFiles, config.picServerHost, this)
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="动火部门负责人签字">{
|
||||
data.USER_DEAL_FINISH_STATUS == 1 && data.Nav_FireUser[0] && data.Nav_FireUser[0].Nav_ImgFile?
|
||||
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_FireUser[0].Nav_ImgFile.FILE_PATH} />
|
||||
:null
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="安全生产管理人员签字">{
|
||||
data.SAFE_DEAL_FINISH_STATUS == 1 && data.Nav_SafeUser[0] && data.Nav_SafeUser[0].Nav_ImgFile?
|
||||
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_SafeUser[0].Nav_ImgFile.FILE_PATH} />
|
||||
:null
|
||||
}</Descriptions.Item>
|
||||
|
||||
</Descriptions>
|
||||
<FormPage {...this.state.tmpData} />
|
||||
{
|
||||
data && data.Nav_Users?
|
||||
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td width="100px" className={styles.fontBold}>序号</td>
|
||||
<td className={styles.fontBold}>作业人员类别</td>
|
||||
<td className={styles.fontBold}>姓名</td>
|
||||
<td className={styles.fontBold}>证书编号</td>
|
||||
<td className={styles.fontBold}>附件</td>
|
||||
{/* <td className={styles.fontBold}>签名</td> */}
|
||||
</tr>
|
||||
{
|
||||
data.Nav_Users && data.Nav_Users.map((item, i) => {
|
||||
return <tr>
|
||||
<td width="100px">
|
||||
{i + 1}
|
||||
</td>
|
||||
<td>
|
||||
{item.Nav_UserType?.NAME}
|
||||
</td>
|
||||
<td>
|
||||
{item.Nav_User?.NAME}
|
||||
</td>
|
||||
<td>
|
||||
{item.CERTIFICATE_CODE}
|
||||
</td>
|
||||
<td>
|
||||
{showFiles(item.Nav_UserFiles, config.picServerHost, this)}
|
||||
</td>
|
||||
{/* <td>
|
||||
{ item.DEAL_STATUS == 1?
|
||||
showUserSign(item.Nav_User, config.picServerHost):null
|
||||
}
|
||||
</td> */}
|
||||
</tr>
|
||||
})
|
||||
}
|
||||
</tbody>
|
||||
</table> : null
|
||||
}
|
||||
{
|
||||
data && data.Nav_Details?
|
||||
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td width="100px" className={styles.fontBold}>序号</td>
|
||||
<td className={styles.fontBold}>作业阶段</td>
|
||||
<td className={styles.fontBold}>作业流程及安全措施</td>
|
||||
<td className={styles.fontBold}>是否确认</td>
|
||||
<td className={styles.fontBold}>附件</td>
|
||||
</tr>
|
||||
{
|
||||
data.Nav_Details && data.Nav_Details.map((item, i) => {
|
||||
return <tr>
|
||||
<td width="100px">
|
||||
{i + 1}
|
||||
</td>
|
||||
<td>
|
||||
{enums.FOJobStepEnum.enums[item.JOB_STEP]}
|
||||
</td>
|
||||
<td>
|
||||
{item.CONTENT}
|
||||
</td>
|
||||
<td>
|
||||
{item.IS_CONFIRM_NEW ? "是" : "否"}
|
||||
{/* {enums.FOYesOrNoEnum.enums[item.IS_CONFIRM]} */}
|
||||
</td>
|
||||
<td>
|
||||
{showFiles(item.Nav_DetailFiles, config.picServerHost, this)}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
})
|
||||
}
|
||||
</tbody>
|
||||
</table> : null
|
||||
}
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
@ -149,4 +283,4 @@ class FO045ShowPrint extends React.Component {
|
||||
}
|
||||
|
||||
}
|
||||
export default connect(({ login }) => ({ login }))(FO045ShowPrint)
|
||||
export default connect(({ login,app }) => ({ login,app }))(FO045ShowPrint)
|
||||
@ -49,6 +49,15 @@ class ListPage extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const prevFlag = (this.props && (this.props.clearQuery || (this.props.data && this.props.data.clearQuery))) || false
|
||||
const nextFlag = (nextProps && (nextProps.clearQuery || (nextProps.data && nextProps.data.clearQuery))) || false
|
||||
if (nextFlag && nextFlag !== prevFlag) {
|
||||
this.refOfSearch && this.refOfSearch.resetQuery && this.refOfSearch.resetQuery()
|
||||
this.loadData({ rules: [], groups: [] })
|
||||
}
|
||||
}
|
||||
|
||||
loadData = (params) => {
|
||||
if (this.state.loadDataFunc) {
|
||||
if (!this.state.loadDataFunc.length) {
|
||||
|
||||
@ -462,8 +462,7 @@ class MultiSelectPagination extends React.Component {
|
||||
this.setState({
|
||||
value: stateValue,
|
||||
searchKey: ""
|
||||
//fetching: false,
|
||||
}, () => this.initFilterJson("", 1));
|
||||
});
|
||||
let retVal = this.getDataValue(stateValue);
|
||||
this.state.baseNav.forEach(db => {
|
||||
const index = stateValue.findIndex(i => i.key == db[this.state.saveId]);
|
||||
|
||||
@ -3,6 +3,7 @@ import React from 'react'
|
||||
import { connect } from 'dva'
|
||||
// 组件库
|
||||
import { Tabs } from 'antd'
|
||||
import storage from '../utils/storage'
|
||||
import AdvanceSearch from './AdvanceSearch'
|
||||
import SearchGroupField from './SearchGroupField'
|
||||
import EditTabPane from './EditTabPane'
|
||||
@ -186,6 +187,30 @@ class Search extends React.Component {
|
||||
})
|
||||
}
|
||||
|
||||
resetQuery = () => {
|
||||
const { filterList } = this.state
|
||||
if (Array.isArray(filterList)) {
|
||||
filterList.forEach(item => {
|
||||
const key = item && item.SHARE_KEY
|
||||
if (key) {
|
||||
this.props.dispatch({
|
||||
type: 'search/setShareData',
|
||||
payload: { key, data: [] }
|
||||
})
|
||||
storage('session').removeItem(key)
|
||||
}
|
||||
})
|
||||
}
|
||||
Object.keys(this.refsOfField || {}).forEach((id) => {
|
||||
const inst = this.refsOfField[id]
|
||||
inst && inst.setState && inst.setState({ data: {} })
|
||||
})
|
||||
Object.keys(this.refsOfGroup || {}).forEach((id) => {
|
||||
const inst = this.refsOfGroup[id]
|
||||
inst && inst.setState && inst.setState({ data: {} })
|
||||
})
|
||||
}
|
||||
|
||||
renderTabBar = (props, DefaultTabBar) => {
|
||||
const { filterList } = this.state
|
||||
if (filterList.length <= 1) {
|
||||
|
||||
57
src/files/edit/FO039.js
Normal file
57
src/files/edit/FO039.js
Normal file
@ -0,0 +1,57 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
|
||||
import moment from 'moment';
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
// 编辑
|
||||
export default {
|
||||
onChange: ({ colInfo, getFieldValue, setFieldValueByBatch,setFieldValue, dispatch,login,updateSubTableData }) => {
|
||||
if (!(colInfo.FIELD_NAME == 'Nav_User.NAME'))
|
||||
return;
|
||||
|
||||
let code = getFieldValue('USER_ID')
|
||||
let json = initFilter(login.OrgId,code);
|
||||
dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOProfessionalResume/GetUserAge',
|
||||
payload: json,
|
||||
onlyData: false,
|
||||
onComplete: (re) => {
|
||||
if (re && re.IsSuccessful && re.Data) {
|
||||
setFieldValue('AGE',re.Data.AGE)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubChange: ({ row, getFieldValue, setFieldValueByBatch, pageCode, record, setDataState, colInfo, dispatch, stateData, saveRowRecord }) => {
|
||||
if (colInfo.FIELD_NAME === "START_DATE" ||colInfo.FIELD_NAME === "END_DATE" ) {
|
||||
let startDate = getDataFieldValue(record, 'START_DATE');
|
||||
let endDate =getDataFieldValue(record, 'END_DATE');
|
||||
if(startDate && endDate)
|
||||
{
|
||||
const start = new Date(startDate);
|
||||
const end = new Date(endDate);
|
||||
const years = end.getFullYear() - start.getFullYear();
|
||||
const months = end.getMonth() - start.getMonth();
|
||||
let yearsWithDecimal = (years + (months / 12)).toFixed(1); // 保留一位小数
|
||||
if (yearsWithDecimal.endsWith('.0')) {
|
||||
// 去掉末尾的.0,但不四舍五入
|
||||
yearsWithDecimal = yearsWithDecimal.substring(0, yearsWithDecimal.length - 2);
|
||||
|
||||
}
|
||||
record["WORK_YEAR"] = yearsWithDecimal;
|
||||
saveRowRecord(record)
|
||||
if(stateData && stateData.Nav_Details)
|
||||
{
|
||||
let year = 0;
|
||||
stateData.Nav_Details.map(t=>{
|
||||
year = Math.round(year + t.WORK_YEAR);
|
||||
})
|
||||
stateData.YEAR=year
|
||||
setDataState(stateData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
108
src/files/edit/FO043.js
Normal file
108
src/files/edit/FO043.js
Normal file
@ -0,0 +1,108 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
|
||||
import moment from 'moment';
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
// 编辑
|
||||
export default {
|
||||
onBeforeSaveHandleRecord(params) {
|
||||
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||
params.record.PUBLISH = params.customParams;
|
||||
},
|
||||
onBeforeEdit: ({ isNew,login,record, dispatch,stateData, setFieldEditable,setFieldVisible,setFieldValue,setFieldValueByBatch }) => {
|
||||
if (isNew) {
|
||||
let json = initFilter(login.OrgId);
|
||||
extendRule(json, "ID", 1, login.userId);
|
||||
extendInclude(json, 'Nav_Department.Nav_Unit');
|
||||
dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FM/User/Get',
|
||||
payload: json,
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
let temps = [];
|
||||
temps.push({ field: 'APPLY_USER_ID', value: ret.ID})
|
||||
temps.push({ field: 'Nav_ApplyUser.NAME', value: ret.NAME })
|
||||
temps.push({ field: 'APPLY_DEPARTMENT_ID', value: ret.DEPARTMENT_ID})
|
||||
temps.push({ field: 'Nav_ApplyDepartment.NAME', value: ret.Nav_Department?.NAME })
|
||||
temps.push({ field: 'PRODUCTION_UNIT_ID', value: ret.Nav_Department?.PRODUCTION_UNIT_ID})
|
||||
temps.push({ field: 'Nav_ProductionUnit.NAME', value: ret.Nav_Department?.Nav_Unit?.NAME })
|
||||
setFieldValueByBatch(temps);
|
||||
}
|
||||
}
|
||||
});
|
||||
///发起人不能编辑
|
||||
setFieldEditable('COMPLETED_CONDITION', false)
|
||||
setFieldEditable('IS_FIRE', false)
|
||||
setFieldEditable('ACT_DATE', false)
|
||||
setFieldEditable('Nav_FireFiles', false)
|
||||
setFieldEditable('Nav_DispatchUser.NAME', false)
|
||||
setFieldEditable('COMPLETED_CONTENT', false)
|
||||
setFieldEditable('IS_LEAVE', false)
|
||||
setFieldEditable('ACT_END_DATE', false)
|
||||
setFieldEditable('LEAVE_DATE', false)
|
||||
setFieldEditable('Nav_MonitorFiles', false)
|
||||
}
|
||||
else if(stateData.FIRE_STATUS == 10)
|
||||
{
|
||||
setFieldEditable('COMPLETED_CONDITION', true)
|
||||
setFieldEditable('IS_FIRE', true)
|
||||
setFieldEditable('ACT_DATE', true)
|
||||
setFieldEditable('Nav_FireFiles', true)
|
||||
setFieldEditable('Nav_DispatchUser.NAME', true)
|
||||
setFieldEditable('COMPLETED_CONTENT', false)
|
||||
setFieldEditable('IS_LEAVE', false)
|
||||
setFieldEditable('ACT_END_DATE', false)
|
||||
setFieldEditable('LEAVE_DATE', false)
|
||||
setFieldEditable('Nav_MonitorFiles', false)
|
||||
}
|
||||
else if(stateData.FIRE_STATUS == 18)
|
||||
{
|
||||
setFieldEditable('COMPLETED_CONDITION', false)
|
||||
setFieldEditable('IS_FIRE', false)
|
||||
setFieldEditable('ACT_DATE', false)
|
||||
setFieldEditable('Nav_FireFiles', false)
|
||||
setFieldEditable('Nav_DispatchUser.NAME', false)
|
||||
setFieldEditable('COMPLETED_CONTENT', true)
|
||||
setFieldEditable('IS_LEAVE', true)
|
||||
setFieldEditable('ACT_END_DATE', true)
|
||||
setFieldEditable('LEAVE_DATE', true)
|
||||
setFieldEditable('Nav_MonitorFiles', true)
|
||||
}else
|
||||
{
|
||||
setFieldEditable('COMPLETED_CONDITION', false)
|
||||
setFieldEditable('IS_FIRE', false)
|
||||
setFieldEditable('ACT_DATE', false)
|
||||
setFieldEditable('Nav_FireFiles', false)
|
||||
setFieldEditable('Nav_DispatchUser.NAME', false)
|
||||
setFieldEditable('COMPLETED_CONTENT', false)
|
||||
setFieldEditable('IS_LEAVE', false)
|
||||
setFieldEditable('ACT_END_DATE', false)
|
||||
setFieldEditable('LEAVE_DATE', false)
|
||||
setFieldEditable('Nav_MonitorFiles', false)
|
||||
}
|
||||
},
|
||||
onChange: ({ colInfo, getFieldValue, setFieldValueByBatch, dispatch,login,updateSubTableData }) => {
|
||||
if (!(colInfo.FIELD_NAME == 'Nav_OperationStep.NAME'))
|
||||
return;
|
||||
|
||||
let code = getFieldValue('OPERATION_STEP_ID')
|
||||
let json = initFilter(login.OrgId,code);
|
||||
dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOFireJob/GetAnalyzeDetail',
|
||||
payload: json,
|
||||
onlyData: false,
|
||||
onComplete: (re) => {
|
||||
if (re && re.IsSuccessful && re.Data) {
|
||||
let temps = [];
|
||||
temps.push({ field: 'Nav_Details', value: re.Data.Nav_Details })
|
||||
temps.push({ field: 'EVALUATE_LEVEL', value: re.Data.EVALUATE_LEVEL })
|
||||
temps.push({ field: 'AUDIT_LEVEL', value: re.Data.AUDIT_LEVEL})
|
||||
setFieldValueByBatch(temps);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
@ -135,6 +135,10 @@ export default {
|
||||
onComplete: (re) => {
|
||||
if (re && re.IsSuccessful && re.Data) {
|
||||
let temps = [];
|
||||
let rets=re.Data?.map((item,i)=>{
|
||||
item['ROW_NO'] = i+1;
|
||||
return item;
|
||||
});
|
||||
temps.push({ field: 'Nav_CheckNoticeDetails', value: re.Data })
|
||||
setFieldValueByBatch(temps);
|
||||
// stateData.Nav_CheckNoticeDetails = re.Data
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
|
||||
import { getPropertyData, extendInclude, extendRule, initFilterGroup, extendGroupRule,getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
|
||||
import moment from 'moment';
|
||||
import FormPage from '../../components/FormPage';
|
||||
import ListPage from '../../components/Table/ListPage';
|
||||
@ -9,8 +9,24 @@ import { Button, Row, Col, Form, Input, Select, Upload, Icon, Modal, Spin,Table
|
||||
*/
|
||||
// 编辑
|
||||
export default {
|
||||
btnSaveNotice: ({params,row,loadData, pageCode,close, record, dispatch,colInfo,login, stateData, clearSelectedRowKeys, saveRowRecord,setFieldValueByBatch, getSelectedRecords }) => {
|
||||
let DetailCheck = getSelectedRecords();
|
||||
btnSaveNotice: ({ params, row, loadData, pageCode, close, record, dispatch, colInfo, login, stateData, getSelectedRowKeys, clearSelectedRowKeys, saveRowRecord, setFieldValueByBatch, getSelectedRecords }) => {
|
||||
let selectedKeys = getSelectedRowKeys();
|
||||
let filter = initFilter();
|
||||
let filterGroup = initFilterGroup(false);
|
||||
selectedKeys.forEach((item) => {
|
||||
extendGroupRule(filterGroup, "ID", 1, item);
|
||||
})
|
||||
filter.FilterGroup = filterGroup;
|
||||
dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'SK/CheckContents/Entities',
|
||||
payload: filter,
|
||||
onlyData: false,
|
||||
onComplete: (re) => {
|
||||
if (re && re.IsSuccessful) {
|
||||
message.success("执行成功");
|
||||
clearSelectedRowKeys();
|
||||
let DetailCheck=re.Data;
|
||||
if (DetailCheck && DetailCheck.length > 0) {
|
||||
let temps = [];
|
||||
DetailCheck.map((item, index) => {
|
||||
@ -25,16 +41,17 @@ export default {
|
||||
|
||||
if (!temps || temps.length == 0) {
|
||||
message.error('请选择要导入的内容');
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
login.tempContents = temps
|
||||
clearSelectedRowKeys();
|
||||
// loadData();
|
||||
// close();
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.error('请选择要导入的内容');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ const BI002HomeDetail = createLoadableComponent(() => import('../components/Cust
|
||||
// const BI054HomeDetail = createLoadableComponent(() => import('../components/CustomPages/BI/BI054HomeDetail'))
|
||||
// const BI055HomeDetail = createLoadableComponent(() => import('../components/CustomPages/BI/BI055HomeDetail'))
|
||||
// const BI004FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI004FormRunAnalysis'))
|
||||
// const BI005LoginRecord = createLoadableComponent(() => import('../components/CustomPages/BI/BI005LoginRecord'))
|
||||
const BI005LoginRecord = createLoadableComponent(() => import('../components/CustomPages/BI/BI005LoginRecord'))
|
||||
// const BI006FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI006FormRunAnalysis'))
|
||||
// const BI006FormRunAnalysisNew = createLoadableComponent(() => import('../components/CustomPages/BI/BI006FormRunAnalysisNew'))
|
||||
// const BI007FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI007FormRunAnalysis'))
|
||||
@ -168,7 +168,7 @@ const BI011FormRunAnalysis = createLoadableComponent(() => import('../components
|
||||
const BI011TrainSafeAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI011TrainSafeAnalysis'))
|
||||
// const BI012NotificationTaskAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI012NotificationTaskAnalysis'))
|
||||
// const BI013RiskAnalysisModel = createLoadableComponent(() => import('../components/CustomPages/BI/BI013RiskAnalysisModel'))
|
||||
// const BI030FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI030FormRunAnalysis'))
|
||||
const BI030FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI030FormRunAnalysis'))
|
||||
|
||||
// const BI060MapeShow = createLoadableComponent(() => import('../components/CustomPages/BI/BI060MapeShow'))
|
||||
// const BI060MapePoint = createLoadableComponent(() => import('../components/CustomPages/BI/BI060MapePoint'))
|
||||
@ -188,9 +188,9 @@ const BI056Performance = createLoadableComponent(() => import('../components/Cus
|
||||
// const BI056Dilg3_1 = createLoadableComponent(() => import('../components/CustomPages/BI/BI056Dilg3_1'))
|
||||
// const BI056Dilg3_2 = createLoadableComponent(() => import('../components/CustomPages/BI/BI056Dilg3_2'))
|
||||
// const BI003StatiscialAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI003StatiscialAnalysis'))
|
||||
// const BI020ApproveAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI020ApproveAnalysis'))
|
||||
const BI020ApproveAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI020ApproveAnalysis'))
|
||||
const BI014RiskPerformanceModel = createLoadableComponent(() => import('../components/CustomPages/BI/BI014RiskPerformanceModel'))
|
||||
// const BI012FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI012FormRunAnalysis'))
|
||||
const BI012FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/BI/BI012FormRunAnalysis'))
|
||||
|
||||
const PF136FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/PF/PF136FormRunAnalysis'))
|
||||
const PF139FormRunAnalysis = createLoadableComponent(() => import('../components/CustomPages/PF/PF139FormRunAnalysis'))
|
||||
@ -392,7 +392,7 @@ export default function (componentName, formId, formParam, data, formCode, formD
|
||||
BI001HomeDetail: <BI001HomeDetail formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI002HomeDetail: <BI002HomeDetail formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI004FormRunAnalysis: <BI004FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI005LoginRecord: <BI005LoginRecord formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
BI005LoginRecord: <BI005LoginRecord formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI006FormRunAnalysis: <BI006FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI006FormRunAnalysisNew: <BI006FormRunAnalysisNew formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI007FormRunAnalysis: <BI007FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
@ -405,13 +405,13 @@ export default function (componentName, formId, formParam, data, formCode, formD
|
||||
// BI012NotificationTaskAnalysis: <BI012NotificationTaskAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI013RiskAnalysisModel: <BI013RiskAnalysisModel formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
BI014RiskPerformanceModel: <BI014RiskPerformanceModel formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI030FormRunAnalysis: <BI030FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
BI030FormRunAnalysis: <BI030FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI060MapeShow: <BI060MapeShow formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI060MapePoint: <BI060MapePoint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI061MapeGISShow: <BI061MapeGISShow formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
BI009FormRunAnalysis: <BI009FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI020ApproveAnalysis: <BI020ApproveAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
// BI012FormRunAnalysis: <BI012FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
BI020ApproveAnalysis: <BI020ApproveAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
BI012FormRunAnalysis: <BI012FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
PF136FormRunAnalysis: <PF136FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
PF139FormRunAnalysis: <PF139FormRunAnalysis formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO025ShowPrint: <FO025ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user