1release/2.9.10.2312.02
This commit is contained in:
parent
da7194d6b1
commit
b7a3fcccfd
|
|
@ -54,11 +54,11 @@ export const optTypeEnum = [
|
|||
}
|
||||
];
|
||||
export const tabList = [
|
||||
{ viewcondition: "1", lanId: 542711, title: "待增员", showcount: true, groupid: "stayAdd" },
|
||||
{ viewcondition: "2,3", lanId: 542504, title: "在缴员工", showcount: true, groupid: "paying" },
|
||||
{ viewcondition: "3", lanId: 542713, title: "待减员", showcount: true, groupid: "stayDel" },
|
||||
{ viewcondition: "4,5", lanId: 542505, title: "停缴员工", showcount: true, groupid: "stopPay" },
|
||||
{ viewcondition: "ext", lanId: 542679, title: "非系统人员", showcount: true, groupid: "ext" }
|
||||
{ viewcondition: "1", title: getLabel(542711, "待增员"), showcount: true, groupid: "stayAdd" },
|
||||
{ viewcondition: "2,3", title: getLabel(542504, "在缴员工"), showcount: true, groupid: "paying" },
|
||||
{ viewcondition: "3", title: getLabel(542713, "待减员"), showcount: true, groupid: "stayDel" },
|
||||
{ viewcondition: "4,5", title: getLabel(542505, "停缴员工"), showcount: true, groupid: "stopPay" },
|
||||
{ viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "ext" }
|
||||
];
|
||||
export const welfareTipList = [
|
||||
{
|
||||
|
|
@ -138,145 +138,149 @@ export const welfareTipList = [
|
|||
list: []
|
||||
}
|
||||
];
|
||||
export const renderDropMenuDatas = (selectedKey, getLabel) => {
|
||||
export const renderDropMenuDatas = (selectedKey, getLabel, showOperateBtn) => {
|
||||
let menus = [{
|
||||
key: "log",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(111, "操作日志")
|
||||
}];
|
||||
switch (selectedKey) {
|
||||
case "1":
|
||||
menus = [
|
||||
{
|
||||
key: "fullStaffIncrease",
|
||||
icon: <i className="iconfont icon-quanbu"/>,
|
||||
content: getLabel(543185, "全量增员")
|
||||
},
|
||||
{
|
||||
key: "batchStaffIncrease",
|
||||
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||
content: getLabel(543187, "批量增员")
|
||||
},
|
||||
{
|
||||
key: "batchDeleteTodolist",
|
||||
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||
content: getLabel(543186, "批量删除待办")
|
||||
},
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "2,3":
|
||||
menus = [
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "3":
|
||||
menus = [
|
||||
{
|
||||
key: "fullReduction",
|
||||
icon: <i className="iconfont icon-quanbu"/>,
|
||||
content: getLabel(543189, "全量减员")
|
||||
},
|
||||
{
|
||||
key: "batchReduction",
|
||||
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||
content: getLabel(543188, "批量减员")
|
||||
},
|
||||
{
|
||||
key: "batchDeleteTodolistStayDel",
|
||||
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||
content: getLabel(543186, "批量删除待办")
|
||||
},
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "4,5":
|
||||
menus = [
|
||||
{
|
||||
key: "batchCancellationOfSuspended",
|
||||
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||
content: getLabel(543190, "批量取消停缴")
|
||||
},
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (showOperateBtn) {
|
||||
switch (selectedKey) {
|
||||
case "1":
|
||||
menus = [
|
||||
{
|
||||
key: "fullStaffIncrease",
|
||||
icon: <i className="iconfont icon-quanbu"/>,
|
||||
content: getLabel(543185, "全量增员")
|
||||
},
|
||||
{
|
||||
key: "batchStaffIncrease",
|
||||
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||
content: getLabel(543187, "批量增员")
|
||||
},
|
||||
{
|
||||
key: "batchDeleteTodolist",
|
||||
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||
content: getLabel(543186, "批量删除待办")
|
||||
},
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "2,3":
|
||||
menus = [
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "3":
|
||||
menus = [
|
||||
{
|
||||
key: "fullReduction",
|
||||
icon: <i className="iconfont icon-quanbu"/>,
|
||||
content: getLabel(543189, "全量减员")
|
||||
},
|
||||
{
|
||||
key: "batchReduction",
|
||||
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||
content: getLabel(543188, "批量减员")
|
||||
},
|
||||
{
|
||||
key: "batchDeleteTodolistStayDel",
|
||||
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||
content: getLabel(543186, "批量删除待办")
|
||||
},
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "4,5":
|
||||
menus = [
|
||||
{
|
||||
key: "batchCancellationOfSuspended",
|
||||
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||
content: getLabel(543190, "批量取消停缴")
|
||||
},
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return menus;
|
||||
};
|
||||
export const renderReqBtns = (selectedKey, getLabel, onOpenAdvanceSearch, onAdvanceSearch, onImport) => {
|
||||
let reqBtns = [
|
||||
export const renderReqBtns = (selectedKey, getLabel, onOpenAdvanceSearch, onAdvanceSearch, onImport, showOperateBtn) => {
|
||||
let reqBtns = showOperateBtn ? [
|
||||
<Button type="primary" onClick={onImport}>{getLabel(32935, "导入")}</Button>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={onOpenAdvanceSearch} onAdvanceSearch={onAdvanceSearch}/>
|
||||
];
|
||||
switch (selectedKey) {
|
||||
case "1":
|
||||
reqBtns.unshift(<WeaHelpfulTip
|
||||
width={300} placement="topLeft"
|
||||
title={
|
||||
<span>
|
||||
{getLabel(544348, "提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除,因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。")}
|
||||
</span>
|
||||
}
|
||||
/>);
|
||||
break;
|
||||
case "3":
|
||||
reqBtns.shift();
|
||||
reqBtns.unshift(<WeaHelpfulTip
|
||||
width={300} placement="topLeft"
|
||||
title={HelpfulDiv}
|
||||
/>);
|
||||
break;
|
||||
case "4,5":
|
||||
reqBtns.shift();
|
||||
reqBtns.unshift(<WeaHelpfulTip
|
||||
width={300} placement="topLeft"
|
||||
title={CancelHelpfulDiv}
|
||||
/>);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
] : [<AdvanceInputBtn onOpenAdvanceSearch={onOpenAdvanceSearch} onAdvanceSearch={onAdvanceSearch}/>];
|
||||
if (showOperateBtn) {
|
||||
switch (selectedKey) {
|
||||
case "1":
|
||||
reqBtns.unshift(<WeaHelpfulTip
|
||||
width={300} placement="topLeft"
|
||||
title={
|
||||
<span>
|
||||
{getLabel(544348, "提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除,因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。")}
|
||||
</span>
|
||||
}
|
||||
/>);
|
||||
break;
|
||||
case "3":
|
||||
reqBtns.shift();
|
||||
reqBtns.unshift(<WeaHelpfulTip
|
||||
width={300} placement="topLeft"
|
||||
title={HelpfulDiv}
|
||||
/>);
|
||||
break;
|
||||
case "4,5":
|
||||
reqBtns.shift();
|
||||
reqBtns.unshift(<WeaHelpfulTip
|
||||
width={300} placement="topLeft"
|
||||
title={CancelHelpfulDiv}
|
||||
/>);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return reqBtns;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import WelfareArchivesImportDialog from "./components/welfareArchivesImportDialo
|
|||
import WelfareTip from "./components/welfareTip";
|
||||
import LogDialog from "./components/logDialog";
|
||||
import * as API from "../../../apis/welfareArchive";
|
||||
import { sysinfo } from "../../../apis/ruleconfig";
|
||||
import { optTypeEnum, renderDropMenuDatas, renderReqBtns, tabList, welfareTipList } from "./config";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import cs from "classnames";
|
||||
|
|
@ -33,10 +34,17 @@ class Index extends Component {
|
|||
this.state = {
|
||||
selectedKey: "1", showSearchAd: false, isQuery: false, logDialogVisible: false,
|
||||
topTabCount: { stayAdd: 0, paying: 0, stayDel: 0, stopPay: 0, ext: 0 },
|
||||
welfareImpDialog: { visible: false, title: getLabel(24023, "数据导入"), runStatuses: "" }
|
||||
welfareImpDialog: { visible: false, title: getLabel(24023, "数据导入"), runStatuses: "" },
|
||||
showExtEmpsWitch: false
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
// extEmpsWitch //非系统人员开关, 1: 开启, 0:关闭
|
||||
const [{ data: { extEmpsWitch } }] = await Promise.all([sysinfo()]);
|
||||
this.setState({ showExtEmpsWitch: extEmpsWitch === "1" });
|
||||
}
|
||||
|
||||
queryInsuranceTabTotal = (active, total) => {
|
||||
API.queryInsuranceTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
|
|
@ -118,7 +126,10 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, topTabCount, showSearchAd, isQuery, logDialogVisible, welfareImpDialog } = this.state;
|
||||
const {
|
||||
selectedKey, topTabCount, showSearchAd, isQuery,
|
||||
logDialogVisible, welfareImpDialog, showExtEmpsWitch
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list;
|
||||
return (
|
||||
|
|
@ -126,11 +137,11 @@ class Index extends Component {
|
|||
<WeaReqTop
|
||||
title={getLabel(538001, "社保福利档案")} buttonSpace={10} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={renderDropMenuDatas(selectedKey, getLabel)}
|
||||
buttons={renderReqBtns(selectedKey, getLabel, this.handleOpenAdvanceSearch, this.handleAdvanceSearch, this.handleImport)}
|
||||
dropMenuDatas={renderDropMenuDatas(selectedKey, getLabel, showOperateBtn)}
|
||||
buttons={renderReqBtns(selectedKey, getLabel, this.handleOpenAdvanceSearch, this.handleAdvanceSearch, this.handleImport, showOperateBtn)}
|
||||
replaceTab={
|
||||
<WeaTab
|
||||
datas={_.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) }))} autoCalculateWidth
|
||||
datas={!showExtEmpsWitch ? _.dropRight(tabList) : tabList} autoCalculateWidth
|
||||
keyParam="viewcondition" selectedKey={selectedKey} counts={topTabCount} countParam="groupid"
|
||||
onChange={key => this.setState({ selectedKey: key })}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue