This commit is contained in:
wjn 2024-01-26 17:28:02 +08:00
parent e5354268fd
commit b54876f903
28 changed files with 0 additions and 4734 deletions

View File

@ -1,162 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG001ReportView extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
BtnAgreeDisplay: 'none',
assessUser: '',
isReviewed: false
};
};
componentDidMount() {
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 json = {
// ORG_ID: this.props.login.OrgId,
// TaskID: this.props.data.TaskID,
// };
// this.props.dispatch({
// type: 'app/getDataByPost',
// url: 'OG/OGSafePdtSigned/Agree',
// payload: json,
// onComplete: (ret) => {
// if (ret) {
// message.success('审阅成功!');
// this.BtnClose();
// }
// }
// })
// }
onTableBtnAgree() {
this.props.dispatch({
type: 'app/getDataByPost',
url: 'HM/HMNoticeRelease/PersonalAgree',
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 json = initFilter(this.props.login.OrgId);
if (dataId == "") {
extendRule(json, 'Nav_SafePdtSigned.ANNUAL', 1, new Date().getFullYear())
} else {
extendRule(json, 'SAFE_PDT_SIGNED_ID', 1, dataId)
}
extendInclude(json, 'Nav_User.Nav_Department');
extendInclude(json, 'Nav_Post');
extendInclude(json, 'Nav_ChargeUser');
extendInclude(json, 'Nav_SafePdtSigned.Nav_StandardCreate');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/SafePdtSignedPost/OrderPaged',
onComplete: (ret) => {
if (ret && ret.length > 0) {
if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ isReviewed: false })
} else {
this.setState({ isReviewed: true })
}
this.setState({
data: ret,
})
}
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "安全生产责任制签订.xlsx")
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
{this.state.isReviewed && (
<Button type={'primary'} style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnAgree()} icon="check" >审阅</Button>
)}
</div>
{/* 安全生产责任制签订 */}
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>安全生产责任制签订</h1>
{
data ? <table style={{ width: '100%', textAlign: 'center', border: '1px solid #333' }} className={styles.PrintForm}>
<tr>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>年度</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>责任制名称</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>岗位</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>部门</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>签订人员</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>签订状态</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>签订日期</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>负责人</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>负责人签订状态</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>查看</td>
</tr>
{
data.map((d, idx) => {
return <tr>
<td colSpan={4} rowSpan={1}>{d.Nav_SafePdtSigned.ANNUAL}</td>
<td colSpan={4} rowSpan={1}>{d.Nav_SafePdtSigned.Nav_StandardCreate.NAME}</td>
<td colSpan={4} rowSpan={1}>{d.Nav_Post.NAME}</td>
<td colSpan={4} rowSpan={1}>{d.Nav_User.Nav_Department.NAME}</td>
<td colSpan={4} rowSpan={1}>{d.Nav_User.NAME}</td>
<td colSpan={4} rowSpan={1}>{d.DEAL_STATUS == 0 ? <label style={{ color: 'red' }} title='未签订'>未签订</label> : ""}</td>
<td colSpan={4} rowSpan={1}>{d.SIGNED_TIME}</td>
<td colSpan={4} rowSpan={1}>{d.Nav_ChargeUser.NAME}</td>
<td colSpan={4} rowSpan={1}>{d.CHARGE_DEAL_STATUS == 0 ? <label style={{ color: 'red' }} title='未签订'>未签订</label> : ""}</td>
<td colSpan={4} rowSpan={1}>{d.DEAL_STATUS == 0 ? <Button icon={'eye'} onClick={this.getSqlsByFormId} ></Button> : null}</td>
</tr>
})
}
</table> : null
}
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG001ReportView)

View File

@ -1,164 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter, onBeforeSaveHandleRecordLog } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import config from "../../../config";
import { connect } from 'dva';
import moment from 'moment';
class OG001ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
enumData: null,
BtnUserDisplay: 'none',
BtnChargeUserDisplay: 'none',
data: null,
};
};
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);
}
}
onTableBtnUser() {
this.props.dispatch({
type: 'app/getDataByPost',
url: 'OG/OGSafePdtSigned/UserAgree',
payload: {
ID: this.props.data.id,
TaskID: this.props.data.TaskID,
},
onComplete: (ret) => {
if (ret) {
message.success('签订成功!');
this.setState({ BtnUserDisplay: 'none' })
this.BtnClose();
}
}
})
}
onTableBtnChargeUser() {
this.props.dispatch({
type: 'app/getDataByPost',
url: 'OG/OGSafePdtSigned/ChargeUserAgree',
payload: {
ID: this.props.data.id,
TaskID: this.props.data.TaskID,
},
onComplete: (ret) => {
if (ret) {
message.success('签订成功!');
this.setState({ BtnChargeUserDisplay: 'none' })
this.BtnClose();
}
}
})
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId);
extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_SafePdtSignedPost.Nav_User.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_SafePdtSignedPost.Nav_ChargeUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_StandardCreate');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/OGSafePdtSigned/FullGet',
onComplete: (ret) => {
if (ret) {
this.setState({ data: ret })
let findChargeUser = ret.Nav_SafePdtSignedPost.find(item => item.CHARGE_USER_ID == this.props.login.user.ID && item.CHARGE_DEAL_STATUS == 0);
if (findChargeUser != undefined) {
this.setState({ BtnChargeUserDisplay: 'inline' })
} else {
let finduser = ret.Nav_SafePdtSignedPost.find(item => item.USER_ID == this.props.login.user.ID && item.DEAL_STATUS == 0);
if (finduser != undefined) {
this.setState({ BtnUserDisplay: 'inline' })
}
}
}
}
});
}
render() {
const { data } = this.state;
return <div>
<div style={{ marginTop: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '20px', display: this.state.isFinished }} >打印</Button>}
content={() => this.componentRef}
/>
<Button type={'primary'} style={{ marginLeft: '20px', display: this.state.BtnUserDisplay }} onClick={() => this.onTableBtnUser()} icon="check" >签订</Button>
<Button type={'primary'} style={{ marginLeft: '20px', display: this.state.BtnChargeUserDisplay }} onClick={() => this.onTableBtnChargeUser()} icon="check" >主管签订</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>{data ? data.Nav_StandardCreate.NAME : ''}</h1>
<div style={{ fontSize: '1.5em', textIndent: '2em' }}>
<div dangerouslySetInnerHTML={{ __html: data ? data.FILE_CONTENT : '' }}></div>
</div>
{
data ? <table style={{ width: '100%', marginTop: '8px', textAlign: 'left' }}>
<tbody>
<tr>
<td colSpan={3} rowSpan={1} >负责人:{
data.Nav_SafePdtSignedPost && data.Nav_SafePdtSignedPost.map((item, i) => {
if (i == 0) {
if (item.CHARGE_DEAL_STATUS == 1) {
if (item.Nav_ChargeUser != null && item.Nav_ChargeUser.Nav_UserSignFiles[0] != null)
return <span><img width={'150px'} alt={item.Nav_ChargeUser.NAME} src={config.picServerHost + item.Nav_ChargeUser.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH} /> <span>{new Date(item.CHARGE_SIGNED_TIME).Format("yyyy-MM-dd")}</span></span>
else
return <span><img width={'150px'} alt={item.Nav_ChargeUser.NAME} /> <span>{new Date(item.CHARGE_SIGNED_TIME).Format("yyyy-MM-dd")}</span></span>
}
}
})
}
</td>
</tr>
<tr>
<td colSpan={3} rowSpan={1} >签订人员:
{
data.Nav_SafePdtSignedPost && data.Nav_SafePdtSignedPost.map((item, i) => {
if (item.DEAL_STATUS == 1) {
if (item.Nav_User != null && item.Nav_User.Nav_UserSignFiles[0] != null)
return <span><img width={'150px'} alt={item.Nav_User.NAME} src={config.picServerHost + item.Nav_User.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH} /> <span>{new Date(item.SIGNED_TIME).Format("yyyy-MM-dd")}</span></span>
else
return <span><img width={'150px'} alt={item.Nav_User.NAME} /> <span>{new Date(item.SIGNED_TIME).Format("yyyy-MM-dd")}</span></span>
}
})
}
</td>
</tr>
</tbody>
</table> : null
}
</div>
</div>
}
}
export default connect(({ login }) => ({ login }))(OG001ShowPrint)

View File

@ -1,202 +0,0 @@
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, 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 OG003ShowPrint 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: 'OG/OGSafePdtAssessPlanCheck/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.Nav_Person.Nav_Post')
extendInclude(json, 'Nav_Department.Nav_User')
extendInclude(json, 'Nav_Details.Nav_Post')
extendInclude(json, 'Nav_Details.Nav_Contents')
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
that.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/SafePdtAssessPlanCheck/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' })
// }
}
}
});
}
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 <div>
<div style={{ padding: '10px' }}>
<Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
<ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.IS_PUBLISH === 5 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.IS_PUBLISH === 5 ? "inline" : "none" }}>导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >已阅</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center'}}>安全生产责任制考核方案审核</h1>
{
data ?
<div>
<Descriptions size="middle" bordered className={styles.description}>
<Descriptions.Item label="制定时间">{data.TIME}</Descriptions.Item>
<Descriptions.Item label="制定部门">{data.Nav_Department ? data.Nav_Department.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="制定人员">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="考核年度">{data?.ANNUAL}</Descriptions.Item>
<Descriptions.Item label="方案名称">{data?.NAME}</Descriptions.Item>
<Descriptions.Item label="附件">{
data.Nav_Files && data.Nav_Files.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}</Descriptions.Item>
</Descriptions>
</div> : null
}
{
data ? <table style={{ width: '100%', textAlign: 'left' }} className={styles.PrintForm1}>
<tr>
<td width='150px' 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>
<td className={styles.fontBold}>考核认定评分办法</td>
</tr>
{
data?.Nav_Details && data?.Nav_Details.map((item, i) => {
return <tr>
<td>
{i + 1}
</td>
<td>
{item?.Nav_Post?.NAME}
</td>
<td>
{item?.ANNUAL}
</td>
<td>
{enums.PTAssessmentCycleEnums.enums[item?.CYCLE]}
</td>
<td>
{
item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => {
return <tr>{item2?.NAME}</tr>
})
}
</td>
<td>
{
item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => {
return <tr> {item2.SCORE}</tr>
})
}
</td>
<td>
{
item?.Nav_Contents && item?.Nav_Contents.map((item2, i) => {
return <tr> {item2.METHOD}</tr>
})
}
</td>
</tr>
})
}
</table> : null
}
<FormPage {...this.state.tmpData} />
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG003ShowPrint)

View File

@ -1,112 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import WFViewComponent from '../../Lib/WFViewComponent'
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG004View extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
BtnAgreeDisplay: 'none',
assessUser: ''
};
};
componentDidMount() {
this.loadData();
}
onTableBtnAgree() {
}
BtnClose = () => {
if (typeof this.props.closeFn != "undefined")
this.props.closeFn();
else if (typeof this.props.data.closeTab == 'function') {
this.props.data.closeTab(this.props.data.id)
} else if (typeof this.props.onCancel === "function"){
this.props.onCancel();
}
}
loadData = () => {
let json = initFilter(this.props.login.OrgId);
extendRule(json, 'ID', 1, this.props.record.ID);
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_SafePdtSignedPost');
extendInclude(json, 'Nav_SafePdtSignedPost.Nav_Post');
extendInclude(json, 'Nav_SafePdtSignedPost.Nav_Files');
extendInclude(json, 'Nav_SafePdtSignedPost.Nav_Files.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/SafePdtSigned/Get',
onComplete: (ret) => {
if (ret) {
this.setState({ data: ret })
}
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.record.ID);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "安全生产责任制签订.xlsx")
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
{/* 安全生产责任制签订 */}
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.record.ID}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>安全生产责任制签订</h1>
{
data ? <table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>签订人员</td>
<td colSpan={21} rowSpan={1} >{data.Nav_User ? data.Nav_User.NAME : ''}</td>
</tr>
<tr>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>序号</td>
<td colSpan={10} rowSpan={1} className={styles.fontBold}>岗位</td>
<td colSpan={10} rowSpan={1} className={styles.fontBold}>附件</td>
</tr>
{
data.Nav_SafePdtSignedPost ? data.Nav_SafePdtSignedPost.map((items, index) => {
return <tr >
<td colSpan={4} rowSpan={1}>{index + 1}</td>
<td colSpan={10} rowSpan={1}>{items.Nav_Post.NAME}</td>
<td colSpan={10} rowSpan={1}>{
items.Nav_Files && items.Nav_Files.map((item, i) => {
return <a width={'20%'} title={item.Nav_File.FILE_NAME} target='_blank' href={config.serviceHost + 'PF/File/GetFile?id=' + item.FILE_ID} >{item.Nav_File.FILE_NAME} </a>
})
}
</td>
</tr>
}) : null
}
</table> : null
}
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG004View)

View File

