From ac8c1ee43a0e7755ba97fabfc0f0bf9e95ff9beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 9 Dec 2022 15:26:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/ledgerPage/components/index.less | 29 +++++++++++++------ .../components/ledgerBaseSetting.js | 26 ++++++++++++++--- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less index 0fbc139b..6d697700 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less @@ -26,25 +26,30 @@ } //薪资账套基本设置信息 -.baseSettingWrapper{ +.baseSettingWrapper { padding: 12px 12px 12px 20px; - .baseSettingLeft{ + + .baseSettingLeft { border: 1px solid #ebedf0; - padding: 0!important; + padding: 0 !important; border-bottom: none; - .wea-form-item{ + + .wea-form-item { padding: 4px 10px; border-bottom: 1px solid #ebedf0; - .desc{ + + .desc { line-height: 32px; } } } - .baseSettingRight{ + + .baseSettingRight { width: 100%; background: #fff; border: 1px solid #ebedf0; - .title{ + + .title { border-bottom: 1px solid #ebedf0; background: #f7fbfe; width: 100%; @@ -52,16 +57,22 @@ line-height: 40px; font-size: 14px; } - .descContent{ + + .descContent { color: #999; width: 100%; padding: 0 12px; line-height: 24px; - .descTitle{ + + .descTitle { font-size: 14px; color: #333; line-height: 26px; } } + + .notice { + color: #ff4d4f; + } } } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js index cca8c3de..229d6191 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js @@ -9,6 +9,7 @@ import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextar import { Col, Row } from "antd"; import { inject, observer } from "mobx-react"; import { baseSettingFormItem } from "../config"; +import { getAddMonthYearMonth, getCurrentYearMonth, getSubtractMonthYearMonth } from "../../../util/date"; import "./index.less"; @inject("taxAgentStore") @@ -97,7 +98,7 @@ class LedgerBaseSetting extends Component { }) } - + ); @@ -122,19 +123,36 @@ const CustomSelect = (props) => { ; }; const MonthCycleDesc = (props) => { + const { taxCycleType, socialSecurityCycleType } = props; return
月份周期说明
-
例:薪资所属月是2022-12(即核算员工12月的工资)
+
+ 例:薪资所属月是{moment().format("YYYY-MM")}(即核算员工{moment().format("MM")}月的工资) +
根据您当前的选择,相应的周期为:
薪资周期
2022-12-04至2023-01-03
税款所属期
-
2022-12-04至2023-01-03
+
{getMonth(taxCycleType)}
考勤取值周期
2022-12-04至2023-01-03
福利台账月份
-
2022-12-04至2023-01-03
+
引用{getMonth(socialSecurityCycleType)}的福利台账数据
; }; + +const getMonth = (salaryCycleType) => { + switch (salaryCycleType) { + case "1": // 上上月 + return getSubtractMonthYearMonth(2); + case "2": // 上月 + return getSubtractMonthYearMonth(1); + case "3": // 本月 + return getCurrentYearMonth(); + case "4": // 下月 + return getAddMonthYearMonth(1); + } +};