/* * Author: 黎永顺 * name: 移动端-工资单预览 * Description: * Date: 2023/10/19 */ import React, { Component } from "react"; import { WeaLocaleProvider } from "ecCom"; import { dealTemplate } from "../pcTemplate"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { render() { const { theme, background, tip, tipPosi, itemTypeList, title } = this.props; const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "mobile"); return ( {/*
{title || getLabel(111, "薪酬预览")}
*/}
{theme || ""}
{/*
{moment().format("YYYY-MM-DD HH:mm:ss")}
*/} {/*{*/} {/* background &&*/} {/*
logo
*/} {/*}*/}
{ !onlyOneGrup && tipPosi.toString() === "1" && tip &&
}
{ showData.map((groupItem, index) => { if (!groupItem) return null; const { groupId, groupName, items = [] } = groupItem; return (
{ groupName ?
{groupName}
: null }
{ (onlyOneGrup && tipPosi.toString() === "1" && tip) && (
{getLabel(111, "发放说明")}
{tip}
) } { items.map((templatItem, index) => { const { salaryItemValue, name, salaryItemShowName } = templatItem || {}; return
{salaryItemShowName || name || ""}
{salaryItemValue}
; }) } { (onlyOneGrup && tipPosi.toString() === "2" && tip) && (
{getLabel(111, "发放说明")}
{tip}
) }
); }) }
{ !onlyOneGrup && tipPosi.toString() === "2" && tip &&
} {this.props.children}
); } } export default Index;