@ -1,282 +0,0 @@
import React from 'react';
import { connect } from 'dva';
import moment from 'moment';
import { Button, Row, Col, Form, Input, Select, Checkbox, Modal, Transfer, Spin, Table, DatePicker, InputNumber, message, Upload, Icon } from 'antd';
import {
extend,
extendRule,
initFilter,
guid,
extendGroupRule,
initFilterGroup,
extendInclude, getOnlyPropertyData
} from "../../../utils/common";
import config from "../../../config";
import storage from '../../../utils/storage';
const FormItem = Form.Item;
const Option = Select.Option;
const { TextArea } = Input;
class OG005ImportPage extends React.Component {
constructor(props) {
super(props);
this.state = {
data: {},
selectedRowKeys: [],
};
};
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
componentDidMount() {
if (this.props.data?.id) {
this.props.form.resetFields();
this.loadData(this.props.data?.id);
}
}
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 = {
Authorization: addHeader,
userid: userId,
username: user ? user.username : '',
RootOrgId,
orgId,
Tenant: Tenant
}
return headers
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
componentWillReceiveProps(NextProps) {
if (NextProps.custom.userImportClick) {
this.props.form.resetFields();
this.loadData();
this.props.dispatch({
type: 'custom/save',
payload: {
userImportClick: false
},
});
}
}
loadData = () => {
const { data, formId, login, dispatch } = this.props;
const { id } = data ? data : {};
this.setState({
data: {},
selectedRowKeys: [],
updateLoadFileList: [],
});
};
onSelectChange = (selectedRowKeys, selectedRows) => { // 选择菜单行
this.setState({ selectedRowKeys: selectedRowKeys });
};
handleOk = () => {
const { form, dispatch, data } = this.props;
const { getFieldValue, getFieldDecorator, validateFields, validateFieldsAndScroll, setFieldsValue } = form;
validateFieldsAndScroll((errors, values) => {
if (errors) return;
let updateData = {};
const details = [];
var groupList = []
if (this.state.data.Nav_AssessPlanItem) {
this.state.data.Nav_AssessPlanItem.map(t => {
let isSelect = false;
if (this.state.selectedRowKeys && this.state.selectedRowKeys.length) {
this.state.selectedRowKeys.forEach((n, i) => {
if (t.ID == n) {
isSelect = true;
}
});
}
if (!isSelect) return;
var d = getOnlyPropertyData(t);
details.push(d);
if (groupList.length > 0) {
let hasData = false
groupList.map(g => {
if (g.POST_NAME == d.POST_NAME && g.ANNUAL == d.ANNUAL && g.CYCLE_NAME == d.CYCLE_NAME) {
hasData = true
}
})
if (!hasData) {
groupList.push({ POST_NAME: d.POST_NAME, ANNUAL: d.ANNUAL, CYCLE_NAME: d.CYCLE_NAME })
}
} else {
groupList.push({ POST_NAME: d.POST_NAME, ANNUAL: d.ANNUAL, CYCLE_NAME: d.CYCLE_NAME })
}
});
};
if (!details.length) {
message.error('请选择导入文件');
return;
}
var ret = this.checkScore(details, groupList)
if (ret) {
updateData.Nav_AssessPlanItem = details;
dispatch({
type: 'app/getDataByPost',
url: 'OG/OGSafeAssessPlanInput/SaveImportAssessPlan',
payload: updateData,
onComplete: (ret) => {
if (ret) {
if (data.close) {
data.close();
}
this.setState({
data: {},
selectedRowKeys: [],
});
message.success('执行成功');
this.BtnClose();
}
}
});
} else {
message.error('被考核岗位考核年度考核周期相同的数据对应的标准分相加需为100分');
return;
}
})
};
checkScore = (data, groupList) => {
var ret = 0
if (groupList.length > 0) {
groupList.forEach(t => {
var total = 0
data.forEach(m => {
if (m.POST_NAME == t.POST_NAME && m.ANNUAL == t.ANNUAL && m.CYCLE_NAME == t.CYCLE_NAME) {
total = total + m.SCORE
}
})
if (total != 100) {
ret = -1
}
})
return ret !== -1
}
}
fillImportData = (ret) => {
if (!ret) {
this.setState({
data: ret.Data,
selectedRowKeys: [],
})
}
if (ret.Data && ret.Data.MessageList && ret.Data.MessageList.length) {
ret.Data.MessageList.forEach((n, i) => {
message.warning(n);
});
}
if (ret.ErrorMessage) {
message.error(ret.ErrorMessage);
}
const selectedRowKeys = [];
if (ret.Data && ret.Data.Nav_AssessPlanItem) {
ret.Data && ret.Data.Nav_AssessPlanItem.forEach((n, i) => {
selectedRowKeys.push(n.ID);
});
}
this.setState({
data: (ret.Data ? ret.Data : {}),
selectedRowKeys
});
}
render() {
const { selectedRowKeys } = this.state;
const rowSelection = {
selectedRowKeys: selectedRowKeys,
fixed: false,
columnWidth: 20,
onChange: this.onSelectChange,
hideDefaultSelections: false
};
const tableColumns = [
{ title: '被考核岗位', dataIndex: 'POST_NAME', key: 'POST_NAME' },
{ title: '考核年度', dataIndex: 'ANNUAL', key: 'ANNUAL' },
{ title: '考核周期', dataIndex: 'CYCLE', key: 'CYCLE' },
{ title: '考核项目', dataIndex: 'NAME', key: 'NAME' },
{ title: '标准分', dataIndex: 'SCORE', key: 'SCORE' },
{ title: '考核认定评分办法', dataIndex: 'METHOD', key: 'METHOD' },
];
const that = this;
const uploadProps = {
name: 'file',
action: config.serviceHost('api/OG/OGSafeAssessPlanInput/ImportAssessPlan'),
data: { OrgId: this.props.login.OrgId },
fileList: this.state.updateLoadFileList,
accept: '.xls,.xlsx',
headers: this.getRequestHeaders(),
onChange(info) {
that.setState({
updateLoadFileList: info.fileList,
});
if (info.file.status === 'done') {
that.fillImportData(info.file.response);
} else if (info.file.status === 'error') {
if (info.file.response && info.file.response.ErrorMessage) {
message.error(`${info.file.name} 导入错误,详情:${info.file.response.ErrorMessage}`);
}
else {
message.error(`${info.file.name} 导入错误`);
}
}
},
};
return (
<div>
<Form>
<Row style={{ marginTop: '10px' }}>
<Upload {...uploadProps}>
<Button>
<Icon type="upload" /> 选择导入文件
</Button>
</Upload>
</Row>
<Row style={{ marginTop: '20px' }}>
<Table
rowKey="ID"
pagination={false}
dataSource={this.state.data.Nav_AssessPlanItem}
columns={tableColumns}
rowSelection={rowSelection}
/>
</Row>
<Row style={{ marginTop: '20px' }}>
<Col style={{ textAlign: 'right' }}>
<Button type={'primary'} icon={'save'} onClick={() => this.handleOk()}>保存</Button>
</Col>
</Row>
</Form>
</div>
);
}
}
export default connect(({ login, loading, custom }) => ({ login, loading, custom }))(Form.create()(OG005ImportPage));

View File

@ -1,134 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG005ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
BtnAgreeDisplay: 'none',
assessUser: ''
};
};
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);
}
}
fmtEnum(name,value){
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId);
extendRule(json, 'ID', 1, this.props.data?.id);
extendInclude(json, 'Nav_Post');
extendInclude(json, 'Nav_SafeAssessItem');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/SafeAssessPlanInput/Get',
onComplete: (ret) => {
if (ret) {
this.setState({ data: ret })
this.getAssessUser(ret.POST_ID)
}
}
});
}
getAssessUser(postId) {
let userjson = initFilter(this.props.login.OrgId, postId);
this.props.dispatch({
type: 'app/getDataByPost',
url: 'OG/OGSafeAssessPlanInput/GetAssessUser',
payload: userjson,
onComplete: (ret) => {
if (ret) {
var user = ''
ret.Nav_User ? ret.Nav_User.map((t, idx) => {
user = user ? user + ' ' + t.NAME : t.NAME
}) : ''
this.setState({assessUser: user})
}
}
})
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data?.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "考核方案录入.xlsx")
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
{/* 考核方案录入 */}
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data?.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>考核方案录入</h1>
{
data ? <table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>编号</td>
<td colSpan={3} rowSpan={1} >{data.CODE}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>被考核岗位</td>
<td colSpan={3} rowSpan={1} >{data.Nav_Post ? data.Nav_Post.NAME : '' }</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>考核年度</td>
<td colSpan={3} rowSpan={1} >{data.ANNUAL}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>考核周期</td>
<td colSpan={3} rowSpan={1} >{ this.fmtEnum('PTAssessmentCycleEnums',data.CYCLE) }</td>
</tr>
{/* <tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>被考核人员</td>
<td colSpan={21} rowSpan={1} >{this.state.assessUser}</td>
</tr> */}
<tr>
<td colSpan={8} rowSpan={1} className={styles.fontBold}>考核项目</td>
<td colSpan={8} rowSpan={1} className={styles.fontBold}>标准分</td>
<td colSpan={8} rowSpan={1} className={styles.fontBold}>考核认定评分办法</td>
</tr>
{
data.Nav_SafeAssessItem ? data.Nav_SafeAssessItem.map((item, index) => {
return <tr >
<td colSpan={8} rowSpan={1} >{item.NAME}</td>
<td colSpan={8} rowSpan={1} >{item.SCORE}</td>
<td colSpan={8} rowSpan={1} >{item.METHOD}</td>
</tr>
}) : null
}
</table> : null
}
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG005ShowPrint)

View File

@ -1,241 +0,0 @@
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, 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 OG008ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
BtnAgreeDisplay: 'none',
BtnChargeAgreeDisplay: '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: 'OG/OGSafeAssessRecord/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: 'OG/OGSafeAssessRecord/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);
that.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/OGSafeAssessRecord/GetEdit',
onComplete: (ret) => {
if (ret) {
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' })
}
//归档才显示打印和导出按钮
// if(ret.PRE_MEETING_STATUS==5){
// this.setState({ isFinished: 'inline' })
// }
}
}
});
}
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")
}
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' }}>
<ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.IS_PUBLISH === 5 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.IS_PUBLISH === 5 ? "inline" : "none" }}>导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center' }}>安全生产责任制考核记录</h1>
{
data ?
<div>
<Descriptions size="middle" bordered className={styles.description}>
<Descriptions.Item label="考核年度">{data?.ANNUAL}</Descriptions.Item>
<Descriptions.Item label="考核周期">{data?.CYCLE_NAME}</Descriptions.Item>
<Descriptions.Item label="考核时间">{data.TIME}</Descriptions.Item>
<Descriptions.Item label="考核部门">{data.Nav_Department ? data.Nav_Department.NAME : ''}</Descriptions.Item>
</Descriptions>
</div> : null
}
{
data ? <table style={{ width: '100%', textAlign: 'left' }} className={styles.PrintForm1}>
<tr>
<td width='150px' 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>
<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>
{i + 1}
</td>
<td>
{item?.Nav_User?.NAME}
</td>
<td>
{item.Nav_Post?.NAME}
</td>
<td>
{
item?.Nav_SafeAssessRecordItem && item?.Nav_SafeAssessRecordItem.map((item2, i) => {
return <tr> {item2?.Nav_SafeAssessItem.NAME}</tr>
})
}
</td>
<td>
{
item?.Nav_SafeAssessRecordItem && item?.Nav_SafeAssessRecordItem.map((item2, i) => {
return <tr>{item2?.Nav_SafeAssessItem.SCORE}</tr>
})
}
</td>
<td>
{
item?.Nav_SafeAssessRecordItem && item?.Nav_SafeAssessRecordItem.map((item2, i) => {
return <tr> {item2.Nav_SafeAssessItem.METHOD}</tr>
})
}
</td>
<td>
{
item?.Nav_SafeAssessRecordItem && item?.Nav_SafeAssessRecordItem.map((item2, i) => {
return <tr> {item2.RESULT_INSTRUCTIONS}</tr>
})
}
</td>
<td>
{
item?.Nav_SafeAssessRecordItem && item?.Nav_SafeAssessRecordItem.map((item2, i) => {
return <tr> {item2.CORRECT_MEASURES}</tr>
})
}
</td>
<td>
{
item?.Nav_SafeAssessRecordItem && item?.Nav_SafeAssessRecordItem.map((item2, i) => {
return <tr> {item2.SCORE}</tr>
})
}
</td>
</tr>
})
}
</table> : null
}
{
data ?
<div>
<Descriptions size="middle" bordered className={styles.description}>
<Descriptions.Item label="被考核人员签名">
<div>{
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 <img style={{ margin: "0 0 0 15px" }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH} />
else
return <img style={{ margin: "0 0 0 15px" }} title={item.Nav_User?.NAME} />
}
})
}</div>
</Descriptions.Item>
</Descriptions>
</div> : null
}
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG008ShowPrint)

View File

