产品-薪酬核算查看详情页面添加公式查看功能

This commit is contained in:
黎永顺 2023-05-16 15:13:45 +08:00
parent bd95f4b2fb
commit e5c64f3a62
1 changed files with 16 additions and 7 deletions

View File

@ -1,4 +1,5 @@
import React from "react";
import { toJS } from "mobx";
import CustomTab from "../../components/customTab";
import { Dropdown, Menu, message } from "antd";
import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal } from "ecCom";
@ -16,7 +17,8 @@ export default class PlaceOnFileDetail extends React.Component {
this.state = {
slideVisiable: false,
selectedRowKeys: [],
searchValue: ""
searchValue: "",
columnIndex: ""
};
this.id = "";
}
@ -38,11 +40,11 @@ export default class PlaceOnFileDetail extends React.Component {
handleClick = ({ data }) => {
const childFrameObj = document.getElementById("atdTable");
const salaryAcctRecordId = getQueryString("id");
const { type, data: { id, data: record } = {} } = data;
const { type, data: { id, data: record, extraId = "" } = {} } = data;
if (type === "PR") {
if (id === "BATCHDELETE") {
this.setState({ selectedRowKeys: record });
}else if (id === "PAGEINFO") {
} else if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = record;
this.pageInfo = { current, pageSize };
const payload = {
@ -57,6 +59,10 @@ export default class PlaceOnFileDetail extends React.Component {
}
};
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
} else if (id === "COLUMNINDEX") {
if (!extraId) {
this.setState({ columnIndex: record });
}
}
} else {
const payload = {
@ -106,9 +112,8 @@ export default class PlaceOnFileDetail extends React.Component {
render() {
const { calculateStore } = this.props;
const { baseSalarySobCycle } = calculateStore;
const { slideVisiable } = this.state;
const { baseSalarySobCycle, columnDescList } = calculateStore;
const { slideVisiable, columnIndex } = this.state;
const menu = (
<Menu onClick={(e) => this.handleMenuClick(e)}>
@ -139,7 +144,7 @@ export default class PlaceOnFileDetail extends React.Component {
renderRightOperation()
}
/>
<div className="tabWrapper">
<div className="tabWrapper" style={{ borderBottom: "none" }}>
<span>薪资所属月{baseSalarySobCycle.salaryMonth}</span>
<WeaHelpfulTip
width={100}
@ -154,6 +159,10 @@ export default class PlaceOnFileDetail extends React.Component {
placement="topLeft"
/>
</div>
<div className="tabWrapper">
<span>公式=</span>
<span>{toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}</span>
</div>
<div className="tableWrapper">
<iframe
style={{ border: 0, width: "100%", height: "100%" }}