From 1a38752cc627564601037841ca5eeeb18c8a0feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 17 Jan 2024 09:44:50 +0800 Subject: [PATCH] 1release/2.9.10.2312.02 --- .../components/mobileTemplate/index.js | 25 ++-- .../components/mobileTemplate/index.less | 2 +- .../components/pcTemplate/content.js | 113 +++++++++--------- .../hrmSalary/components/pcTemplate/index.js | 8 +- .../components/pcTemplate/index.less | 11 +- .../hrmSalary/pages/calculate/calculate.js | 2 +- pc4mobx/hrmSalary/pages/declare/declare.js | 2 +- pc4mobx/hrmSalary/pages/mySalary/index.less | 2 +- .../hrmSalary/pages/mySalaryBenefits/index.js | 6 +- .../hrmSalary/pages/payrollRelease/index.js | 2 +- 10 files changed, 90 insertions(+), 83 deletions(-) diff --git a/pc4mobx/hrmSalary/components/mobileTemplate/index.js b/pc4mobx/hrmSalary/components/mobileTemplate/index.js index ba53b276..18de0574 100644 --- a/pc4mobx/hrmSalary/components/mobileTemplate/index.js +++ b/pc4mobx/hrmSalary/components/mobileTemplate/index.js @@ -7,7 +7,6 @@ import React, { Component } from "react"; import { WeaLocaleProvider } from "ecCom"; import { dealTemplate } from "../pcTemplate"; -import moment from "moment"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -24,7 +23,7 @@ class Index extends Component {
{theme || ""}
-
{moment().format("YYYY-MM-DD HH:mm:ss")}
+ {/*
{moment().format("YYYY-MM-DD HH:mm:ss")}
*/} {/*{*/} {/* background &&*/} {/*
logo
*/} @@ -32,7 +31,7 @@ class Index extends Component {
{ !onlyOneGrup && tipPosi.toString() === "1" && tip && -
{tip}
+
}
{ @@ -46,10 +45,11 @@ class Index extends Component { }
{ - (onlyOneGrup && tipPosi.toString() === "1" && tip) && (
-
{getLabel(111, "发放说明")}
-
{tip}
-
) + (onlyOneGrup && tipPosi.toString() === "1" && tip) && ( +
+
{getLabel(111, "发放说明")}
+
{tip}
+
) } { items.map((templatItem, index) => { @@ -62,10 +62,11 @@ class Index extends Component { }) } { - (onlyOneGrup && tipPosi.toString() === "2" && tip) && (
-
{getLabel(111, "发放说明")}
-
{tip}
-
) + (onlyOneGrup && tipPosi.toString() === "2" && tip) && ( +
+
{getLabel(111, "发放说明")}
+
{tip}
+
) }
); @@ -74,7 +75,7 @@ class Index extends Component {
{ !onlyOneGrup && tipPosi.toString() === "2" && tip && -
{tip}
+
} {this.props.children}
diff --git a/pc4mobx/hrmSalary/components/mobileTemplate/index.less b/pc4mobx/hrmSalary/components/mobileTemplate/index.less index 34d1868a..566ad60b 100644 --- a/pc4mobx/hrmSalary/components/mobileTemplate/index.less +++ b/pc4mobx/hrmSalary/components/mobileTemplate/index.less @@ -40,6 +40,7 @@ font-size: 19px; font-weight: 700; margin-bottom: 12px; + text-align: center; } .time { @@ -67,7 +68,6 @@ } .corporate-culture-text { - font-size: 14px; text-align: left; color: #111; padding: 8px 16px; diff --git a/pc4mobx/hrmSalary/components/pcTemplate/content.js b/pc4mobx/hrmSalary/components/pcTemplate/content.js index b4b63874..b8c7360b 100644 --- a/pc4mobx/hrmSalary/components/pcTemplate/content.js +++ b/pc4mobx/hrmSalary/components/pcTemplate/content.js @@ -1,6 +1,5 @@ import React, { Component } from "react"; import { WeaLocaleProvider } from "ecCom"; -import moment from "moment"; import { dealTemplate } from "./index"; const getLabel = WeaLocaleProvider.getLabel; @@ -11,69 +10,71 @@ class Content extends Component { const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc"); return (
-
-
-
{theme || ""}
-
{moment(sendTime).format("YYYY-MM-DD HH:mm:ss")}
-
-
- {/*{*/} - {/* background &&*/} - {/*
logo
*/} - {/*}*/} - { - !onlyOneGrup && tipPosi.toString() === "1" && tip && -
{tip}
- } -
+
+
+
+
{theme || ""}
+ {/*
{moment(sendTime).format("YYYY-MM-DD HH:mm:ss")}
*/} +
+
+ {/*{*/} + {/* background &&*/} + {/*
logo
*/} + {/*}*/} { - showData.map((groupItem, index) => { - // 如果当前组下没有条目 当前组直接不展示。 - if (!groupItem) return null; - const { groupId, groupName, items = [] } = groupItem; - return ( -
- { - groupName ?
{groupName}
: null - } -
+ !onlyOneGrup && tipPosi.toString() === "1" && tip && +
+ } +
+ { + showData.map((groupItem, index) => { + // 如果当前组下没有条目 当前组直接不展示。 + if (!groupItem) return null; + const { groupId, groupName, items = [] } = groupItem; + return ( +
{ - (onlyOneGrup && tipPosi.toString() === "1" && tip) && (
-
{getLabel(111, "发放说明")}
-
{tip}
-
) + groupName ?
{groupName}
: null } - { - items.map((templatItem, index) => { - const { salaryItemValue, name, salaryItemShowName } = templatItem || {}; - return
-
- {salaryItemShowName || name || ""} -
-
{salaryItemValue || ""}
-
; +
+ { + (onlyOneGrup && tipPosi.toString() === "1" && tip) && (
+
{getLabel(111, "发放说明")}
+
{tip}
+
) + } + { + items.map((templatItem, index) => { + const { salaryItemValue, name, salaryItemShowName, id } = templatItem || {}; + return
+
+ {salaryItemShowName || name || ""} +
+
{salaryItemValue || ""}
+
; - }) - } - { - (onlyOneGrup && tipPosi.toString() === "2" && tip) && (
-
{getLabel(111, "发放说明")}
-
{tip}
-
) - } -
-
); - }) + }) + } + { + (onlyOneGrup && tipPosi.toString() === "2" && tip) && (
+
{getLabel(111, "发放说明")}
+
{tip}
+
) + } +
+
); + }) + } +
+ { + !onlyOneGrup && tipPosi.toString() === "2" && tip && +
}
- { - !onlyOneGrup && tipPosi.toString() === "2" && tip && -
{tip}
- }
+ {this.props.children}
- {this.props.children}
); } diff --git a/pc4mobx/hrmSalary/components/pcTemplate/index.js b/pc4mobx/hrmSalary/components/pcTemplate/index.js index 824722e6..ba6cd4a0 100644 --- a/pc4mobx/hrmSalary/components/pcTemplate/index.js +++ b/pc4mobx/hrmSalary/components/pcTemplate/index.js @@ -28,11 +28,11 @@ export const dealTemplate = (itemTypeList, type) => { }); if (items.length % 2 && type === "pc") items.push({}); // 未分类不展示标题 - if (!groupId.includes("222222222222222222")) { + // if (!groupId.includes("222222222222222222")) { showData.push({ groupId, groupName, items }); - } else { - showData.push({ items }); - } + // } else { + // showData.push({ items }); + // } } }); if (cloneItemTypeList.length === 1) { diff --git a/pc4mobx/hrmSalary/components/pcTemplate/index.less b/pc4mobx/hrmSalary/components/pcTemplate/index.less index 54d2cbdd..610f591b 100644 --- a/pc4mobx/hrmSalary/components/pcTemplate/index.less +++ b/pc4mobx/hrmSalary/components/pcTemplate/index.less @@ -42,6 +42,7 @@ line-height: 22px; font-weight: 400; text-align: center; + font-weight: bolder; } .header-salary-date-time { @@ -69,13 +70,12 @@ .corporate-culture-text { width: 100%; - margin-top: 16px; - text-align: center; - min-height: 12px; - font-size: 12px; + text-align: left; color: #111; + padding: 8px 16px; white-space: pre-wrap; word-break: break-all; + margin-top: 16px; } .data-detail { @@ -83,12 +83,13 @@ .salary-group { margin-bottom: 16px; - padding-bottom: 16px; + padding-bottom: 16px; background: #FFF; .group-title { font-size: 14px; padding: 16px 0 0 8px; + font-weight: bolder; } .group-list { diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js index 7f9f791d..48018983 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calculate.js +++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js @@ -27,7 +27,7 @@ class Calculate extends Component { queryParams: { name: "", dateRange: [ - moment(new Date()).startOf("year").format("YYYY-MM"), + moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"), moment(new Date()).endOf("year").format("YYYY-MM") ] }, isRefresh: false, diff --git a/pc4mobx/hrmSalary/pages/declare/declare.js b/pc4mobx/hrmSalary/pages/declare/declare.js index 23abefd1..f524c784 100644 --- a/pc4mobx/hrmSalary/pages/declare/declare.js +++ b/pc4mobx/hrmSalary/pages/declare/declare.js @@ -25,7 +25,7 @@ class Calculate extends Component { queryParams: { taxAgentName: "", dateRange: [ - moment(new Date()).startOf("year").format("YYYY-MM"), + moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"), moment(new Date()).endOf("year").format("YYYY-MM") ] }, isRefresh: false, diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.less b/pc4mobx/hrmSalary/pages/mySalary/index.less index 258288c9..d4fd9324 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.less +++ b/pc4mobx/hrmSalary/pages/mySalary/index.less @@ -30,7 +30,7 @@ .salary-preview-container { max-width: 1000px; margin: 0 auto; - border: 1px solid #e5e5e5; + border: 2px solid #FFF; padding-top: 32px; } diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js b/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js index 51277169..89d25e4d 100644 --- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js +++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js @@ -18,7 +18,11 @@ class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "1", salaryYearMonth: [moment().startOf("year").format("YYYY-MM"), moment().endOf("year").format("YYYY-MM")] + selectedKey: "1", + salaryYearMonth: [ + moment().subtract(1, 'year').startOf("year").format("YYYY-MM"), + moment().endOf("year").format("YYYY-MM") + ] }; } diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/index.js index 6e406620..8fa3d35e 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/index.js @@ -28,7 +28,7 @@ class Index extends Component { queryParams: { salarySobId: "", name: "", dateRange: [ - moment(new Date()).startOf("year").format("YYYY-MM"), + moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"), moment(new Date()).endOf("year").format("YYYY-MM") ] }