1release/2.9.10.2312.02

This commit is contained in:
黎永顺 2024-01-17 09:44:50 +08:00
parent 93a0c76753
commit 1a38752cc6
10 changed files with 90 additions and 83 deletions

View File

@ -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 {
<div className="bill-container">
<div className="bill-info-header">
<div className="title">{theme || ""}</div>
<div className="time">{moment().format("YYYY-MM-DD HH:mm:ss")}</div>
{/*<div className="time">{moment().format("YYYY-MM-DD HH:mm:ss")}</div>*/}
{/*{*/}
{/* background &&*/}
{/* <div className="img"><img src={`${background}`} alt="logo"/></div>*/}
@ -32,7 +31,7 @@ class Index extends Component {
</div>
{
!onlyOneGrup && tipPosi.toString() === "1" && tip &&
<div className="corporate-culture-text top" title={tip}>{tip}</div>
<div className="corporate-culture-text top" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
}
<div className="salary-detail-table-container">
{
@ -46,10 +45,11 @@ class Index extends Component {
}
<div className="group-list">
{
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (<div className="list-item send-tip top">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (
<div className="list-item send-tip top">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
{
items.map((templatItem, index) => {
@ -62,10 +62,11 @@ class Index extends Component {
})
}
{
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (<div className="list-item send-tip bottom">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (
<div className="list-item send-tip bottom">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
</div>
</div>);
@ -74,7 +75,7 @@ class Index extends Component {
</div>
{
!onlyOneGrup && tipPosi.toString() === "2" && tip &&
<div className="corporate-culture-text footer" title={tip}>{tip}</div>
<div className="corporate-culture-text footer" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
}
{this.props.children}
</div>

View File

@ -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;

View File

@ -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 (
<div className="salary-preview-container">
<div className="edition-center">
<div className="header">
<div className="header-title">{theme || ""}</div>
<div className="header-salary-date-time">{moment(sendTime).format("YYYY-MM-DD HH:mm:ss")}</div>
</div>
<div className="body">
{/*{*/}
{/* background &&*/}
{/* <div className="comp-img"><img src={`${background}`} alt="logo"/></div>*/}
{/*}*/}
{
!onlyOneGrup && tipPosi.toString() === "1" && tip &&
<div className="corporate-culture-text" title={tip}>{tip}</div>
}
<div className="data-detail">
<div style={{ border: "10px solid #F6F6F6" }}>
<div className="edition-center">
<div className="header">
<div className="header-title">{theme || ""}</div>
{/*<div className="header-salary-date-time">{moment(sendTime).format("YYYY-MM-DD HH:mm:ss")}</div>*/}
</div>
<div className="body">
{/*{*/}
{/* background &&*/}
{/* <div className="comp-img"><img src={`${background}`} alt="logo"/></div>*/}
{/*}*/}
{
showData.map((groupItem, index) => {
// 如果当前组下没有条目 当前组直接不展示。
if (!groupItem) return null;
const { groupId, groupName, items = [] } = groupItem;
return (
<div className="salary-group" key={groupId || index}>
{
groupName ? <div className="group-title">{groupName}</div> : null
}
<div className="group-list">
!onlyOneGrup && tipPosi.toString() === "1" && tip &&
<div className="corporate-culture-text" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
}
<div className="data-detail">
{
showData.map((groupItem, index) => {
// 如果当前组下没有条目 当前组直接不展示。
if (!groupItem) return null;
const { groupId, groupName, items = [] } = groupItem;
return (
<div className="salary-group" key={groupId || index}>
{
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (<div className="send-tip top">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
groupName ? <div className="group-title">{groupName}</div> : null
}
{
items.map((templatItem, index) => {
const { salaryItemValue, name, salaryItemShowName } = templatItem || {};
return <div key={index}
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
<div className="item-name" title={salaryItemShowName || name}>
<span className="text">{salaryItemShowName || name || ""}</span>
</div>
<div className="item-count">{salaryItemValue || ""}</div>
</div>;
<div className="group-list">
{
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (<div className="send-tip top">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
{
items.map((templatItem, index) => {
const { salaryItemValue, name, salaryItemShowName, id } = templatItem || {};
return <div key={index} style={{ display: id ? "flex" : "none" }}
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
<div className="item-name" title={salaryItemShowName || name}>
<span className="text">{salaryItemShowName || name || ""}</span>
</div>
<div className="item-count">{salaryItemValue || ""}</div>
</div>;
})
}
{
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (<div className="send-tip bottom">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
</div>
</div>);
})
})
}
{
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (<div className="send-tip bottom">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
</div>
</div>);
})
}
</div>
{
!onlyOneGrup && tipPosi.toString() === "2" && tip &&
<div className="corporate-culture-text" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
}
</div>
{
!onlyOneGrup && tipPosi.toString() === "2" && tip &&
<div className="corporate-culture-text" title={tip}>{tip}</div>
}
</div>
{this.props.children}
</div>
{this.props.children}
</div>
);
}

View File

@ -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) {

View File

@ -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 {

View File

@ -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,

View File

@ -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,

View File

@ -30,7 +30,7 @@
.salary-preview-container {
max-width: 1000px;
margin: 0 auto;
border: 1px solid #e5e5e5;
border: 2px solid #FFF;
padding-top: 32px;
}

View File

@ -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")
]
};
}

View File

@ -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")
]
}