产品-薪资档案列表改造
This commit is contained in:
parent
ea830a6315
commit
b9d2a06d99
|
|
@ -14,7 +14,6 @@ import {
|
||||||
WeaFormItem,
|
WeaFormItem,
|
||||||
WeaHelpfulTip,
|
WeaHelpfulTip,
|
||||||
WeaInput,
|
WeaInput,
|
||||||
WeaNewScroll,
|
|
||||||
WeaPopoverHrm,
|
WeaPopoverHrm,
|
||||||
WeaSearchGroup,
|
WeaSearchGroup,
|
||||||
WeaSelect,
|
WeaSelect,
|
||||||
|
|
@ -23,7 +22,7 @@ import {
|
||||||
WeaTop
|
WeaTop
|
||||||
} from "ecCom";
|
} from "ecCom";
|
||||||
import { WeaTableNew } from "comsMobx";
|
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 ImportMenu from "./components/importMenu";
|
||||||
import ExportMenu from "./components/exportMenu";
|
import ExportMenu from "./components/exportMenu";
|
||||||
import AllWithoutPay from "./components/allWithoutPay";
|
import AllWithoutPay from "./components/allWithoutPay";
|
||||||
|
|
@ -32,7 +31,6 @@ import SlideModalTitle from "../../components/slideModalTitle";
|
||||||
import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide";
|
import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide";
|
||||||
import ChangeSalaryModal from "../salaryFile/changeSalaryModal";
|
import ChangeSalaryModal from "../salaryFile/changeSalaryModal";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import UnifiedTable from "../../components/UnifiedTable";
|
|
||||||
|
|
||||||
const WeaTableComx = WeaTableNew.WeaTable;
|
const WeaTableComx = WeaTableNew.WeaTable;
|
||||||
|
|
||||||
|
|
@ -152,8 +150,45 @@ class Index extends Component {
|
||||||
this.queryTabTotal();
|
this.queryTabTotal();
|
||||||
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
||||||
const init = this.init();
|
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 () => {
|
init = async () => {
|
||||||
const { data: archiveStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" });
|
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" });
|
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}
|
searchsBaseValue={this.state.searchItemsValue.username}
|
||||||
/>
|
/>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
<WeaNewScroll height="100%">
|
<Spin spinning={loading.query}>
|
||||||
<UnifiedTable
|
<iframe
|
||||||
rowKey="id"
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
loading={loading.query}
|
src="http://localhost:7607/#/payrollFilesTable"
|
||||||
columns={this.getColumns()}
|
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/payrollFilesTable"
|
||||||
dataSource={dataSource}
|
id="atdTable"
|
||||||
pagination={pagination}
|
|
||||||
rowSelection={rowSelection}
|
|
||||||
xWidth={this.getColumns().length * 120}
|
|
||||||
/>
|
/>
|
||||||
{/*人员卡片*/}
|
</Spin>
|
||||||
<WeaPopoverHrm/>
|
{/*<WeaNewScroll height="100%">*/}
|
||||||
<WeaTableComx
|
{/* <UnifiedTable*/}
|
||||||
style={{ display: "none" }}
|
{/* rowKey="id"*/}
|
||||||
comsWeaTableStore={tableStore}
|
{/* loading={loading.query}*/}
|
||||||
needScroll={true}
|
{/* columns={this.getColumns()}*/}
|
||||||
/>
|
{/* dataSource={dataSource}*/}
|
||||||
</WeaNewScroll>
|
{/* pagination={pagination}*/}
|
||||||
|
{/* rowSelection={rowSelection}*/}
|
||||||
|
{/* xWidth={this.getColumns().length * 120}*/}
|
||||||
|
{/* />*/}
|
||||||
|
{/*</WeaNewScroll>*/}
|
||||||
|
{/*人员卡片*/}
|
||||||
|
<WeaPopoverHrm/>
|
||||||
|
<WeaTableComx
|
||||||
|
style={{ display: "none" }}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
needScroll={true}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
<div style={{ display: "none" }}>
|
<div style={{ display: "none" }}>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@
|
||||||
.tableWrapper {
|
.tableWrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
.ant-spin-nested-loading, .ant-spin-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue