社保福利台账页面的bug修改

This commit is contained in:
liyongshun 2022-07-20 10:33:23 +08:00
parent a80fc0c66c
commit 6ff45ec2a1
6 changed files with 133 additions and 101 deletions

View File

@ -284,7 +284,7 @@ export default class Ledger extends React.Component {
"基础设置",
"关联人员",
"薪资项目",
"调薪计薪规则",
"调薪计薪规则"
// "校验规则"
];
@ -317,13 +317,15 @@ export default class Ledger extends React.Component {
saveLedgerBasic(baseInfoRequest).then(() => {
nextStep();
});
} else if (currentStep == 1 || currentStep == 3) {
// } else if (currentStep == 1 || currentStep == 3) {
} else if (currentStep == 1) {
nextStep();
} else if (currentStep == 2) {
saveLedgerItem().then(() => {
nextStep();
});
} else if (currentStep == 4) {
// } else if (currentStep == 4) {
} else if (currentStep == 3) {
saveAdjustmentRule().then(() => {
this.setState({ stepSlideVisible: false });
});
@ -472,7 +474,8 @@ export default class Ledger extends React.Component {
下一步
</Button>
</div>}
{(currentStep == 2 || currentStep == 3) &&
{/*{(currentStep == 2 || currentStep == 3) &&*/}
{currentStep == 2 &&
<div>
<Button
type="default"
@ -498,7 +501,8 @@ export default class Ledger extends React.Component {
保存并进入下一步
</Button>
</div>}
{currentStep == 4 &&
{/*{currentStep == 4 &&*/}
{currentStep == 3 &&
<div>
<Button
type="default"
@ -544,7 +548,7 @@ export default class Ledger extends React.Component {
{ title: "基础设置", key: 0 },
{ title: "关联人员", key: 1 },
{ title: "薪资项目", key: 2 },
{ title: "调薪计薪规则", key: 3 },
{ title: "调薪计薪规则", key: 3 }
// { title: "校验规则", key: 4 }
]}
showOperateBtn={showOperateBtn}

View File

@ -177,21 +177,25 @@ export default class SalaryFile extends React.Component {
const { taxAgentStore: { showOperateBtn } } = this.props;
return (
<div style={{ display: "inline-block" }}>
{
showOperateBtn &&
<Dropdown.Button
type="primary"
overlay={
<Menu onClick={this.handSildeOptionMenuClick.bind(this)}>
<Menu.Item key="1">调整个税扣缴义务人</Menu.Item>
</Menu>
}
onClick={() => {
this.setState({ changeSalaryVisible: true });
}}>
调薪
</Dropdown.Button>
}
<Button type="primary" onClick={() => {
this.setState({ changeSalaryVisible: true });
}}>调薪</Button>
{/*暂时去掉调整个税扣缴义务人导入按钮*/}
{/*{*/}
{/* showOperateBtn &&*/}
{/* <Dropdown.Button*/}
{/* type="primary"*/}
{/* overlay={*/}
{/* <Menu onClick={this.handSildeOptionMenuClick.bind(this)}>*/}
{/* <Menu.Item key="1">调整个税扣缴义务人</Menu.Item>*/}
{/* </Menu>*/}
{/* }*/}
{/* onClick={() => {*/}
{/* this.setState({ changeSalaryVisible: true });*/}
{/* }}>*/}
{/* 调薪*/}
{/* </Dropdown.Button>*/}
{/*}*/}
</div>
);
}
@ -219,7 +223,7 @@ export default class SalaryFile extends React.Component {
const { salaryFileStore: {getTableDatas, form}} = this.props;
getTableDatas(pageInfo)
}
// 搜索
handleSearch(value) {
const {
@ -341,7 +345,8 @@ export default class SalaryFile extends React.Component {
const menu = (
<Menu onClick={handleMenuClick}>
{importType.map((item) => (
{/*暂时去掉调整个税扣缴义务人导入按钮*/}
{_.filter(importType, it => it.id!=="taxAgentAdjust").map((item) => (
<Menu.Item key={item.id}>{item.content}</Menu.Item>
))}
</Menu>
@ -360,7 +365,7 @@ export default class SalaryFile extends React.Component {
style={{ display: "inline-block", position: "relative" }}
className="salaryFileTabWrapper">
{
showOperateBtn &&
showOperateBtn &&
<Fragment>
<WeaHelpfulTip
style={{ marginRight: "10px" }}
@ -452,7 +457,7 @@ export default class SalaryFile extends React.Component {
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
>
<CustomTab
<CustomTab
searchOperationItem={
renderRightOperation()
}
@ -551,7 +556,7 @@ export default class SalaryFile extends React.Component {
subtitle={"操作记录"}
tabs={[
{ title: "薪资项目", key: 0 },
{ title: "个税扣缴义务人", key: 1 },
// { title: "个税扣缴义务人", key: 1 },
]}
editable={false}
showOperateBtn={showOperateBtn}

View File

@ -13,10 +13,11 @@ const selectedTabItems = [
key: '0',
name: "薪资调整记录"
},
{
key: "1",
name: "个税扣缴义务人调整记录"
}
{/*暂时去掉调整个税扣缴义务人导入按钮*/}
// {
// key: "1",
// name: "个税扣缴义务人调整记录"
// }
]
@inject('salaryFileStore')
@ -70,7 +71,7 @@ export default class SalaryFileViewSlide extends React.Component {
</Row>
</Col>
</Row>
<Row className="formRow">
<Col span={8}>
<Row>
@ -93,7 +94,7 @@ export default class SalaryFileViewSlide extends React.Component {
</Row>
</div>
}
<WeaSearchGroup title={<span>薪资档案 <WeaHelpfulTip
width={200}
title="提示:显示已生效的最新数据"
@ -122,4 +123,4 @@ export default class SalaryFileViewSlide extends React.Component {
</div>
)
}
}
}

View File

@ -5,16 +5,10 @@
* LastEditTime: 2022-06-29 09:53:36
*/
import React, { Component } from "react";
import { Icon, Tooltip, Button, message, Modal, Spin } from "antd";
import { Button, Icon, message, Modal, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import {
WeaBrowser,
WeaTable,
WeaPopoverHrm,
WeaDialog,
WeaInputSearch
} from "ecCom";
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
import { getSearchs } from "../../../../util";
import { getQueryString } from "../../../../util/url";
import _ from "lodash";
@ -57,10 +51,10 @@ export default class NormalIndex extends Component {
nextProps.selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
: this.getSupplementaryList({
billMonth,
current,
paymentOrganization
});
billMonth,
current,
paymentOrganization
});
}
}
@ -69,17 +63,17 @@ export default class NormalIndex extends Component {
const { current } = this.state;
selectedKey === "1"
? this.getNormalList({
billMonth,
current: 1,
paymentOrganization,
userName: value
})
billMonth,
current: 1,
paymentOrganization,
userName: value
})
: this.getSupplementaryList({
billMonth,
current: 1,
paymentOrganization,
userName: value
});
billMonth,
current: 1,
paymentOrganization,
userName: value
});
}
handleSave = () => {
@ -180,7 +174,7 @@ export default class NormalIndex extends Component {
}
return {
...it,
title: <span dangerouslySetInnerHTML={{ __html: it.title }} />,
title: <span dangerouslySetInnerHTML={{ __html: it.title }}/>,
width: 150
};
});
@ -217,7 +211,7 @@ export default class NormalIndex extends Component {
}
return {
...it,
title: <span dangerouslySetInnerHTML={{ __html: it.title }} />,
title: <span dangerouslySetInnerHTML={{ __html: it.title }}/>,
width: 150
};
});
@ -258,18 +252,19 @@ export default class NormalIndex extends Component {
this.setState({ selectedRowKeys: [] });
selectedKey === "1"
? this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
})
billMonth,
paymentOrganization,
current: this.state.current
})
: this.getSupplementaryList({
billMonth,
current: this.state.current,
paymentOrganization
});
billMonth,
current: this.state.current,
paymentOrganization
});
});
},
onCancel: () => {}
onCancel: () => {
}
});
}
};
@ -299,21 +294,35 @@ export default class NormalIndex extends Component {
const { commonAccount } = this.props.standingBookStore;
commonAccount({
billMonth,
paymentOrganization,
includes: []
}).then(() => {
message.success("核算成功");
selectedKey === "1"
? this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
})
billMonth,
paymentOrganization,
current: this.state.current
})
: this.getSupplementaryList({
billMonth,
paymentOrganization,
current: this.state.current
});
billMonth,
paymentOrganization,
current: this.state.current
});
});
}
handleExport = () => {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const urlObj = {
"1": "/api/bs/hrmsalary/welfare/common/export",
"3": "/api/bs/hrmsalary/welfare/supplementary/export"
};
const url = `${window.location
.origin}${urlObj[selectedKey]}?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
};
render() {
const { remarks, billMonth, selectedKey, paymentOrganization } = this.props;
const { selectedRowKeys, addProps, date } = this.state;
@ -337,10 +346,10 @@ export default class NormalIndex extends Component {
selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
: this.getSupplementaryList({
billMonth,
current,
paymentOrganization
});
billMonth,
current,
paymentOrganization
});
}
};
return (
@ -351,7 +360,7 @@ export default class NormalIndex extends Component {
<span>
账单月份
<Tooltip placement="topLeft" title="提示:正常缴纳,账单月份即社保福利缴纳月份">
<Icon type="question-circle" />
<Icon type="question-circle"/>
</Tooltip>
</span>
<span>
@ -367,18 +376,19 @@ export default class NormalIndex extends Component {
</div>}
<div className="tabOption">
{this.props.type !== "detail" && this.props.selectedKey == "3"
? <span>
? <span style={{ display: "flex", alignItems: "center" }}>
<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} />
<i className="icon-coms-Add-to" onClick={this.handleAdd} style={{ color: "#2db7f5", fontSize: 18 }}/>
</Tooltip>
</span>
: <span />}
: <span/>}
{addProps.visible &&
<WeaDialog
@ -410,8 +420,13 @@ export default class NormalIndex extends Component {
<Tooltip title="导出全部">
<i className="icon-coms02-coms2-export" />
</Tooltip> */}
{/* {selectedKey === "1" && this.props.type !== "detail" && <Button type="primary" onClick={() => {this.handleCommonAccountClick()}}>核算</Button>} */}
{selectedKey === "1" && this.props.type !== "detail" && <Button type="primary" onClick={() => {
this.handleCommonAccountClick();
}}>核算</Button>}
<Tooltip title="导出全部">
<i className="icon-coms02-coms2-export" style={{ color: "#2db7f5", fontSize: 18 }}
onClick={this.handleExport}/>
</Tooltip>
<WeaInputSearch
value={this.state.searchValue}
onChange={value => {
@ -432,7 +447,7 @@ export default class NormalIndex extends Component {
loading={loading}
pagination={pagination}
rowSelection={rowSelection}
scroll={{ x: 1200, y: 300 }}
scroll={{ x: 1200, y: "calc(100vh - 233px)" }}
/>
</Spin>
</div>

View File

@ -5,9 +5,9 @@
* LastEditTime: 2022-05-09 15:07:56
*/
import React, { Component } from "react";
import { Icon, Tooltip, Button, Spin } from "antd";
import { Button, Icon, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import { WeaInputSearch, WeaTable } from "ecCom";
import { WeaTable } from "ecCom";
import "./index.less";
@inject("standingBookStore")
@ -20,8 +20,8 @@ export default class OverViewIndex extends Component {
tableData: {
list: [],
columns: [],
total: 0,
},
total: 0
}
};
}
@ -48,7 +48,7 @@ export default class OverViewIndex extends Component {
...it,
title: (
<span dangerouslySetInnerHTML={{ __html: it.title }}></span>
),
)
};
}
);
@ -56,12 +56,19 @@ export default class OverViewIndex extends Component {
tableData: {
list,
columns,
total,
},
total
}
});
}
);
};
handleExport = () => {
const { billMonth, paymentOrganization } = this.props;
const url = `${window.location
.origin}/api/bs/hrmsalary/welfare/overView/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
};
render() {
const { remarks, billMonth, selectedKey, paymentOrganization } = this.props;
const { selectedRowKeys } = this.state;
@ -75,7 +82,7 @@ export default class OverViewIndex extends Component {
},
onChange(current) {
console.log("Current: ", current);
},
}
};
return (
<div className="normalWapper">
@ -86,15 +93,15 @@ export default class OverViewIndex extends Component {
<Tooltip
placement="topLeft"
title="提示:正常缴纳,账单月份即社保福利缴纳月份">
<Icon type="question-circle" />
<Icon type="question-circle"/>
</Tooltip>
</span>
<span>{billMonth}</span>
</div>
</div>
{/* <div className="tabOption">
<Button>导出全部</Button>
</div> */}
<div className="tabOption">
<Button type="primary" onClick={this.handleExport}>导出全部</Button>
</div>
{/* table */}
<div style={{ padding: "0 16px" }}>
<Spin spinning={loading}>
@ -104,7 +111,7 @@ export default class OverViewIndex extends Component {
dataSource={list}
loading={loading}
pagination={pagination}
scroll={{ x: 1200 }}
scroll={{ x: 1200, y: "calc(100vh - 200px)" }}
/>
</Spin>
</div>

View File

@ -375,10 +375,10 @@ export class LedgerStore {
//保存薪资帐套基本信息
@action
saveLedgerBasic = params => {
if (!this.validateBaseFrom(params)) {
return;
}
return new Promise((resolve, reject) => {
if (!this.validateBaseFrom(params)) {
reject("保存失败");
}
API.saveLedgerBasic(params).then(res => {
if (res.status) {
this.salarySobId = res.data;