@ -1,132 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG010ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
};
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = () => {
let json = initFilter(this.props.login.OrgId);
extendRule(json, 'ID', 1, this.props.data?.id);
extendInclude(json, 'Nav_AppointType');
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_Department');
extendInclude(json, 'Nav_AppointUsers.Nav_User');
extendInclude(json, 'Nav_AppointAgreeUser');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/PolicyDocumentDetail/Get',
onComplete: (ret) => {
if (ret) {
this.setState({ data: ret })
}
}
});
}
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")
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
{/* 人员任命情况变化记录表 */}
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data?.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>人员任命情况变化记录表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>创建时间</td>
<td colSpan={4} rowSpan={1} >{data && data.CREATE_TIME}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>任命文件编号</td>
<td colSpan={4} rowSpan={1} >{data && data.CODE}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>版本号</td>
<td colSpan={4} rowSpan={1} >{data && data.VERSION}</td>
</tr>
<tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>被任命人员类别</td>
<td colSpan={4} rowSpan={1} >{data && data.Nav_AppointType && data.Nav_AppointType.NAME}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>任命文件名称</td>
<td colSpan={4} rowSpan={1} >{data && data.NAME}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>人员任命增加/删除原因</td>
<td colSpan={4} rowSpan={1}>{this.fmtEnum('OGAppointmentAddDelReason', data && data.APPOINT_REASON)}</td>
</tr>
<tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>编制单位</td>
<td colSpan={4} rowSpan={1}>{data && data.Nav_Department.NAME}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>批准人员</td>
<td colSpan={4} rowSpan={1}>{data && data.Nav_AppointAgreeUser.NAME}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>颁布时间</td>
<td colSpan={4} rowSpan={1}>{data && data.PUBLISH_TIME}</td>
</tr>
<tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>生效时间</td>
<td colSpan={4} rowSpan={1}>{data && data.APPOINT_EFFECT_TIME}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>状态</td>
<td colSpan={4} rowSpan={1}>{this.fmtEnum('HMOperationStepEnum', data && data.STATUS)}</td>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>被任命人员</td>
<td colSpan={4} rowSpan={1}>{data && data.Nav_AppointUsers.map(t => t.Nav_User.NAME).join('、')}</td>
</tr>
<tr>
<td colSpan={3} rowSpan={1} className={styles.fontBold}>附件</td>
<td colSpan={18} rowSpan={1}>
{
data && data.Nav_Files && data.Nav_Files.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG010ShowPrint)

View File

