feature/V2-dev合并多语言

This commit is contained in:
黎永顺 2023-12-14 16:45:09 +08:00
parent 97bd0c8b4d
commit 1f332adcff
5 changed files with 22 additions and 12 deletions

View File

@ -1,9 +1,14 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
//薪资档案-薪资档案列表
export const getArchiveList = params => {
return postFetch("/api/bs/hrmsalary/salaryArchive/list", params);
};
//薪资档案的高级搜索
export const getSaCondition = params => {
return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params);
};
//薪资档案-获取薪资档案详情表单
export const getArchiveForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getForm", "get", params);

View File

@ -1,9 +1,11 @@
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import { WeaInputLocale, WeaLocaleProvider } from "ecCom";
import moment from "moment";
import { dealTemplate } from "./index";
const getLabel = WeaLocaleProvider.getLabel;
const getMultiStrFromBase64 = WeaInputLocale.getMultiStrFromBase64;
const getCurrentLabel = WeaInputLocale.getCurrentLabel;
class Content extends Component {
render() {
@ -34,12 +36,13 @@ class Content extends Component {
return (
<div className="salary-group" key={groupId || index}>
{
groupName ? <div className="group-title">{groupName}</div> : null
groupName ? <div
className="group-title">{groupName.indexOf("base64") !== -1 ? getCurrentLabel(getMultiStrFromBase64(groupName)) : getCurrentLabel(groupName)}</div> : null
}
<div className="group-list">
{
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (<div className="send-tip top">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="label">{getLabel(544304, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}
@ -58,7 +61,7 @@ class Content extends Component {
}
{
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (<div className="send-tip bottom">
<div className="label">{getLabel(111, "发放说明")}</div>
<div className="label">{getLabel(544304, "发放说明")}</div>
<div className="detail">{tip}</div>
</div>)
}

View File

@ -1,12 +1,9 @@
import React, { Component } from "react";
import { WeaInputLocale, WeaLocaleProvider } from "ecCom";
import moment from "moment";
import { WeaLocaleProvider } from "ecCom";
import Content from "./content";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const getMultiStrFromBase64 = WeaInputLocale.getMultiStrFromBase64;
const getCurrentLabel = WeaInputLocale.getCurrentLabel;
class Index extends Component {
render() {

View File

@ -213,7 +213,7 @@ export default class MobilePayroll extends React.Component {
type === "phone" ?
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
<MobileTemplate {...salaryProps} title={getLabel(545935, "工资单查看")}>
{
(_.isNil(confirmStatus) || confirmStatus === "0") &&
<ConfirmBtns

View File

@ -5,7 +5,7 @@
* Date: 2023/11/23
*/
import React, { Component } from "react";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { WeaDialog, WeaInputLocale, WeaLocaleProvider } from "ecCom";
import { Button, Col, Row, Tree } from "antd";
import uuidV4 from "uuid/v4";
import { getSmsSalaryItemSet } from "../../../../apis/payroll";
@ -16,6 +16,8 @@ import "codemirror/mode/javascript/javascript.js";
const TreeNode = Tree.TreeNode;
const getLabel = WeaLocaleProvider.getLabel;
const getMultiStrFromBase64 = WeaInputLocale.getMultiStrFromBase64;
const getCurrentLabel = WeaInputLocale.getCurrentLabel;
class SmsSettingDialog extends Component {
constructor(props) {
@ -38,7 +40,8 @@ class SmsSettingDialog extends Component {
getSmsSalaryItemSet({ salarySobId: props.salarySobId }).then(({ status, data }) => {
if (status) this.setState({
variableList: _.map(data, item => ({
key: item.groupId, value: item.groupName,
key: item.groupId,
value: item.groupName.indexOf("base64") !== -1 ? getCurrentLabel(getMultiStrFromBase64(item.groupName)) : getCurrentLabel(item.groupName),
children: item.items
}))
});
@ -131,7 +134,9 @@ class SmsSettingDialog extends Component {
{
_.map(children, child => {
const { name, id } = child;
return (<TreeNode title={name} key={id || uuidV4()}/>);
return (<TreeNode
title={name.indexOf("base64") !== -1 ? getCurrentLabel(getMultiStrFromBase64(name)) : getCurrentLabel(name)}
key={id || uuidV4()}/>);
})
}
</TreeNode>;