2023-08-11 16:06:21 +08:00
|
|
|
/*
|
|
|
|
|
* Author: 黎永顺
|
|
|
|
|
* name: 人员信息报送-查看详情
|
|
|
|
|
* Description:
|
|
|
|
|
* Date: 2023/8/11
|
|
|
|
|
*/
|
|
|
|
|
import React, { Component } from "react";
|
2023-08-11 17:14:43 +08:00
|
|
|
import { WeaDatePicker, WeaLocaleProvider, WeaSelect, WeaTab, WeaTop } from "ecCom";
|
2023-08-14 14:46:19 +08:00
|
|
|
import { Button, Dropdown, Menu, Spin } from "antd";
|
|
|
|
|
import BaseInfo from "./components/baseInfo";
|
|
|
|
|
import { advanceConditions, submitStatus } from "./constants";
|
|
|
|
|
import { getSearchs } from "../../util";
|
2023-08-11 16:06:21 +08:00
|
|
|
import { inject, observer } from "mobx-react";
|
2023-08-14 14:46:19 +08:00
|
|
|
import { toJS } from "mobx";
|
2023-08-11 16:06:21 +08:00
|
|
|
import "./index.less";
|
|
|
|
|
|
|
|
|
|
const { getLabel } = WeaLocaleProvider;
|
|
|
|
|
|
2023-08-14 14:46:19 +08:00
|
|
|
@inject("taxAgentStore", "employeeDeclareStore")
|
2023-08-11 16:06:21 +08:00
|
|
|
@observer
|
|
|
|
|
class Index extends Component {
|
2023-08-11 17:14:43 +08:00
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
2023-08-14 14:46:19 +08:00
|
|
|
selectedKey: "0",
|
|
|
|
|
showSearchAd: false,
|
|
|
|
|
declareStatus: "ALL",
|
|
|
|
|
taxCycle: new Date()
|
2023-08-11 17:14:43 +08:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-11 16:06:21 +08:00
|
|
|
componentDidMount() {
|
2023-08-14 14:46:19 +08:00
|
|
|
const { employeeDeclareStore: { advanceForm } } = this.props;
|
2023-08-11 16:06:21 +08:00
|
|
|
document.title = getLabel(544289, "人员信息报送");
|
2023-08-14 14:46:19 +08:00
|
|
|
advanceForm.initFormFields(advanceConditions);
|
|
|
|
|
window.addEventListener("message", this.handleReceive, false);
|
2023-08-11 16:06:21 +08:00
|
|
|
}
|
|
|
|
|
|
2023-08-14 14:46:19 +08:00
|
|
|
componentWillUnmount() {
|
|
|
|
|
window.removeEventListener("message", this.handleReceive, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleReceive = ({ data }) => {
|
|
|
|
|
const { type, payload: { id, params } = {} } = data;
|
|
|
|
|
if (type === "init") {
|
|
|
|
|
this.postMessageToChild({});
|
|
|
|
|
} else if (type === "turn") {
|
|
|
|
|
if (id === "PAGEINFO") {
|
|
|
|
|
const { pageNum: current, size: pageSize } = params;
|
|
|
|
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize } });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
postMessageToChild = (payload) => {
|
|
|
|
|
const childFrameObj = document.getElementById("atdTable");
|
|
|
|
|
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({}), "*");
|
|
|
|
|
};
|
|
|
|
|
|
2023-08-11 16:06:21 +08:00
|
|
|
render() {
|
2023-08-14 14:46:19 +08:00
|
|
|
const { selectedKey, showSearchAd, declareStatus, taxCycle } = this.state;
|
|
|
|
|
const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form } } = this.props;
|
2023-08-11 17:14:43 +08:00
|
|
|
const menu = (
|
|
|
|
|
<Menu>
|
|
|
|
|
<Menu.Item key="1">{getLabel(32136, "批量删除")}</Menu.Item>
|
|
|
|
|
<Menu.Item key="2">{getLabel(111, "批量编辑")}</Menu.Item>
|
|
|
|
|
<Menu.Item key="3">{getLabel(81272, "导出全部")}</Menu.Item>
|
|
|
|
|
<Menu.Item key="4">{getLabel(543715, "导出所选")}</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
|
);
|
2023-08-11 16:06:21 +08:00
|
|
|
const buttons = [
|
|
|
|
|
<Button type="primary">{getLabel(111, "全部报送")}</Button>,
|
2023-08-11 17:14:43 +08:00
|
|
|
<Button type="ghost">{getLabel(111, "获取报送结果")}</Button>,
|
|
|
|
|
<Button type="ghost">{getLabel(111, "刷新数据")}</Button>,
|
2023-08-14 14:46:19 +08:00
|
|
|
<WeaDatePicker arrow type="month" className="pickerDateCustom flex a-center" value={taxCycle}
|
|
|
|
|
onChange={val => console.log(val)}/>,
|
2023-08-11 17:14:43 +08:00
|
|
|
<Dropdown overlay={menu}>
|
2023-08-11 16:06:21 +08:00
|
|
|
<Button type="ghost" icon="ellipsis" className="moreBtn"/>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
];
|
2023-08-11 17:14:43 +08:00
|
|
|
const topTab = [
|
|
|
|
|
{ title: getLabel(332, "全部"), viewcondition: "0" },
|
|
|
|
|
{ title: getLabel(111, "本月新增"), viewcondition: "1" },
|
|
|
|
|
{ title: getLabel(111, "本月信息变动"), viewcondition: "2" }
|
|
|
|
|
];
|
2023-08-11 16:06:21 +08:00
|
|
|
return (
|
|
|
|
|
<WeaTop
|
|
|
|
|
title={getLabel(544289, "人员信息报送")} iconBgcolor="#F14A2D"
|
|
|
|
|
icon={<i className="icon-coms-fa"/>} className="declareWrapper"
|
|
|
|
|
buttons={showOperateBtn ? buttons : []}
|
|
|
|
|
>
|
2023-08-14 14:46:19 +08:00
|
|
|
<div style={{ height: "100%", background: "#f6f6f6" }} className="flex flex-rollback">
|
|
|
|
|
{/*基础信息*/}
|
|
|
|
|
<BaseInfo/>
|
|
|
|
|
{/*列表数据*/}
|
|
|
|
|
<div className="listview-com-layout flex-1 flex flex-rollback">
|
2023-08-11 17:14:43 +08:00
|
|
|
<WeaTab
|
2023-08-14 14:46:19 +08:00
|
|
|
datas={topTab} keyParam="viewcondition" showSearchAd={showSearchAd}
|
2023-08-11 17:14:43 +08:00
|
|
|
selectedKey={selectedKey} searchType={["base", "advanced"]}
|
2023-08-14 14:46:19 +08:00
|
|
|
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
|
|
|
|
|
advanceHeight={300} searchsAd={getSearchs(form, toJS(advanceConditions), 2)}
|
2023-08-11 17:14:43 +08:00
|
|
|
buttons={[
|
2023-08-14 14:46:19 +08:00
|
|
|
<Dropdown.Button
|
|
|
|
|
overlay={
|
|
|
|
|
<Menu>
|
|
|
|
|
<Menu.Item key="1">{getLabel(32935, "导入")}</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
|
}
|
|
|
|
|
type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
|
2023-08-11 17:14:43 +08:00
|
|
|
<WeaSelect
|
2023-08-14 14:46:19 +08:00
|
|
|
value={declareStatus}
|
|
|
|
|
style={{ width: 150 }}
|
|
|
|
|
options={_.map(submitStatus, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))}
|
|
|
|
|
onChange={declareStatus => this.setState({ declareStatus })}
|
|
|
|
|
/>
|
|
|
|
|
]} searchsBaseValue={form.getFormParams().keyword}
|
|
|
|
|
onSearchChange={(v) => form.updateFields({ keyword: v })}
|
2023-08-11 17:14:43 +08:00
|
|
|
onChange={key => this.setState({ selectedKey: key })}
|
2023-08-14 14:46:19 +08:00
|
|
|
onAdReset={() => form.resetForm()}
|
2023-08-11 17:14:43 +08:00
|
|
|
/>
|
2023-08-14 14:46:19 +08:00
|
|
|
<div className="flex-1">
|
|
|
|
|
<Spin spinning={false}>
|
|
|
|
|
<iframe
|
|
|
|
|
style={{ border: 0, width: "100%", height: "100%" }}
|
|
|
|
|
src="http://localhost:7607/#/employeeDeclareTable"
|
|
|
|
|
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/employeeDeclareTable"
|
|
|
|
|
id="atdTable"
|
|
|
|
|
/>
|
|
|
|
|
</Spin>
|
|
|
|
|
</div>
|
2023-08-11 17:14:43 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-11 16:06:21 +08:00
|
|
|
</WeaTop>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Index;
|