@ -1,163 +0,0 @@
import { message } from "antd/lib/index";
import {Button, Popconfirm, Row, Col,Checkbox,Radio, Form, Input, Select, Table,Upload, Icon, PageHeader,Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
const Option = Select.Option;
// public enum OGEmployeeOpinionReportStatus
// {
// 草稿 = 0,
// 受理中 = 1,
// 落实中 = 2,
// 评价中 = 3,
// 完成 = 4,
// }
class OG011ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
};
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId,'',null,null,null);
extendRule(json, 'ID', 1, dataId);
json.OrgType = 2;
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_LaunchDepartment');
extendInclude(json, 'Nav_ItemEnum');
extendInclude(json, 'Nav_FileList.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_Assignee');
extendInclude(json, 'Nav_DoDepartment');
extendInclude(json, 'Nav_DoUser');
extendInclude(json, 'Nav_ImpFileList.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EmployeeOpinionReport/Get',
onComplete: (ret) => {
if (!ret)
return;
this.setState({data: ret});
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '员工意见上报表';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
fmtEnum(name,value){
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center'}}>员工意见上报表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报日期</td>
<td colSpan={6} rowSpan={1}>{data ? data.START_TIME : null}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报员工</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_User ? data.Nav_User.NAME : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>所在部门</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_LaunchDepartment ? data.Nav_LaunchDepartment.NAME : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议事项名称</td>
<td colSpan={10} rowSpan={1}>{data && data.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议事项类别</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_ItemEnum && data.Nav_ItemEnum.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议事项描述</td>
<td colSpan={22} rowSpan={1}>{data && data.DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议文件</td>
<td colSpan={22} rowSpan={1}>{
data && data.Nav_FileList && data.Nav_FileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理人</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_Assignee ? data.Nav_Assignee.NAME : null}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理状况</td>
<td colSpan={10} rowSpan={1}>{data && this.fmtEnum('OGAssigneeStatus',data.ASSIGNEE_STATUS)}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理状况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.ASSIGNEE_DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实部门</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_DoDepartment && data.Nav_DoDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实人员</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_DoUser && data.Nav_DoUser.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实情况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.IMPLEMENT_DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实文件</td>
<td colSpan={22} rowSpan={1}>{
data && data.Nav_ImpFileList && data.Nav_ImpFileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}</td>
</tr>
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG011ShowPrint)

View File

@ -1,260 +0,0 @@
import React from 'react';
import { connect } from 'dva';
import { Button, Row, Col, Form, Input,Select,Upload,Icon,Modal,Spin,message,Transfer } from 'antd';
import {
extend,
extendRule,
initFilter,
initQueryFilter,
getOnlyPropertyData,
extendInclude, guid,setDataFieldValue
} from "../../../utils/common";
import DropDownPagination from '../../common/DropDownPaginationEx';
import EditComponent from "../../Lib/EditComponent";
import FormPage from '../../FormPage';
import config from "../../../config";
import moment from 'moment';
const FormItem = Form.Item;
const Option = Select.Option;
const { TextArea } = Input;
class OG012EditPage extends EditComponent {
constructor(props) {
super(props);
this.state = {
data: {
},
level: '',
fileEnable: true,
investFileEnable: true
};
};
onBeforeEdit(params){
const {isNew,copySrcData,record}=params || {};
const data = { ...this.state.data };
const setFieldEditable = (field, editable) => { this.setFieldEditable(field, editable, this); };
const setFieldVisible = (field, visible) => { this.setFieldVisible(field, visible, this) };
const local_FileList=[];
if(this.state.data && this.state.data.Nav_FileList){
this.state.data.Nav_FileList.forEach(t=>{
local_FileList.push({
uid: t.ID,
name: t.name?t.name:(t.Nav_File?t.Nav_File.FILE_NAME:'未知文件'),
status: t.status?t.status:'done',
response: {Data:t.FILE_ID,file:t},
});
});
}
const local_InvestigationFileList=[];
if(this.state.data&&this.state.data.Nav_InvestigationFileList){
this.state.data.Nav_InvestigationFileList.forEach(t=>{
local_InvestigationFileList.push({
uid: t.ID,
name: t.name?t.name:(t.Nav_File?t.Nav_File.FILE_NAME:'未知文件'),
status: t.status?t.status:'done',
response: {Data:t.FILE_ID,file:t},
});
});
}
let s = 0;
if (!isNew && data && data.STATUS !== undefined){
s = data.STATUS;
}
setFieldVisible("START_TIME" , s >= 0);
setFieldVisible("Nav_User.NAME" , s >= 0);
setFieldVisible("Nav_LaunchDepartment.NAME" , s >= 0);
setFieldVisible("NAME" , s >= 0);
setFieldVisible("Nav_ItemEnum.NAME" , s >= 0);
setFieldVisible("DESCRIPTION" , s >= 0);
setFieldVisible("Nav_FileList.Nav_File.NAME" , s >= 0);
setFieldVisible("Nav_Assignee.NAME" , s >= 1);
setFieldVisible("ASSIGNEE_STATUS" , s >= 1);
setFieldVisible("ASSIGNEE_DESCRIPTION" , s >= 1);
setFieldVisible("Nav_ImplementDepartment.NAME" , s >= 1);
setFieldVisible("Nav_ImplementUser.NAME" , s >= 1);
setFieldVisible("IMPLEMENT_DESCRIPTION" , s >= 2);
setFieldVisible("Nav_InvestigationFileList.Nav_File.NAME", s >= 2);
setFieldVisible("SATISFACTION_STATUS" , s >= 3);
let curUid = this.props.login.user.ID;
let launchUid = data && data.USER_ID ? data.USER_ID : null;
let acceptUid = data && data.ASSIGNEE_ID ? data.ASSIGNEE_ID : null;
let doUid = data && data.IMPLEMENT_USER_ID ? data.IMPLEMENT_USER_ID : null;
this.state.fileEnable = s == 0 && (!launchUid || curUid === launchUid)
this.state.investFileEnable = s === 2 && (curUid === doUid)
setFieldEditable("START_TIME" , false);
setFieldEditable("Nav_User.NAME" , false);
setFieldEditable("Nav_LaunchDepartment.NAME" , false);
setFieldEditable("NAME" , s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_ItemEnum.NAME" , s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("DESCRIPTION" , s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_FileList.Nav_File.NAME" , this.state.fileEnable);
setFieldEditable("Nav_Assignee.NAME" , false);
setFieldEditable("ASSIGNEE_STATUS" , s === 1 && (curUid === acceptUid));
setFieldEditable("ASSIGNEE_DESCRIPTION" , s === 1 && (curUid === acceptUid));
setFieldEditable("Nav_ImplementDepartment.NAME" , s === 1 && (curUid === acceptUid));
setFieldEditable("Nav_ImplementUser.NAME" , s === 1 && (curUid === acceptUid));
setFieldEditable("IMPLEMENT_DESCRIPTION" , s === 2 && (curUid === doUid));
setFieldEditable("Nav_InvestigationFileList.Nav_File.NAME", this.state.investFileEnable);
setFieldEditable("SATISFACTION_STATUS" , s === 3 && (curUid === launchUid));
this.setState({
local_FileList,
local_InvestigationFileList,
data
})
}
doSaveFile(record,srcRecord,recordFiledName,stateFiledName){
if(!record[recordFiledName]){
record[recordFiledName]=[];
}
if(srcRecord[recordFiledName]){
srcRecord[recordFiledName].forEach(t=>{
record[recordFiledName].push(getOnlyPropertyData(t));
})
}
if(this.state[stateFiledName]) {
this.state[stateFiledName].forEach(t => {
if (t.response) {
if (record[recordFiledName].filter(t1 => t1.FILE_ID === t.response.Data).length == 0) {
record[recordFiledName].push({
ID: guid(),
FILE_ID: t.response.Data,
ORG_ID: this.props.login.OrgId,
name: t.name,
status: t.status,
});
}
}
});
}
if (record[recordFiledName]) {
record[recordFiledName].forEach(t1 => {
if (!this.state[stateFiledName] || this.state[stateFiledName].filter(t => t.response && t1.FILE_ID === t.response.Data).length == 0) {
t1.IS_DELETED = true;
}
});
}
}
onBeforeSaveHandleRecord(params){
super.onBeforeSaveHandleRecord(params);
const {editCode,record,srcRecord}=params?params:{};
this.doSaveFile(record,srcRecord,'Nav_FileList','local_FileList');
if(this.state.data.STATUS == 2){
this.doSaveFile(record,srcRecord,'Nav_InvestigationFileList','local_InvestigationFileList');
}
}
handleSopShowModal = (file) => {
var urls = config.serviceHost + 'PF/File/GetFile?id=' + file.response.Data;
fetch(urls).then(res => res.blob()).then(blob => {
const a = document.createElement('a');
document.body.appendChild(a)
a.style.display = 'none'
// 使用获取到的blob对象创建的url
const url = window.URL.createObjectURL(blob);
a.href = url;
// 指定下载的文件名
a.download = file.name;
a.click();
document.body.removeChild(a)
// 移除blob对象的url
window.URL.revokeObjectURL(url);
}, () => {
});
};
onRenderHeadControl(params){
const {colConfig,record}=params;
switch (colConfig.field){
case 'Nav_FileList.Nav_File.NAME':{
const props = {
name: 'file',
disabled: colConfig.disabled,
action: config.serviceHost +'PF/File/UploadFile',
data:{OrgId:this.props.login.OrgId},
fileList:this.state.local_FileList,
onPreview: (file) =>{
this.handleSopShowModal(file);
},
onRemove: (file) =>{
if(!this.state.fileEnable){
return false
}
},
onChange:(info)=>{
this.setState({
local_FileList:info.fileList,
});
if (info.file.status === 'done') {
message.success(`${info.file.name} 上传成功`);
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`);
}
},
};
return <>
<Upload {...props}>
<Button disabled={!this.state.fileEnable}>
<Icon type="upload" /> 上传附件
</Button>
</Upload>
</>
}
case 'Nav_InvestigationFileList.Nav_File.NAME':{
const props = {
name: 'file',
action: config.serviceHost +'PF/File/UploadFile',
data:{OrgId:this.props.login.OrgId},
fileList:this.state.local_InvestigationFileList,
onPreview: (file) =>{
this.handleSopShowModal(file);
},
onRemove: (file) =>{
if(!this.state.investFileEnable){
return false
}
},
onChange:(info)=>{
this.setState({
local_InvestigationFileList:info.fileList,
});
if (info.file.status === 'done') {
message.success(`${info.file.name} 上传成功`);
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`);
}
},
};
return <>
<Upload {...props}>
<Button disabled={!this.state.investFileEnable}>
<Icon type="upload" /> 上传附件
</Button>
</Upload>
</>
}
default:{
return super.onRenderHeadControl(params);
break;
}
}
}
}
export default connect(({ login, loading,custom,app }) => ({ login, loading,custom,app}))(Form.create()(OG012EditPage));

View File

@ -1,159 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG013ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
};
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, dataId);
json.OrgType = 2;
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_LaunchDepartment');
extendInclude(json, 'Nav_ItemEnum');
extendInclude(json, 'Nav_FileList.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_Assignee');
extendInclude(json, 'Nav_ImplementUser');
extendInclude(json, 'Nav_ImplementDepartment');
extendInclude(json, 'Nav_InvestigationFileList.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EmployeeRefuseItemReport/Get',
onComplete: (ret) => {
if (!ret)
return;
this.setState({ data: ret });
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '员工拒绝事项上报表';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>员工拒绝事项上报表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报日期</td>
<td colSpan={6} rowSpan={1}>{data ? data.START_TIME : null}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报员工</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_User ? data.Nav_User.NAME : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>所在部门</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_LaunchDepartment ? data.Nav_LaunchDepartment.NAME : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>拒绝事项名称</td>
<td colSpan={22} rowSpan={1}>{data && data.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>拒绝事项类别</td>
<td colSpan={22} rowSpan={1}>{data && data.Nav_ItemEnum && data.Nav_ItemEnum.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>拒绝事项描述</td>
<td colSpan={22} rowSpan={1}>{data && data.DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>拒绝事项文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_FileList && data.Nav_FileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理人</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_Assignee ? data.Nav_Assignee.NAME : null}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理状况</td>
<td colSpan={10} rowSpan={1}>{data && this.fmtEnum('OGAssigneeStatus', data.ASSIGNEE_STATUS)}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理状况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.ASSIGNEE_DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查部门</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_ImplementDepartment && data.Nav_ImplementDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查人员</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_ImplementUser && data.Nav_ImplementUser.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查情况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.IMPLEMENT_DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_InvestigationFileList && data.Nav_InvestigationFileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>拒绝制度认可</td>
<td colSpan={22} rowSpan={1}>{data && this.fmtEnum('OGRefuseSystemApproval', data.SATISFACTION_STATUS)}</td>
</tr>
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG013ShowPrint)

View File

@ -1,219 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG015ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
BtnAgreeDisplay: 'none',
confirmDisplay: 'none',
isMobile: false
};
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
onTableBtnAgree() {
this.props.dispatch({
type: 'app/getDataByPost',
url: 'OG/OGInnerContact/PersonalAgree',
payload: {
ID: this.props.data.id,
TaskID: this.props.data.TaskID,
IgnoreDataRule: true
},
onComplete: (ret) => {
if (ret) {
message.success('确认成功');
this.setState({ BtnAgreeDisplay: 'none' })
this.BtnClose();
}
}
})
}
onTableConfirm() {
this.props.dispatch({
type: 'app/getDataByPost',
url: 'HM/HMNoticeRelease/PersonalAgree',
payload: {
ID: this.props.data.id,
TaskID: this.props.data.TaskID,
},
onComplete: (ret) => {
if (ret) {
message.success('确认成功!');
this.setState({ BtnAgreeDisplay: 'none' })
this.BtnClose();
}
}
})
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, dataId);
json.OrgType = 2;
extendInclude(json, 'Nav_FormDepartment');
extendInclude(json, 'Nav_ToDepartment');
extendInclude(json, 'Nav_FromUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_ToUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_DoDepartment');
extendInclude(json, 'Nav_DoUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_ItemFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_DoFiles.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/InnerContact/Get',
onComplete: (ret) => {
if (!ret)
return;
if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' })
} else if (ret.STATUS == 1) {
this.setState({ BtnAgreeDisplay: 'inline' })
} else if (ret.STATUS == 2) {
this.setState({ confirmDisplay: 'inline' })
}
this.setState({ data: ret });
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '内部联系沟通记录表';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
render() {
const { data, isMobile } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type={'primary'} style={{ marginLeft: isMobile ? '0' : '20px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
<Button type={'primary'} style={{ marginLeft: isMobile ? '0' : '20px', display: this.state.confirmDisplay }} onClick={() => this.onTableConfirm()} icon="check" >已阅</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>内部联系沟通记录表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>日期</td>
<td colSpan={12} rowSpan={1}>{data && data.DATE}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>填写人员</td>
<td colSpan={8} rowSpan={1}>{data && data.Nav_User && data.Nav_User.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通部门</td>
<td colSpan={5} rowSpan={1}>{data && data.Nav_FormDepartment && data.Nav_FormDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通人员</td>
<td colSpan={5} rowSpan={1}>{data && data.Nav_FromUser && data.Nav_FromUser.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通人签名</td>
<td colSpan={8} rowSpan={1}>{
data && data.FORM_USER_TIME == "0001-01-01 00:00:00" ? "" : data && <img width={'150px'} alt={data.Nav_FromUser.NAME} src={config.picServerHost + data.Nav_FromUser.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH} />
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>被沟通人部门</td>
<td colSpan={5} rowSpan={1}>{data && data.Nav_ToDepartment && data.Nav_ToDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>被沟通人员</td>
<td colSpan={5} rowSpan={1}>{data && data.Nav_ToUser && data.Nav_ToUser.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>被沟通签名</td>
<td colSpan={8} rowSpan={1}>{
data && data.TO_USER_TIME == "0001-01-01 00:00:00" ? "" : data && <img width={'150px'} alt={data.Nav_ToUser.NAME} src={config.picServerHost + data.Nav_ToUser.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH} />
}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通目的</td>
<td colSpan={22} rowSpan={1}>{data && data.PURPOSE}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通事项名称</td>
<td colSpan={22} rowSpan={1}>{data && data.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通事项描述</td>
<td colSpan={22} rowSpan={1}>{data && data.DESC}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通事项文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_ItemFiles && data.Nav_ItemFiles.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实部门</td>
<td colSpan={5} rowSpan={1}>{data && data.Nav_DoDepartment && data.Nav_DoDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实人员</td>
<td colSpan={5} rowSpan={1}>{data && data.Nav_DoUser && data.Nav_DoUser.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实人签名</td>
<td colSpan={8} rowSpan={1}>{
data && data.STATUS != 2 ? "" : data && <img width={'150px'} alt={data.Nav_DoUser.NAME} src={config.picServerHost + data.Nav_DoUser.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH} />
}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实情况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.DO_DESC}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_DoFiles && data.Nav_DoFiles.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG015ShowPrint)

View File

@ -1,161 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG023ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
};
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
if (dataId == "")
return;
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, dataId);
json.OrgType = 2;
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_Department');
extendInclude(json, 'Nav_ExternalContactDetail');
extendInclude(json, 'Nav_FileList.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_DoDepartment');
extendInclude(json, 'Nav_DoUser');
extendInclude(json, 'Nav_ImpFileList.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/ExternalContactCommunicate/Get',
onComplete: (ret) => {
if (!ret)
return;
this.setState({ data: ret });
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '外部联系沟通表';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
render() {
const { data } = this.state;
const reportCount = data && data.Nav_Demands ? data.Nav_Demands.filter(i => i.OK).length : 0;
const total = data && data.Nav_Demands ? data.Nav_Demands.length : 0;
const rate = total === 0 ? 0 : Math.round(reportCount * 100 / total);
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>外部联系沟通表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>日期</td>
<td colSpan={6} rowSpan={1}>{data ? data.START_TIME : null}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>责任部门</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_Department ? data.Nav_Department.NAME : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通人员</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_User ? data.Nav_User.NAME : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>外部单位</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_ExternalContactDetail ? data.Nav_ExternalContactDetail.NAME : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>外部单位沟通人</td>
<td colSpan={6} rowSpan={1}>{data ? data.EXTERNAL_COMMUNICATE_PERSON : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>外部单位电话</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_ExternalContactDetail ? data.Nav_ExternalContactDetail.PHONE : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通目的</td>
<td colSpan={22} rowSpan={1}>{data && data.COMMUNICATE_PURPOSE ? data.COMMUNICATE_PURPOSE : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通事项名称</td>
<td colSpan={22} rowSpan={1}>{data && data.COMMUNICATE_NAME ? data.COMMUNICATE_NAME : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通事项描述</td>
<td colSpan={22} rowSpan={1}>{data && data.COMMUNICATE_DES ? data.COMMUNICATE_DES : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>沟通文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_FileList && data.Nav_FileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实部门</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_DoDepartment && data.Nav_DoDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实人员</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_DoUser && data.Nav_DoUser.NAME}</td>
</tr>
{
data && data.DO_USER_ID ?
<>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实情况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.IMPLEMENT_DESCRIPTION ? data.IMPLEMENT_DESCRIPTION : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>落实文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_ImpFileList && data.Nav_ImpFileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr></> : ''
}
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG023ShowPrint)

View File

@ -1,184 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
const Option = Select.Option;
// 草稿 = 0,
// 受理中 = 1,
// 调查中 = 2,
// 评价中 = 3,
// 完成 = 4,
class OG025ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
};
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
if (dataId == "")
return;
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_ExternalContactDetail');
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_ItemEnum');
extendInclude(json, 'Nav_FileList.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_Department');
extendInclude(json, 'Nav_Assignee');
extendInclude(json, 'Nav_SurveyDepartment');
extendInclude(json, 'Nav_SurveyUser');
extendInclude(json, 'Nav_SurveyFileList.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/ExternalComplainAdvise/Get',
onComplete: (ret) => {
if (!ret)
return;
this.setState({ data: ret });
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '外部单位投诉建议表';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
render() {
const { data } = this.state;
const reportCount = data && data.Nav_Demands ? data.Nav_Demands.filter(i => i.OK).length : 0;
const total = data && data.Nav_Demands ? data.Nav_Demands.length : 0;
const rate = total === 0 ? 0 : Math.round(reportCount * 100 / total);
return <div>
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>外部单位投诉建议表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报日期</td>
<td colSpan={6} rowSpan={1}>{data ? data.START_TIME : null}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>外部单位</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_ExternalContactDetail ? data.Nav_ExternalContactDetail.NAME : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报员工</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_User ? data.Nav_User.NAME : ''}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议事项名称</td>
<td colSpan={14} rowSpan={1}>{data && data.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议事项类别</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_ItemEnum && data.Nav_ItemEnum.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议事项描述</td>
<td colSpan={22} rowSpan={1}>{data && data.DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>建议文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_FileList && data.Nav_FileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
{
data && data.STATUS > 0 ?
<>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>责任部门</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_Department ? data.Nav_Department.NAME : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理人</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_Assignee ? data.Nav_Assignee.NAME : null}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理状况</td>
<td colSpan={6} rowSpan={1}>{data && this.fmtEnum('OGAssigneeStatus', data.ASSIGNEE_STATUS)}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理意见描述</td>
<td colSpan={22} rowSpan={1}>{data && data.ASSIGNEE_DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查部门</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_SurveyDepartment && data.Nav_SurveyDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查人员</td>
<td colSpan={10} rowSpan={1}>{data && data.Nav_SurveyUser && data.Nav_SurveyUser.NAME}</td>
</tr>
</> : ''
}
{
data && data.STATUS > 1 ?
<>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查情况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.SURVEY_DESCRIPTION}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>调查文件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_SurveyFileList && data.Nav_SurveyFileList.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>评价</td>
<td colSpan={22} rowSpan={1}>{data && this.fmtEnum('OGSatisfactionStatus', data.SATISFACTION_STATUS)}</td>
</tr>
</> : ''
}
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG025ShowPrint)

View File

@ -1,96 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import WFViewComponent from '../../Lib/WFViewComponent'
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
const Option = Select.Option;
class OG025Summary extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
BtnAgreeDisplay: 'none',
assessUser: '',
allYear: [],
selectYear: 2020
};
};
componentDidMount() {
this.loadData();
var tmp = []
for (let index = 1999; index < 3000; index++) {
tmp.push({
ID: index,
NAME: index
})
}
this.setState({
allYear: tmp
})
}
loadData = (year) => {
let json = initFilter(this.props.login.OrgId);
let currentYear = new Date().getFullYear()
json['Parameter1']=year || currentYear;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EventReport/GetCurrentYearEvent',
onComplete: (ret) => {
if (ret) {
this.setState({
data: ret
})
}
}
});
}
getRate(){
let ret = 0
if(this.state.data && this.state.data.PROCESSED_EVENTS && this.state.data.TOTAL_EVENTS){
ret = this.state.data.PROCESSED_EVENTS / this.state.data.TOTAL_EVENTS * 100 + '%'
}
return ret
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px', textAlign: 'center'}}>
&nbsp;&nbsp;&nbsp;&nbsp;
<Select value={this.state.selectYear} style={{ width: '40%' }}
onChange={selVlue => {
this.setState({ selectYear: selVlue })
this.loadData(selVlue)
}}>
{
this.state.allYear ? this.state.allYear.map((d, idx) => {
return <Option key={d.ID} value={d.ID} label={d.NAME}>
{d.NAME}
</Option>
}) : ''
}
</Select>
</div>
<div style={{ padding: '10px', textAlign: 'center'}}>
已处理份数<Input value={data ? data.PROCESSED_EVENTS : 0} style={{ width: '40%'}}/>
</div>
<div style={{ padding: '10px', textAlign: 'center'}}>
上报总份数<Input value={data ? data.TOTAL_EVENTS : 0} style={{ width: '40%'}}/>
</div>
<div style={{ padding: '10px', textAlign: 'center'}}>
处理比例<Input value={this.getRate()} style={{ width: '40%'}}/>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG025Summary)

View File

@ -1,156 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import FormPage from '../../../components/FormPage'
class OG027ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
tmpData: {},
BtnAgreeDisplay: 'none',
};
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
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);
}
}
onClickApprove = (appVisible) => {
const newtmpData = {
data: { id: this.props.data.id, isShow: true, key: guid(), appVisible: appVisible, BtnAgreeDisplay: 'inline' },
formCode: "PF123",
}
this.setState({
tmpData: newtmpData,
});
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId);
extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_Department');
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_ApproveRewardPunishmentDetail');
extendInclude(json, 'Nav_ApproveRewardPunishmentDetail.Nav_Department');
extendInclude(json, 'Nav_ApproveRewardPunishmentDetail.Nav_User');
extendInclude(json, 'Nav_ApproveRewardPunishmentDetail.Nav_User.Nav_Department');
extendInclude(json, 'Nav_ApproveRewardPunishmentDetail.Nav_Reason');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/ApproveRewardPunishmentReport/Get',
onComplete: (ret) => {
if (ret) {
if (this.props.data && this.props.data.loadDataDeal) {
this.props.data.loadDataDeal(1);
}
this.onClickApprove(false);
this.setState({ data: ret })
}
}
});
}
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")
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
fmtDepartment(it) {
if (!it) {
return '';
}
if (it.Nav_Department) {
return it.Nav_Department.NAME;
}
return it.Nav_User && it.Nav_User.Nav_Department && it.Nav_User.Nav_Department.NAME;
}
render() {
const { data } = this.state;
return <div>
<div style={{ padding: '10px' }}>
<Button onClick={() => this.onClickApprove(true)} icon="export">审批详情</Button>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>认可与奖励上报表</h1>
{
data ? <div>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>发起部门</td>
<td colSpan={4} rowSpan={1} >{data.Nav_Department ? data.Nav_Department.NAME : ''}</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>发起人员</td>
<td colSpan={4} rowSpan={1} >{data.Nav_User ? data.Nav_User.NAME : ''}</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>发起时间</td>
<td colSpan={4} rowSpan={1} >{data.START_TIME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>序号</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>奖惩类型</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>奖惩部门</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>奖惩人员</td>
<td colSpan={5} rowSpan={1} className={styles.fontBold}>奖惩原因</td>
<td colSpan={5} rowSpan={1} className={styles.fontBold}>原因描述</td>
</tr>
{
data.Nav_ApproveRewardPunishmentDetail ? data.Nav_ApproveRewardPunishmentDetail.map((item, index) => {
return <tr >
<td colSpan={2} rowSpan={1} >{index + 1}</td>
<td colSpan={4} rowSpan={1} >{this.fmtEnum('OGRewardPunishmentType', item.TYPE)}</td>
<td colSpan={4} rowSpan={1} >{this.fmtDepartment(item)}</td>
<td colSpan={4} rowSpan={1} >{item.Nav_User ? item.Nav_User.NAME : ''}</td>
<td colSpan={5} rowSpan={1} >{item.Nav_Reason ? item.Nav_Reason.NAME : ''}</td>
<td colSpan={5} rowSpan={1} >{item.REASON_DESCRIBE}</td>
</tr>
}) : null
}
</tbody>
</table>
<FormPage {...this.state.tmpData} />
</div>
: null
}
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG027ShowPrint)

View File

@ -1,114 +0,0 @@
import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, showFiles, initQueryFilter, ShowDateTime } from '../../../utils/common';
import ReactToPrint from 'react-to-print';
import { ExportToExcel } from '@woowalker/feui'
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import { message } from 'antd/lib/index';
import styles from '../HI/StepForm.css';
import config from '../../../config.js';
import FormPage from '../../FormPage'
class OG030ReplyView extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
btndisplay: 'none',
isCheck: false, //是否待办 审批
}
}
componentDidMount() {
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
onTableBtnExport() {
let TableWrap = document.getElementById('table1');
let Table = TableWrap.getElementsByTagName('table1')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, this.props.record.Nav_Department.NAME + '.xlsx')
}
loadData = (id) => {
var orgId = this.props.login ? this.props.login.OrgId : '';
let json = initFilter(orgId);
extendRule(json, 'ID', 1, id);
extendInclude(json, 'Nav_User')
extendInclude(json, 'Nav_ReplyUser')
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File')
extendInclude(json, 'Nav_Items')
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EventGetDetail/Get',
onComplete: (ret) => {
if (ret) {
this.setState({
data: ret,
})
}
}
});
}
render() {
const { data } = this.state; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
return <div>
<div style={{ padding: '10px' }}>
<table>
<tr>
<td><ReactToPrint trigger={() => <Button type={'default'} icon={'printer'} >打印</Button>} content={() => this.componentRef} /></td>
<td><ExportToExcel fileName='工余事件征集数据' tableId={'tableId' + this.props.data.id} /></td>
</tr>
</table>
</div>
<FormPage {...this.state.tmpData} />
<div ref={el => (this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>
<h1 className={styles.showPrintHead}>工余事件征集数据</h1>
{
data ? <div style={{ width: '95%' }}>
<Descriptions title='' size='middle' bordered>
<Descriptions.Item label="参与人员">{data.Nav_User.NAME}</Descriptions.Item>
<Descriptions.Item label="反馈人员">{data.Nav_ReplyUser.NAME}</Descriptions.Item>
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost)}</Descriptions.Item>
</Descriptions>
</div> : null
}
{
(data?.Nav_Items && data?.Nav_Items.length > 0) ?
<table className={styles.PrintFormLight}>
<tbody>
<tr>
<td colSpan={3} className={styles.showPrintHead2}>事件项</td>
</tr>
<tr className={styles.PrintFormLightTh}>
<td>事件类型</td>
<td>事件描述</td>
<td>反馈意见</td>
</tr>
{data?.Nav_Items?.map((item, i) => {
return <tr>
<td>{enums.OGEventGetType.enums[item.TYPE]} </td>
<td>{item.DESC} </td>
<td>{item.REPLY} </td>
</tr>
})}
</tbody>
</table>
: null
}
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG030ReplyView)

View File

@ -1,166 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, DatePicker, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
class OG030ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
selIndex: -1,
details: null,
}
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, dataId);
json.OrgType = 2;
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_Department');
extendInclude(json, 'Nav_Details');
extendInclude(json, 'Nav_Details.Nav_User');
extendInclude(json, 'Nav_Details.Nav_Items');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EventGet/Get',
onComplete: (ret) => {
if (!ret)
return;
let items = [];
ret.Nav_Details.forEach(it => {
if (it.STATUS == 2) {
it.Nav_Items.forEach(i => {
if (i.DESC) {
items.push({
ID: i.ID,
TYPE: this.fmtEnum('OGEventGetType', i.TYPE),
DESC: i.DESC,
NAME: it.Nav_User.NAME,
REPLY: i.REPLY
})
}
});
}
})
this.setState({
data: ret,
items,
});
}
});
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
onAgree() {
const { data } = this.state;
if (!data || data.STATUS != 2) {
message.error("当前状态不可提交")
return;
}
let json = initFilter(this.props.login.OrgId, data.ID, null, null, null);
json.Parameter1 = this.props.data.TaskID;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/OGEventGet/Agree',
onComplete: (ret) => {
if (ret) {
message.success('审阅成功');
this.BtnClose();
}
}
});
}
render() {
const { data, items } = this.state;
return <div>
{
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
{
data && data.STATUS == 2 && data.USER_ID == this.props.login.user.ID && <>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onAgree()} icon="check" >已阅</Button>
</>
}
</div>
}
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>工余事件征集</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集时间</td>
<td colSpan={4} rowSpan={1}>{data && data.START_TIME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>截止时间</td>
<td colSpan={4} rowSpan={1}>{data && data.END_TIME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集部门</td>
<td colSpan={4} rowSpan={1}>{data && data.Nav_Department && data.Nav_Department.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集人员</td>
<td colSpan={4} rowSpan={1}>{data && data.Nav_User && data.Nav_User.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>序号</td>
<td colSpan={4} rowSpan={1} className={styles.fontBold}>事件类型</td>
<td colSpan={8} rowSpan={1} className={styles.fontBold}>事件描述</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>有意见人员</td>
<td colSpan={8} rowSpan={1} className={styles.fontBold}>反馈意见</td>
</tr>
{
items && items.map((it, idx) => {
return <tr key={it.ID}>
<td colSpan={2} rowSpan={1} >{idx + 1}</td>
<td colSpan={4} rowSpan={1} >{it.TYPE}</td>
<td colSpan={8} rowSpan={1} >{it.DESC}</td>
<td colSpan={2} rowSpan={1} >{it.NAME}</td>
<td colSpan={8} rowSpan={1} >{it.REPLY}</td>
</tr>
})
}
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>工余事件数</td>
<td colSpan={10} rowSpan={1}>{data && data.EVENT_COUNT}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>对比数</td>
<td colSpan={10} rowSpan={1}>{data && data.EVENT_COMPARE}</td>
</tr>
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG030ShowPrint)

View File

@ -1,146 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, DatePicker, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG031ShowPrint extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
BtnAgreeDisplay: 'none',
}
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
if (this.props.data.id == "")
return;
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, this.props.data.id);
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_AHUser');
extendInclude(json, 'Nav_Department');
extendInclude(json, 'Nav_DoUser');
extendInclude(json, 'Nav_DoDepartment');
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EventReport/Get',
onComplete: (ret) => {
if (!ret)
return;
if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' })
} else {
this.setState({ BtnAgreeDisplay: 'inline' })
}
this.setState({
data: ret,
});
}
});
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "工余事件上报及处理表.xlsx")
}
render() {
const { data, items } = this.state;
return <div>
{
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
}
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>工余事件上报及处理表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报日期</td>
<td colSpan={6} rowSpan={1}>{data && data.TIME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>上报员工</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_User && data.Nav_User.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>所在部门</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_Department && data.Nav_Department.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>事件类型</td>
<td colSpan={6} rowSpan={1}>{data && this.fmtEnum('OGEventGetType', data.TYPE)}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>发生日期</td>
<td colSpan={6} rowSpan={1}>{data && data.HAPPEN_TIME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>发生地点</td>
<td colSpan={6} rowSpan={1}>{data && data.PLACE}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>事件描述</td>
<td colSpan={22} rowSpan={1}>{data && data.DESC}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>处理状况</td>
<td colSpan={6} rowSpan={1}>{data && this.fmtEnum('OGEventDoType', data.DO_TYPE)}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>处理部门</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_DoDepartment && data.Nav_DoDepartment.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>责任人</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_DoUser && data.Nav_DoUser.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>情况描述</td>
<td colSpan={22} rowSpan={1}>{data && data.DO_DESC}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>附件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_Files && data.Nav_Files.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG031ShowPrint)

View File

@ -1,499 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table, Upload, Icon, DatePicker } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
class OG034EditPage extends React.Component {
constructor(props) {
super(props);
let type = 'view';
switch (this.props.formCode) {
case 'OG034_EDIT': {
type = 'edit';
break;
}
case 'OG034_REPORT': {
type = 'report';
break;
}
case 'OG034_VIEW': {
type = 'view'
break;
}
default: {
type = 'view';
break;
}
}
this.state = {
ID: this.props.data.id || '',
data: null,
type,
users: null,
selUids: [],
reportList: {}
};
};
componentDidMount() {
this.loadUsers();
this.loadData();
}
loadUsers() {
let json = initFilter(this.props.login.OrgId, '', null, 'NAME', null);
extendRule(json, "ENABLE_STATUS", 1, 0);
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'FM/User/Entities',
onComplete: (ret) => {
if (!ret)
return;
this.setState({
users: ret,
});
}
});
}
loadData() {
let json = initFilter(this.props.login.OrgId, '', null, null, null);
if (this.state.ID) {
extendRule(json, 'ID', 1, this.state.ID);
}
extendInclude(json, 'Nav_HostUser');
extendInclude(json, 'Nav_ReviewItemsList.Nav_Item');
extendInclude(json, 'Nav_ReviewUserList.Nav_User');
extendInclude(json, 'Nav_ReviewResultList.Nav_Result');
extendInclude(json, 'Nav_ActionPlanList.Nav_Plan');
extendInclude(json, 'Nav_ActionPlanList.Nav_User');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/OGStanardSysReview/Get',
onComplete: (ret) => {
if (!ret)
return;
ret.Nav_ReviewItemsList.sort(function (a, b) {
var x = a.Nav_Item.CREATE_TIME;
var y = b.Nav_Item.CREATE_TIME;
if (x < y) { return -1; }
if (x > y) { return 1; }
return 0;
});
ret.Nav_ReviewResultList.sort(function (a, b) {
var x = a.Nav_Result.CREATE_TIME;
var y = b.Nav_Result.CREATE_TIME;
if (x < y) { return -1; }
if (x > y) { return 1; }
return 0;
});
ret.Nav_ActionPlanList.sort(function (a, b) {
var x = a.Nav_Plan.CREATE_TIME;
var y = b.Nav_Plan.CREATE_TIME;
if (x < y) { return -1; }
if (x > y) { return 1; }
return 0;
});
this.setState({
ID: ret.ID,
data: ret,
selUids: ret.Nav_ReviewUserList.map(it => it.USER_ID),
});
}
});
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '标准化系统评审意见表';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
onSave = (submit) => {
if (!this.state.data || this.state.type !== 'edit')
return;
let data = JSON.parse(JSON.stringify(this.state.data));
if (!data.Nav_ReviewUserList) {
data.Nav_ReviewUserList = [];
}
data.Nav_ReviewUserList.forEach(it => {
if (!this.state.selUids || !this.state.selUids.find(uid => uid == it.USER_ID)) {
it.IS_DELETED = true;
}
})
this.state.selUids.forEach(uid => {
if (!data.Nav_ReviewUserList.find(it => it.USER_ID === uid)) {
data.Nav_ReviewUserList.push({
ID: guid(),
USER_ID: uid,
})
}
})
if (submit) {
if (!data.REVIEW_TIME) {
message.error("请选择评审时间")
return;
}
if (!data.HOST_ID) {
message.error("请选择评审主持人")
return;
}
if (!data.Nav_ReviewUserList || data.Nav_ReviewUserList.length == 0) {
message.error("请选择评审人员")
return;
}
if (!data.Nav_ReviewItemsList || data.Nav_ReviewItemsList.length == 0) {
message.error("请选择评审项目")
return;
}
if (!data.Nav_ReviewResultList || data.Nav_ReviewResultList.length == 0) {
message.error("请选择评审结论")
return;
}
if (!data.Nav_ActionPlanList || data.Nav_ActionPlanList.length == 0) {
message.error("请选择行动计划")
return;
}
let fail = false;
data.Nav_ActionPlanList.forEach(it => {
if (!it.USER_ID) {
fail = true;
}
});
if (fail) {
message.error("请选择执行人员")
return;
}
}
if (submit) {
data.PUBLISH = 'SaveAndNotify'
}
this.props.dispatch({
type: 'app/getDataByPost',
payload: data,
url: 'OG/OGStanardSysReview/FullUpdate',
onComplete: (ret) => {
message.success("操作成功");
this.BtnClose();
}
});
}
onReport() {
if (this.state.type != 'report')
return;
let reportList = this.state.reportList;
let data = this.state.data;
let id = ''
let flag = ''
let hasError = false
data && data.Nav_ActionPlanList && data.Nav_ActionPlanList.forEach(it => {
if (it.IMPLEMENTATION == 0 && !reportList[it.ID] && it.USER_ID === this.props.login.user.ID) {
hasError = true
}
if (reportList[it.ID]) {
id = id ? id + ',' + it.ID : it.ID
flag = flag ? flag + ',' + reportList[it.ID] : reportList[it.ID]
}
})
if (hasError) {
message.error("请选择执行情况")
return;
}
if (!id) {
message.error("已处理完成!")
return;
}
let json = initFilter(this.props.login.OrgId, '', null, null, null);
json.Parameter1 = id;
json.Parameter2 = flag;
json.Parameter3 = this.props.data.TaskID;
json.Parameter4 = this.props.data.id;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/OGStanardSysReview/SubmitUser',
onComplete: (ret) => {
if (ret) {
message.success("操作成功");
this.BtnClose();
}
}
});
}
render() {
const { data, type, users, reportList } = this.state;
const hasReviewItems = data && data.Nav_ReviewItemsList && data.Nav_ReviewItemsList.length > 0;
const hasResultList = data && data.Nav_ReviewResultList && data.Nav_ReviewResultList.length > 0;
const hasPlan = data && data.Nav_ActionPlanList && data.Nav_ActionPlanList.length > 0;
const isEdit = type === 'edit' && data && data.STATUS === 0 && (!data.USER_ID || data.USER_ID === this.props.login.user.ID);
const isReprot = type === 'report' && data && data.STATUS === 10;
const isView = type === 'view';
return <div>
<div style={{ padding: '10px' }}>
{
isView && <>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</>
}
{
isEdit && <>
<Button type='primary' style={{ marginLeft: '8px' }} onClick={() => this.onSave(false)} icon="save" >保存</Button>
<Button type='primary' style={{ marginLeft: '8px' }} onClick={() => this.onSave(true)} icon="edit" >提交</Button>
</>
}
{
isReprot && <>
<Popconfirm title="是否确定操作?" onConfirm={() => this.onReport()}>
<Button type='primary' style={{ marginLeft: '8px' }} icon="edit" >落实</Button>
</Popconfirm>
</>
}
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>标准化系统评审意见表</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>评审时间</td>
<td colSpan={6} rowSpan={1}>
{
data && !isEdit && data.REVIEW_TIME
}
{
data && isEdit && <DatePicker
format={'YYYY-MM-DD'}
value={data.REVIEW_TIME ? moment(data.REVIEW_TIME) : null}
onChange={(e, datestring) => {
let data = this.state.data;
data.REVIEW_TIME = new Date(datestring);
this.setState({ data })
}}
/>
}
</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>评审主持人</td>
<td colSpan={6} rowSpan={1}>
<Select showSearch={true} style={{ width: "100%" }} disabled={!isEdit} value={data ? data.HOST_ID : null}
onChange={value => {
let data = this.state.data;
data.HOST_ID = value;
this.setState({ data });
}}
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
>
{
users && users.map(it => {
return <Select.Option key={it.ID} value={it.ID}>{it.NAME}</Select.Option>
})
}
</Select>
</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>评审人员</td>
<td colSpan={6} rowSpan={1}>
<Select mode={"multiple"} style={{ width: "100%" }} disabled={!isEdit} value={this.state.selUids}
onChange={value => this.setState({ selUids: value })}
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
>
{
users && users.map(it => {
return <Select.Option key={it.ID} value={it.ID}>{it.NAME}</Select.Option>
})
}
</Select>
</td>
</tr>
{
hasReviewItems && data.Nav_ReviewItemsList.map((it, idx) => {
return <tr key={it.ID}>
{
idx == 0 && <td colSpan={2} rowSpan={data.Nav_ReviewItemsList.length} className={styles.fontBold}>评审项目</td>
}
<td colSpan={10} rowSpan={1} style={{ textAlign: 'left' }}>{it.Nav_Item && it.Nav_Item.NAME}</td>
{
idx == 0 && <td colSpan={2} rowSpan={data.Nav_ReviewItemsList.length} className={styles.fontBold}>存在问题</td>
}
<td colSpan={10} rowSpan={1} style={{ textAlign: 'left' }}>
{
isEdit ?
<Input value={it.PROBLEM} onChange={evt => {
let data = this.state.data;
data.Nav_ReviewItemsList[idx].PROBLEM = evt.target.value;
this.setState({ data });
}} />
:
it.PROBLEM
}
</td>
</tr>
})
}
{
!hasReviewItems && <tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>评审项目</td>
<td colSpan={10} rowSpan={1}></td>
<td colSpan={12} rowSpan={1}></td>
</tr>
}
{
hasResultList && data.Nav_ReviewResultList.map((it, idx) => {
return <tr key={it.ID}>
{
idx == 0 && <td colSpan={2} rowSpan={data.Nav_ReviewResultList.length} className={styles.fontBold}>评审结论</td>
}
<td colSpan={10} rowSpan={1} style={{ textAlign: 'left' }}>{it.Nav_Result && it.Nav_Result.NAME}</td>
<td colSpan={12} rowSpan={1} style={{ textAlign: 'left' }}>
{
!isEdit && it.RESULT
}
{
isEdit && it.Nav_Result && it.Nav_Result.NAME === '标准化系统运行的总体评价' &&
<Select style={{ width: "100%" }} value={it.RESULT} onChange={(value) => {
let data = this.state.data;
data.Nav_ReviewResultList[idx].RESULT = value;
this.setState({ data });
}}>
<Select.Option value={"优"}></Select.Option>
<Select.Option value={"良"}></Select.Option>
<Select.Option value={"中"}></Select.Option>
<Select.Option value={"差"}></Select.Option>
</Select>
}
{
isEdit && it.Nav_Result && it.Nav_Result.NAME !== '标准化系统运行的总体评价' &&
<Input value={it.RESULT} onChange={evt => {
let data = this.state.data;
data.Nav_ReviewResultList[idx].RESULT = evt.target.value;
this.setState({ data });
}} />
}
</td>
</tr>
})
}
{
!hasResultList && <tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>评审结论</td>
<td colSpan={10} rowSpan={1}></td>
<td colSpan={12} rowSpan={1}></td>
</tr>
}
{
hasPlan && data.Nav_ActionPlanList.map((it, idx) => {
return <tr key={it.ID}>
{
idx == 0 && <td colSpan={2} rowSpan={data.Nav_ActionPlanList.length} className={styles.fontBold}>行动计划</td>
}
<td colSpan={2} rowSpan={1} style={{ textAlign: 'left' }}>{it.Nav_Plan && it.Nav_Plan.NAME}</td>
{
data && data.STATUS === 0 &&
<td colSpan={8} rowSpan={1} style={{ textAlign: 'left' }}>
<Input value={it.PLAN_CONTENT} onChange={(e) => {
let d = this.state.data;
d.Nav_ActionPlanList[idx].PLAN_CONTENT = e.target.value;
this.setState({ data: d });
}} />
</td>
}
{
data && data.STATUS !== 0 &&
<td colSpan={8} rowSpan={1} style={{ textAlign: 'left' }}>{it && it.PLAN_CONTENT}</td>
}
{
idx == 0 && <td colSpan={2} rowSpan={data.Nav_ActionPlanList.length} className={styles.fontBold}>执行人员</td>
}
<td colSpan={4} rowSpan={1} style={{ textAlign: 'left' }}>
{
!isEdit && it.Nav_User && it.Nav_User.NAME
}
{
isEdit && <Select style={{ width: "100%" }} value={it.USER_ID} showSearch={true}
onChange={value => {
let data = this.state.data;
data.Nav_ActionPlanList[idx].USER_ID = value;
this.setState({ data });
}}
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
>
{
users && users.map(it => {
return <Select.Option required key={it.ID} value={it.ID}>{it.NAME}</Select.Option>
})
}
</Select>
}
</td>
{
idx == 0 && <td colSpan={2} rowSpan={data.Nav_ActionPlanList.length} className={styles.fontBold}>执行情况</td>
}
<td colSpan={4} rowSpan={1}>
{
it.IMPLEMENTATION === 0 && it.USER_ID === this.props.login.user.ID && this.state.type === 'report' ?
<>
<Select style={{ width: "100%" }} value={reportList[it.ID]} onChange={(value) => {
let reportList = this.state.reportList;
reportList[it.ID] = value;
this.setState({ reportList });
}}>
<Select.Option value={"1"}>已执行</Select.Option>
<Select.Option value={"0"}>未执行</Select.Option>
</Select>
</>
:
this.fmtEnum('OGStandardizationImplementation', it.IMPLEMENTATION)
}
</td>
</tr>
})
}
{
!hasPlan && <tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>行动计划</td>
<td colSpan={10} rowSpan={1}></td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>执行人员</td>
<td colSpan={4} rowSpan={1}></td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>执行情况</td>
<td colSpan={4} rowSpan={1}></td>
</tr>
}
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG034EditPage)

View File

@ -1,206 +0,0 @@
import React from 'react';
import { connect } from 'dva';
import { Button, Tree, Checkbox, Row, Col, Form, Input, Select, Upload, Icon, Modal, Spin, message, Transfer } from 'antd';
import {
extend,
extendRule,
initFilter,
initQueryFilter,
getOnlyPropertyData,
extendInclude, guid, setDataFieldValue
} from "../../../utils/common";
import DropDownPagination from '../../common/DropDownPaginationEx';
import EditComponent from '../../../baseComponents/EditComponent/index.js'
import FormPage from '../../FormPage';
import config from "../../../config";
import moment from 'moment';
const FormItem = Form.Item;
const Option = Select.Option;
const { TextArea } = Input;
class OG059EditPage extends EditComponent {
constructor(props) {
super(props);
this.state = {
data: {
},
checkAll: false,
treeData: [],
uids: [],
users: [],
};
};
onBeforeSaveHandleRecord(params) {
super.onBeforeSaveHandleRecord(params);
const { editCode, record, srcRecord } = params ? params : {};
if (!record.Nav_Users) {
record.Nav_Users = [];
}
if (this.state.uids) {
this.state.uids.forEach(uid => {
if (!record.Nav_Users.find(it => it.USER_ID === uid)) {
record.Nav_Users.push({
ID: guid(),
USER_ID: uid,
ORG_ID: this.props.login.OrgId,
});
}
});
}
record.Nav_Users.forEach(it => {
if (!this.state.uids || !this.state.uids.find(uid => uid === it.USER_ID)) {
it.IS_DELETED = true;
}
});
}
showTreeNode = (data) => {
if (!data || data.length == 0)
return;
return data.map((item) => {
if (item) {
let title = item.Name;
return (
<Tree.TreeNode
title={title}
key={item.Id.toString()}
data={item}
disabled={item.IsDisabled}
disableCheckbox={item.IsDisabled}
isLeaf={!(item.Children && item.Children.length)}>
{this.showTreeNode(item.Children)})
</Tree.TreeNode>
);
};
});
};
onBeforeEdit(params) {
const { colConfig, record } = params;
const { isNew, isCopy, copySrcData } = params ? params : {};
const { dispatch } = this.props;
this.getTreeData();
}
getTreeData = () => {
const { form, dispatch, data, login } = this.props;
const initJson = initFilter(login.orgId, login.userId)
const createNodes = (data, parentNode, list, parentId) => {
if (!data)
return;
data.map(it => {
if (it.ParentId === parentId) {
it.Children = [];
createNodes(data, it, it.Children, it.Id);
list.push(it);
};
});
};
dispatch({
type: 'app/getDataByPost',
url: 'OG/OGEmployeeOpinionCollection/GetDepartmentTree',
payload: initJson,
onComplete: (ret) => {
if (ret) {
const treeData = [];
createNodes(ret, null, treeData, null);
this.setState({
treeData,
}, () => {
});
if (this.state.data && this.state.data.Nav_Users) {
this.setState({
uids: this.state.data.Nav_Users.map(it => it.USER_ID.toLocaleUpperCase())
})
}
}
}
});
};
refreshTransferSource = () => {
let users = [];
if (this.state.checkAll) {
if (this.state.selNode) {
let node = JSON.parse(JSON.stringify(this.state.selNode));
users.push(...node.Users);
const getChilds = (node, users) => {
if (node.Children && node.Children.length > 0) {
node.Children.forEach(it => {
users.push(...it.Users);
getChilds(it, users);
})
}
}
getChilds(node, users);
}
} else {
if (this.state.selNode) {
let node = JSON.parse(JSON.stringify(this.state.selNode));
users.push(...node.Users);
}
}
this.setState({
users,
})
}
onRenderHeadControl(params) {
const { colConfig, record } = params;
const spanCol = { xs: 20, sm: 20, md: 20 };
switch (colConfig.field) {
case 'Nav_Users.Nav_User.NAME': {
return <>
<Row style={{ width: 580 }}>
<Col span={16} >
<Tree
onSelect={
(selectedKeys, e) => {
this.setState({
selNode: e.node.props.data,
}, () => {
this.refreshTransferSource()
})
}
}
>
{this.showTreeNode(this.state.treeData)}
</Tree>
<Checkbox style={{ marginBottom: '8px', float: 'right' }} onChange={(e) => {
this.setState({
checkAll: e.target.checked
})
this.refreshTransferSource();
}
}>
全选
</Checkbox>
</Col>
<Col {...spanCol}>
<Transfer
dataSource={this.state.users}
titles={['部门人员', '已选择']}
targetKeys={this.state.uids}
onChange={(nextTargetKeys, direction, moveKeys) => {
let arr = nextTargetKeys.map(it => it);
this.setState({ uids: arr });
}}
render={item => item.title}
/>
</Col>
</Row>
</>
break;
}
default: {
return super.onRenderHeadControl(params);
break;
}
}
}
}
export default connect(({ login, loading, custom, app }) => ({ login, loading, custom, app }))(Form.create()(OG059EditPage));

