产品-薪资档案列表改造
This commit is contained in:
parent
ea830a6315
commit
b9d2a06d99
|
|
@ -14,7 +14,6 @@ import {
|
|||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaInput,
|
||||
WeaNewScroll,
|
||||
WeaPopoverHrm,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
|
|
@ -23,7 +22,7 @@ import {
|
|||
WeaTop
|
||||
} from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { Button, Dropdown, Menu, message, Modal, Popover } from "antd";
|
||||
import { Button, Dropdown, Menu, message, Modal, Popover, Spin } from "antd";
|
||||
import ImportMenu from "./components/importMenu";
|
||||
import ExportMenu from "./components/exportMenu";
|
||||
import AllWithoutPay from "./components/allWithoutPay";
|
||||
|
|
@ -32,7 +31,6 @@ import SlideModalTitle from "../../components/slideModalTitle";
|
|||
import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide";
|
||||
import ChangeSalaryModal from "../salaryFile/changeSalaryModal";
|
||||
import "./index.less";
|
||||
import UnifiedTable from "../../components/UnifiedTable";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
|
||||
|
|
@ -152,8 +150,45 @@ class Index extends Component {
|
|||
this.queryTabTotal();
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
||||
const init = this.init();
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
||||
dataIndex: it.dataIndex,
|
||||
width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 120 : it.dataIndex === "taxAgentName" ? 176 : 150,
|
||||
title: it.title, align: "left",
|
||||
fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "",
|
||||
ellipsis: true
|
||||
}));
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
const { dataSource, pageInfo } = this.state;
|
||||
if (type === "init") {
|
||||
this.postMessageToChild({
|
||||
columns, dataSource, showOperateBtn,
|
||||
showSum: false, pageInfo, pointerXY: window.pointerXY
|
||||
});
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
console.log(current, pageSize);
|
||||
} else if (id === "USERCARD") {
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload) => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const { dataSource, columns, showSum, pageInfo } = payload;
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, showSum, pageInfo
|
||||
}), "*");
|
||||
};
|
||||
|
||||
init = async () => {
|
||||
const { data: archiveStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" });
|
||||
const { data: userStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" });
|
||||
|
|
@ -791,24 +826,32 @@ class Index extends Component {
|
|||
searchsBaseValue={this.state.searchItemsValue.username}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
<UnifiedTable
|
||||
rowKey="id"
|
||||
loading={loading.query}
|
||||
columns={this.getColumns()}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
rowSelection={rowSelection}
|
||||
xWidth={this.getColumns().length * 120}
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
src="http://localhost:7607/#/payrollFilesTable"
|
||||
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/payrollFilesTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
{/*人员卡片*/}
|
||||
<WeaPopoverHrm/>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
comsWeaTableStore={tableStore}
|
||||
needScroll={true}
|
||||
/>
|
||||
</WeaNewScroll>
|
||||
</Spin>
|
||||
{/*<WeaNewScroll height="100%">*/}
|
||||
{/* <UnifiedTable*/}
|
||||
{/* rowKey="id"*/}
|
||||
{/* loading={loading.query}*/}
|
||||
{/* columns={this.getColumns()}*/}
|
||||
{/* dataSource={dataSource}*/}
|
||||
{/* pagination={pagination}*/}
|
||||
{/* rowSelection={rowSelection}*/}
|
||||
{/* xWidth={this.getColumns().length * 120}*/}
|
||||
{/* />*/}
|
||||
{/*</WeaNewScroll>*/}
|
||||
{/*人员卡片*/}
|
||||
<WeaPopoverHrm/>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
comsWeaTableStore={tableStore}
|
||||
needScroll={true}
|
||||
/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
<div style={{ display: "none" }}>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@
|
|||
.tableWrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue