产品-社保福利档案、薪资档案、薪资核算列表添加工号查询功能

This commit is contained in:
黎永顺 2023-05-31 17:11:19 +08:00
parent 5a2897bf70
commit 8d2643926f
1 changed files with 129 additions and 56 deletions

View File

@ -7,7 +7,7 @@
import React, { Component } from "react";
import { Button, Icon, message, Modal, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import { WeaInputSearch, WeaTab } from "ecCom";
import { WeaInputSearch, WeaTab, WeaSearchGroup, WeaInput, WeaFormItem } from "ecCom";
import { calcPageNo } from "../../../../util";
import { getQueryString } from "../../../../util/url";
import ProgressModal from "../../../../components/progressModal";
@ -43,6 +43,7 @@ export default class NormalIndex extends Component {
total: 0
},
searchValue: "",
workcode: "",
progressVisible: false,
progress: 0,
fieldData: {}, //选中的表单头信息
@ -440,13 +441,19 @@ export default class NormalIndex extends Component {
});
};
getSearchs=()=> {
let group = [];
return group;
return <WeaSearchGroup center needTigger showGroup title="其他条件">
<WeaFormItem label="工号" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInput
value={this.state.workcode}
onChange={v => this.setState({ workcode: v })}
/>
</WeaFormItem>
</WeaSearchGroup>;
}
render() {
const { remarks, billMonth, selectedKey, paymentOrganization, standingBookStore } = this.props;
const { addProps, adjustSlide, importParams, returnEditPersonSlide, showSearchAd } = this.state;
const { addProps, adjustSlide, importParams, returnEditPersonSlide, showSearchAd, searchValue } = this.state;
const { loading } = standingBookStore;
return (
<div className="normalWapper">
@ -476,7 +483,125 @@ export default class NormalIndex extends Component {
datas={[]} selectedKey="" advanceHeight={200} searchsAd={this.getSearchs()}
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
onSearchChange={searchValue => this.setState({ searchValue })}
buttons={
(this.props.type !== "detail" && this.props.selectedKey == "3") ? [
<Tooltip title="批量删除">
<i
style={{ color: "#2db7f5", fontSize: 18 }}
className="icon-coms-Batch-delete"
onClick={this.handleBatchDelete}
/>
</Tooltip>,
<Tooltip title="添加该月正常缴纳人员">
<i className="icon-coms-Add-to" onClick={this.handleAdd} style={{ color: "#2db7f5", fontSize: 18 }}/>
</Tooltip>,
<Tooltip title="导出全部">
<i
className="icon-coms02-coms2-export"
style={{ color: "#2db7f5", fontSize: 18, marginRight: 10, cursor: "pointer" }}
onClick={this.handleExport}
/>
</Tooltip>
] : (selectedKey === "1" && this.props.type !== "detail") ? [
<Button type="primary" onClick={() => {
this.handleCommonAccountClick();
}}>核算</Button>,
<Button type="ghost" onClick={() => {
this.setState({
adjustSlide: {
...adjustSlide,
visible: true
}
});
}}>调差</Button>,
<Tooltip title="导出全部">
<i
className="icon-coms02-coms2-export"
style={{ color: "#2db7f5", fontSize: 18, marginRight: 10, cursor: "pointer" }}
onClick={this.handleExport}
/>
</Tooltip>
] : selectedKey === "1" ? [
<Button type="primary" onClick={() => {
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`);
}}>线下对比</Button>,
<Tooltip title="导出全部">
<i
className="icon-coms02-coms2-export"
style={{ color: "#2db7f5", fontSize: 18, marginRight: 10, cursor: "pointer" }}
onClick={this.handleExport}
/>
</Tooltip>
] : this.props.type !== "detail" ? [
<Tooltip title="导入数据">
<i
className="icon-coms02-Import"
style={{ color: "#2db7f5", fontSize: 18, marginRight: 10, cursor: "pointer" }}
onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}
/>
</Tooltip>,
<Tooltip title="导出全部">
<i
className="icon-coms02-coms2-export"
style={{ color: "#2db7f5", fontSize: 18, marginRight: 10, cursor: "pointer" }}
onClick={this.handleExport}
/>
</Tooltip>
] : []
}
/>
<SupplementarySlide
{...addProps}
billMonth={billMonth} paymentOrganization={paymentOrganization}
onCancel={(isRefresh) => {
this.setState({
addProps: {
...addProps,
visible: false
}
}, () => {
isRefresh && this.getSupplementaryList({
billMonth,
current: this.state.current,
paymentOrganization
});
});
}}
/>
{/*核算进度条*/}
<ProgressModal
title={selectedKey === "3" ? "正在删除请稍后" : "正在核算请稍后"}
visible={this.state.progressVisible}
onCancel={() => {
this.setState({ progressVisible: false, progress: 0 });
}}
progress={this.state.progress}
/>
{/*导入弹框*/}
{
importParams.visible &&
<AcctResultImportModal
visiable={importParams.visible}
fieldData={this.state.fieldData}
onAdd={fieldData => {
this.setState({
fieldData
});
}}
onCancel={() => {
this.setState({ importParams: { ...importParams, visible: false }, fieldData: {} }, () => {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const { current } = this.state;
selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
});
}}
isStandingBook
standingBookTabKey={selectedKey}
/>
}
{/*<div className="tabOption">*/}
{/* {this.props.type !== "detail" && this.props.selectedKey == "3"*/}
{/* ? <span style={{ display: "flex", alignItems: "center" }}>*/}
@ -492,24 +617,6 @@ export default class NormalIndex extends Component {
{/* </Tooltip>*/}
{/* </span>*/}
{/* : <span/>}*/}
{/* <SupplementarySlide*/}
{/* {...addProps}*/}
{/* billMonth={billMonth} paymentOrganization={paymentOrganization}*/}
{/* onCancel={(isRefresh) => {*/}
{/* this.setState({*/}
{/* addProps: {*/}
{/* ...addProps,*/}
{/* visible: false*/}
{/* }*/}
{/* }, () => {*/}
{/* isRefresh && this.getSupplementaryList({*/}
{/* billMonth,*/}
{/* current: this.state.current,*/}
{/* paymentOrganization*/}
{/* });*/}
{/* });*/}
{/* }}*/}
{/* />*/}
{/* {*/}
{/* selectedKey === "1" && this.props.type !== "detail" &&*/}
{/* <React.Fragment>*/}
@ -534,15 +641,6 @@ export default class NormalIndex extends Component {
{/* }}>线下对比</Button>*/}
{/* </React.Fragment>*/}
{/* }*/}
{/* /!*核算进度条*!/*/}
{/* <ProgressModal*/}
{/* title={selectedKey === "3" ? "正在删除请稍后" : "正在核算请稍后"}*/}
{/* visible={this.state.progressVisible}*/}
{/* onCancel={() => {*/}
{/* this.setState({ progressVisible: false, progress: 0 });*/}
{/* }}*/}
{/* progress={this.state.progress}*/}
{/* />*/}
{/* {*/}
{/* this.props.type !== "detail" &&*/}
{/* <Tooltip title="导入数据">*/}
@ -553,31 +651,6 @@ export default class NormalIndex extends Component {
{/* />*/}
{/* </Tooltip>*/}
{/* }*/}
{/* /!*导入弹框*!/*/}
{/* {*/}
{/* importParams.visible &&*/}
{/* <AcctResultImportModal*/}
{/* visiable={importParams.visible}*/}
{/* fieldData={this.state.fieldData}*/}
{/* onAdd={fieldData => {*/}
{/* this.setState({*/}
{/* fieldData*/}
{/* });*/}
{/* }}*/}
{/* onCancel={() => {*/}
{/* this.setState({ importParams: { ...importParams, visible: false }, fieldData: {} }, () => {*/}
{/* const { billMonth, selectedKey, paymentOrganization } = this.props;*/}
{/* const { current } = this.state;*/}
{/* selectedKey === "1"*/}
{/* ? this.getNormalList({ billMonth, current, paymentOrganization })*/}
{/* : this.getSupplementaryList({ billMonth, current, paymentOrganization });*/}
{/* });*/}
{/* }}*/}
{/* isStandingBook*/}
{/* standingBookTabKey={selectedKey}*/}
{/* />*/}
{/* }*/}
{/* <Tooltip title="导出全部">*/}
{/* <i*/}
{/* className="icon-coms02-coms2-export"*/}