View File

@ -1,360 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, DatePicker, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
const Option = Select.Option;
// /// <summary>
// /// 员工意见汇总表状态
// /// </summary>
// public enum OGEmployeeOpinionStatus
// {
// 草稿 = 0,
// 意见征集中 = 1,
// 汇总中 = 2,
// 负责人审阅中 = 3,
// 安环部审阅中 = 4,
// 完成 = 5,
// }
// /// <summary>
// /// 员工意见征集表状态
// /// </summary>
// public enum OGEmployeeOpinionFeedbackStatus
// {
// 未填写 = 0,
// 反馈中 = 1,
// 完成 = 2,
// }
class OG059ShowPrint extends React.Component {
constructor(props) {
super(props);
let type = '';
switch (this.props.formCode) {
case 'OG059_REPORT': {
type = 'report';
break;
}
case 'OG059_CHECK': {
type = 'check';
break;
}
case 'OG059_SHOWPRINT': {
type = 'view'
break;
}
}
this.state = {
data: null,
opinions: [],
opinion_user_map: {},
type,
}
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, dataId);
json.OrgType = 2;
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_Department');
extendInclude(json, 'Nav_Users.Nav_User');
extendInclude(json, 'Nav_Users.Nav_Files.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_Users.Nav_Opinions');
extendInclude(json, 'Nav_ChargeUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
extendInclude(json, 'Nav_AHChargeUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EmployeeOpinionCollection/Get',
onComplete: (ret) => {
if (!ret)
return;
let map = {};
let opinions = [];
let opinion_user_map = {};
ret.Nav_Users.forEach((it, idx) => {
map[it.ID] = idx;
})
ret.Nav_Users.filter(t => t.STATUS !== 0).forEach((it, idx) => {
it.Nav_Opinions.forEach((op, idx) => {
opinions.push(op);
opinion_user_map[op.ID] = op;
})
})
this.setState({
data: ret,
opinions: opinions,
opinion_user_map: opinion_user_map,
map,
});
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '员工意见征集汇总表';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
renderUserFeed(it, idx) {
return <tr key={it.ID}>
<td colSpan={2} rowSpan={1} >{idx + 1}</td>
<td colSpan={12} rowSpan={1} >{ }</td>
<td colSpan={2} rowSpan={1} >{it.Nav_User.NAME}</td>
<td colSpan={2} rowSpan={1} >受理意见</td>
<td colSpan={6} rowSpan={1} >不认可解释</td>
</tr>
}
onSave() {
const curuid = this.props.login.user.ID;
const editable = this.state.type == 'report' && this.state.data && this.state.data.STATUS === 2 && this.state.data.USER_ID === curuid;
if (!editable) {
message.error("当前状态不可保存")
return;
}
let data = JSON.parse(JSON.stringify(this.state.data));
this.props.dispatch({
type: 'app/getDataByPost',
payload: data,
url: 'OG/OGEmployeeOpinionCollection/FullUpdate',
onComplete: (ret) => {
if (ret) {
message.success("保存成功");
this.BtnClose();
}
}
});
}
onSubmit() {
const curuid = this.props.login.user.ID;
const editable = (this.state.type == 'report' || this.state.type == 'view') && this.state.data && this.state.data.STATUS === 2 && this.state.data.USER_ID === curuid;
if (!editable) {
message.error("当前状态不可提交")
return;
}
this.state.data.PUBLISH = "SaveAndNotify";
this.state.data.TaskID = this.props.data.TaskID;
let data = JSON.parse(JSON.stringify(this.state.data));
this.props.dispatch({
type: 'app/getDataByPost',
payload: data,
url: 'OG/OGEmployeeOpinionCollection/FullUpdate',
onComplete: (ret) => {
if (ret) {
message.success("提交成功");
this.BtnClose();
}
}
});
}
onAgree() {
const curuid = this.props.login.user.ID;
const checkable = this.state.type == 'check' && this.state.data &&
((this.state.data.STATUS === 3 && this.state.data.CHARGE_USER_ID == curuid) || (this.state.data.STATUS === 4 && this.state.data.AH_CHARGE_USER_ID == curuid));
if (!checkable) {
message.error("当前状态不可审阅")
return;
}
let json = initFilter(this.props.login.OrgId, this.props.data.id, null, null, null);
json.Parameter1 = this.props.data.TaskID;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/OGEmployeeOpinionCollection/Agree',
onComplete: (ret) => {
message.success("提交成功");
this.BtnClose();
}
});
}
getUserName(it) {
if (!it || !this.state.data)
return "";
let id = it.COLLECTION_USER_ID;
let idx = this.state.map[id];
let t = this.state.data.Nav_Users[idx];
return t && t.Nav_User && t.Nav_User.NAME;
}
render() {
const curuid = this.props.login.user.ID;
const { data, opinions, opinion_user_map } = this.state;
const editable = (this.state.type == 'report') && data && data.STATUS === 2 && data.USER_ID === curuid;
const checkable = this.state.type == 'check' && data &&
((data.STATUS === 3 && data.CHARGE_USER_ID == curuid) || (data.STATUS === 4 && data.AH_CHARGE_USER_ID == curuid));
const count = data && data.Nav_Users ? data.Nav_Users.length : 0;
const feedback = data && data.Nav_Users ? data.Nav_Users.filter(t => t.STATUS !== 0).length : 0;
const rate = count !== 0 ? `${Math.round(feedback * 100 / count)}%` : '';
return <div>
{
this.state.type === 'view' &&
<div style={{ padding: '10px' }}>
<ReactToPrint
trigger={() => <Button type={'primary'} icon={'printer'} >打印</Button>}
content={() => this.componentRef}
/>
<Button style={{ marginLeft: '8px' }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
</div>
}
{
editable &&
<div style={{ padding: '10px' }}>
<Button type={"primary"} style={{ marginLeft: '8px' }} onClick={() => this.onSave()}><Icon type="save" />保存</Button>
<Button type={"primary"} style={{ marginLeft: '8px' }} onClick={() => this.onSubmit()} ><Icon type="edit" />保存并提交</Button>
</div>
}
{
checkable &&
<div style={{ padding: '10px' }}>
<Button type={"primary"} style={{ marginLeft: '8px' }} onClick={() => this.onAgree()} icon="check" >确定</Button>
</div>
}
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>
员工意见征集汇总表
</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集目的</td>
<td colSpan={22} rowSpan={1}>{data && data.NAME}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集起止时间</td>
<td colSpan={6} rowSpan={1}>{data && `${data.START_TIME}-${data.END_TIME}`}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集部门</td>
<td colSpan={2} rowSpan={1}>{data && data.Nav_Department && data.Nav_Department.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集份数</td>
<td colSpan={2} rowSpan={1}>{count}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>回收份数</td>
<td colSpan={2} rowSpan={1}>{feedback}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>回收比例</td>
<td colSpan={2} rowSpan={1}>{rate}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>参与人员</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_Users && data.Nav_Users.map((item, i) => {
if (item.STATUS == 0)
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User.NAME + ' '}</label>
else
return item.Nav_User.NAME + ' '
})
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>序号</td>
<td colSpan={12} rowSpan={1} className={styles.fontBold}>意见反馈</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>反馈人员</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>受理意见</td>
<td colSpan={6} rowSpan={1} className={styles.fontBold}>不认可解释</td>
</tr>
{
opinions.map((it, idx) => {
return <tr key={it.ID}>
<td colSpan={2} rowSpan={1} >{idx + 1}</td>
<td colSpan={12} rowSpan={1} >{it.OPINION_CONTENT}</td>
<td colSpan={2} rowSpan={1} >{this.getUserName(it)}</td>
<td colSpan={2} rowSpan={1} >{
!editable ? (data && data.STATUS > 1 ? this.fmtEnum('OGOpinionResultEnum', it.RESULT) : '')
:
<Select value={it.RESULT} onChange={value => {
it.RESULT = value
let opinions = this.state.opinions;
if (opinion_user_map[it.ID]) {
opinion_user_map[it.ID].RESULT = value
}
this.setState({ opinions })
}}>
<Select.Option value={0}>不认可</Select.Option>
<Select.Option value={1}>认可</Select.Option>
</Select>
}</td>
<td colSpan={6} rowSpan={1} >{
!editable ?
it.REFUSE_DESCRIPTION
:
<Input value={it.REFUSE_DESCRIPTION} onChange={e => {
let opinions = this.state.opinions;
if (opinion_user_map[it.ID]) {
opinion_user_map[it.ID].REFUSE_DESCRIPTION = e.target.value
}
this.setState({ opinions })
}} />
}</td>
</tr>
})
}
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>附件</td>
<td colSpan={22} rowSpan={1}>
{
data && data.Nav_Users && data.Nav_Users.filter(t => t.STATUS !== 0).map(it => {
return it.Nav_Files.map(item => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
});
})
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={2} className={styles.fontBold}>审阅意见</td>
<td colSpan={2} rowSpan={1}>部门负责人</td>
<td colSpan={20} rowSpan={1}>
{
data && data.Nav_ChargeUser && data.STATUS > 3 ? <img width={'150px'} alt={data.Nav_ChargeUser.NAME} src={config.picServerHost + data.Nav_ChargeUser.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH}></img> : ""
}
</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1}>安环部负责人</td>
<td colSpan={20} rowSpan={1}>
{
data && data.Nav_AHChargeUser && data.STATUS > 4 ? <img width={'150px'} alt={data.Nav_AHChargeUser.NAME} src={config.picServerHost + data.Nav_AHChargeUser.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH}></img> : ""
}
</td>
</tr>
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG059ShowPrint)

View File

@ -1,141 +0,0 @@
import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, DatePicker, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import XLSX from 'xlsx';
import { connect } from 'dva';
import moment from 'moment';
import config from "../../../config";
class OG059UserView extends React.Component {
constructor(props) {
super(props);
this.state = {
data: null,
opinions: [],
opinion_user_map: {},
}
};
componentDidMount() {
if (window.navigator.userAgent.indexOf("Windows") < 1) {
this.setState({ isMobile: true })
}
if (this.props.data?.id)
this.loadData(this.props.data?.id);
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) {
this.loadData(NextProps.data?.id);
}
}
BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel();
}
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId, '', null, null, null);
extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_Collection');
extendInclude(json, 'Nav_Opinions');
extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File');
json.IgnoreDataRule = true;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,
url: 'OG/EmployeeOpinionCollectionUser/Get',
onComplete: (ret) => {
if (!ret)
return;
let map = {};
let opinions = [];
let opinion_user_map = {};
ret.Nav_Opinions.forEach((op, idx) => {
opinions.push(op);
opinion_user_map[op.ID] = op;
})
this.setState({
data: ret,
opinions: opinions,
opinion_user_map: opinion_user_map,
map,
});
}
});
}
onTableBtnExport() {
let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
let name = '员工意见征集';
name += '.xlsx';
XLSX.writeFile(wb, name)
}
fmtEnum(name, value) {
const enums = this.props.app.enums;
if (!enums || !enums[name]) return '';
return enums[name].enums[value] || '';
}
renderUserFeed(it, idx) {
return <tr key={it.ID}>
<td colSpan={2} rowSpan={1} >{idx + 1}</td>
<td colSpan={12} rowSpan={1} >{ }</td>
<td colSpan={2} rowSpan={1} >{it.Nav_User.NAME}</td>
<td colSpan={2} rowSpan={1} >受理意见</td>
<td colSpan={6} rowSpan={1} >不认可解释</td>
</tr>
}
render() {
const curuid = this.props.login.user.ID;
const { data, opinions, opinion_user_map } = this.state;
return <div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center' }}>
员工意见征集
</h1>
<table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集目的</td>
<td colSpan={6} rowSpan={1}>{data && data.Nav_Collection.NAME}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>征集起止时间</td>
<td colSpan={6} rowSpan={1}>{data && `${data.Nav_Collection.START_TIME}-${data.Nav_Collection.END_TIME}`}</td>
</tr>
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>序号</td>
<td colSpan={12} rowSpan={1} className={styles.fontBold}>意见反馈</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>反馈人员</td>
</tr>
{
opinions.map((it, idx) => {
return <tr key={it.ID}>
<td colSpan={2} rowSpan={1} >{idx + 1}</td>
<td colSpan={12} rowSpan={1} >{it.OPINION_CONTENT}</td>
<td colSpan={2} rowSpan={1} >{data.Nav_User.NAME}</td>
</tr>
})
}
<tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>附件</td>
<td colSpan={14} rowSpan={1}>
{
data && data.Nav_Files && data.Nav_Files.map((item, i) => {
return <a width={'20%'} title={item.Nav_ImgFile.FILE_NAME} target='_blank' href={config.picServerHost + item.Nav_ImgFile.Nav_File.FILE_PATH} >{item.Nav_ImgFile.FILE_NAME} </a>
})
}
</td>
</tr>
</tbody>
</table>
</div>
</div>
}
}
export default connect(({ login, app }) => ({ login, app }))(OG059UserView)

