薪资账套页面重构

This commit is contained in:
黎永顺 2022-12-09 15:26:21 +08:00
parent c6d6693198
commit ac8c1ee43a
2 changed files with 42 additions and 13 deletions

View File

@ -26,25 +26,30 @@
} }
//薪资账套基本设置信息 //薪资账套基本设置信息
.baseSettingWrapper{ .baseSettingWrapper {
padding: 12px 12px 12px 20px; padding: 12px 12px 12px 20px;
.baseSettingLeft{
.baseSettingLeft {
border: 1px solid #ebedf0; border: 1px solid #ebedf0;
padding: 0!important; padding: 0 !important;
border-bottom: none; border-bottom: none;
.wea-form-item{
.wea-form-item {
padding: 4px 10px; padding: 4px 10px;
border-bottom: 1px solid #ebedf0; border-bottom: 1px solid #ebedf0;
.desc{
.desc {
line-height: 32px; line-height: 32px;
} }
} }
} }
.baseSettingRight{
.baseSettingRight {
width: 100%; width: 100%;
background: #fff; background: #fff;
border: 1px solid #ebedf0; border: 1px solid #ebedf0;
.title{
.title {
border-bottom: 1px solid #ebedf0; border-bottom: 1px solid #ebedf0;
background: #f7fbfe; background: #f7fbfe;
width: 100%; width: 100%;
@ -52,16 +57,22 @@
line-height: 40px; line-height: 40px;
font-size: 14px; font-size: 14px;
} }
.descContent{
.descContent {
color: #999; color: #999;
width: 100%; width: 100%;
padding: 0 12px; padding: 0 12px;
line-height: 24px; line-height: 24px;
.descTitle{
.descTitle {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
line-height: 26px; line-height: 26px;
} }
} }
.notice {
color: #ff4d4f;
}
} }
} }

View File

@ -9,6 +9,7 @@ import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextar
import { Col, Row } from "antd"; import { Col, Row } from "antd";
import { inject, observer } from "mobx-react"; import { inject, observer } from "mobx-react";
import { baseSettingFormItem } from "../config"; import { baseSettingFormItem } from "../config";
import { getAddMonthYearMonth, getCurrentYearMonth, getSubtractMonthYearMonth } from "../../../util/date";
import "./index.less"; import "./index.less";
@inject("taxAgentStore") @inject("taxAgentStore")
@ -97,7 +98,7 @@ class LedgerBaseSetting extends Component {
}) })
} }
</Col> </Col>
<Col span={6}><MonthCycleDesc/></Col> <Col span={6}><MonthCycleDesc {...settingBaseInfo}/></Col>
</Row> </Row>
</div> </div>
); );
@ -122,19 +123,36 @@ const CustomSelect = (props) => {
</Row>; </Row>;
}; };
const MonthCycleDesc = (props) => { const MonthCycleDesc = (props) => {
const { taxCycleType, socialSecurityCycleType } = props;
return <div className="baseSettingRight"> return <div className="baseSettingRight">
<div className="title">月份周期说明</div> <div className="title">月份周期说明</div>
<div className="descContent"> <div className="descContent">
<div>薪资所属月是2022-12即核算员工12月的工资</div> <div>
薪资所属月是<span className="notice">{moment().format("YYYY-MM")}</span><span
className="notice">{moment().format("MM")}</span>
</div>
<div>根据您当前的选择相应的周期为</div> <div>根据您当前的选择相应的周期为</div>
<div className="descTitle">薪资周期</div> <div className="descTitle">薪资周期</div>
<div>2022-12-04至2023-01-03</div> <div>2022-12-04至2023-01-03</div>
<div className="descTitle">税款所属期</div> <div className="descTitle">税款所属期</div>
<div>2022-12-04至2023-01-03</div> <div className="notice">{getMonth(taxCycleType)}</div>
<div className="descTitle">考勤取值周期</div> <div className="descTitle">考勤取值周期</div>
<div>2022-12-04至2023-01-03</div> <div>2022-12-04至2023-01-03</div>
<div className="descTitle">福利台账月份</div> <div className="descTitle">福利台账月份</div>
<div>2022-12-04至2023-01-03</div> <div>引用<span className="notice">{getMonth(socialSecurityCycleType)}</span></div>
</div> </div>
</div>; </div>;
}; };
const getMonth = (salaryCycleType) => {
switch (salaryCycleType) {
case "1": // 上上月
return getSubtractMonthYearMonth(2);
case "2": // 上月
return getSubtractMonthYearMonth(1);
case "3": // 本月
return getCurrentYearMonth();
case "4": // 下月
return getAddMonthYearMonth(1);
}
};