View File

@ -1,21 +0,0 @@
import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty } from "../../utils/common";
import { connect } from 'dva';
/**
* @return {string}
*/
// 编辑
export default {
onBeforeSaveHandleRecord(params) {
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
params.record.PUBLISH = params.customParams;
},
onBeforeEdit({ isNew, stateData, setFieldVisible, setFieldEditable, login }) {
if (!isNew) {
setDataFieldValue(stateData, 'VERSION', stateData.VERSION + 1);
setFieldEditable('Nav_AppointType.NAME', false);
}else{
setDataFieldValue(stateData, 'VERSION', 1);
}
}
}

View File

@ -1,53 +0,0 @@
import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty } from "../../utils/common";
import { connect } from 'dva';
/**
* @return {string}
*/
// 编辑
export default {
onBeforeSaveHandleRecord(params) {
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
params.record.PUBLISH = params.customParams;
},
onBeforeEdit({isNew,stateData,setFieldVisible,setFieldEditable,login}) {
let s = 0;
if (!isNew && stateData && stateData.STATUS !== undefined) {
s = stateData.STATUS;
}
setFieldVisible("START_TIME", s >= 0);
setFieldVisible("Nav_User.NAME", s >= 0);
setFieldVisible("Nav_LaunchDepartment.NAME", s >= 0);
setFieldVisible("NAME", s >= 0);
setFieldVisible("Nav_ItemEnum.NAME", s >= 0);
setFieldVisible("DESCRIPTION", s >= 0);
setFieldVisible("Nav_FileList", s >= 0);
setFieldVisible("Nav_Assignee.NAME", s >= 1);
setFieldVisible("ASSIGNEE_STATUS", s >= 1);
setFieldVisible("ASSIGNEE_DESCRIPTION", s >= 1);
setFieldVisible("Nav_DoDepartment.NAME", s >= 1);
setFieldVisible("Nav_DoUser.NAME", s >= 1);
setFieldVisible("IMPLEMENT_DESCRIPTION", s >= 2);
setFieldVisible("Nav_ImpFileList", s >= 2);
setFieldVisible("SATISFACTION_STATUS", s >= 3);
let curUid = login.user.ID;
let launchUid = stateData && stateData.USER_ID ? stateData.USER_ID : null;
let acceptUid = stateData && stateData.ASSIGNEE_ID ? stateData.ASSIGNEE_ID : null;
let doUid = stateData && stateData.DO_USER_ID ? stateData.DO_USER_ID : null;
setFieldEditable("START_TIME", false);
setFieldEditable("Nav_User.NAME", false);
setFieldEditable("Nav_LaunchDepartment.NAME", false);
setFieldEditable("NAME", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_ItemEnum.NAME", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("DESCRIPTION", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_FileList", s==0);
setFieldEditable("Nav_Assignee.NAME", false);
setFieldEditable("ASSIGNEE_STATUS", s === 1 && (curUid === acceptUid));
setFieldEditable("ASSIGNEE_DESCRIPTION", s === 1 && (curUid === acceptUid));
setFieldEditable("Nav_DoDepartment.NAME", s === 1 && (curUid === acceptUid));
setFieldEditable("Nav_DoUser.NAME", s === 1 && (curUid === acceptUid));
setFieldEditable("IMPLEMENT_DESCRIPTION", s === 2 && (curUid === doUid));
setFieldEditable("Nav_ImpFileList", s>=0);
setFieldEditable("SATISFACTION_STATUS", s === 3 && (curUid === launchUid));
}
}

View File

@ -1,62 +0,0 @@
import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty } from "../../utils/common";
import { connect } from 'dva';
/**
* @return {string}
*/
// 编辑
export default {
onBeforeSaveHandleRecord(params) {
params.record.TaskID = params.data.TaskID//TaskID传递消息表ID
params.record.PUBLISH = params.customParams;
},
onBeforeEdit: ({ isNew, pageCode, login, dispatch, app, updateSubTableData, stateData, setFieldVisible, getFieldValue, setFieldEditable, setFieldValue }) => {
let s = 0;
var status = getFieldValue('STATUS');
var curUid = login.user.ID;
var launchUid = getFieldValue('USER_ID');
var acceptUid = getFieldValue('ASSIGNEE_ID');
var doUid = getFieldValue('SURVEY_USER_ID');
if (!isNew && status !== undefined) {
s = status;
}
if (isNew) {
setFieldVisible("START_TIME", false);
setFieldVisible("Nav_User.NAME", false);
} else {
setFieldVisible("START_TIME", s >= 0);
setFieldVisible("Nav_User.NAME", s >= 0);
setFieldEditable("START_TIME", false);
setFieldEditable("Nav_User.NAME", false);
}
setFieldVisible("Nav_ExternalContactDetail.NAME", s >= 0);
setFieldVisible("NAME", s >= 0);
setFieldVisible("Nav_ItemEnum.NAME", s >= 0);
setFieldVisible("DESCRIPTION", s >= 0);
setFieldVisible("Nav_FileList", s >= 0);
setFieldVisible("Nav_Department.NAME", s >= 1);
setFieldVisible("Nav_Assignee.NAME", s >= 1);
setFieldVisible("ASSIGNEE_STATUS", s >= 1);
setFieldVisible("ASSIGNEE_DESCRIPTION", s >= 1);
setFieldVisible("Nav_SurveyDepartment.NAME", s >= 1);
setFieldVisible("Nav_SurveyUser.NAME", s >= 1);
setFieldVisible("SURVEY_DESCRIPTION", s >= 2);
setFieldVisible("Nav_SurveyFileList", s >= 2);
setFieldVisible("SATISFACTION_STATUS", s >= 3);
setFieldEditable("Nav_ExternalContactDetail.NAME", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("NAME", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_ItemEnum.NAME", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("DESCRIPTION", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_FileList", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_Department.NAME", false);
setFieldEditable("Nav_Assignee.NAME", false);
setFieldEditable("ASSIGNEE_STATUS", s === 1 && (curUid === acceptUid));
setFieldEditable("ASSIGNEE_DESCRIPTION", s === 1 && (curUid === acceptUid));
setFieldEditable("Nav_SurveyDepartment.NAME", s === 1 && (curUid === acceptUid));
setFieldEditable("Nav_SurveyUser.NAME", s === 1 && (curUid === acceptUid));
setFieldEditable("SURVEY_DESCRIPTION", s === 2 && (curUid === doUid));
setFieldEditable("Nav_SurveyFileList", s === 2 && (curUid === doUid));
setFieldEditable("SATISFACTION_STATUS", s === 3 && (curUid === launchUid));
},
}

View File

@ -1,39 +0,0 @@
import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty } from "../../utils/common";
import { connect } from 'dva';
/**
* @return {string}
*/
// 编辑
export default {
onBeforeSaveHandleRecord(params) {
params.record.TaskID = params.data.TaskID//TaskID传递消息表ID
params.record.PUBLISH = params.customParams;
},
onBeforeEdit: ({ isNew, pageCode, login, dispatch, app, updateSubTableData, stateData, setFieldVisible, getFieldValue, setFieldEditable, setFieldValue }) => {
let s = 0;
var status = getFieldValue('STATUS');
var curUid = login.user.ID;
var launchUid = getFieldValue('USER_ID');
if (!isNew && status !== undefined) {
s = status;
}
setFieldVisible("DO_TYPE", s >= 10);
setFieldVisible("Nav_DoDepartment.NAME", s >= 10);
setFieldVisible("Nav_DoUser.NAME", s >= 10);
setFieldVisible("DO_DESC", s >= 10);
setFieldVisible("COMMENT", s == 20);
setFieldEditable("TYPE", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("HAPPEN_TIME", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("PLACE", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("DESC", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("Nav_Files", s == 0 && (!launchUid || curUid === launchUid));
setFieldEditable("DO_TYPE", s == 10);
setFieldEditable("Nav_DoDepartment.NAME", s == 10);
setFieldEditable("Nav_DoUser.NAME", s == 10);
setFieldEditable("DO_DESC", s == 10);
setFieldEditable("COMMENT", s == 20);
},
}

View File

@ -1237,74 +1237,6 @@ const SCShowPrint = Loadable({
loader: () => import('../components/CustomPages/SC/SCShowPrint'),
loading: () => <div />
})
const OG001ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG001ShowPrint'),
loading: () => <div />
})
const OG001ReportView = Loadable({
loader: () => import('../components/CustomPages/OG/OG001ReportView'),
loading: () => <div />
})
const OG003ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG003ShowPrint'),
loading: () => <div />
})
const OG005ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG005ShowPrint'),
loading: () => <div />
})
const OG005ImportPage = Loadable({
loader: () => import('../components/CustomPages/OG/OG005ImportPage'),
loading: () => <div />
})
const OG008ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG008ShowPrint'),
loading: () => <div />
})
const OG010ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG010ShowPrint'),
loading: () => <div />
})
const OG011ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG011ShowPrint'),
loading: () => <div />
})
const OG013ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG013ShowPrint'),
loading: () => <div />
})
const OG015ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG015ShowPrint'),
loading: () => <div />
})
const OG023ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG023ShowPrint'),
loading: () => <div />
})
const OG025ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG025ShowPrint'),
loading: () => <div />
})
const OG027ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG027ShowPrint'),
loading: () => <div />
})
const OG030ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG030ShowPrint'),
loading: () => <div />
})
const OG030ReplyView = Loadable({
loader: () => import('../components/CustomPages/OG/OG030ReplyView'),
loading: () => <div />
})
const OG031ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG031ShowPrint'),
loading: () => <div />
})
const OG034EditPage = Loadable({
loader: () => import('../components/CustomPages/OG/OG034EditPage'),
loading: () => <div />
})
const OG018Check = Loadable({
loader: () => import('../components/CustomPages/OG/OG018Check'),
loading: () => <div />
@ -1313,18 +1245,6 @@ const OG020Edit = Loadable({
loader: () => import('../components/CustomPages/OG/OG020Edit'),
loading: () => <div />
})
const OG059EditPage = Loadable({
loader: () => import('../components/CustomPages/OG/OG059EditPage'),
loading: () => <div />
})
const OG059ShowPrint = Loadable({
loader: () => import('../components/CustomPages/OG/OG059ShowPrint'),
loading: () => <div />
})
const OG059UserView = Loadable({
loader: () => import('../components/CustomPages/OG/OG059UserView'),
loading: () => <div />
})
const PT014ShowPrint = Loadable({
loader: () => import('../components/CustomPages/PT/PT014ShowPrint'),
loading: () => <div />
@ -2130,28 +2050,8 @@ export default function (componentName, formId, formParam, data, formCode, formD
SCShowPrint: <SCShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG001ShowPrint: <OG001ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG001ReportView: <OG001ReportView formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG003ShowPrint: <OG003ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG005ShowPrint: <OG005ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG005ImportPage: <OG005ImportPage formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG008ShowPrint: <OG008ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG010ShowPrint: <OG010ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG011ShowPrint: <OG011ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG013ShowPrint: <OG013ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG015ShowPrint: <OG015ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG023ShowPrint: <OG023ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG025ShowPrint: <OG025ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG027ShowPrint: <OG027ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG030ShowPrint: <OG030ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG030ReplyView: <OG030ReplyView formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG031ShowPrint: <OG031ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG034EditPage: <OG034EditPage formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG018Check: <OG018Check formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG020Edit: <OG020Edit formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG059EditPage: <OG059EditPage formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG059ShowPrint: <OG059ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
OG059UserView: <OG059UserView formId={formId} formParam={formParam} data={data} formCode={formCode} />,
PT014ShowPrint: <PT014ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
PT017ShowPrint: <PT017ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,